42 #define ULONG_PTR DWORD
45 #ifndef nsSystemTrayService_h__
46 #define nsSystemTrayService_h__
52 #define _WIN32_WINNT 0x0400
57 #include "nsISystemTrayService.h"
58 #include "imgIDecoderObserver.h"
60 #include "nsIDOMEventListener.h"
62 #include "nsDataHashtable.h"
69 #define NS_SYSTEMTRAYSERVICE_CID \
70 { 0xf53fcefa, 0x2f53, 0x40cf, \
71 { 0xbb, 0xaf, 0x2f, 0x58, 0x96, 0xa5, 0x6e, 0x82 } }
73 #define NS_SYSTEMTRAYSERVICE_CONTRACTID \
74 "@mozilla.org/system-tray-service;1"
76 #define NS_SYSTEMTRAYSERVICE_CLASSNAME "System Tray Service"
78 class nsIDOMAbstractView;
79 class nsIDOMDocumentEvent;
82 class nsIDOMEventTarget;
86 public imgILoad,
public imgIDecoderObserver
90 NS_DECL_NSISYSTEMTRAYSERVICE
91 NS_DECL_IMGICONTAINEROBSERVER
92 NS_DECL_IMGIDECODEROBSERVER
103 nsresult
AddTrayIcon(HWND hwnd, nsIURI* iconURI,
const nsAString& iconId,
104 nsIDOMElement* targetElement);
108 nsIDOMElement* targetElement);
111 static nsresult
CreateEvent(nsIDOMDocumentEvent* documentEvent,
114 const nsAString& typeArg, nsIDOMAbstractView* viewArg, PRInt32 detailArg,
115 PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg,
116 PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg,
117 PRBool shiftKeyArg, PRBool metkeyArg, PRUint16 buttonArg,
137 #endif // nsSystemTrayService_h__
nsCOMPtr< imgIContainer > mImage
NS_DECL_ISUPPORTS NS_DECL_NSISYSTEMTRAYSERVICE nsSystemTrayService()
static const TCHAR * S_PROPPROC
nsresult GetIconForWnd(HWND hwnd, HICON &result)
nsresult CreateListenerWindow(HWND *listenerWindow, nsIDOMElement *targetElement)
static nsresult CreateMouseEvent(nsIDOMDocumentEvent *documentEvent, const nsAString &typeArg, nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg, PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg, PRBool shiftKeyArg, PRBool metkeyArg, PRUint16 buttonArg, nsIDOMEvent **_retval)
nsresult AddTrayIcon(HWND hwnd, nsIURI *iconURI, const nsAString &iconId, nsIDOMElement *targetElement)
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
nsDataHashtable< nsStringHashKey, NOTIFYICONDATAW > mIconDataMap
nsresult GetDOMWindow(nsIXULWindow *xulWindow, nsIDOMWindow **_retval)
nsresult GetIconForURI(nsIURI *iconURI, HICON &result)
static const TCHAR * S_PROPINST
static nsresult CreateEvent(nsIDOMDocumentEvent *documentEvent, const nsAString &typeArg, nsIDOMEvent **_retval)