xref: /reactos/dll/shellext/stobject/precomp.h (revision 8a978a17)
1 #ifndef _STOBJECT_PRECOMP_H_
2 #define _STOBJECT_PRECOMP_H_
3 
4 #define WIN32_NO_STATUS
5 #include <stdarg.h>
6 #include <tchar.h>
7 
8 #define COBJMACROS
9 #define WIN32_NO_STATUS
10 #define _INC_WINDOWS
11 #define COM_NO_WINDOWS_H
12 #define NTOS_MODE_USER
13 
14 #include <windef.h>
15 #include <winbase.h>
16 #include <shlguid_undoc.h>
17 #include <shlobj.h>
18 #include <strsafe.h>
19 #include <atlbase.h>
20 #include <atlcom.h>
21 #include <atlwin.h>
22 #include <atlstr.h>
23 #include <setupapi.h>
24 #include <shellapi.h>
25 
26 #include <wine/debug.h>
27 WINE_DEFAULT_DEBUG_CHANNEL(stobject);
28 
29 #include "resource.h"
30 
31 extern HINSTANCE g_hInstance;
32 
33 #define ID_ICON_VOLUME  (WM_APP + 0x4CB)
34 #define ID_ICON_HOTPLUG (WM_APP + 0x4CC)
35 #define ID_ICON_POWER   (WM_APP + 0x4CD)
36 
37 #define POWER_SERVICE_FLAG    0x00000001
38 #define HOTPLUG_SERVICE_FLAG  0x00000002
39 #define VOLUME_SERVICE_FLAG   0x00000004
40 
41 #include "csystray.h"
42 
43 typedef HRESULT(STDMETHODCALLTYPE * PFNSTINIT)     (_In_ CSysTray * pSysTray);
44 typedef HRESULT(STDMETHODCALLTYPE * PFNSTSHUTDOWN) (_In_ CSysTray * pSysTray);
45 typedef HRESULT(STDMETHODCALLTYPE * PFNSTUPDATE)   (_In_ CSysTray * pSysTray);
46 typedef HRESULT(STDMETHODCALLTYPE * PFNSTMESSAGE)  (_In_ CSysTray * pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult);
47 
48 struct SysTrayIconHandlers_t
49 {
50     DWORD            dwServiceFlag;
51     PFNSTINIT        pfnInit;
52     PFNSTSHUTDOWN    pfnShutdown;
53     PFNSTUPDATE      pfnUpdate;
54     PFNSTMESSAGE     pfnMessage;
55 };
56 
57 extern SysTrayIconHandlers_t g_IconHandlers[];
58 extern const int g_NumIcons;
59 
60 /* --------------- Icon callbacks ------------------------------ */
61 
62 extern HRESULT STDMETHODCALLTYPE Volume_Init(_In_ CSysTray * pSysTray);
63 extern HRESULT STDMETHODCALLTYPE Volume_Shutdown(_In_ CSysTray * pSysTray);
64 extern HRESULT STDMETHODCALLTYPE Volume_Update(_In_ CSysTray * pSysTray);
65 extern HRESULT STDMETHODCALLTYPE Volume_Message(_In_ CSysTray * pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult);
66 
67 extern HRESULT STDMETHODCALLTYPE Hotplug_Init(_In_ CSysTray * pSysTray);
68 extern HRESULT STDMETHODCALLTYPE Hotplug_Shutdown(_In_ CSysTray * pSysTray);
69 extern HRESULT STDMETHODCALLTYPE Hotplug_Update(_In_ CSysTray * pSysTray);
70 extern HRESULT STDMETHODCALLTYPE Hotplug_Message(_In_ CSysTray * pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult);
71 
72 extern HRESULT STDMETHODCALLTYPE Power_Init(_In_ CSysTray * pSysTray);
73 extern HRESULT STDMETHODCALLTYPE Power_Shutdown(_In_ CSysTray * pSysTray);
74 extern HRESULT STDMETHODCALLTYPE Power_Update(_In_ CSysTray * pSysTray);
75 extern HRESULT STDMETHODCALLTYPE Power_Message(_In_ CSysTray * pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult);
76 
77 #define POWER_TIMER_ID   2
78 #define VOLUME_TIMER_ID  3
79 #define HOTPLUG_TIMER_ID 4
80 #define HOTPLUG_DEVICE_TIMER_ID 5
81 
82 #endif /* _STOBJECT_PRECOMP_H_ */
83