diff options
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 01547ed83..3f63b56fb 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 aab36cc75..efccca531 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) |