]> git.proxmox.com Git - rustc.git/blame - src/vendor/winapi/src/um/powersetting.rs
New upstream version 1.24.1+dfsg1
[rustc.git] / src / vendor / winapi / src / um / powersetting.rs
CommitLineData
ff7c6d11
XL
1// Copyright © 2016-2017 winapi-rs developers
2// Licensed under the Apache License, Version 2.0
3// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5// All files in the project carrying such notice may not be copied, modified, or distributed
6// except according to those terms.
7use shared::guiddef::{GUID, LPCGUID};
8use shared::minwindef::{DWORD, HKEY, LPBYTE, LPDWORD, PUCHAR, PULONG};
9use um::winnt::{HANDLE};
10use um::winuser::{HPOWERNOTIFY, PHPOWERNOTIFY};
11extern "system" {
12 pub fn PowerReadACValue(
13 RootPowerKey: HKEY,
14 SchemeGuid: *const GUID,
15 SubGroupOfPowerSettingsGuid: *const GUID,
16 PowerSettingGuid: *const GUID,
17 Type: PULONG,
18 Buffer: LPBYTE,
19 BufferSize: LPDWORD,
20 ) -> DWORD;
21 pub fn PowerReadDCValue(
22 RootPowerKey: HKEY,
23 SchemeGuid: *const GUID,
24 SubGroupOfPowerSettingsGuid: *const GUID,
25 PowerSettingGuid: *const GUID,
26 Type: PULONG,
27 Buffer: PUCHAR,
28 BufferSize: LPDWORD,
29 ) -> DWORD;
30 pub fn PowerWriteACValueIndex(
31 RootPowerKey: HKEY,
32 SchemeGuid: *const GUID,
33 SubGroupOfPowerSettingsGuid: *const GUID,
34 PowerSettingGuid: *const GUID,
35 AcValueIndex: DWORD,
36 ) -> DWORD;
37 pub fn PowerWriteDCValueIndex(
38 RootPowerKey: HKEY,
39 SchemeGuid: *const GUID,
40 SubGroupOfPowerSettingsGuid: *const GUID,
41 PowerSettingGuid: *const GUID,
42 DcValueIndex: DWORD,
43 ) -> DWORD;
44 pub fn PowerGetActiveScheme(
45 UserRootPowerKey: HKEY,
46 ActivePolicyGuid: *mut *mut GUID,
47 ) -> DWORD;
48 pub fn PowerSetActiveScheme(
49 UserRootPowerKey: HKEY,
50 SchemeGuid: *const GUID,
51 ) -> DWORD;
52 pub fn PowerSettingRegisterNotification(
53 SettingGuid: LPCGUID,
54 Flags: DWORD,
55 Recipient: HANDLE,
56 RegistrationHandle: PHPOWERNOTIFY,
57 ) -> DWORD;
58 pub fn PowerSettingUnregisterNotification(
59 RegistrationHandle: HPOWERNOTIFY,
60 ) -> DWORD;
61}