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

This commit is contained in:
Amine Khaldi 2017-12-08 23:15:31 +01:00
parent 6429bfcd8f
commit e15874b491
8 changed files with 26 additions and 40 deletions

View file

@ -20,13 +20,17 @@ spec2def(stobject.dll stobject.spec)
file(GLOB_RECURSE stobject_rc_deps resources/*.*)
add_rc_deps(stobject.rc ${stobject_rc_deps})
add_library(stobject SHARED
list(APPEND SOURCE
csystray.cpp
stobject.cpp
stobject.rc
hotplug.cpp
power.cpp
volume.cpp
precomp.h)
add_library(stobject SHARED
${SOURCE}
stobject.rc
${CMAKE_CURRENT_BINARY_DIR}/stobject.def)
set_module_type(stobject win32dll UNICODE)
@ -48,4 +52,5 @@ add_importlibs(stobject
kernel32
ntdll)
add_pch(stobject precomp.h SOURCE)
add_cd_file(TARGET stobject DESTINATION reactos/system32 FOR all)

View file

@ -9,7 +9,8 @@
#include "precomp.h"
WINE_DEFAULT_DEBUG_CHANNEL(stobject);
#include <undocshell.h>
#include <shellutils.h>
SysTrayIconHandlers_t g_IconHandlers [] = {
{ Volume_Init, Volume_Shutdown, Volume_Update, Volume_Message },

View file

@ -7,6 +7,7 @@
* David Quintana <gigaherz@gmail.com>
* Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
*/
#pragma once
extern const GUID CLSID_SysTray;

View file

@ -5,17 +5,14 @@
* PURPOSE: Removable devices notification icon handler
* PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
*/
#include <windows.h>
#include "precomp.h"
#include <mmsystem.h>
#include <mmddk.h>
#include <atlstr.h>
#include <atlsimpcoll.h>
#include <dbt.h>
#include <setupapi.h>
#include <cfgmgr32.h>
#include <shlwapi.h>
WINE_DEFAULT_DEBUG_CHANNEL(stobject);
#define DISPLAY_NAME_LEN 40
//BOOL WINAPI UnregisterDeviceNotification(HDEVNOTIFY Handle);

View file

@ -8,23 +8,17 @@
* David Quintana <gigaherz@gmail.com>
*/
#include <windows.h>
#include <setupapi.h>
#include <devguid.h>
#include <batclass.h>
#include "precomp.h"
#include "powrprof.h"
#include <mmsystem.h>
#include <mmddk.h>
#include <atlstr.h>
#include <devguid.h>
#include <winioctl.h>
#include <powrprof.h>
#include <windows.h>
#include <batclass.h>
#define GBS_HASBATTERY 0x1
#define GBS_ONBATTERY 0x2
WINE_DEFAULT_DEBUG_CHANNEL(stobject);
int br_icons[5] = { IDI_BATTCAP0, IDI_BATTCAP1, IDI_BATTCAP2, IDI_BATTCAP3, IDI_BATTCAP4 }; // battery mode icons.
int bc_icons[5] = { IDI_BATTCHA0, IDI_BATTCHA1, IDI_BATTCHA2, IDI_BATTCHA3, IDI_BATTCHA4 }; // charging mode icons.

View file

@ -1,4 +1,5 @@
#pragma once
#ifndef _STOBJECT_PRECOMP_H_
#define _STOBJECT_PRECOMP_H_
#define WIN32_NO_STATUS
#include <stdarg.h>
@ -12,27 +13,18 @@
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <winuser.h>
#include <wincon.h>
#include <ddeml.h>
#include <shlguid_undoc.h>
#include <shlwapi.h>
#include <shlobj.h>
#include <shlobj_undoc.h>
#include <shlwapi_undoc.h>
#include <tchar.h>
#include <strsafe.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <undocshell.h>
#include <shellutils.h>
#include <atlstr.h>
#include <setupapi.h>
#include <shellapi.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(stobject);
#include "resource.h"
@ -82,4 +74,6 @@ extern HRESULT STDMETHODCALLTYPE Power_Message(_In_ CSysTray * pSysTray, UINT uM
#define POWER_TIMER_ID 2
#define VOLUME_TIMER_ID 3
#define HOTPLUG_TIMER_ID 4
#define HOTPLUG_TIMER_ID 4
#endif /* _STOBJECT_PRECOMP_H_ */

View file

@ -9,9 +9,6 @@
#include "precomp.h"
#include <olectl.h>
#include <atlwin.h>
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_SysTray, CSysTray)
END_OBJECT_MAP()

View file

@ -8,11 +8,8 @@
#include "precomp.h"
#include <mmsystem.h>
#include <mmddk.h>
WINE_DEFAULT_DEBUG_CHANNEL(stobject);
HICON g_hIconVolume;
HICON g_hIconMute;