source: Daodan/MinGW/include/powrprof.h@ 1112

Last change on this file since 1112 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 4.2 KB
Line 
1#ifndef _POWRPROF_H
2#define _POWRPROF_H
3#if __GNUC__ >= 3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define EnableMultiBatteryDisplay 2
12#define EnablePasswordLogon 4
13#define EnableSysTrayBatteryMeter 1
14#define EnableWakeOnRing 8
15#define EnableVideoDimDisplay 16
16#define NEWSCHEME (UINT)-1
17
18#ifndef RC_INVOKED
19#include <ntdef.h> /* for NTSTATUS */
20typedef struct _GLOBAL_MACHINE_POWER_POLICY{
21 ULONG Revision;
22 SYSTEM_POWER_STATE LidOpenWakeAc;
23 SYSTEM_POWER_STATE LidOpenWakeDc;
24 ULONG BroadcastCapacityResolution;
25} GLOBAL_MACHINE_POWER_POLICY, *PGLOBAL_MACHINE_POWER_POLICY;
26typedef struct _GLOBAL_USER_POWER_POLICY{
27 ULONG Revision;
28 POWER_ACTION_POLICY PowerButtonAc;
29 POWER_ACTION_POLICY PowerButtonDc;
30 POWER_ACTION_POLICY SleepButtonAc;
31 POWER_ACTION_POLICY SleepButtonDc;
32 POWER_ACTION_POLICY LidCloseAc;
33 POWER_ACTION_POLICY LidCloseDc;
34 SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
35 ULONG GlobalFlags;
36} GLOBAL_USER_POWER_POLICY, *PGLOBAL_USER_POWER_POLICY;
37typedef struct _GLOBAL_POWER_POLICY{
38 GLOBAL_USER_POWER_POLICY user;
39 GLOBAL_MACHINE_POWER_POLICY mach;
40} GLOBAL_POWER_POLICY, *PGLOBAL_POWER_POLICY;
41typedef struct _MACHINE_POWER_POLICY{
42 ULONG Revision;
43 SYSTEM_POWER_STATE MinSleepAc;
44 SYSTEM_POWER_STATE MinSleepDc;
45 SYSTEM_POWER_STATE ReducedLatencySleepAc;
46 SYSTEM_POWER_STATE ReducedLatencySleepDc;
47 ULONG DozeTimeoutAc;
48 ULONG DozeTimeoutDc;
49 ULONG DozeS4TimeoutAc;
50 ULONG DozeS4TimeoutDc;
51 UCHAR MinThrottleAc;
52 UCHAR MinThrottleDc;
53 UCHAR pad1[2];
54 POWER_ACTION_POLICY OverThrottledAc;
55 POWER_ACTION_POLICY OverThrottledDc;
56} MACHINE_POWER_POLICY, *PMACHINE_POWER_POLICY;
57typedef struct _MACHINE_PROCESSOR_POWER_POLICY {
58 ULONG Revision;
59 PROCESSOR_POWER_POLICY ProcessorPolicyAc;
60 PROCESSOR_POWER_POLICY ProcessorPolicyDc;
61} MACHINE_PROCESSOR_POWER_POLICY, *PMACHINE_PROCESSOR_POWER_POLICY;
62typedef struct _USER_POWER_POLICY{
63 ULONG Revision;
64 POWER_ACTION_POLICY IdleAc;
65 POWER_ACTION_POLICY IdleDc;
66 ULONG IdleTimeoutAc;
67 ULONG IdleTimeoutDc;
68 UCHAR IdleSensitivityAc;
69 UCHAR IdleSensitivityDc;
70 UCHAR ThrottlePolicyAc;
71 UCHAR ThrottlePolicyDc;
72 SYSTEM_POWER_STATE MaxSleepAc;
73 SYSTEM_POWER_STATE MaxSleepDc;
74 ULONG Reserved[2];
75 ULONG VideoTimeoutAc;
76 ULONG VideoTimeoutDc;
77 ULONG SpindownTimeoutAc;
78 ULONG SpindownTimeoutDc;
79 BOOLEAN OptimizeForPowerAc;
80 BOOLEAN OptimizeForPowerDc;
81 UCHAR FanThrottleToleranceAc;
82 UCHAR FanThrottleToleranceDc;
83 UCHAR ForcedThrottleAc;
84 UCHAR ForcedThrottleDc;
85} USER_POWER_POLICY, *PUSER_POWER_POLICY;
86typedef struct _POWER_POLICY{
87 USER_POWER_POLICY user;
88 MACHINE_POWER_POLICY mach;
89} POWER_POLICY, *PPOWER_POLICY;
90typedef BOOLEAN (CALLBACK* PWRSCHEMESENUMPROC)(UINT, DWORD, LPTSTR, DWORD, LPTSTR, PPOWER_POLICY, LPARAM);
91typedef BOOLEAN (CALLBACK* PFNNTINITIATEPWRACTION)(POWER_ACTION, SYSTEM_POWER_STATE, ULONG, BOOLEAN);
92NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);
93BOOLEAN WINAPI CanUserWritePwrScheme(VOID);
94BOOLEAN WINAPI DeletePwrScheme(UINT);
95BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC, LPARAM);
96BOOLEAN WINAPI GetActivePwrScheme(PUINT);
97BOOLEAN WINAPI GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
98BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES);
99BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT, PUINT);
100BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY);
101BOOLEAN WINAPI IsPwrHibernateAllowed(VOID);
102BOOLEAN WINAPI IsPwrShutdownAllowed(VOID);
103BOOLEAN WINAPI IsPwrSuspendAllowed(VOID);
104BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
105BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
106BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);
107BOOLEAN WINAPI SetActivePwrScheme(UINT, PGLOBAL_POWER_POLICY, PPOWER_POLICY);
108BOOLEAN WINAPI SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN);
109BOOLEAN WINAPI WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
110BOOLEAN WINAPI WriteProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
111BOOLEAN WINAPI ValidatePowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
112BOOLEAN WINAPI WritePwrScheme(PUINT, LPTSTR, LPTSTR, PPOWER_POLICY);
113
114#endif /* RC_INVOKED */
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif /* _POWRPROF_H */
Note: See TracBrowser for help on using the repository browser.