2008-01-29 Brandon Sneed <nivenh@sourceware.org>

* include/winnt.h (SYSTEM_POWER_CONDITION): typedef.
	* include/winuser.h (PBT_POWERSETTINGCHANGE, DEVICE_NOTIFY_WINDOW_HANDLE,
	DEVICE_NOTIFY_SERVICE_HANDLE): define.
	* include/winuser.h (LPCGUID, HPOWERNOTIFY, POWERBROADCAST_SETTING): typedefs.
	* include/winuser.h (GUID_POWERSCHEME_PERSONALITY, GUID_MIN_POWER_SAVINGS,
	GUID_MAX_POWER_SAVINGS, GUID_TYPICAL_POWER_SAVINGS, GUID_ACDC_POWER_SOURCE,
	GUID_BATTERY_PERCENTAGE_REMAINING, GUID_IDLE_BACKGROUND_TASK,
	GUID_SYSTEM_AWAYMODE, GUID_MONITOR_POWER_ON): added externs for GUIDs.
	* include/winuser.h (RegisterPowerSettingNotification,
	UnregisterPowerSettingNotification): Add prototypes.
	* lib/user32.def: Added imports for the above prototypes.
	* lib/Makefile.in: Added build support for power-uuid.c.
	* lib/power-uuid.c: New file containing power GUID definitions.
This commit is contained in:
Brandon Sneed
2008-01-29 21:18:49 +00:00
parent 458430dc16
commit e917b0bc44
6 changed files with 85 additions and 3 deletions

View File

@ -126,7 +126,7 @@ UUID_OBJS = mshtml-uuid.o msxml-uuid.o unknwn-uuid.o \
objsafe-uuid.o oaidl-uuid.o docobj-uuid.o comcat-uuid.o \
exdisp-uuid.o mlang-uuid.o objidl-uuid.o cguid-uuid.o \
olectlid-uuid.o ativscp-uuid.o urlmon-uuid.o hlink-uuid.o \
hlguids-uuid.o extras-uuid.o devguid.o
hlguids-uuid.o extras-uuid.o devguid.o power-uuid.o
EXTRA_OBJS = shell32.o scrnsave.o scrnsavw.o largeint.o \
$(UUID_OBJS) ws2_32.o
UUID_SOURCES = mshtml-uuid.c msxml-uuid.c unknwn-uuid.c \
@ -134,7 +134,7 @@ UUID_SOURCES = mshtml-uuid.c msxml-uuid.c unknwn-uuid.c \
objsafe-uuid.c oaidl-uuid.c docobj-uuid.c comcat-uuid.c \
exdisp-uuid.c mlang-uuid.c objidl-uuid.c cguid-uuid.c \
olectlid-uuid.c ativscp-uuid.c urlmon-uuid.c hlink-uuid.c \
hlguids-uuid.c extras-uuid.c devguid.c
hlguids-uuid.c extras-uuid.c devguid.c power-uuid.c
SOURCES = scrnsave.c shell32.c largeint.c $(UUID_SOURCES)\
res.rc test.c ws2_32.c

View File

@ -0,0 +1,18 @@
/* power-uuid.c */
/* Generate GUIDs for OLE Accessibility interfaces */
/* All IIDs defined in this file were found at "Registering for Power Events" on MSDN here:
* http://msdn2.microsoft.com/en-us/library/aa373195.aspx
*/
#define INITGUID
#include <basetyps.h>
DEFINE_GUID(GUID_POWERSCHEME_PERSONALITY, 0x245d8541, 0x3943, 0x4422, 0xb0, 0x25, 0x13, 0xA7, 0x84, 0xF6, 0x79, 0xB7);
DEFINE_GUID(GUID_MIN_POWER_SAVINGS, 0x8c5e7fda, 0xe8bf, 0x4a96, 0x9a, 0x85, 0xa6, 0xe2, 0x3a, 0x8c, 0x63, 0x5c);
DEFINE_GUID(GUID_MAX_POWER_SAVINGS, 0xa1841308, 0x3541, 0x4fab, 0xbc, 0x81, 0xf7, 0x15, 0x56, 0xf2, 0x0b, 0x4a);
DEFINE_GUID(GUID_TYPICAL_POWER_SAVINGS, 0x381b4222, 0xf694, 0x41f0, 0x96, 0x85, 0xff, 0x5b, 0xb2, 0x60, 0xdf, 0x2e);
DEFINE_GUID(GUID_ACDC_POWER_SOURCE, 0x5d3e9a59, 0xe9D5, 0x4b00, 0xa6, 0xbd, 0xff, 0x34, 0xff, 0x51, 0x65, 0x48);
DEFINE_GUID(GUID_BATTERY_PERCENTAGE_REMAINING, 0xa7ad8041, 0xb45a, 0x4cae, 0x87, 0xa3, 0xee, 0xcb, 0xb4, 0x68, 0xa9, 0xe1);
DEFINE_GUID(GUID_IDLE_BACKGROUND_TASK, 0x515c31d8, 0xf734, 0x163d, 0xa0, 0xfd, 0x11, 0xa0, 0x8c, 0x91, 0xe8, 0xf1);
DEFINE_GUID(GUID_SYSTEM_AWAYMODE, 0x98a7f580, 0x01f7, 0x48aa, 0x9c, 0x0f, 0x44, 0x35, 0x2c, 0x29, 0xe5, 0xC0);
DEFINE_GUID(GUID_MONITOR_POWER_ON, 0x02731015, 0x4510, 0x4526, 0x99, 0xe6, 0xe5, 0xa1, 0x7e, 0xbd, 0x1a, 0xea);

View File

@ -484,6 +484,7 @@ RegisterClipboardFormatA@4
RegisterClipboardFormatW@4
RegisterDeviceNotificationA@12
RegisterDeviceNotificationW@12
RegisterPowerSettingNotification@12
RegisterHotKey@16
RegisterRawInputDevices@12
RegisterWindowMessageA@4
@ -613,6 +614,7 @@ UnpackDDElParam@16
UnregisterClassA@8
UnregisterClassW@8
UnregisterDeviceNotification@4
UnregisterPowerSettingNotification@4
UnregisterHotKey@8
UpdateLayeredWindow@36
UpdateWindow@4