diff options
author | Brandon Sneed <nivenh@sourceware.org> | 2008-01-29 21:18:49 +0000 |
---|---|---|
committer | Brandon Sneed <nivenh@sourceware.org> | 2008-01-29 21:18:49 +0000 |
commit | e917b0bc44e45f1e0a78ccda051cd5d40dca20a6 (patch) | |
tree | 04cec0bfb43c08d66d022943a9f2a5a979698538 /winsup/w32api/include | |
parent | 458430dc16ded7ec0f6e249645bda48cc76d2c63 (diff) | |
download | newlib-e917b0bc44e45f1e0a78ccda051cd5d40dca20a6.zip newlib-e917b0bc44e45f1e0a78ccda051cd5d40dca20a6.tar.gz newlib-e917b0bc44e45f1e0a78ccda051cd5d40dca20a6.tar.bz2 |
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.
Diffstat (limited to 'winsup/w32api/include')
-rw-r--r-- | winsup/w32api/include/winnt.h | 9 | ||||
-rw-r--r-- | winsup/w32api/include/winuser.h | 38 |
2 files changed, 46 insertions, 1 deletions
diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h index 01547ed..3f63b56 100644 --- a/winsup/w32api/include/winnt.h +++ b/winsup/w32api/include/winnt.h @@ -3545,6 +3545,15 @@ typedef enum { PowerActionWarmEject } POWER_ACTION, *PPOWER_ACTION; +#if (_WIN32_WINNT >= 0x0600) +typedef enum { + PoAc = 0, + PoDc = 1, + PoHot = 2, + PoConditionMaximum = 3 +} SYSTEM_POWER_CONDITION, *PSYSTEM_POWER_CONDITION; +#endif + typedef enum _DEVICE_POWER_STATE { PowerDeviceUnspecified, PowerDeviceD0, diff --git a/winsup/w32api/include/winuser.h b/winsup/w32api/include/winuser.h index aab36cc..efccca5 100644 --- a/winsup/w32api/include/winuser.h +++ b/winsup/w32api/include/winuser.h @@ -1100,9 +1100,11 @@ extern "C" { #define PBT_APMPOWERSTATUSCHANGE 10 #define PBT_APMOEMEVENT 11 #define PBT_APMRESUMEAUTOMATIC 18 - #define PBTF_APMRESUMEFROMFAILURE 1 #endif +#if (_WIN32_WINNT >= 0x0600) +#define PBT_POWERSETTINGCHANGE 32787 +#endif /* end pbt.h */ #define PM_NOREMOVE 0 @@ -3367,7 +3369,35 @@ typedef struct { (p).y=HIWORD(*(DWORD *)&ps); \ } #define POINTTOPOINTS(p) ((POINTS)MAKELONG((p).x,(p).y)) + +#ifndef _LPCGUID_DEFINED +#define _LPCGUID_DEFINED +typedef const GUID *LPCGUID; +#endif + +#if (_WIN32_WINNT >= 0x0600) +#define DEVICE_NOTIFY_WINDOW_HANDLE 0 +#define DEVICE_NOTIFY_SERVICE_HANDLE 1 + +typedef HANDLE HPOWERNOTIFY; + +typedef struct { + GUID PowerSetting; + DWORD DataLength; + UCHAR Data[1]; +} POWERBROADCAST_SETTING, *PPOWERBROADCAST_SETTING; +extern const GUID GUID_POWERSCHEME_PERSONALITY; +extern const GUID GUID_MIN_POWER_SAVINGS; +extern const GUID GUID_MAX_POWER_SAVINGS; +extern const GUID GUID_TYPICAL_POWER_SAVINGS; +extern const GUID GUID_ACDC_POWER_SOURCE; +extern const GUID GUID_BATTERY_PERCENTAGE_REMAINING; +extern const GUID GUID_IDLE_BACKGROUND_TASK; +extern const GUID GUID_SYSTEM_AWAYMODE; +extern const GUID GUID_MONITOR_POWER_ON; +#endif + WINUSERAPI HKL WINAPI ActivateKeyboardLayout(HKL,UINT); WINUSERAPI BOOL WINAPI AdjustWindowRect(LPRECT,DWORD,BOOL); WINUSERAPI BOOL WINAPI AdjustWindowRectEx(LPRECT,DWORD,BOOL,DWORD); @@ -3890,6 +3920,9 @@ WINUSERAPI UINT WINAPI RegisterClipboardFormatW(LPCWSTR); WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE,LPVOID,DWORD); WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE,LPVOID,DWORD); #endif +#if (_WIN32_WINNT >= 0x0600) +WINUSERAPI HPOWERNOTIFY WINAPI RegisterPowerSettingNotification(HANDLE,LPCGUID,DWORD); +#endif WINUSERAPI BOOL WINAPI RegisterHotKey(HWND,int,UINT,UINT); #if (_WIN32_WINNT >= 0x0501) WINUSERAPI BOOL WINAPI RegisterRawInputDevices(PCRAWINPUTDEVICE,UINT,UINT); @@ -4037,6 +4070,9 @@ WINUSERAPI BOOL WINAPI UnregisterClassW(LPCWSTR,HINSTANCE); #if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) WINUSERAPI BOOL WINAPI UnregisterDeviceNotification(HANDLE); #endif +#if (_WIN32_WINNT >= 0x0600) +WINUSERAPI BOOL WINAPI UnregisterPowerSettingNotification(HPOWERNOTIFY); +#endif WINUSERAPI BOOL WINAPI UnregisterHotKey(HWND,int); WINUSERAPI BOOL WINAPI UpdateWindow(HWND); #if (_WIN32_WINNT >= 0x0500) |