strmbase: Move run_event to the strmbase_renderer structure.
[wine.git] / include / powrprof.h
blob318188e465e50c0da60e45bdb5f37e80f6bfd59c
1 /*
2 * Copyright (C) 2005 Benjamin Cutler
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_POWRPROF_H
20 #define __WINE_POWRPROF_H 1
22 #define EnableSysTrayBatteryMeter 0x01
23 #define EnableMultiBatteryDisplay 0x02
24 #define EnablePasswordLogon 0x04
25 #define EnableWakeOnRing 0x08
26 #define EnableVideoDimDisplay 0x10
28 typedef struct _GLOBAL_MACHINE_POWER_POLICY {
29 ULONG Revision;
30 SYSTEM_POWER_STATE LidOpenWakeAc;
31 SYSTEM_POWER_STATE LidOpenWakeDc;
32 ULONG BroadcastCapacityResolution;
33 } GLOBAL_MACHINE_POWER_POLICY,
34 *PGLOBAL_MACHINE_POWER_POLICY;
36 typedef struct _GLOBAL_USER_POWER_POLICY {
37 ULONG Revision;
38 POWER_ACTION_POLICY PowerButtonAc;
39 POWER_ACTION_POLICY PowerButtonDc;
40 POWER_ACTION_POLICY SleepButtonAc;
41 POWER_ACTION_POLICY SleepButtonDc;
42 POWER_ACTION_POLICY LidCloseAc;
43 POWER_ACTION_POLICY LidCloseDc;
44 SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
45 ULONG GlobalFlags;
46 } GLOBAL_USER_POWER_POLICY,
47 *PGLOBAL_USER_POWER_POLICY;
49 typedef struct _GLOBAL_POWER_POLICY {
50 GLOBAL_USER_POWER_POLICY user;
51 GLOBAL_MACHINE_POWER_POLICY mach;
52 } GLOBAL_POWER_POLICY,
53 *PGLOBAL_POWER_POLICY;
55 typedef struct _MACHINE_POWER_POLICY {
56 ULONG Revision;
57 SYSTEM_POWER_STATE MinSleepAc;
58 SYSTEM_POWER_STATE MinSleepDc;
59 SYSTEM_POWER_STATE ReducedLatencySleepAc;
60 SYSTEM_POWER_STATE ReducedLatencySleepDc;
61 ULONG DozeTimeoutAc;
62 ULONG DozeTimeoutDc;
63 ULONG DozeS4TimeoutAc;
64 ULONG DozeS4TimeoutDc;
65 UCHAR MinThrottleAc;
66 UCHAR MinThrottleDc;
67 UCHAR pad1[2];
68 POWER_ACTION_POLICY OverThrottledAc;
69 POWER_ACTION_POLICY OverThrottledDc;
70 } MACHINE_POWER_POLICY,
71 *PMACHINE_POWER_POLICY;
73 typedef struct _MACHINE_PROCESSOR_POWER_POLICY {
74 ULONG Revision;
75 PROCESSOR_POWER_POLICY ProcessorPolicyAc;
76 PROCESSOR_POWER_POLICY ProcessorPolicyDc;
77 } MACHINE_PROCESSOR_POWER_POLICY,
78 *PMACHINE_PROCESSOR_POWER_POLICY;
80 typedef struct _USER_POWER_POLICY {
81 ULONG Revision;
82 POWER_ACTION_POLICY IdleAc;
83 POWER_ACTION_POLICY IdleDc;
84 ULONG IdleTimeoutAc;
85 ULONG IdleTimeoutDc;
86 UCHAR IdleSensitivityAc;
87 UCHAR IdleSensitivityDc;
88 UCHAR ThrottlePolicyAc;
89 UCHAR ThrottlePolicyDc;
90 SYSTEM_POWER_STATE MaxSleepAc;
91 SYSTEM_POWER_STATE MaxSleepDc;
92 ULONG Reserved[2];
93 ULONG VideoTimeoutAc;
94 ULONG VideoTimeoutDc;
95 ULONG SpindownTimeoutAc;
96 ULONG SpindownTimeoutDc;
97 BOOLEAN OptimizeForPowerAc;
98 BOOLEAN OptimizeForPowerDc;
99 UCHAR FanThrottleToleranceAc;
100 UCHAR FanThrottleToleranceDc;
101 UCHAR ForcedThrottleAc;
102 UCHAR ForcedThrottleDc;
103 } USER_POWER_POLICY,
104 *PUSER_POWER_POLICY;
106 typedef struct _POWER_POLICY {
107 USER_POWER_POLICY user;
108 MACHINE_POWER_POLICY mach;
109 } POWER_POLICY,
110 *PPOWER_POLICY;
112 typedef enum _POWER_DATA_ACCESSOR {
113 ACCESS_AC_POWER_SETTING_INDEX,
114 ACCESS_DC_POWER_SETTING_INDEX,
115 ACCESS_FRIENDLY_NAME,
116 ACCESS_DESCRIPTION,
117 ACCESS_POSSIBLE_POWER_SETTING,
118 ACCESS_POSSIBLE_POWER_SETTING_FRIENDLY_NAME,
119 ACCESS_POSSIBLE_POWER_SETTING_DESCRIPTION,
120 ACCESS_DEFAULT_AC_POWER_SETTING,
121 ACCESS_DEFAULT_DC_POWER_SETTING,
122 ACCESS_POSSIBLE_VALUE_MIN,
123 ACCESS_POSSIBLE_VALUE_MAX,
124 ACCESS_POSSIBLE_VALUE_INCREMENT,
125 ACCESS_POSSIBLE_VALUE_UNITS,
126 ACCESS_ICON_RESOURCE,
127 ACCESS_DEFAULT_SECURITY_DESCRIPTOR,
128 ACCESS_ATTRIBUTES,
129 ACCESS_SCHEME,
130 ACCESS_SUBGROUP,
131 ACCESS_INDIVIDUAL_SETTING,
132 ACCESS_ACTIVE_SCHEME,
133 ACCESS_CREATE_SCHEME,
134 ACCESS_AC_POWER_SETTING_MAX,
135 ACCESS_DC_POWER_SETTING_MAX,
136 ACCESS_AC_POWER_SETTING_MIN,
137 ACCESS_DC_POWER_SETTING_MIN,
138 ACCESS_PROFILE,
139 ACCESS_OVERLAY_SCHEME,
140 ACCESS_ACTIVE_OVERLAY_SCHEME,
141 } POWER_DATA_ACCESSOR, *PPOWER_DATA_ACCESSOR;
143 #ifdef __cplusplus
144 extern "C" {
145 #endif
147 typedef BOOLEAN (CALLBACK* PWRSCHEMESENUMPROC)(UINT, DWORD, LPWSTR, DWORD, LPWSTR, PPOWER_POLICY, LPARAM);
149 NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);
150 BOOLEAN WINAPI CanUserWritePwrScheme(VOID);
151 BOOLEAN WINAPI DeletePwrScheme(UINT);
152 BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC, LPARAM);
153 BOOLEAN WINAPI GetActivePwrScheme(PUINT);
154 BOOLEAN WINAPI GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
155 BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES);
156 BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT, PUINT);
157 BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY);
158 BOOLEAN WINAPI IsPwrHibernateAllowed(VOID);
159 BOOLEAN WINAPI IsPwrShutdownAllowed(VOID);
160 BOOLEAN WINAPI IsPwrSuspendAllowed(VOID);
161 DWORD WINAPI PowerEnumerate(HKEY, const GUID *, const GUID *, POWER_DATA_ACCESSOR, ULONG, UCHAR *, DWORD *);
162 BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
163 BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
164 BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);
165 BOOLEAN WINAPI SetActivePwrScheme(UINT, PGLOBAL_POWER_POLICY, PPOWER_POLICY);
166 BOOLEAN WINAPI SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN);
167 BOOLEAN WINAPI WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
168 BOOLEAN WINAPI WriteProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
169 BOOLEAN WINAPI WritePwrScheme(PUINT, LPWSTR, LPWSTR, PPOWER_POLICY);
171 /* Power scheme */
172 POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRole(void);
174 #ifdef __cplusplus
176 #endif
178 #endif /* _POWRPROF_H */