Reactos

[STOBJECT] Improve the existing PCH and make use of it.

+26 -40
+7 -2
dll/shellext/stobject/CMakeLists.txt
··· 20 20 file(GLOB_RECURSE stobject_rc_deps resources/*.*) 21 21 add_rc_deps(stobject.rc ${stobject_rc_deps}) 22 22 23 - add_library(stobject SHARED 23 + list(APPEND SOURCE 24 24 csystray.cpp 25 25 stobject.cpp 26 - stobject.rc 27 26 hotplug.cpp 28 27 power.cpp 29 28 volume.cpp 29 + precomp.h) 30 + 31 + add_library(stobject SHARED 32 + ${SOURCE} 33 + stobject.rc 30 34 ${CMAKE_CURRENT_BINARY_DIR}/stobject.def) 31 35 32 36 set_module_type(stobject win32dll UNICODE) ··· 48 52 kernel32 49 53 ntdll) 50 54 55 + add_pch(stobject precomp.h SOURCE) 51 56 add_cd_file(TARGET stobject DESTINATION reactos/system32 FOR all)
+2 -1
dll/shellext/stobject/csystray.cpp
··· 9 9 10 10 #include "precomp.h" 11 11 12 - WINE_DEFAULT_DEBUG_CHANNEL(stobject); 12 + #include <undocshell.h> 13 + #include <shellutils.h> 13 14 14 15 SysTrayIconHandlers_t g_IconHandlers [] = { 15 16 { Volume_Init, Volume_Shutdown, Volume_Update, Volume_Message },
+1
dll/shellext/stobject/csystray.h
··· 7 7 * David Quintana <gigaherz@gmail.com> 8 8 * Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com> 9 9 */ 10 + 10 11 #pragma once 11 12 12 13 extern const GUID CLSID_SysTray;
+3 -6
dll/shellext/stobject/hotplug.cpp
··· 5 5 * PURPOSE: Removable devices notification icon handler 6 6 * PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com> 7 7 */ 8 - #include <windows.h> 8 + 9 9 #include "precomp.h" 10 - #include <mmsystem.h> 11 - #include <mmddk.h> 12 - #include <atlstr.h> 10 + 13 11 #include <atlsimpcoll.h> 14 12 #include <dbt.h> 15 - #include <setupapi.h> 16 13 #include <cfgmgr32.h> 14 + #include <shlwapi.h> 17 15 18 - WINE_DEFAULT_DEBUG_CHANNEL(stobject); 19 16 #define DISPLAY_NAME_LEN 40 20 17 21 18 //BOOL WINAPI UnregisterDeviceNotification(HDEVNOTIFY Handle);
+5 -11
dll/shellext/stobject/power.cpp
··· 8 8 * David Quintana <gigaherz@gmail.com> 9 9 */ 10 10 11 - #include <windows.h> 12 - #include <setupapi.h> 13 - #include <devguid.h> 14 - #include <batclass.h> 15 - 16 11 #include "precomp.h" 17 - #include "powrprof.h" 18 12 19 - #include <mmsystem.h> 20 - #include <mmddk.h> 21 - #include <atlstr.h> 13 + #include <devguid.h> 14 + #include <winioctl.h> 15 + #include <powrprof.h> 16 + #include <windows.h> 17 + #include <batclass.h> 22 18 23 19 #define GBS_HASBATTERY 0x1 24 20 #define GBS_ONBATTERY 0x2 25 - 26 - WINE_DEFAULT_DEBUG_CHANNEL(stobject); 27 21 28 22 int br_icons[5] = { IDI_BATTCAP0, IDI_BATTCAP1, IDI_BATTCAP2, IDI_BATTCAP3, IDI_BATTCAP4 }; // battery mode icons. 29 23 int bc_icons[5] = { IDI_BATTCHA0, IDI_BATTCHA1, IDI_BATTCHA2, IDI_BATTCHA3, IDI_BATTCHA4 }; // charging mode icons.
+8 -14
dll/shellext/stobject/precomp.h
··· 1 - #pragma once 1 + #ifndef _STOBJECT_PRECOMP_H_ 2 + #define _STOBJECT_PRECOMP_H_ 2 3 3 4 #define WIN32_NO_STATUS 4 5 #include <stdarg.h> ··· 12 13 13 14 #include <windef.h> 14 15 #include <winbase.h> 15 - #include <winreg.h> 16 - #include <winuser.h> 17 - #include <wincon.h> 18 - #include <ddeml.h> 19 16 #include <shlguid_undoc.h> 20 - #include <shlwapi.h> 21 17 #include <shlobj.h> 22 - #include <shlobj_undoc.h> 23 - #include <shlwapi_undoc.h> 24 - #include <tchar.h> 25 18 #include <strsafe.h> 26 19 #include <atlbase.h> 27 20 #include <atlcom.h> 28 21 #include <atlwin.h> 29 - #include <undocshell.h> 30 - #include <shellutils.h> 31 - 22 + #include <atlstr.h> 23 + #include <setupapi.h> 32 24 #include <shellapi.h> 33 25 34 26 #include <wine/debug.h> 35 - #include <wine/unicode.h> 27 + WINE_DEFAULT_DEBUG_CHANNEL(stobject); 36 28 37 29 #include "resource.h" 38 30 ··· 82 74 83 75 #define POWER_TIMER_ID 2 84 76 #define VOLUME_TIMER_ID 3 85 - #define HOTPLUG_TIMER_ID 4 77 + #define HOTPLUG_TIMER_ID 4 78 + 79 + #endif /* _STOBJECT_PRECOMP_H_ */
-3
dll/shellext/stobject/stobject.cpp
··· 9 9 10 10 #include "precomp.h" 11 11 12 - #include <olectl.h> 13 - #include <atlwin.h> 14 - 15 12 BEGIN_OBJECT_MAP(ObjectMap) 16 13 OBJECT_ENTRY(CLSID_SysTray, CSysTray) 17 14 END_OBJECT_MAP()
-3
dll/shellext/stobject/volume.cpp
··· 8 8 9 9 #include "precomp.h" 10 10 11 - #include <mmsystem.h> 12 11 #include <mmddk.h> 13 - 14 - WINE_DEFAULT_DEBUG_CHANNEL(stobject); 15 12 16 13 HICON g_hIconVolume; 17 14 HICON g_hIconMute;