]> git.proxmox.com Git - rustc.git/blob - vendor/windows-sys/src/Windows/Win32/System/Power/mod.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / vendor / windows-sys / src / Windows / Win32 / System / Power / mod.rs
1 #![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)]
2 #[link(name = "windows")]
3 extern "system" {
4 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
5 pub fn CallNtPowerInformation(informationlevel: POWER_INFORMATION_LEVEL, inputbuffer: *const ::core::ffi::c_void, inputbufferlength: u32, outputbuffer: *mut ::core::ffi::c_void, outputbufferlength: u32) -> i32;
6 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
7 #[cfg(feature = "Win32_Foundation")]
8 pub fn CanUserWritePwrScheme() -> super::super::Foundation::BOOLEAN;
9 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
10 #[cfg(feature = "Win32_Foundation")]
11 pub fn DeletePwrScheme(uiid: u32) -> super::super::Foundation::BOOLEAN;
12 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
13 #[cfg(feature = "Win32_Foundation")]
14 pub fn DevicePowerClose() -> super::super::Foundation::BOOLEAN;
15 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
16 #[cfg(feature = "Win32_Foundation")]
17 pub fn DevicePowerEnumDevices(queryindex: u32, queryinterpretationflags: u32, queryflags: u32, preturnbuffer: *mut u8, pbuffersize: *mut u32) -> super::super::Foundation::BOOLEAN;
18 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
19 #[cfg(feature = "Win32_Foundation")]
20 pub fn DevicePowerOpen(debugmask: u32) -> super::super::Foundation::BOOLEAN;
21 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
22 pub fn DevicePowerSetDeviceState(devicedescription: ::windows_sys::core::PCWSTR, setflags: u32, setdata: *const ::core::ffi::c_void) -> u32;
23 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
24 #[cfg(feature = "Win32_Foundation")]
25 pub fn EnumPwrSchemes(lpfn: PWRSCHEMESENUMPROC, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN;
26 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
27 #[cfg(feature = "Win32_Foundation")]
28 pub fn GetActivePwrScheme(puiid: *mut u32) -> super::super::Foundation::BOOLEAN;
29 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
30 #[cfg(feature = "Win32_Foundation")]
31 pub fn GetCurrentPowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLICY, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN;
32 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
33 #[cfg(feature = "Win32_Foundation")]
34 pub fn GetDevicePowerState(hdevice: super::super::Foundation::HANDLE, pfon: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL;
35 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
36 #[cfg(feature = "Win32_Foundation")]
37 pub fn GetPwrCapabilities(lpspc: *mut SYSTEM_POWER_CAPABILITIES) -> super::super::Foundation::BOOLEAN;
38 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
39 #[cfg(feature = "Win32_Foundation")]
40 pub fn GetPwrDiskSpindownRange(puimax: *mut u32, puimin: *mut u32) -> super::super::Foundation::BOOLEAN;
41 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
42 #[cfg(feature = "Win32_Foundation")]
43 pub fn GetSystemPowerStatus(lpsystempowerstatus: *mut SYSTEM_POWER_STATUS) -> super::super::Foundation::BOOL;
44 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
45 #[cfg(feature = "Win32_Foundation")]
46 pub fn IsAdminOverrideActive(papp: *const ADMINISTRATOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
47 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
48 #[cfg(feature = "Win32_Foundation")]
49 pub fn IsPwrHibernateAllowed() -> super::super::Foundation::BOOLEAN;
50 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
51 #[cfg(feature = "Win32_Foundation")]
52 pub fn IsPwrShutdownAllowed() -> super::super::Foundation::BOOLEAN;
53 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
54 #[cfg(feature = "Win32_Foundation")]
55 pub fn IsPwrSuspendAllowed() -> super::super::Foundation::BOOLEAN;
56 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
57 #[cfg(feature = "Win32_Foundation")]
58 pub fn IsSystemResumeAutomatic() -> super::super::Foundation::BOOL;
59 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
60 pub fn PowerCanRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_sys::core::GUID) -> u32;
61 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
62 #[cfg(feature = "Win32_Foundation")]
63 pub fn PowerClearRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL;
64 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
65 #[cfg(feature = "Win32_System_Registry")]
66 pub fn PowerCreatePossibleSetting(rootsystempowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32) -> u32;
67 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`*"]
68 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))]
69 pub fn PowerCreateRequest(context: *const super::Threading::REASON_CONTEXT) -> super::super::Foundation::HANDLE;
70 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
71 #[cfg(feature = "Win32_System_Registry")]
72 pub fn PowerCreateSetting(rootsystempowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u32;
73 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
74 #[cfg(feature = "Win32_System_Registry")]
75 pub fn PowerDeleteScheme(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID) -> u32;
76 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
77 pub fn PowerDeterminePlatformRole() -> POWER_PLATFORM_ROLE;
78 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
79 pub fn PowerDeterminePlatformRoleEx(version: POWER_PLATFORM_ROLE_VERSION) -> POWER_PLATFORM_ROLE;
80 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
81 #[cfg(feature = "Win32_System_Registry")]
82 pub fn PowerDuplicateScheme(rootpowerkey: super::Registry::HKEY, sourceschemeguid: *const ::windows_sys::core::GUID, destinationschemeguid: *mut *mut ::windows_sys::core::GUID) -> u32;
83 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
84 #[cfg(feature = "Win32_System_Registry")]
85 pub fn PowerEnumerate(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, accessflags: POWER_DATA_ACCESSOR, index: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
86 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
87 #[cfg(feature = "Win32_System_Registry")]
88 pub fn PowerGetActiveScheme(userrootpowerkey: super::Registry::HKEY, activepolicyguid: *mut *mut ::windows_sys::core::GUID) -> u32;
89 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
90 #[cfg(feature = "Win32_System_Registry")]
91 pub fn PowerImportPowerScheme(rootpowerkey: super::Registry::HKEY, importfilenamepath: ::windows_sys::core::PCWSTR, destinationschemeguid: *mut *mut ::windows_sys::core::GUID) -> u32;
92 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
93 #[cfg(feature = "Win32_Foundation")]
94 pub fn PowerIsSettingRangeDefined(subkeyguid: *const ::windows_sys::core::GUID, settingguid: *const ::windows_sys::core::GUID) -> super::super::Foundation::BOOLEAN;
95 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"]
96 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))]
97 pub fn PowerOpenSystemPowerKey(phsystempowerkey: *mut super::Registry::HKEY, access: u32, openexisting: super::super::Foundation::BOOL) -> u32;
98 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"]
99 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))]
100 pub fn PowerOpenUserPowerKey(phuserpowerkey: *mut super::Registry::HKEY, access: u32, openexisting: super::super::Foundation::BOOL) -> u32;
101 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
102 #[cfg(feature = "Win32_System_Registry")]
103 pub fn PowerReadACDefaultIndex(rootpowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acdefaultindex: *mut u32) -> u32;
104 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
105 #[cfg(feature = "Win32_System_Registry")]
106 pub fn PowerReadACValue(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
107 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
108 #[cfg(feature = "Win32_System_Registry")]
109 pub fn PowerReadACValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acvalueindex: *mut u32) -> u32;
110 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
111 #[cfg(feature = "Win32_System_Registry")]
112 pub fn PowerReadDCDefaultIndex(rootpowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcdefaultindex: *mut u32) -> u32;
113 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
114 #[cfg(feature = "Win32_System_Registry")]
115 pub fn PowerReadDCValue(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
116 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
117 #[cfg(feature = "Win32_System_Registry")]
118 pub fn PowerReadDCValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcvalueindex: *mut u32) -> u32;
119 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
120 #[cfg(feature = "Win32_System_Registry")]
121 pub fn PowerReadDescription(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
122 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
123 #[cfg(feature = "Win32_System_Registry")]
124 pub fn PowerReadFriendlyName(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
125 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
126 #[cfg(feature = "Win32_System_Registry")]
127 pub fn PowerReadIconResourceSpecifier(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
128 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
129 #[cfg(feature = "Win32_System_Registry")]
130 pub fn PowerReadPossibleDescription(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
131 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
132 #[cfg(feature = "Win32_System_Registry")]
133 pub fn PowerReadPossibleFriendlyName(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
134 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
135 #[cfg(feature = "Win32_System_Registry")]
136 pub fn PowerReadPossibleValue(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
137 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
138 pub fn PowerReadSettingAttributes(subgroupguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u32;
139 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
140 #[cfg(feature = "Win32_System_Registry")]
141 pub fn PowerReadValueIncrement(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueincrement: *mut u32) -> u32;
142 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
143 #[cfg(feature = "Win32_System_Registry")]
144 pub fn PowerReadValueMax(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valuemaximum: *mut u32) -> u32;
145 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
146 #[cfg(feature = "Win32_System_Registry")]
147 pub fn PowerReadValueMin(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueminimum: *mut u32) -> u32;
148 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
149 #[cfg(feature = "Win32_System_Registry")]
150 pub fn PowerReadValueUnitsSpecifier(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
151 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
152 pub fn PowerRegisterForEffectivePowerModeNotifications(version: u32, callback: EFFECTIVE_POWER_MODE_CALLBACK, context: *const ::core::ffi::c_void, registrationhandle: *mut *mut ::core::ffi::c_void) -> ::windows_sys::core::HRESULT;
153 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
154 #[cfg(feature = "Win32_Foundation")]
155 pub fn PowerRegisterSuspendResumeNotification(flags: u32, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut ::core::ffi::c_void) -> u32;
156 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
157 pub fn PowerRemovePowerSetting(powersettingsubkeyguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u32;
158 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
159 pub fn PowerReplaceDefaultPowerSchemes() -> u32;
160 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
161 pub fn PowerReportThermalEvent(event: *const THERMAL_EVENT) -> u32;
162 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
163 pub fn PowerRestoreDefaultPowerSchemes() -> u32;
164 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
165 pub fn PowerRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_sys::core::GUID) -> u32;
166 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
167 #[cfg(feature = "Win32_System_Registry")]
168 pub fn PowerSetActiveScheme(userrootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID) -> u32;
169 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
170 #[cfg(feature = "Win32_Foundation")]
171 pub fn PowerSetRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL;
172 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
173 pub fn PowerSettingAccessCheck(accessflags: POWER_DATA_ACCESSOR, powerguid: *const ::windows_sys::core::GUID) -> u32;
174 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
175 #[cfg(feature = "Win32_System_Registry")]
176 pub fn PowerSettingAccessCheckEx(accessflags: POWER_DATA_ACCESSOR, powerguid: *const ::windows_sys::core::GUID, accesstype: super::Registry::REG_SAM_FLAGS) -> u32;
177 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
178 #[cfg(feature = "Win32_Foundation")]
179 pub fn PowerSettingRegisterNotification(settingguid: *const ::windows_sys::core::GUID, flags: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut ::core::ffi::c_void) -> u32;
180 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
181 pub fn PowerSettingUnregisterNotification(registrationhandle: HPOWERNOTIFY) -> u32;
182 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
183 pub fn PowerUnregisterFromEffectivePowerModeNotifications(registrationhandle: *const ::core::ffi::c_void) -> ::windows_sys::core::HRESULT;
184 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
185 pub fn PowerUnregisterSuspendResumeNotification(registrationhandle: HPOWERNOTIFY) -> u32;
186 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
187 #[cfg(feature = "Win32_System_Registry")]
188 pub fn PowerWriteACDefaultIndex(rootsystempowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, defaultacindex: u32) -> u32;
189 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
190 #[cfg(feature = "Win32_System_Registry")]
191 pub fn PowerWriteACValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acvalueindex: u32) -> u32;
192 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
193 #[cfg(feature = "Win32_System_Registry")]
194 pub fn PowerWriteDCDefaultIndex(rootsystempowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, defaultdcindex: u32) -> u32;
195 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
196 #[cfg(feature = "Win32_System_Registry")]
197 pub fn PowerWriteDCValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcvalueindex: u32) -> u32;
198 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
199 #[cfg(feature = "Win32_System_Registry")]
200 pub fn PowerWriteDescription(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
201 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
202 #[cfg(feature = "Win32_System_Registry")]
203 pub fn PowerWriteFriendlyName(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
204 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
205 #[cfg(feature = "Win32_System_Registry")]
206 pub fn PowerWriteIconResourceSpecifier(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
207 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
208 #[cfg(feature = "Win32_System_Registry")]
209 pub fn PowerWritePossibleDescription(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32;
210 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
211 #[cfg(feature = "Win32_System_Registry")]
212 pub fn PowerWritePossibleFriendlyName(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32;
213 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
214 #[cfg(feature = "Win32_System_Registry")]
215 pub fn PowerWritePossibleValue(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: u32, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32;
216 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
217 pub fn PowerWriteSettingAttributes(subgroupguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, attributes: u32) -> u32;
218 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
219 #[cfg(feature = "Win32_System_Registry")]
220 pub fn PowerWriteValueIncrement(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueincrement: u32) -> u32;
221 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
222 #[cfg(feature = "Win32_System_Registry")]
223 pub fn PowerWriteValueMax(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valuemaximum: u32) -> u32;
224 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
225 #[cfg(feature = "Win32_System_Registry")]
226 pub fn PowerWriteValueMin(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueminimum: u32) -> u32;
227 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"]
228 #[cfg(feature = "Win32_System_Registry")]
229 pub fn PowerWriteValueUnitsSpecifier(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
230 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
231 #[cfg(feature = "Win32_Foundation")]
232 pub fn ReadGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
233 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
234 #[cfg(feature = "Win32_Foundation")]
235 pub fn ReadProcessorPwrScheme(uiid: u32, pmachineprocessorpowerpolicy: *mut MACHINE_PROCESSOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
236 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
237 #[cfg(feature = "Win32_Foundation")]
238 pub fn ReadPwrScheme(uiid: u32, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN;
239 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
240 #[cfg(feature = "Win32_Foundation")]
241 pub fn RegisterPowerSettingNotification(hrecipient: super::super::Foundation::HANDLE, powersettingguid: *const ::windows_sys::core::GUID, flags: u32) -> HPOWERNOTIFY;
242 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
243 #[cfg(feature = "Win32_Foundation")]
244 pub fn RegisterSuspendResumeNotification(hrecipient: super::super::Foundation::HANDLE, flags: u32) -> HPOWERNOTIFY;
245 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
246 #[cfg(feature = "Win32_Foundation")]
247 pub fn RequestWakeupLatency(latency: LATENCY_TIME) -> super::super::Foundation::BOOL;
248 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
249 #[cfg(feature = "Win32_Foundation")]
250 pub fn SetActivePwrScheme(uiid: u32, pglobalpowerpolicy: *const GLOBAL_POWER_POLICY, ppowerpolicy: *const POWER_POLICY) -> super::super::Foundation::BOOLEAN;
251 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
252 #[cfg(feature = "Win32_Foundation")]
253 pub fn SetSuspendState(bhibernate: super::super::Foundation::BOOLEAN, bforce: super::super::Foundation::BOOLEAN, bwakeupeventsdisabled: super::super::Foundation::BOOLEAN) -> super::super::Foundation::BOOLEAN;
254 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
255 #[cfg(feature = "Win32_Foundation")]
256 pub fn SetSystemPowerState(fsuspend: super::super::Foundation::BOOL, fforce: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL;
257 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
258 pub fn SetThreadExecutionState(esflags: EXECUTION_STATE) -> EXECUTION_STATE;
259 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
260 #[cfg(feature = "Win32_Foundation")]
261 pub fn UnregisterPowerSettingNotification(handle: HPOWERNOTIFY) -> super::super::Foundation::BOOL;
262 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
263 #[cfg(feature = "Win32_Foundation")]
264 pub fn UnregisterSuspendResumeNotification(handle: HPOWERNOTIFY) -> super::super::Foundation::BOOL;
265 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
266 #[cfg(feature = "Win32_Foundation")]
267 pub fn ValidatePowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLICY, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN;
268 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
269 #[cfg(feature = "Win32_Foundation")]
270 pub fn WriteGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
271 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
272 #[cfg(feature = "Win32_Foundation")]
273 pub fn WriteProcessorPwrScheme(uiid: u32, pmachineprocessorpowerpolicy: *const MACHINE_PROCESSOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
274 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
275 #[cfg(feature = "Win32_Foundation")]
276 pub fn WritePwrScheme(puiid: *const u32, lpszschemename: ::windows_sys::core::PCWSTR, lpszdescription: ::windows_sys::core::PCWSTR, lpscheme: *const POWER_POLICY) -> super::super::Foundation::BOOLEAN;
277 }
278 #[repr(C)]
279 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
280 pub struct ACPI_REAL_TIME {
281 pub Year: u16,
282 pub Month: u8,
283 pub Day: u8,
284 pub Hour: u8,
285 pub Minute: u8,
286 pub Second: u8,
287 pub Valid: u8,
288 pub Milliseconds: u16,
289 pub TimeZone: i16,
290 pub DayLight: u8,
291 pub Reserved1: [u8; 3],
292 }
293 impl ::core::marker::Copy for ACPI_REAL_TIME {}
294 impl ::core::clone::Clone for ACPI_REAL_TIME {
295 fn clone(&self) -> Self {
296 *self
297 }
298 }
299 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
300 pub const ACPI_TIME_ADJUST_DAYLIGHT: u32 = 1u32;
301 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
302 pub const ACPI_TIME_IN_DAYLIGHT: u32 = 2u32;
303 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
304 pub const ACPI_TIME_ZONE_UNKNOWN: u32 = 2047u32;
305 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
306 pub const ACTIVE_COOLING: u32 = 0u32;
307 #[repr(C)]
308 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
309 pub struct ADMINISTRATOR_POWER_POLICY {
310 pub MinSleep: SYSTEM_POWER_STATE,
311 pub MaxSleep: SYSTEM_POWER_STATE,
312 pub MinVideoTimeout: u32,
313 pub MaxVideoTimeout: u32,
314 pub MinSpindownTimeout: u32,
315 pub MaxSpindownTimeout: u32,
316 }
317 impl ::core::marker::Copy for ADMINISTRATOR_POWER_POLICY {}
318 impl ::core::clone::Clone for ADMINISTRATOR_POWER_POLICY {
319 fn clone(&self) -> Self {
320 *self
321 }
322 }
323 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
324 pub const BATTERY_CAPACITY_RELATIVE: u32 = 1073741824u32;
325 #[repr(C)]
326 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
327 pub struct BATTERY_CHARGER_STATUS {
328 pub Type: BATTERY_CHARGING_SOURCE_TYPE,
329 pub VaData: [u32; 1],
330 }
331 impl ::core::marker::Copy for BATTERY_CHARGER_STATUS {}
332 impl ::core::clone::Clone for BATTERY_CHARGER_STATUS {
333 fn clone(&self) -> Self {
334 *self
335 }
336 }
337 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
338 pub const BATTERY_CHARGING: u32 = 4u32;
339 #[repr(C)]
340 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
341 pub struct BATTERY_CHARGING_SOURCE {
342 pub Type: BATTERY_CHARGING_SOURCE_TYPE,
343 pub MaxCurrent: u32,
344 }
345 impl ::core::marker::Copy for BATTERY_CHARGING_SOURCE {}
346 impl ::core::clone::Clone for BATTERY_CHARGING_SOURCE {
347 fn clone(&self) -> Self {
348 *self
349 }
350 }
351 #[repr(C)]
352 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
353 #[cfg(feature = "Win32_Foundation")]
354 pub struct BATTERY_CHARGING_SOURCE_INFORMATION {
355 pub Type: BATTERY_CHARGING_SOURCE_TYPE,
356 pub SourceOnline: super::super::Foundation::BOOLEAN,
357 }
358 #[cfg(feature = "Win32_Foundation")]
359 impl ::core::marker::Copy for BATTERY_CHARGING_SOURCE_INFORMATION {}
360 #[cfg(feature = "Win32_Foundation")]
361 impl ::core::clone::Clone for BATTERY_CHARGING_SOURCE_INFORMATION {
362 fn clone(&self) -> Self {
363 *self
364 }
365 }
366 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
367 pub type BATTERY_CHARGING_SOURCE_TYPE = i32;
368 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
369 pub const BatteryChargingSourceType_AC: BATTERY_CHARGING_SOURCE_TYPE = 1i32;
370 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
371 pub const BatteryChargingSourceType_USB: BATTERY_CHARGING_SOURCE_TYPE = 2i32;
372 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
373 pub const BatteryChargingSourceType_Wireless: BATTERY_CHARGING_SOURCE_TYPE = 3i32;
374 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
375 pub const BatteryChargingSourceType_Max: BATTERY_CHARGING_SOURCE_TYPE = 4i32;
376 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
377 pub const BATTERY_CLASS_MAJOR_VERSION: u32 = 1u32;
378 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
379 pub const BATTERY_CLASS_MINOR_VERSION: u32 = 0u32;
380 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
381 pub const BATTERY_CLASS_MINOR_VERSION_1: u32 = 1u32;
382 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
383 pub const BATTERY_CRITICAL: u32 = 8u32;
384 pub const BATTERY_CYCLE_COUNT_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4019772196, data2: 20, data3: 19493, data4: [165, 11, 199, 36, 174, 92, 211, 113] };
385 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
386 pub const BATTERY_DISCHARGING: u32 = 2u32;
387 pub const BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1085539685, data2: 38647, data3: 17461, data4: [134, 148, 151, 224, 228, 57, 89, 5] };
388 #[repr(C)]
389 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
390 pub struct BATTERY_INFORMATION {
391 pub Capabilities: u32,
392 pub Technology: u8,
393 pub Reserved: [u8; 3],
394 pub Chemistry: [u8; 4],
395 pub DesignedCapacity: u32,
396 pub FullChargedCapacity: u32,
397 pub DefaultAlert1: u32,
398 pub DefaultAlert2: u32,
399 pub CriticalBias: u32,
400 pub CycleCount: u32,
401 }
402 impl ::core::marker::Copy for BATTERY_INFORMATION {}
403 impl ::core::clone::Clone for BATTERY_INFORMATION {
404 fn clone(&self) -> Self {
405 *self
406 }
407 }
408 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
409 pub const BATTERY_IS_SHORT_TERM: u32 = 536870912u32;
410 #[repr(C)]
411 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
412 pub struct BATTERY_MANUFACTURE_DATE {
413 pub Day: u8,
414 pub Month: u8,
415 pub Year: u16,
416 }
417 impl ::core::marker::Copy for BATTERY_MANUFACTURE_DATE {}
418 impl ::core::clone::Clone for BATTERY_MANUFACTURE_DATE {
419 fn clone(&self) -> Self {
420 *self
421 }
422 }
423 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
424 pub const BATTERY_MINIPORT_UPDATE_DATA_VER_1: u32 = 1u32;
425 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
426 pub const BATTERY_MINIPORT_UPDATE_DATA_VER_2: u32 = 2u32;
427 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
428 pub const BATTERY_POWER_ON_LINE: u32 = 1u32;
429 #[repr(C)]
430 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
431 pub struct BATTERY_QUERY_INFORMATION {
432 pub BatteryTag: u32,
433 pub InformationLevel: BATTERY_QUERY_INFORMATION_LEVEL,
434 pub AtRate: u32,
435 }
436 impl ::core::marker::Copy for BATTERY_QUERY_INFORMATION {}
437 impl ::core::clone::Clone for BATTERY_QUERY_INFORMATION {
438 fn clone(&self) -> Self {
439 *self
440 }
441 }
442 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
443 pub type BATTERY_QUERY_INFORMATION_LEVEL = i32;
444 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
445 pub const BatteryInformation: BATTERY_QUERY_INFORMATION_LEVEL = 0i32;
446 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
447 pub const BatteryGranularityInformation: BATTERY_QUERY_INFORMATION_LEVEL = 1i32;
448 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
449 pub const BatteryTemperature: BATTERY_QUERY_INFORMATION_LEVEL = 2i32;
450 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
451 pub const BatteryEstimatedTime: BATTERY_QUERY_INFORMATION_LEVEL = 3i32;
452 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
453 pub const BatteryDeviceName: BATTERY_QUERY_INFORMATION_LEVEL = 4i32;
454 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
455 pub const BatteryManufactureDate: BATTERY_QUERY_INFORMATION_LEVEL = 5i32;
456 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
457 pub const BatteryManufactureName: BATTERY_QUERY_INFORMATION_LEVEL = 6i32;
458 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
459 pub const BatteryUniqueID: BATTERY_QUERY_INFORMATION_LEVEL = 7i32;
460 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
461 pub const BatterySerialNumber: BATTERY_QUERY_INFORMATION_LEVEL = 8i32;
462 #[repr(C)]
463 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
464 pub struct BATTERY_REPORTING_SCALE {
465 pub Granularity: u32,
466 pub Capacity: u32,
467 }
468 impl ::core::marker::Copy for BATTERY_REPORTING_SCALE {}
469 impl ::core::clone::Clone for BATTERY_REPORTING_SCALE {
470 fn clone(&self) -> Self {
471 *self
472 }
473 }
474 pub const BATTERY_RUNTIME_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1398421351, data2: 6850, data3: 18876, data4: [160, 119, 63, 122, 2, 228, 10, 236] };
475 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
476 pub const BATTERY_SEALED: u32 = 268435456u32;
477 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
478 pub const BATTERY_SET_CHARGER_ID_SUPPORTED: u32 = 8u32;
479 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
480 pub const BATTERY_SET_CHARGE_SUPPORTED: u32 = 1u32;
481 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
482 pub const BATTERY_SET_CHARGINGSOURCE_SUPPORTED: u32 = 4u32;
483 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
484 pub const BATTERY_SET_DISCHARGE_SUPPORTED: u32 = 2u32;
485 #[repr(C)]
486 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
487 pub struct BATTERY_SET_INFORMATION {
488 pub BatteryTag: u32,
489 pub InformationLevel: BATTERY_SET_INFORMATION_LEVEL,
490 pub Buffer: [u8; 1],
491 }
492 impl ::core::marker::Copy for BATTERY_SET_INFORMATION {}
493 impl ::core::clone::Clone for BATTERY_SET_INFORMATION {
494 fn clone(&self) -> Self {
495 *self
496 }
497 }
498 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
499 pub type BATTERY_SET_INFORMATION_LEVEL = i32;
500 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
501 pub const BatteryCriticalBias: BATTERY_SET_INFORMATION_LEVEL = 0i32;
502 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
503 pub const BatteryCharge: BATTERY_SET_INFORMATION_LEVEL = 1i32;
504 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
505 pub const BatteryDischarge: BATTERY_SET_INFORMATION_LEVEL = 2i32;
506 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
507 pub const BatteryChargingSource: BATTERY_SET_INFORMATION_LEVEL = 3i32;
508 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
509 pub const BatteryChargerId: BATTERY_SET_INFORMATION_LEVEL = 4i32;
510 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
511 pub const BatteryChargerStatus: BATTERY_SET_INFORMATION_LEVEL = 5i32;
512 pub const BATTERY_STATIC_DATA_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 98690147, data2: 58594, data3: 20137, data4: [128, 203, 155, 212, 179, 202, 6, 85] };
513 #[repr(C)]
514 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
515 pub struct BATTERY_STATUS {
516 pub PowerState: u32,
517 pub Capacity: u32,
518 pub Voltage: u32,
519 pub Rate: i32,
520 }
521 impl ::core::marker::Copy for BATTERY_STATUS {}
522 impl ::core::clone::Clone for BATTERY_STATUS {
523 fn clone(&self) -> Self {
524 *self
525 }
526 }
527 pub const BATTERY_STATUS_CHANGE_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3453984963, data2: 31835, data3: 20035, data4: [160, 52, 5, 159, 165, 184, 67, 100] };
528 pub const BATTERY_STATUS_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4232474833, data2: 60351, data3: 16750, data4: [135, 206, 55, 74, 78, 188, 17, 26] };
529 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
530 pub const BATTERY_SYSTEM_BATTERY: u32 = 2147483648u32;
531 pub const BATTERY_TAG_CHANGE_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1579118105, data2: 34694, data3: 19747, data4: [148, 252, 158, 116, 107, 213, 216, 136] };
532 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
533 pub const BATTERY_TAG_INVALID: u32 = 0u32;
534 pub const BATTERY_TEMPERATURE_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 441622861, data2: 44494, data3: 19012, data4: [154, 62, 200, 216, 241, 95, 242, 194] };
535 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
536 pub const BATTERY_UNKNOWN_CAPACITY: u32 = 4294967295u32;
537 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
538 pub const BATTERY_UNKNOWN_CURRENT: u32 = 4294967295u32;
539 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
540 pub const BATTERY_UNKNOWN_RATE: u32 = 2147483648u32;
541 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
542 pub const BATTERY_UNKNOWN_TIME: u32 = 4294967295u32;
543 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
544 pub const BATTERY_UNKNOWN_VOLTAGE: u32 = 4294967295u32;
545 #[repr(C)]
546 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
547 pub struct BATTERY_USB_CHARGER_STATUS {
548 pub Type: BATTERY_CHARGING_SOURCE_TYPE,
549 pub Reserved: u32,
550 pub Flags: u32,
551 pub MaxCurrent: u32,
552 pub Voltage: u32,
553 pub PortType: USB_CHARGER_PORT,
554 pub PortId: u64,
555 pub PowerSourceInformation: *mut ::core::ffi::c_void,
556 pub OemCharger: ::windows_sys::core::GUID,
557 }
558 impl ::core::marker::Copy for BATTERY_USB_CHARGER_STATUS {}
559 impl ::core::clone::Clone for BATTERY_USB_CHARGER_STATUS {
560 fn clone(&self) -> Self {
561 *self
562 }
563 }
564 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
565 pub const BATTERY_USB_CHARGER_STATUS_FN_DEFAULT_USB: u32 = 1u32;
566 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
567 pub const BATTERY_USB_CHARGER_STATUS_UCM_PD: u32 = 2u32;
568 #[repr(C)]
569 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
570 pub struct BATTERY_WAIT_STATUS {
571 pub BatteryTag: u32,
572 pub Timeout: u32,
573 pub PowerState: u32,
574 pub LowCapacity: u32,
575 pub HighCapacity: u32,
576 }
577 impl ::core::marker::Copy for BATTERY_WAIT_STATUS {}
578 impl ::core::clone::Clone for BATTERY_WAIT_STATUS {
579 fn clone(&self) -> Self {
580 *self
581 }
582 }
583 #[repr(C)]
584 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
585 pub struct CM_POWER_DATA {
586 pub PD_Size: u32,
587 pub PD_MostRecentPowerState: DEVICE_POWER_STATE,
588 pub PD_Capabilities: u32,
589 pub PD_D1Latency: u32,
590 pub PD_D2Latency: u32,
591 pub PD_D3Latency: u32,
592 pub PD_PowerStateMapping: [DEVICE_POWER_STATE; 7],
593 pub PD_DeepestSystemWake: SYSTEM_POWER_STATE,
594 }
595 impl ::core::marker::Copy for CM_POWER_DATA {}
596 impl ::core::clone::Clone for CM_POWER_DATA {
597 fn clone(&self) -> Self {
598 *self
599 }
600 }
601 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
602 pub const DEVICEPOWER_AND_OPERATION: u32 = 1073741824u32;
603 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
604 pub const DEVICEPOWER_CLEAR_WAKEENABLED: u32 = 2u32;
605 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
606 pub const DEVICEPOWER_FILTER_DEVICES_PRESENT: u32 = 536870912u32;
607 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
608 pub const DEVICEPOWER_FILTER_HARDWARE: u32 = 268435456u32;
609 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
610 pub const DEVICEPOWER_FILTER_ON_NAME: u32 = 33554432u32;
611 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
612 pub const DEVICEPOWER_FILTER_WAKEENABLED: u32 = 134217728u32;
613 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
614 pub const DEVICEPOWER_FILTER_WAKEPROGRAMMABLE: u32 = 67108864u32;
615 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
616 pub const DEVICEPOWER_HARDWAREID: u32 = 2147483648u32;
617 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
618 pub const DEVICEPOWER_SET_WAKEENABLED: u32 = 1u32;
619 #[repr(C)]
620 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
621 pub struct DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {
622 pub Callback: PDEVICE_NOTIFY_CALLBACK_ROUTINE,
623 pub Context: *mut ::core::ffi::c_void,
624 }
625 impl ::core::marker::Copy for DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {}
626 impl ::core::clone::Clone for DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {
627 fn clone(&self) -> Self {
628 *self
629 }
630 }
631 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
632 pub type DEVICE_POWER_STATE = i32;
633 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
634 pub const PowerDeviceUnspecified: DEVICE_POWER_STATE = 0i32;
635 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
636 pub const PowerDeviceD0: DEVICE_POWER_STATE = 1i32;
637 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
638 pub const PowerDeviceD1: DEVICE_POWER_STATE = 2i32;
639 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
640 pub const PowerDeviceD2: DEVICE_POWER_STATE = 3i32;
641 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
642 pub const PowerDeviceD3: DEVICE_POWER_STATE = 4i32;
643 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
644 pub const PowerDeviceMaximum: DEVICE_POWER_STATE = 5i32;
645 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
646 pub type EFFECTIVE_POWER_MODE = i32;
647 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
648 pub const EffectivePowerModeBatterySaver: EFFECTIVE_POWER_MODE = 0i32;
649 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
650 pub const EffectivePowerModeBetterBattery: EFFECTIVE_POWER_MODE = 1i32;
651 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
652 pub const EffectivePowerModeBalanced: EFFECTIVE_POWER_MODE = 2i32;
653 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
654 pub const EffectivePowerModeHighPerformance: EFFECTIVE_POWER_MODE = 3i32;
655 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
656 pub const EffectivePowerModeMaxPerformance: EFFECTIVE_POWER_MODE = 4i32;
657 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
658 pub const EffectivePowerModeGameMode: EFFECTIVE_POWER_MODE = 5i32;
659 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
660 pub const EffectivePowerModeMixedReality: EFFECTIVE_POWER_MODE = 6i32;
661 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
662 pub type EFFECTIVE_POWER_MODE_CALLBACK = ::core::option::Option<unsafe extern "system" fn(mode: EFFECTIVE_POWER_MODE, context: *const ::core::ffi::c_void)>;
663 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
664 pub const EFFECTIVE_POWER_MODE_V1: u32 = 1u32;
665 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
666 pub const EFFECTIVE_POWER_MODE_V2: u32 = 2u32;
667 #[repr(C)]
668 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
669 pub struct EMI_CHANNEL_MEASUREMENT_DATA {
670 pub AbsoluteEnergy: u64,
671 pub AbsoluteTime: u64,
672 }
673 impl ::core::marker::Copy for EMI_CHANNEL_MEASUREMENT_DATA {}
674 impl ::core::clone::Clone for EMI_CHANNEL_MEASUREMENT_DATA {
675 fn clone(&self) -> Self {
676 *self
677 }
678 }
679 #[repr(C)]
680 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
681 pub struct EMI_CHANNEL_V2 {
682 pub MeasurementUnit: EMI_MEASUREMENT_UNIT,
683 pub ChannelNameSize: u16,
684 pub ChannelName: [u16; 1],
685 }
686 impl ::core::marker::Copy for EMI_CHANNEL_V2 {}
687 impl ::core::clone::Clone for EMI_CHANNEL_V2 {
688 fn clone(&self) -> Self {
689 *self
690 }
691 }
692 #[repr(C)]
693 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
694 pub struct EMI_MEASUREMENT_DATA_V2 {
695 pub ChannelData: [EMI_CHANNEL_MEASUREMENT_DATA; 1],
696 }
697 impl ::core::marker::Copy for EMI_MEASUREMENT_DATA_V2 {}
698 impl ::core::clone::Clone for EMI_MEASUREMENT_DATA_V2 {
699 fn clone(&self) -> Self {
700 *self
701 }
702 }
703 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
704 pub type EMI_MEASUREMENT_UNIT = i32;
705 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
706 pub const EmiMeasurementUnitPicowattHours: EMI_MEASUREMENT_UNIT = 0i32;
707 #[repr(C)]
708 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
709 pub struct EMI_METADATA_SIZE {
710 pub MetadataSize: u32,
711 }
712 impl ::core::marker::Copy for EMI_METADATA_SIZE {}
713 impl ::core::clone::Clone for EMI_METADATA_SIZE {
714 fn clone(&self) -> Self {
715 *self
716 }
717 }
718 #[repr(C)]
719 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
720 pub struct EMI_METADATA_V1 {
721 pub MeasurementUnit: EMI_MEASUREMENT_UNIT,
722 pub HardwareOEM: [u16; 16],
723 pub HardwareModel: [u16; 16],
724 pub HardwareRevision: u16,
725 pub MeteredHardwareNameSize: u16,
726 pub MeteredHardwareName: [u16; 1],
727 }
728 impl ::core::marker::Copy for EMI_METADATA_V1 {}
729 impl ::core::clone::Clone for EMI_METADATA_V1 {
730 fn clone(&self) -> Self {
731 *self
732 }
733 }
734 #[repr(C)]
735 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
736 pub struct EMI_METADATA_V2 {
737 pub HardwareOEM: [u16; 16],
738 pub HardwareModel: [u16; 16],
739 pub HardwareRevision: u16,
740 pub ChannelCount: u16,
741 pub Channels: [EMI_CHANNEL_V2; 1],
742 }
743 impl ::core::marker::Copy for EMI_METADATA_V2 {}
744 impl ::core::clone::Clone for EMI_METADATA_V2 {
745 fn clone(&self) -> Self {
746 *self
747 }
748 }
749 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
750 pub const EMI_NAME_MAX: u32 = 16u32;
751 #[repr(C)]
752 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
753 pub struct EMI_VERSION {
754 pub EmiVersion: u16,
755 }
756 impl ::core::marker::Copy for EMI_VERSION {}
757 impl ::core::clone::Clone for EMI_VERSION {
758 fn clone(&self) -> Self {
759 *self
760 }
761 }
762 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
763 pub const EMI_VERSION_V1: u32 = 1u32;
764 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
765 pub const EMI_VERSION_V2: u32 = 2u32;
766 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
767 pub type EXECUTION_STATE = u32;
768 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
769 pub const ES_AWAYMODE_REQUIRED: EXECUTION_STATE = 64u32;
770 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
771 pub const ES_CONTINUOUS: EXECUTION_STATE = 2147483648u32;
772 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
773 pub const ES_DISPLAY_REQUIRED: EXECUTION_STATE = 2u32;
774 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
775 pub const ES_SYSTEM_REQUIRED: EXECUTION_STATE = 1u32;
776 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
777 pub const ES_USER_PRESENT: EXECUTION_STATE = 4u32;
778 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
779 pub const EnableMultiBatteryDisplay: u32 = 2u32;
780 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
781 pub const EnablePasswordLogon: u32 = 4u32;
782 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
783 pub const EnableSysTrayBatteryMeter: u32 = 1u32;
784 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
785 pub const EnableVideoDimDisplay: u32 = 16u32;
786 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
787 pub const EnableWakeOnRing: u32 = 8u32;
788 #[repr(C)]
789 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
790 pub struct GLOBAL_MACHINE_POWER_POLICY {
791 pub Revision: u32,
792 pub LidOpenWakeAc: SYSTEM_POWER_STATE,
793 pub LidOpenWakeDc: SYSTEM_POWER_STATE,
794 pub BroadcastCapacityResolution: u32,
795 }
796 impl ::core::marker::Copy for GLOBAL_MACHINE_POWER_POLICY {}
797 impl ::core::clone::Clone for GLOBAL_MACHINE_POWER_POLICY {
798 fn clone(&self) -> Self {
799 *self
800 }
801 }
802 #[repr(C)]
803 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
804 #[cfg(feature = "Win32_Foundation")]
805 pub struct GLOBAL_POWER_POLICY {
806 pub user: GLOBAL_USER_POWER_POLICY,
807 pub mach: GLOBAL_MACHINE_POWER_POLICY,
808 }
809 #[cfg(feature = "Win32_Foundation")]
810 impl ::core::marker::Copy for GLOBAL_POWER_POLICY {}
811 #[cfg(feature = "Win32_Foundation")]
812 impl ::core::clone::Clone for GLOBAL_POWER_POLICY {
813 fn clone(&self) -> Self {
814 *self
815 }
816 }
817 #[repr(C)]
818 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
819 #[cfg(feature = "Win32_Foundation")]
820 pub struct GLOBAL_USER_POWER_POLICY {
821 pub Revision: u32,
822 pub PowerButtonAc: POWER_ACTION_POLICY,
823 pub PowerButtonDc: POWER_ACTION_POLICY,
824 pub SleepButtonAc: POWER_ACTION_POLICY,
825 pub SleepButtonDc: POWER_ACTION_POLICY,
826 pub LidCloseAc: POWER_ACTION_POLICY,
827 pub LidCloseDc: POWER_ACTION_POLICY,
828 pub DischargePolicy: [SYSTEM_POWER_LEVEL; 4],
829 pub GlobalFlags: u32,
830 }
831 #[cfg(feature = "Win32_Foundation")]
832 impl ::core::marker::Copy for GLOBAL_USER_POWER_POLICY {}
833 #[cfg(feature = "Win32_Foundation")]
834 impl ::core::clone::Clone for GLOBAL_USER_POWER_POLICY {
835 fn clone(&self) -> Self {
836 *self
837 }
838 }
839 pub const GUID_CLASS_INPUT: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1293833650, data2: 61807, data3: 4559, data4: [136, 203, 0, 17, 17, 0, 0, 48] };
840 pub const GUID_DEVICE_ACPI_TIME: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2549718006, data2: 17559, data3: 20248, data4: [187, 34, 75, 159, 178, 251, 239, 156] };
841 pub const GUID_DEVICE_APPLICATIONLAUNCH_BUTTON: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1654085870, data2: 39022, data3: 19870, data4: [142, 71, 222, 39, 248, 171, 5, 77] };
842 pub const GUID_DEVICE_BATTERY: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1919098452, data2: 30884, data3: 4560, data4: [188, 247, 0, 170, 0, 183, 179, 42] };
843 pub const GUID_DEVICE_ENERGY_METER: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1170047812, data2: 32470, data3: 18895, data4: [164, 64, 194, 118, 201, 51, 176, 83] };
844 pub const GUID_DEVICE_FAN: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 99406141, data2: 33242, data3: 18986, data4: [138, 76, 82, 79, 35, 221, 77, 201] };
845 pub const GUID_DEVICE_LID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1257913682, data2: 29863, data3: 4560, data4: [190, 94, 0, 160, 201, 6, 40, 87] };
846 pub const GUID_DEVICE_MEMORY: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1070657597, data2: 37600, data3: 17915, data4: [183, 92, 94, 216, 255, 176, 16, 33] };
847 pub const GUID_DEVICE_MESSAGE_INDICATOR: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3444089701, data2: 64148, data3: 19682, data4: [162, 50, 161, 183, 100, 229, 216, 180] };
848 pub const GUID_DEVICE_PROCESSOR: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2549799696, data2: 20019, data3: 16558, data4: [53, 156, 139, 239, 2, 157, 189, 208] };
849 pub const GUID_DEVICE_SYS_BUTTON: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1257913683, data2: 29863, data3: 4560, data4: [190, 94, 0, 160, 201, 6, 40, 87] };
850 pub const GUID_DEVICE_THERMAL_ZONE: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1257913681, data2: 29863, data3: 4560, data4: [190, 94, 0, 160, 201, 6, 40, 87] };
851 pub const GUID_DEVINTERFACE_THERMAL_COOLING: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3689166653, data2: 15489, data3: 16587, data4: [172, 228, 224, 229, 208, 95, 12, 159] };
852 pub const GUID_DEVINTERFACE_THERMAL_MANAGER: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2457780371, data2: 27044, data3: 19392, data4: [189, 2, 113, 22, 100, 113, 68, 99] };
853 pub type HPOWERNOTIFY = isize;
854 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
855 pub const IOCTL_ACPI_GET_REAL_TIME: u32 = 2703888u32;
856 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
857 pub const IOCTL_ACPI_SET_REAL_TIME: u32 = 2720276u32;
858 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
859 pub const IOCTL_BATTERY_CHARGING_SOURCE_CHANGE: u32 = 2703440u32;
860 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
861 pub const IOCTL_BATTERY_QUERY_INFORMATION: u32 = 2703428u32;
862 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
863 pub const IOCTL_BATTERY_QUERY_STATUS: u32 = 2703436u32;
864 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
865 pub const IOCTL_BATTERY_QUERY_TAG: u32 = 2703424u32;
866 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
867 pub const IOCTL_BATTERY_SET_INFORMATION: u32 = 2719816u32;
868 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
869 pub const IOCTL_EMI_GET_MEASUREMENT: u32 = 2244620u32;
870 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
871 pub const IOCTL_EMI_GET_METADATA: u32 = 2244616u32;
872 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
873 pub const IOCTL_EMI_GET_METADATA_SIZE: u32 = 2244612u32;
874 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
875 pub const IOCTL_EMI_GET_VERSION: u32 = 2244608u32;
876 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
877 pub const IOCTL_GET_PROCESSOR_OBJ_INFO: u32 = 2703744u32;
878 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
879 pub const IOCTL_GET_SYS_BUTTON_CAPS: u32 = 2703680u32;
880 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
881 pub const IOCTL_GET_SYS_BUTTON_EVENT: u32 = 2703684u32;
882 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
883 pub const IOCTL_GET_WAKE_ALARM_POLICY: u32 = 2736652u32;
884 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
885 pub const IOCTL_GET_WAKE_ALARM_SYSTEM_POWERSTATE: u32 = 2703896u32;
886 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
887 pub const IOCTL_GET_WAKE_ALARM_VALUE: u32 = 2736648u32;
888 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
889 pub const IOCTL_NOTIFY_SWITCH_EVENT: u32 = 2703616u32;
890 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
891 pub const IOCTL_QUERY_LID: u32 = 2703552u32;
892 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
893 pub const IOCTL_RUN_ACTIVE_COOLING_METHOD: u32 = 2719880u32;
894 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
895 pub const IOCTL_SET_SYS_MESSAGE_INDICATOR: u32 = 2720192u32;
896 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
897 pub const IOCTL_SET_WAKE_ALARM_POLICY: u32 = 2720260u32;
898 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
899 pub const IOCTL_SET_WAKE_ALARM_VALUE: u32 = 2720256u32;
900 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
901 pub const IOCTL_THERMAL_QUERY_INFORMATION: u32 = 2703488u32;
902 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
903 pub const IOCTL_THERMAL_READ_POLICY: u32 = 2703508u32;
904 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
905 pub const IOCTL_THERMAL_READ_TEMPERATURE: u32 = 2703504u32;
906 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
907 pub const IOCTL_THERMAL_SET_COOLING_POLICY: u32 = 2719876u32;
908 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
909 pub const IOCTL_THERMAL_SET_PASSIVE_LIMIT: u32 = 2719884u32;
910 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
911 pub type LATENCY_TIME = i32;
912 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
913 pub const LT_DONT_CARE: LATENCY_TIME = 0i32;
914 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
915 pub const LT_LOWEST_LATENCY: LATENCY_TIME = 1i32;
916 #[repr(C)]
917 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
918 pub struct MACHINE_POWER_POLICY {
919 pub Revision: u32,
920 pub MinSleepAc: SYSTEM_POWER_STATE,
921 pub MinSleepDc: SYSTEM_POWER_STATE,
922 pub ReducedLatencySleepAc: SYSTEM_POWER_STATE,
923 pub ReducedLatencySleepDc: SYSTEM_POWER_STATE,
924 pub DozeTimeoutAc: u32,
925 pub DozeTimeoutDc: u32,
926 pub DozeS4TimeoutAc: u32,
927 pub DozeS4TimeoutDc: u32,
928 pub MinThrottleAc: u8,
929 pub MinThrottleDc: u8,
930 pub pad1: [u8; 2],
931 pub OverThrottledAc: POWER_ACTION_POLICY,
932 pub OverThrottledDc: POWER_ACTION_POLICY,
933 }
934 impl ::core::marker::Copy for MACHINE_POWER_POLICY {}
935 impl ::core::clone::Clone for MACHINE_POWER_POLICY {
936 fn clone(&self) -> Self {
937 *self
938 }
939 }
940 #[repr(C)]
941 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
942 pub struct MACHINE_PROCESSOR_POWER_POLICY {
943 pub Revision: u32,
944 pub ProcessorPolicyAc: PROCESSOR_POWER_POLICY,
945 pub ProcessorPolicyDc: PROCESSOR_POWER_POLICY,
946 }
947 impl ::core::marker::Copy for MACHINE_PROCESSOR_POWER_POLICY {}
948 impl ::core::clone::Clone for MACHINE_PROCESSOR_POWER_POLICY {
949 fn clone(&self) -> Self {
950 *self
951 }
952 }
953 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
954 pub const MAX_ACTIVE_COOLING_LEVELS: u32 = 10u32;
955 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
956 pub const MAX_BATTERY_STRING_SIZE: u32 = 128u32;
957 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
958 pub const PASSIVE_COOLING: u32 = 1u32;
959 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
960 pub const PDCAP_S0_SUPPORTED: u32 = 65536u32;
961 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
962 pub const PDCAP_S1_SUPPORTED: u32 = 131072u32;
963 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
964 pub const PDCAP_S2_SUPPORTED: u32 = 262144u32;
965 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
966 pub const PDCAP_S3_SUPPORTED: u32 = 524288u32;
967 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
968 pub const PDCAP_S4_SUPPORTED: u32 = 16777216u32;
969 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
970 pub const PDCAP_S5_SUPPORTED: u32 = 33554432u32;
971 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
972 pub const PDCAP_WAKE_FROM_S0_SUPPORTED: u32 = 1048576u32;
973 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
974 pub const PDCAP_WAKE_FROM_S1_SUPPORTED: u32 = 2097152u32;
975 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
976 pub const PDCAP_WAKE_FROM_S2_SUPPORTED: u32 = 4194304u32;
977 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
978 pub const PDCAP_WAKE_FROM_S3_SUPPORTED: u32 = 8388608u32;
979 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
980 pub type PDEVICE_NOTIFY_CALLBACK_ROUTINE = ::core::option::Option<unsafe extern "system" fn(context: *const ::core::ffi::c_void, r#type: u32, setting: *const ::core::ffi::c_void) -> u32>;
981 #[repr(C)]
982 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
983 pub struct POWERBROADCAST_SETTING {
984 pub PowerSetting: ::windows_sys::core::GUID,
985 pub DataLength: u32,
986 pub Data: [u8; 1],
987 }
988 impl ::core::marker::Copy for POWERBROADCAST_SETTING {}
989 impl ::core::clone::Clone for POWERBROADCAST_SETTING {
990 fn clone(&self) -> Self {
991 *self
992 }
993 }
994 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
995 pub type POWER_ACTION = i32;
996 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
997 pub const PowerActionNone: POWER_ACTION = 0i32;
998 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
999 pub const PowerActionReserved: POWER_ACTION = 1i32;
1000 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1001 pub const PowerActionSleep: POWER_ACTION = 2i32;
1002 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1003 pub const PowerActionHibernate: POWER_ACTION = 3i32;
1004 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1005 pub const PowerActionShutdown: POWER_ACTION = 4i32;
1006 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1007 pub const PowerActionShutdownReset: POWER_ACTION = 5i32;
1008 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1009 pub const PowerActionShutdownOff: POWER_ACTION = 6i32;
1010 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1011 pub const PowerActionWarmEject: POWER_ACTION = 7i32;
1012 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1013 pub const PowerActionDisplayOff: POWER_ACTION = 8i32;
1014 #[repr(C)]
1015 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1016 pub struct POWER_ACTION_POLICY {
1017 pub Action: POWER_ACTION,
1018 pub Flags: u32,
1019 pub EventCode: POWER_ACTION_POLICY_EVENT_CODE,
1020 }
1021 impl ::core::marker::Copy for POWER_ACTION_POLICY {}
1022 impl ::core::clone::Clone for POWER_ACTION_POLICY {
1023 fn clone(&self) -> Self {
1024 *self
1025 }
1026 }
1027 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1028 pub type POWER_ACTION_POLICY_EVENT_CODE = u32;
1029 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1030 pub const POWER_FORCE_TRIGGER_RESET: POWER_ACTION_POLICY_EVENT_CODE = 2147483648u32;
1031 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1032 pub const POWER_LEVEL_USER_NOTIFY_EXEC: POWER_ACTION_POLICY_EVENT_CODE = 4u32;
1033 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1034 pub const POWER_LEVEL_USER_NOTIFY_SOUND: POWER_ACTION_POLICY_EVENT_CODE = 2u32;
1035 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1036 pub const POWER_LEVEL_USER_NOTIFY_TEXT: POWER_ACTION_POLICY_EVENT_CODE = 1u32;
1037 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1038 pub const POWER_USER_NOTIFY_BUTTON: POWER_ACTION_POLICY_EVENT_CODE = 8u32;
1039 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1040 pub const POWER_USER_NOTIFY_SHUTDOWN: POWER_ACTION_POLICY_EVENT_CODE = 16u32;
1041 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1042 pub const POWER_ATTRIBUTE_HIDE: u32 = 1u32;
1043 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1044 pub const POWER_ATTRIBUTE_SHOW_AOAC: u32 = 2u32;
1045 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1046 pub type POWER_DATA_ACCESSOR = i32;
1047 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1048 pub const ACCESS_AC_POWER_SETTING_INDEX: POWER_DATA_ACCESSOR = 0i32;
1049 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1050 pub const ACCESS_DC_POWER_SETTING_INDEX: POWER_DATA_ACCESSOR = 1i32;
1051 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1052 pub const ACCESS_FRIENDLY_NAME: POWER_DATA_ACCESSOR = 2i32;
1053 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1054 pub const ACCESS_DESCRIPTION: POWER_DATA_ACCESSOR = 3i32;
1055 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1056 pub const ACCESS_POSSIBLE_POWER_SETTING: POWER_DATA_ACCESSOR = 4i32;
1057 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1058 pub const ACCESS_POSSIBLE_POWER_SETTING_FRIENDLY_NAME: POWER_DATA_ACCESSOR = 5i32;
1059 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1060 pub const ACCESS_POSSIBLE_POWER_SETTING_DESCRIPTION: POWER_DATA_ACCESSOR = 6i32;
1061 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1062 pub const ACCESS_DEFAULT_AC_POWER_SETTING: POWER_DATA_ACCESSOR = 7i32;
1063 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1064 pub const ACCESS_DEFAULT_DC_POWER_SETTING: POWER_DATA_ACCESSOR = 8i32;
1065 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1066 pub const ACCESS_POSSIBLE_VALUE_MIN: POWER_DATA_ACCESSOR = 9i32;
1067 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1068 pub const ACCESS_POSSIBLE_VALUE_MAX: POWER_DATA_ACCESSOR = 10i32;
1069 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1070 pub const ACCESS_POSSIBLE_VALUE_INCREMENT: POWER_DATA_ACCESSOR = 11i32;
1071 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1072 pub const ACCESS_POSSIBLE_VALUE_UNITS: POWER_DATA_ACCESSOR = 12i32;
1073 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1074 pub const ACCESS_ICON_RESOURCE: POWER_DATA_ACCESSOR = 13i32;
1075 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1076 pub const ACCESS_DEFAULT_SECURITY_DESCRIPTOR: POWER_DATA_ACCESSOR = 14i32;
1077 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1078 pub const ACCESS_ATTRIBUTES: POWER_DATA_ACCESSOR = 15i32;
1079 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1080 pub const ACCESS_SCHEME: POWER_DATA_ACCESSOR = 16i32;
1081 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1082 pub const ACCESS_SUBGROUP: POWER_DATA_ACCESSOR = 17i32;
1083 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1084 pub const ACCESS_INDIVIDUAL_SETTING: POWER_DATA_ACCESSOR = 18i32;
1085 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1086 pub const ACCESS_ACTIVE_SCHEME: POWER_DATA_ACCESSOR = 19i32;
1087 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1088 pub const ACCESS_CREATE_SCHEME: POWER_DATA_ACCESSOR = 20i32;
1089 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1090 pub const ACCESS_AC_POWER_SETTING_MAX: POWER_DATA_ACCESSOR = 21i32;
1091 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1092 pub const ACCESS_DC_POWER_SETTING_MAX: POWER_DATA_ACCESSOR = 22i32;
1093 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1094 pub const ACCESS_AC_POWER_SETTING_MIN: POWER_DATA_ACCESSOR = 23i32;
1095 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1096 pub const ACCESS_DC_POWER_SETTING_MIN: POWER_DATA_ACCESSOR = 24i32;
1097 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1098 pub const ACCESS_PROFILE: POWER_DATA_ACCESSOR = 25i32;
1099 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1100 pub const ACCESS_OVERLAY_SCHEME: POWER_DATA_ACCESSOR = 26i32;
1101 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1102 pub const ACCESS_ACTIVE_OVERLAY_SCHEME: POWER_DATA_ACCESSOR = 27i32;
1103 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1104 pub type POWER_INFORMATION_LEVEL = i32;
1105 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1106 pub const SystemPowerPolicyAc: POWER_INFORMATION_LEVEL = 0i32;
1107 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1108 pub const SystemPowerPolicyDc: POWER_INFORMATION_LEVEL = 1i32;
1109 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1110 pub const VerifySystemPolicyAc: POWER_INFORMATION_LEVEL = 2i32;
1111 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1112 pub const VerifySystemPolicyDc: POWER_INFORMATION_LEVEL = 3i32;
1113 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1114 pub const SystemPowerCapabilities: POWER_INFORMATION_LEVEL = 4i32;
1115 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1116 pub const SystemBatteryState: POWER_INFORMATION_LEVEL = 5i32;
1117 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1118 pub const SystemPowerStateHandler: POWER_INFORMATION_LEVEL = 6i32;
1119 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1120 pub const ProcessorStateHandler: POWER_INFORMATION_LEVEL = 7i32;
1121 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1122 pub const SystemPowerPolicyCurrent: POWER_INFORMATION_LEVEL = 8i32;
1123 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1124 pub const AdministratorPowerPolicy: POWER_INFORMATION_LEVEL = 9i32;
1125 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1126 pub const SystemReserveHiberFile: POWER_INFORMATION_LEVEL = 10i32;
1127 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1128 pub const ProcessorInformation: POWER_INFORMATION_LEVEL = 11i32;
1129 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1130 pub const SystemPowerInformation: POWER_INFORMATION_LEVEL = 12i32;
1131 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1132 pub const ProcessorStateHandler2: POWER_INFORMATION_LEVEL = 13i32;
1133 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1134 pub const LastWakeTime: POWER_INFORMATION_LEVEL = 14i32;
1135 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1136 pub const LastSleepTime: POWER_INFORMATION_LEVEL = 15i32;
1137 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1138 pub const SystemExecutionState: POWER_INFORMATION_LEVEL = 16i32;
1139 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1140 pub const SystemPowerStateNotifyHandler: POWER_INFORMATION_LEVEL = 17i32;
1141 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1142 pub const ProcessorPowerPolicyAc: POWER_INFORMATION_LEVEL = 18i32;
1143 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1144 pub const ProcessorPowerPolicyDc: POWER_INFORMATION_LEVEL = 19i32;
1145 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1146 pub const VerifyProcessorPowerPolicyAc: POWER_INFORMATION_LEVEL = 20i32;
1147 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1148 pub const VerifyProcessorPowerPolicyDc: POWER_INFORMATION_LEVEL = 21i32;
1149 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1150 pub const ProcessorPowerPolicyCurrent: POWER_INFORMATION_LEVEL = 22i32;
1151 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1152 pub const SystemPowerStateLogging: POWER_INFORMATION_LEVEL = 23i32;
1153 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1154 pub const SystemPowerLoggingEntry: POWER_INFORMATION_LEVEL = 24i32;
1155 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1156 pub const SetPowerSettingValue: POWER_INFORMATION_LEVEL = 25i32;
1157 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1158 pub const NotifyUserPowerSetting: POWER_INFORMATION_LEVEL = 26i32;
1159 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1160 pub const PowerInformationLevelUnused0: POWER_INFORMATION_LEVEL = 27i32;
1161 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1162 pub const SystemMonitorHiberBootPowerOff: POWER_INFORMATION_LEVEL = 28i32;
1163 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1164 pub const SystemVideoState: POWER_INFORMATION_LEVEL = 29i32;
1165 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1166 pub const TraceApplicationPowerMessage: POWER_INFORMATION_LEVEL = 30i32;
1167 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1168 pub const TraceApplicationPowerMessageEnd: POWER_INFORMATION_LEVEL = 31i32;
1169 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1170 pub const ProcessorPerfStates: POWER_INFORMATION_LEVEL = 32i32;
1171 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1172 pub const ProcessorIdleStates: POWER_INFORMATION_LEVEL = 33i32;
1173 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1174 pub const ProcessorCap: POWER_INFORMATION_LEVEL = 34i32;
1175 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1176 pub const SystemWakeSource: POWER_INFORMATION_LEVEL = 35i32;
1177 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1178 pub const SystemHiberFileInformation: POWER_INFORMATION_LEVEL = 36i32;
1179 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1180 pub const TraceServicePowerMessage: POWER_INFORMATION_LEVEL = 37i32;
1181 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1182 pub const ProcessorLoad: POWER_INFORMATION_LEVEL = 38i32;
1183 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1184 pub const PowerShutdownNotification: POWER_INFORMATION_LEVEL = 39i32;
1185 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1186 pub const MonitorCapabilities: POWER_INFORMATION_LEVEL = 40i32;
1187 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1188 pub const SessionPowerInit: POWER_INFORMATION_LEVEL = 41i32;
1189 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1190 pub const SessionDisplayState: POWER_INFORMATION_LEVEL = 42i32;
1191 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1192 pub const PowerRequestCreate: POWER_INFORMATION_LEVEL = 43i32;
1193 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1194 pub const PowerRequestAction: POWER_INFORMATION_LEVEL = 44i32;
1195 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1196 pub const GetPowerRequestList: POWER_INFORMATION_LEVEL = 45i32;
1197 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1198 pub const ProcessorInformationEx: POWER_INFORMATION_LEVEL = 46i32;
1199 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1200 pub const NotifyUserModeLegacyPowerEvent: POWER_INFORMATION_LEVEL = 47i32;
1201 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1202 pub const GroupPark: POWER_INFORMATION_LEVEL = 48i32;
1203 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1204 pub const ProcessorIdleDomains: POWER_INFORMATION_LEVEL = 49i32;
1205 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1206 pub const WakeTimerList: POWER_INFORMATION_LEVEL = 50i32;
1207 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1208 pub const SystemHiberFileSize: POWER_INFORMATION_LEVEL = 51i32;
1209 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1210 pub const ProcessorIdleStatesHv: POWER_INFORMATION_LEVEL = 52i32;
1211 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1212 pub const ProcessorPerfStatesHv: POWER_INFORMATION_LEVEL = 53i32;
1213 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1214 pub const ProcessorPerfCapHv: POWER_INFORMATION_LEVEL = 54i32;
1215 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1216 pub const ProcessorSetIdle: POWER_INFORMATION_LEVEL = 55i32;
1217 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1218 pub const LogicalProcessorIdling: POWER_INFORMATION_LEVEL = 56i32;
1219 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1220 pub const UserPresence: POWER_INFORMATION_LEVEL = 57i32;
1221 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1222 pub const PowerSettingNotificationName: POWER_INFORMATION_LEVEL = 58i32;
1223 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1224 pub const GetPowerSettingValue: POWER_INFORMATION_LEVEL = 59i32;
1225 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1226 pub const IdleResiliency: POWER_INFORMATION_LEVEL = 60i32;
1227 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1228 pub const SessionRITState: POWER_INFORMATION_LEVEL = 61i32;
1229 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1230 pub const SessionConnectNotification: POWER_INFORMATION_LEVEL = 62i32;
1231 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1232 pub const SessionPowerCleanup: POWER_INFORMATION_LEVEL = 63i32;
1233 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1234 pub const SessionLockState: POWER_INFORMATION_LEVEL = 64i32;
1235 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1236 pub const SystemHiberbootState: POWER_INFORMATION_LEVEL = 65i32;
1237 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1238 pub const PlatformInformation: POWER_INFORMATION_LEVEL = 66i32;
1239 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1240 pub const PdcInvocation: POWER_INFORMATION_LEVEL = 67i32;
1241 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1242 pub const MonitorInvocation: POWER_INFORMATION_LEVEL = 68i32;
1243 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1244 pub const FirmwareTableInformationRegistered: POWER_INFORMATION_LEVEL = 69i32;
1245 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1246 pub const SetShutdownSelectedTime: POWER_INFORMATION_LEVEL = 70i32;
1247 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1248 pub const SuspendResumeInvocation: POWER_INFORMATION_LEVEL = 71i32;
1249 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1250 pub const PlmPowerRequestCreate: POWER_INFORMATION_LEVEL = 72i32;
1251 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1252 pub const ScreenOff: POWER_INFORMATION_LEVEL = 73i32;
1253 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1254 pub const CsDeviceNotification: POWER_INFORMATION_LEVEL = 74i32;
1255 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1256 pub const PlatformRole: POWER_INFORMATION_LEVEL = 75i32;
1257 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1258 pub const LastResumePerformance: POWER_INFORMATION_LEVEL = 76i32;
1259 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1260 pub const DisplayBurst: POWER_INFORMATION_LEVEL = 77i32;
1261 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1262 pub const ExitLatencySamplingPercentage: POWER_INFORMATION_LEVEL = 78i32;
1263 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1264 pub const RegisterSpmPowerSettings: POWER_INFORMATION_LEVEL = 79i32;
1265 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1266 pub const PlatformIdleStates: POWER_INFORMATION_LEVEL = 80i32;
1267 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1268 pub const ProcessorIdleVeto: POWER_INFORMATION_LEVEL = 81i32;
1269 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1270 pub const PlatformIdleVeto: POWER_INFORMATION_LEVEL = 82i32;
1271 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1272 pub const SystemBatteryStatePrecise: POWER_INFORMATION_LEVEL = 83i32;
1273 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1274 pub const ThermalEvent: POWER_INFORMATION_LEVEL = 84i32;
1275 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1276 pub const PowerRequestActionInternal: POWER_INFORMATION_LEVEL = 85i32;
1277 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1278 pub const BatteryDeviceState: POWER_INFORMATION_LEVEL = 86i32;
1279 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1280 pub const PowerInformationInternal: POWER_INFORMATION_LEVEL = 87i32;
1281 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1282 pub const ThermalStandby: POWER_INFORMATION_LEVEL = 88i32;
1283 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1284 pub const SystemHiberFileType: POWER_INFORMATION_LEVEL = 89i32;
1285 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1286 pub const PhysicalPowerButtonPress: POWER_INFORMATION_LEVEL = 90i32;
1287 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1288 pub const QueryPotentialDripsConstraint: POWER_INFORMATION_LEVEL = 91i32;
1289 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1290 pub const EnergyTrackerCreate: POWER_INFORMATION_LEVEL = 92i32;
1291 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1292 pub const EnergyTrackerQuery: POWER_INFORMATION_LEVEL = 93i32;
1293 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1294 pub const UpdateBlackBoxRecorder: POWER_INFORMATION_LEVEL = 94i32;
1295 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1296 pub const SessionAllowExternalDmaDevices: POWER_INFORMATION_LEVEL = 95i32;
1297 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1298 pub const SendSuspendResumeNotification: POWER_INFORMATION_LEVEL = 96i32;
1299 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1300 pub const PowerInformationLevelMaximum: POWER_INFORMATION_LEVEL = 97i32;
1301 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1302 pub type POWER_PLATFORM_ROLE = i32;
1303 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1304 pub const PlatformRoleUnspecified: POWER_PLATFORM_ROLE = 0i32;
1305 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1306 pub const PlatformRoleDesktop: POWER_PLATFORM_ROLE = 1i32;
1307 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1308 pub const PlatformRoleMobile: POWER_PLATFORM_ROLE = 2i32;
1309 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1310 pub const PlatformRoleWorkstation: POWER_PLATFORM_ROLE = 3i32;
1311 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1312 pub const PlatformRoleEnterpriseServer: POWER_PLATFORM_ROLE = 4i32;
1313 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1314 pub const PlatformRoleSOHOServer: POWER_PLATFORM_ROLE = 5i32;
1315 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1316 pub const PlatformRoleAppliancePC: POWER_PLATFORM_ROLE = 6i32;
1317 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1318 pub const PlatformRolePerformanceServer: POWER_PLATFORM_ROLE = 7i32;
1319 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1320 pub const PlatformRoleSlate: POWER_PLATFORM_ROLE = 8i32;
1321 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1322 pub const PlatformRoleMaximum: POWER_PLATFORM_ROLE = 9i32;
1323 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1324 pub type POWER_PLATFORM_ROLE_VERSION = u32;
1325 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1326 pub const POWER_PLATFORM_ROLE_V1: POWER_PLATFORM_ROLE_VERSION = 1u32;
1327 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1328 pub const POWER_PLATFORM_ROLE_V2: POWER_PLATFORM_ROLE_VERSION = 2u32;
1329 #[repr(C)]
1330 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1331 #[cfg(feature = "Win32_Foundation")]
1332 pub struct POWER_POLICY {
1333 pub user: USER_POWER_POLICY,
1334 pub mach: MACHINE_POWER_POLICY,
1335 }
1336 #[cfg(feature = "Win32_Foundation")]
1337 impl ::core::marker::Copy for POWER_POLICY {}
1338 #[cfg(feature = "Win32_Foundation")]
1339 impl ::core::clone::Clone for POWER_POLICY {
1340 fn clone(&self) -> Self {
1341 *self
1342 }
1343 }
1344 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1345 pub type POWER_REQUEST_TYPE = i32;
1346 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1347 pub const PowerRequestDisplayRequired: POWER_REQUEST_TYPE = 0i32;
1348 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1349 pub const PowerRequestSystemRequired: POWER_REQUEST_TYPE = 1i32;
1350 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1351 pub const PowerRequestAwayModeRequired: POWER_REQUEST_TYPE = 2i32;
1352 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1353 pub const PowerRequestExecutionRequired: POWER_REQUEST_TYPE = 3i32;
1354 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1355 pub type POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = u32;
1356 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1357 pub const DEVICE_NOTIFY_SERVICE_HANDLE: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = 1u32;
1358 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1359 pub const DEVICE_NOTIFY_CALLBACK: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = 2u32;
1360 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1361 pub const DEVICE_NOTIFY_WINDOW_HANDLE: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = 0u32;
1362 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_UI_Shell_PropertiesSystem\"`*"]
1363 #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
1364 pub const PROCESSOR_NUMBER_PKEY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY { fmtid: ::windows_sys::core::GUID { data1: 1462028317, data2: 54703, data3: 19487, data4: [161, 3, 160, 110, 40, 242, 4, 198] }, pid: 1u32 };
1365 #[repr(C)]
1366 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1367 pub struct PROCESSOR_OBJECT_INFO {
1368 pub PhysicalID: u32,
1369 pub PBlkAddress: u32,
1370 pub PBlkLength: u8,
1371 }
1372 impl ::core::marker::Copy for PROCESSOR_OBJECT_INFO {}
1373 impl ::core::clone::Clone for PROCESSOR_OBJECT_INFO {
1374 fn clone(&self) -> Self {
1375 *self
1376 }
1377 }
1378 #[repr(C)]
1379 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1380 pub struct PROCESSOR_OBJECT_INFO_EX {
1381 pub PhysicalID: u32,
1382 pub PBlkAddress: u32,
1383 pub PBlkLength: u8,
1384 pub InitialApicId: u32,
1385 }
1386 impl ::core::marker::Copy for PROCESSOR_OBJECT_INFO_EX {}
1387 impl ::core::clone::Clone for PROCESSOR_OBJECT_INFO_EX {
1388 fn clone(&self) -> Self {
1389 *self
1390 }
1391 }
1392 #[repr(C)]
1393 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1394 pub struct PROCESSOR_POWER_POLICY {
1395 pub Revision: u32,
1396 pub DynamicThrottle: u8,
1397 pub Spare: [u8; 3],
1398 pub _bitfield: u32,
1399 pub PolicyCount: u32,
1400 pub Policy: [PROCESSOR_POWER_POLICY_INFO; 3],
1401 }
1402 impl ::core::marker::Copy for PROCESSOR_POWER_POLICY {}
1403 impl ::core::clone::Clone for PROCESSOR_POWER_POLICY {
1404 fn clone(&self) -> Self {
1405 *self
1406 }
1407 }
1408 #[repr(C)]
1409 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1410 pub struct PROCESSOR_POWER_POLICY_INFO {
1411 pub TimeCheck: u32,
1412 pub DemoteLimit: u32,
1413 pub PromoteLimit: u32,
1414 pub DemotePercent: u8,
1415 pub PromotePercent: u8,
1416 pub Spare: [u8; 2],
1417 pub _bitfield: u32,
1418 }
1419 impl ::core::marker::Copy for PROCESSOR_POWER_POLICY_INFO {}
1420 impl ::core::clone::Clone for PROCESSOR_POWER_POLICY_INFO {
1421 fn clone(&self) -> Self {
1422 *self
1423 }
1424 }
1425 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1426 #[cfg(feature = "Win32_Foundation")]
1427 pub type PWRSCHEMESENUMPROC = ::core::option::Option<unsafe extern "system" fn(index: u32, namesize: u32, name: ::windows_sys::core::PCWSTR, descriptionsize: u32, description: ::windows_sys::core::PCWSTR, policy: *const POWER_POLICY, context: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN>;
1428 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1429 #[cfg(feature = "Win32_Foundation")]
1430 pub type PWRSCHEMESENUMPROC_V1 = ::core::option::Option<unsafe extern "system" fn(index: u32, namesize: u32, name: *const i8, descriptionsize: u32, description: *const i8, policy: *const POWER_POLICY, context: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN>;
1431 #[repr(C)]
1432 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1433 pub struct SET_POWER_SETTING_VALUE {
1434 pub Version: u32,
1435 pub Guid: ::windows_sys::core::GUID,
1436 pub PowerCondition: SYSTEM_POWER_CONDITION,
1437 pub DataLength: u32,
1438 pub Data: [u8; 1],
1439 }
1440 impl ::core::marker::Copy for SET_POWER_SETTING_VALUE {}
1441 impl ::core::clone::Clone for SET_POWER_SETTING_VALUE {
1442 fn clone(&self) -> Self {
1443 *self
1444 }
1445 }
1446 #[repr(C)]
1447 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1448 #[cfg(feature = "Win32_Foundation")]
1449 pub struct SYSTEM_BATTERY_STATE {
1450 pub AcOnLine: super::super::Foundation::BOOLEAN,
1451 pub BatteryPresent: super::super::Foundation::BOOLEAN,
1452 pub Charging: super::super::Foundation::BOOLEAN,
1453 pub Discharging: super::super::Foundation::BOOLEAN,
1454 pub Spare1: [super::super::Foundation::BOOLEAN; 3],
1455 pub Tag: u8,
1456 pub MaxCapacity: u32,
1457 pub RemainingCapacity: u32,
1458 pub Rate: u32,
1459 pub EstimatedTime: u32,
1460 pub DefaultAlert1: u32,
1461 pub DefaultAlert2: u32,
1462 }
1463 #[cfg(feature = "Win32_Foundation")]
1464 impl ::core::marker::Copy for SYSTEM_BATTERY_STATE {}
1465 #[cfg(feature = "Win32_Foundation")]
1466 impl ::core::clone::Clone for SYSTEM_BATTERY_STATE {
1467 fn clone(&self) -> Self {
1468 *self
1469 }
1470 }
1471 #[repr(C)]
1472 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1473 #[cfg(feature = "Win32_Foundation")]
1474 pub struct SYSTEM_POWER_CAPABILITIES {
1475 pub PowerButtonPresent: super::super::Foundation::BOOLEAN,
1476 pub SleepButtonPresent: super::super::Foundation::BOOLEAN,
1477 pub LidPresent: super::super::Foundation::BOOLEAN,
1478 pub SystemS1: super::super::Foundation::BOOLEAN,
1479 pub SystemS2: super::super::Foundation::BOOLEAN,
1480 pub SystemS3: super::super::Foundation::BOOLEAN,
1481 pub SystemS4: super::super::Foundation::BOOLEAN,
1482 pub SystemS5: super::super::Foundation::BOOLEAN,
1483 pub HiberFilePresent: super::super::Foundation::BOOLEAN,
1484 pub FullWake: super::super::Foundation::BOOLEAN,
1485 pub VideoDimPresent: super::super::Foundation::BOOLEAN,
1486 pub ApmPresent: super::super::Foundation::BOOLEAN,
1487 pub UpsPresent: super::super::Foundation::BOOLEAN,
1488 pub ThermalControl: super::super::Foundation::BOOLEAN,
1489 pub ProcessorThrottle: super::super::Foundation::BOOLEAN,
1490 pub ProcessorMinThrottle: u8,
1491 pub ProcessorMaxThrottle: u8,
1492 pub FastSystemS4: super::super::Foundation::BOOLEAN,
1493 pub Hiberboot: super::super::Foundation::BOOLEAN,
1494 pub WakeAlarmPresent: super::super::Foundation::BOOLEAN,
1495 pub AoAc: super::super::Foundation::BOOLEAN,
1496 pub DiskSpinDown: super::super::Foundation::BOOLEAN,
1497 pub HiberFileType: u8,
1498 pub AoAcConnectivitySupported: super::super::Foundation::BOOLEAN,
1499 pub spare3: [u8; 6],
1500 pub SystemBatteriesPresent: super::super::Foundation::BOOLEAN,
1501 pub BatteriesAreShortTerm: super::super::Foundation::BOOLEAN,
1502 pub BatteryScale: [BATTERY_REPORTING_SCALE; 3],
1503 pub AcOnLineWake: SYSTEM_POWER_STATE,
1504 pub SoftLidWake: SYSTEM_POWER_STATE,
1505 pub RtcWake: SYSTEM_POWER_STATE,
1506 pub MinDeviceWakeState: SYSTEM_POWER_STATE,
1507 pub DefaultLowLatencyWake: SYSTEM_POWER_STATE,
1508 }
1509 #[cfg(feature = "Win32_Foundation")]
1510 impl ::core::marker::Copy for SYSTEM_POWER_CAPABILITIES {}
1511 #[cfg(feature = "Win32_Foundation")]
1512 impl ::core::clone::Clone for SYSTEM_POWER_CAPABILITIES {
1513 fn clone(&self) -> Self {
1514 *self
1515 }
1516 }
1517 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1518 pub type SYSTEM_POWER_CONDITION = i32;
1519 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1520 pub const PoAc: SYSTEM_POWER_CONDITION = 0i32;
1521 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1522 pub const PoDc: SYSTEM_POWER_CONDITION = 1i32;
1523 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1524 pub const PoHot: SYSTEM_POWER_CONDITION = 2i32;
1525 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1526 pub const PoConditionMaximum: SYSTEM_POWER_CONDITION = 3i32;
1527 #[repr(C)]
1528 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1529 #[cfg(feature = "Win32_Foundation")]
1530 pub struct SYSTEM_POWER_LEVEL {
1531 pub Enable: super::super::Foundation::BOOLEAN,
1532 pub Spare: [u8; 3],
1533 pub BatteryLevel: u32,
1534 pub PowerPolicy: POWER_ACTION_POLICY,
1535 pub MinSystemState: SYSTEM_POWER_STATE,
1536 }
1537 #[cfg(feature = "Win32_Foundation")]
1538 impl ::core::marker::Copy for SYSTEM_POWER_LEVEL {}
1539 #[cfg(feature = "Win32_Foundation")]
1540 impl ::core::clone::Clone for SYSTEM_POWER_LEVEL {
1541 fn clone(&self) -> Self {
1542 *self
1543 }
1544 }
1545 #[repr(C)]
1546 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1547 #[cfg(feature = "Win32_Foundation")]
1548 pub struct SYSTEM_POWER_POLICY {
1549 pub Revision: u32,
1550 pub PowerButton: POWER_ACTION_POLICY,
1551 pub SleepButton: POWER_ACTION_POLICY,
1552 pub LidClose: POWER_ACTION_POLICY,
1553 pub LidOpenWake: SYSTEM_POWER_STATE,
1554 pub Reserved: u32,
1555 pub Idle: POWER_ACTION_POLICY,
1556 pub IdleTimeout: u32,
1557 pub IdleSensitivity: u8,
1558 pub DynamicThrottle: u8,
1559 pub Spare2: [u8; 2],
1560 pub MinSleep: SYSTEM_POWER_STATE,
1561 pub MaxSleep: SYSTEM_POWER_STATE,
1562 pub ReducedLatencySleep: SYSTEM_POWER_STATE,
1563 pub WinLogonFlags: u32,
1564 pub Spare3: u32,
1565 pub DozeS4Timeout: u32,
1566 pub BroadcastCapacityResolution: u32,
1567 pub DischargePolicy: [SYSTEM_POWER_LEVEL; 4],
1568 pub VideoTimeout: u32,
1569 pub VideoDimDisplay: super::super::Foundation::BOOLEAN,
1570 pub VideoReserved: [u32; 3],
1571 pub SpindownTimeout: u32,
1572 pub OptimizeForPower: super::super::Foundation::BOOLEAN,
1573 pub FanThrottleTolerance: u8,
1574 pub ForcedThrottle: u8,
1575 pub MinThrottle: u8,
1576 pub OverThrottled: POWER_ACTION_POLICY,
1577 }
1578 #[cfg(feature = "Win32_Foundation")]
1579 impl ::core::marker::Copy for SYSTEM_POWER_POLICY {}
1580 #[cfg(feature = "Win32_Foundation")]
1581 impl ::core::clone::Clone for SYSTEM_POWER_POLICY {
1582 fn clone(&self) -> Self {
1583 *self
1584 }
1585 }
1586 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1587 pub type SYSTEM_POWER_STATE = i32;
1588 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1589 pub const PowerSystemUnspecified: SYSTEM_POWER_STATE = 0i32;
1590 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1591 pub const PowerSystemWorking: SYSTEM_POWER_STATE = 1i32;
1592 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1593 pub const PowerSystemSleeping1: SYSTEM_POWER_STATE = 2i32;
1594 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1595 pub const PowerSystemSleeping2: SYSTEM_POWER_STATE = 3i32;
1596 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1597 pub const PowerSystemSleeping3: SYSTEM_POWER_STATE = 4i32;
1598 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1599 pub const PowerSystemHibernate: SYSTEM_POWER_STATE = 5i32;
1600 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1601 pub const PowerSystemShutdown: SYSTEM_POWER_STATE = 6i32;
1602 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1603 pub const PowerSystemMaximum: SYSTEM_POWER_STATE = 7i32;
1604 #[repr(C)]
1605 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1606 pub struct SYSTEM_POWER_STATUS {
1607 pub ACLineStatus: u8,
1608 pub BatteryFlag: u8,
1609 pub BatteryLifePercent: u8,
1610 pub SystemStatusFlag: u8,
1611 pub BatteryLifeTime: u32,
1612 pub BatteryFullLifeTime: u32,
1613 }
1614 impl ::core::marker::Copy for SYSTEM_POWER_STATUS {}
1615 impl ::core::clone::Clone for SYSTEM_POWER_STATUS {
1616 fn clone(&self) -> Self {
1617 *self
1618 }
1619 }
1620 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1621 pub const SYS_BUTTON_LID: u32 = 4u32;
1622 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1623 pub const SYS_BUTTON_LID_CHANGED: u32 = 524288u32;
1624 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1625 pub const SYS_BUTTON_LID_CLOSED: u32 = 131072u32;
1626 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1627 pub const SYS_BUTTON_LID_INITIAL: u32 = 262144u32;
1628 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1629 pub const SYS_BUTTON_LID_OPEN: u32 = 65536u32;
1630 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1631 pub const SYS_BUTTON_LID_STATE_MASK: u32 = 196608u32;
1632 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1633 pub const SYS_BUTTON_POWER: u32 = 1u32;
1634 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1635 pub const SYS_BUTTON_SLEEP: u32 = 2u32;
1636 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1637 pub const SYS_BUTTON_WAKE: u32 = 2147483648u32;
1638 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1639 pub const THERMAL_COOLING_INTERFACE_VERSION: u32 = 1u32;
1640 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1641 pub const THERMAL_DEVICE_INTERFACE_VERSION: u32 = 1u32;
1642 #[repr(C)]
1643 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1644 pub struct THERMAL_EVENT {
1645 pub Version: u32,
1646 pub Size: u32,
1647 pub Type: u32,
1648 pub Temperature: u32,
1649 pub TripPointTemperature: u32,
1650 pub Initiator: ::windows_sys::core::PWSTR,
1651 }
1652 impl ::core::marker::Copy for THERMAL_EVENT {}
1653 impl ::core::clone::Clone for THERMAL_EVENT {
1654 fn clone(&self) -> Self {
1655 *self
1656 }
1657 }
1658 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1659 pub const THERMAL_EVENT_VERSION: u32 = 1u32;
1660 #[repr(C)]
1661 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1662 pub struct THERMAL_INFORMATION {
1663 pub ThermalStamp: u32,
1664 pub ThermalConstant1: u32,
1665 pub ThermalConstant2: u32,
1666 pub Processors: usize,
1667 pub SamplingPeriod: u32,
1668 pub CurrentTemperature: u32,
1669 pub PassiveTripPoint: u32,
1670 pub CriticalTripPoint: u32,
1671 pub ActiveTripPointCount: u8,
1672 pub ActiveTripPoint: [u32; 10],
1673 }
1674 impl ::core::marker::Copy for THERMAL_INFORMATION {}
1675 impl ::core::clone::Clone for THERMAL_INFORMATION {
1676 fn clone(&self) -> Self {
1677 *self
1678 }
1679 }
1680 #[repr(C)]
1681 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1682 #[cfg(feature = "Win32_Foundation")]
1683 pub struct THERMAL_POLICY {
1684 pub Version: u32,
1685 pub WaitForUpdate: super::super::Foundation::BOOLEAN,
1686 pub Hibernate: super::super::Foundation::BOOLEAN,
1687 pub Critical: super::super::Foundation::BOOLEAN,
1688 pub ThermalStandby: super::super::Foundation::BOOLEAN,
1689 pub ActivationReasons: u32,
1690 pub PassiveLimit: u32,
1691 pub ActiveLevel: u32,
1692 pub OverThrottled: super::super::Foundation::BOOLEAN,
1693 }
1694 #[cfg(feature = "Win32_Foundation")]
1695 impl ::core::marker::Copy for THERMAL_POLICY {}
1696 #[cfg(feature = "Win32_Foundation")]
1697 impl ::core::clone::Clone for THERMAL_POLICY {
1698 fn clone(&self) -> Self {
1699 *self
1700 }
1701 }
1702 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1703 pub const THERMAL_POLICY_VERSION_1: u32 = 1u32;
1704 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1705 pub const THERMAL_POLICY_VERSION_2: u32 = 2u32;
1706 #[repr(C)]
1707 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1708 pub struct THERMAL_WAIT_READ {
1709 pub Timeout: u32,
1710 pub LowTemperature: u32,
1711 pub HighTemperature: u32,
1712 }
1713 impl ::core::marker::Copy for THERMAL_WAIT_READ {}
1714 impl ::core::clone::Clone for THERMAL_WAIT_READ {
1715 fn clone(&self) -> Self {
1716 *self
1717 }
1718 }
1719 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1720 pub const TZ_ACTIVATION_REASON_CURRENT: u32 = 2u32;
1721 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1722 pub const TZ_ACTIVATION_REASON_THERMAL: u32 = 1u32;
1723 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1724 pub const UNKNOWN_CAPACITY: u32 = 4294967295u32;
1725 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1726 pub const UNKNOWN_CURRENT: u32 = 4294967295u32;
1727 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1728 pub const UNKNOWN_RATE: u32 = 2147483648u32;
1729 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1730 pub const UNKNOWN_VOLTAGE: u32 = 4294967295u32;
1731 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1732 pub type USB_CHARGER_PORT = i32;
1733 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1734 pub const UsbChargerPort_Legacy: USB_CHARGER_PORT = 0i32;
1735 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1736 pub const UsbChargerPort_TypeC: USB_CHARGER_PORT = 1i32;
1737 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1738 pub const UsbChargerPort_Max: USB_CHARGER_PORT = 2i32;
1739 #[repr(C)]
1740 #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"]
1741 #[cfg(feature = "Win32_Foundation")]
1742 pub struct USER_POWER_POLICY {
1743 pub Revision: u32,
1744 pub IdleAc: POWER_ACTION_POLICY,
1745 pub IdleDc: POWER_ACTION_POLICY,
1746 pub IdleTimeoutAc: u32,
1747 pub IdleTimeoutDc: u32,
1748 pub IdleSensitivityAc: u8,
1749 pub IdleSensitivityDc: u8,
1750 pub ThrottlePolicyAc: u8,
1751 pub ThrottlePolicyDc: u8,
1752 pub MaxSleepAc: SYSTEM_POWER_STATE,
1753 pub MaxSleepDc: SYSTEM_POWER_STATE,
1754 pub Reserved: [u32; 2],
1755 pub VideoTimeoutAc: u32,
1756 pub VideoTimeoutDc: u32,
1757 pub SpindownTimeoutAc: u32,
1758 pub SpindownTimeoutDc: u32,
1759 pub OptimizeForPowerAc: super::super::Foundation::BOOLEAN,
1760 pub OptimizeForPowerDc: super::super::Foundation::BOOLEAN,
1761 pub FanThrottleToleranceAc: u8,
1762 pub FanThrottleToleranceDc: u8,
1763 pub ForcedThrottleAc: u8,
1764 pub ForcedThrottleDc: u8,
1765 }
1766 #[cfg(feature = "Win32_Foundation")]
1767 impl ::core::marker::Copy for USER_POWER_POLICY {}
1768 #[cfg(feature = "Win32_Foundation")]
1769 impl ::core::clone::Clone for USER_POWER_POLICY {
1770 fn clone(&self) -> Self {
1771 *self
1772 }
1773 }
1774 #[repr(C)]
1775 #[doc = "*Required features: `\"Win32_System_Power\"`*"]
1776 pub struct WAKE_ALARM_INFORMATION {
1777 pub TimerIdentifier: u32,
1778 pub Timeout: u32,
1779 }
1780 impl ::core::marker::Copy for WAKE_ALARM_INFORMATION {}
1781 impl ::core::clone::Clone for WAKE_ALARM_INFORMATION {
1782 fn clone(&self) -> Self {
1783 *self
1784 }
1785 }