diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/rust/winreg/src/enums.rs | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/winreg/src/enums.rs')
-rw-r--r-- | third_party/rust/winreg/src/enums.rs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/third_party/rust/winreg/src/enums.rs b/third_party/rust/winreg/src/enums.rs new file mode 100644 index 0000000000..b537b287c2 --- /dev/null +++ b/third_party/rust/winreg/src/enums.rs @@ -0,0 +1,51 @@ +// Copyright 2015, Igor Shaula +// Licensed under the MIT License <LICENSE or +// http://opensource.org/licenses/MIT>. This file +// may not be copied, modified, or distributed +// except according to those terms. + +//! `use winreg::enums::*;` to import all needed enumerations and constants +use super::winapi; +pub use winapi::um::winnt::{ + KEY_ALL_ACCESS, KEY_CREATE_LINK, KEY_CREATE_SUB_KEY, KEY_ENUMERATE_SUB_KEYS, KEY_EXECUTE, + KEY_NOTIFY, KEY_QUERY_VALUE, KEY_READ, KEY_SET_VALUE, KEY_WOW64_32KEY, KEY_WOW64_64KEY, + KEY_WOW64_RES, KEY_WRITE, +}; +pub use winapi::um::winreg::{ + HKEY_CLASSES_ROOT, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER, HKEY_CURRENT_USER_LOCAL_SETTINGS, + HKEY_DYN_DATA, HKEY_LOCAL_MACHINE, HKEY_PERFORMANCE_DATA, HKEY_PERFORMANCE_NLSTEXT, + HKEY_PERFORMANCE_TEXT, HKEY_USERS, REG_PROCESS_APPKEY, +}; + +macro_rules! winapi_enum{ + ($t:ident, $doc:expr => [$($v:ident),*]) => ( + #[doc=$doc] + #[allow(non_camel_case_types)] + #[derive(Debug,Clone,PartialEq)] + pub enum $t { + $( $v = winapi::um::winnt::$v as isize ),* + } + ) +} + +winapi_enum!(RegType, "Enumeration of possible registry value types" => [ +REG_NONE, +REG_SZ, +REG_EXPAND_SZ, +REG_BINARY, +REG_DWORD, +REG_DWORD_BIG_ENDIAN, +REG_LINK, +REG_MULTI_SZ, +REG_RESOURCE_LIST, +REG_FULL_RESOURCE_DESCRIPTOR, +REG_RESOURCE_REQUIREMENTS_LIST, +REG_QWORD +]); +pub use self::RegType::*; + +winapi_enum!(RegDisposition, "Enumeration of possible disposition values" => [ +REG_CREATED_NEW_KEY, +REG_OPENED_EXISTING_KEY +]); +pub use self::RegDisposition::*; |