#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum Key {
Unknown,
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M,
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
Key1,
Key2,
Key3,
Key4,
Key5,
Key6,
Key7,
Key8,
Key9,
Key0,
Enter,
Escape,
Backspace,
Tab,
Space,
Minus,
Equals,
LeftBrace,
RightBrace,
Backslash,
NonUsHash,
Semicolon,
Apostrophe,
GraveAccent,
Comma,
Dot,
Slash,
CapsLock,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
PrintScreen,
ScrollLock,
Pause,
Insert,
Home,
PageUp,
Delete,
End,
PageDown,
Right,
Left,
Down,
Up,
NumLock,
KeypadSlash,
KeypadAsterisk,
KeypadMinus,
KeypadPlus,
KeypadEnter,
Keypad1,
Keypad2,
Keypad3,
Keypad4,
Keypad5,
Keypad6,
Keypad7,
Keypad8,
Keypad9,
Keypad0,
KeypadDot,
NonUsBackslash,
KeypadEquals,
Menu,
LeftCtrl,
LeftShift,
LeftAlt,
LeftMeta,
RightCtrl,
RightShift,
RightAlt,
RightMeta,
Mute,
VolumeDown,
VolumeUp,
PlayPause,
MediaMute,
MediaVolumeIncrement,
MediaVolumeDecrement,
AcBack,
AcRefresh,
AcFullScreenView,
AcSelectTaskApplication,
BrightnessDown,
BrightnessUp,
Assistant,
Power,
Unknown0055,
Unknown0056,
Unknown0059,
Unknown005C,
Unknown005D,
Unknown005E,
Unknown0079,
Unknown007A,
Unknown007B,
Unknown007C,
Unknown0085,
Unknown0087,
Unknown0089,
Unknown009C,
Unknown009F,
Unknown00A0,
Unknown00A2,
Unknown00A3,
Unknown00A5,
Unknown00A6,
Unknown00A7,
Unknown00A8,
Unknown00A9,
Unknown00Ad,
Unknown00B1,
Unknown00B2,
Unknown00B3,
Unknown00B4,
Unknown00C9,
Unknown00Cf,
Unknown00D0,
Unknown00D4,
Unknown00E2,
Unknown0120,
Unknown0121,
Unknown0122,
Unknown0123,
Unknown0124,
Unknown0125,
Unknown0126,
Unknown0127,
Unknown0128,
Unknown0129,
Unknown012A,
Unknown012B,
Unknown012C,
Unknown012D,
Unknown012E,
Unknown012F,
Unknown0130,
Unknown0131,
Unknown0132,
Unknown0133,
Unknown0134,
Unknown0135,
Unknown0136,
Unknown0137,
Unknown0138,
Unknown0139,
Unknown013A,
Unknown013B,
Unknown013C,
Unknown013D,
Unknown013E,
Unknown0161,
Unknown016A,
Unknown016E,
Unknown0172,
Unknown0179,
Unknown018E,
Unknown018F,
Unknown0190,
Unknown0191,
Unknown0192,
Unknown0193,
Unknown0195,
Unknown01D0,
Unknown020A,
Unknown020B,
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u32,
},
}
#[macro_export]
macro_rules! KeyUnknown {
() => {
_
};
}
impl Key {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::Unknown),
458756 => Some(Self::A),
458757 => Some(Self::B),
458758 => Some(Self::C),
458759 => Some(Self::D),
458760 => Some(Self::E),
458761 => Some(Self::F),
458762 => Some(Self::G),
458763 => Some(Self::H),
458764 => Some(Self::I),
458765 => Some(Self::J),
458766 => Some(Self::K),
458767 => Some(Self::L),
458768 => Some(Self::M),
458769 => Some(Self::N),
458770 => Some(Self::O),
458771 => Some(Self::P),
458772 => Some(Self::Q),
458773 => Some(Self::R),
458774 => Some(Self::S),
458775 => Some(Self::T),
458776 => Some(Self::U),
458777 => Some(Self::V),
458778 => Some(Self::W),
458779 => Some(Self::X),
458780 => Some(Self::Y),
458781 => Some(Self::Z),
458782 => Some(Self::Key1),
458783 => Some(Self::Key2),
458784 => Some(Self::Key3),
458785 => Some(Self::Key4),
458786 => Some(Self::Key5),
458787 => Some(Self::Key6),
458788 => Some(Self::Key7),
458789 => Some(Self::Key8),
458790 => Some(Self::Key9),
458791 => Some(Self::Key0),
458792 => Some(Self::Enter),
458793 => Some(Self::Escape),
458794 => Some(Self::Backspace),
458795 => Some(Self::Tab),
458796 => Some(Self::Space),
458797 => Some(Self::Minus),
458798 => Some(Self::Equals),
458799 => Some(Self::LeftBrace),
458800 => Some(Self::RightBrace),
458801 => Some(Self::Backslash),
458802 => Some(Self::NonUsHash),
458803 => Some(Self::Semicolon),
458804 => Some(Self::Apostrophe),
458805 => Some(Self::GraveAccent),
458806 => Some(Self::Comma),
458807 => Some(Self::Dot),
458808 => Some(Self::Slash),
458809 => Some(Self::CapsLock),
458810 => Some(Self::F1),
458811 => Some(Self::F2),
458812 => Some(Self::F3),
458813 => Some(Self::F4),
458814 => Some(Self::F5),
458815 => Some(Self::F6),
458816 => Some(Self::F7),
458817 => Some(Self::F8),
458818 => Some(Self::F9),
458819 => Some(Self::F10),
458820 => Some(Self::F11),
458821 => Some(Self::F12),
458822 => Some(Self::PrintScreen),
458823 => Some(Self::ScrollLock),
458824 => Some(Self::Pause),
458825 => Some(Self::Insert),
458826 => Some(Self::Home),
458827 => Some(Self::PageUp),
458828 => Some(Self::Delete),
458829 => Some(Self::End),
458830 => Some(Self::PageDown),
458831 => Some(Self::Right),
458832 => Some(Self::Left),
458833 => Some(Self::Down),
458834 => Some(Self::Up),
458835 => Some(Self::NumLock),
458836 => Some(Self::KeypadSlash),
458837 => Some(Self::KeypadAsterisk),
458838 => Some(Self::KeypadMinus),
458839 => Some(Self::KeypadPlus),
458840 => Some(Self::KeypadEnter),
458841 => Some(Self::Keypad1),
458842 => Some(Self::Keypad2),
458843 => Some(Self::Keypad3),
458844 => Some(Self::Keypad4),
458845 => Some(Self::Keypad5),
458846 => Some(Self::Keypad6),
458847 => Some(Self::Keypad7),
458848 => Some(Self::Keypad8),
458849 => Some(Self::Keypad9),
458850 => Some(Self::Keypad0),
458851 => Some(Self::KeypadDot),
458852 => Some(Self::NonUsBackslash),
458855 => Some(Self::KeypadEquals),
458870 => Some(Self::Menu),
458976 => Some(Self::LeftCtrl),
458977 => Some(Self::LeftShift),
458978 => Some(Self::LeftAlt),
458979 => Some(Self::LeftMeta),
458980 => Some(Self::RightCtrl),
458981 => Some(Self::RightShift),
458982 => Some(Self::RightAlt),
458983 => Some(Self::RightMeta),
458879 => Some(Self::Mute),
458881 => Some(Self::VolumeDown),
458880 => Some(Self::VolumeUp),
786637 => Some(Self::PlayPause),
786658 => Some(Self::MediaMute),
786665 => Some(Self::MediaVolumeIncrement),
786666 => Some(Self::MediaVolumeDecrement),
786980 => Some(Self::AcBack),
786983 => Some(Self::AcRefresh),
786992 => Some(Self::AcFullScreenView),
786850 => Some(Self::AcSelectTaskApplication),
786543 => Some(Self::BrightnessDown),
786544 => Some(Self::BrightnessUp),
4294901761 => Some(Self::Assistant),
4294901762 => Some(Self::Power),
4294901845 => Some(Self::Unknown0055),
4294901846 => Some(Self::Unknown0056),
4294901849 => Some(Self::Unknown0059),
4294901852 => Some(Self::Unknown005C),
4294901853 => Some(Self::Unknown005D),
4294901854 => Some(Self::Unknown005E),
4294901881 => Some(Self::Unknown0079),
4294901882 => Some(Self::Unknown007A),
4294901883 => Some(Self::Unknown007B),
4294901884 => Some(Self::Unknown007C),
4294901893 => Some(Self::Unknown0085),
4294901895 => Some(Self::Unknown0087),
4294901897 => Some(Self::Unknown0089),
4294901916 => Some(Self::Unknown009C),
4294901919 => Some(Self::Unknown009F),
4294901920 => Some(Self::Unknown00A0),
4294901922 => Some(Self::Unknown00A2),
4294901923 => Some(Self::Unknown00A3),
4294901925 => Some(Self::Unknown00A5),
4294901926 => Some(Self::Unknown00A6),
4294901927 => Some(Self::Unknown00A7),
4294901928 => Some(Self::Unknown00A8),
4294901929 => Some(Self::Unknown00A9),
4294901933 => Some(Self::Unknown00Ad),
4294901937 => Some(Self::Unknown00B1),
4294901938 => Some(Self::Unknown00B2),
4294901939 => Some(Self::Unknown00B3),
4294901940 => Some(Self::Unknown00B4),
4294901961 => Some(Self::Unknown00C9),
4294901967 => Some(Self::Unknown00Cf),
4294901968 => Some(Self::Unknown00D0),
4294901972 => Some(Self::Unknown00D4),
4294901986 => Some(Self::Unknown00E2),
4294902048 => Some(Self::Unknown0120),
4294902049 => Some(Self::Unknown0121),
4294902050 => Some(Self::Unknown0122),
4294902051 => Some(Self::Unknown0123),
4294902052 => Some(Self::Unknown0124),
4294902053 => Some(Self::Unknown0125),
4294902054 => Some(Self::Unknown0126),
4294902055 => Some(Self::Unknown0127),
4294902056 => Some(Self::Unknown0128),
4294902057 => Some(Self::Unknown0129),
4294902058 => Some(Self::Unknown012A),
4294902059 => Some(Self::Unknown012B),
4294902060 => Some(Self::Unknown012C),
4294902061 => Some(Self::Unknown012D),
4294902062 => Some(Self::Unknown012E),
4294902063 => Some(Self::Unknown012F),
4294902064 => Some(Self::Unknown0130),
4294902065 => Some(Self::Unknown0131),
4294902066 => Some(Self::Unknown0132),
4294902067 => Some(Self::Unknown0133),
4294902068 => Some(Self::Unknown0134),
4294902069 => Some(Self::Unknown0135),
4294902070 => Some(Self::Unknown0136),
4294902071 => Some(Self::Unknown0137),
4294902072 => Some(Self::Unknown0138),
4294902073 => Some(Self::Unknown0139),
4294902074 => Some(Self::Unknown013A),
4294902075 => Some(Self::Unknown013B),
4294902076 => Some(Self::Unknown013C),
4294902077 => Some(Self::Unknown013D),
4294902078 => Some(Self::Unknown013E),
4294902113 => Some(Self::Unknown0161),
4294902122 => Some(Self::Unknown016A),
4294902126 => Some(Self::Unknown016E),
4294902130 => Some(Self::Unknown0172),
4294902137 => Some(Self::Unknown0179),
4294902158 => Some(Self::Unknown018E),
4294902159 => Some(Self::Unknown018F),
4294902160 => Some(Self::Unknown0190),
4294902161 => Some(Self::Unknown0191),
4294902162 => Some(Self::Unknown0192),
4294902163 => Some(Self::Unknown0193),
4294902165 => Some(Self::Unknown0195),
4294902224 => Some(Self::Unknown01D0),
4294902282 => Some(Self::Unknown020A),
4294902283 => Some(Self::Unknown020B),
_ => None,
}
}
#[inline]
pub fn from_primitive_allow_unknown(prim: u32) -> Self {
match prim {
0 => Self::Unknown,
458756 => Self::A,
458757 => Self::B,
458758 => Self::C,
458759 => Self::D,
458760 => Self::E,
458761 => Self::F,
458762 => Self::G,
458763 => Self::H,
458764 => Self::I,
458765 => Self::J,
458766 => Self::K,
458767 => Self::L,
458768 => Self::M,
458769 => Self::N,
458770 => Self::O,
458771 => Self::P,
458772 => Self::Q,
458773 => Self::R,
458774 => Self::S,
458775 => Self::T,
458776 => Self::U,
458777 => Self::V,
458778 => Self::W,
458779 => Self::X,
458780 => Self::Y,
458781 => Self::Z,
458782 => Self::Key1,
458783 => Self::Key2,
458784 => Self::Key3,
458785 => Self::Key4,
458786 => Self::Key5,
458787 => Self::Key6,
458788 => Self::Key7,
458789 => Self::Key8,
458790 => Self::Key9,
458791 => Self::Key0,
458792 => Self::Enter,
458793 => Self::Escape,
458794 => Self::Backspace,
458795 => Self::Tab,
458796 => Self::Space,
458797 => Self::Minus,
458798 => Self::Equals,
458799 => Self::LeftBrace,
458800 => Self::RightBrace,
458801 => Self::Backslash,
458802 => Self::NonUsHash,
458803 => Self::Semicolon,
458804 => Self::Apostrophe,
458805 => Self::GraveAccent,
458806 => Self::Comma,
458807 => Self::Dot,
458808 => Self::Slash,
458809 => Self::CapsLock,
458810 => Self::F1,
458811 => Self::F2,
458812 => Self::F3,
458813 => Self::F4,
458814 => Self::F5,
458815 => Self::F6,
458816 => Self::F7,
458817 => Self::F8,
458818 => Self::F9,
458819 => Self::F10,
458820 => Self::F11,
458821 => Self::F12,
458822 => Self::PrintScreen,
458823 => Self::ScrollLock,
458824 => Self::Pause,
458825 => Self::Insert,
458826 => Self::Home,
458827 => Self::PageUp,
458828 => Self::Delete,
458829 => Self::End,
458830 => Self::PageDown,
458831 => Self::Right,
458832 => Self::Left,
458833 => Self::Down,
458834 => Self::Up,
458835 => Self::NumLock,
458836 => Self::KeypadSlash,
458837 => Self::KeypadAsterisk,
458838 => Self::KeypadMinus,
458839 => Self::KeypadPlus,
458840 => Self::KeypadEnter,
458841 => Self::Keypad1,
458842 => Self::Keypad2,
458843 => Self::Keypad3,
458844 => Self::Keypad4,
458845 => Self::Keypad5,
458846 => Self::Keypad6,
458847 => Self::Keypad7,
458848 => Self::Keypad8,
458849 => Self::Keypad9,
458850 => Self::Keypad0,
458851 => Self::KeypadDot,
458852 => Self::NonUsBackslash,
458855 => Self::KeypadEquals,
458870 => Self::Menu,
458976 => Self::LeftCtrl,
458977 => Self::LeftShift,
458978 => Self::LeftAlt,
458979 => Self::LeftMeta,
458980 => Self::RightCtrl,
458981 => Self::RightShift,
458982 => Self::RightAlt,
458983 => Self::RightMeta,
458879 => Self::Mute,
458881 => Self::VolumeDown,
458880 => Self::VolumeUp,
786637 => Self::PlayPause,
786658 => Self::MediaMute,
786665 => Self::MediaVolumeIncrement,
786666 => Self::MediaVolumeDecrement,
786980 => Self::AcBack,
786983 => Self::AcRefresh,
786992 => Self::AcFullScreenView,
786850 => Self::AcSelectTaskApplication,
786543 => Self::BrightnessDown,
786544 => Self::BrightnessUp,
4294901761 => Self::Assistant,
4294901762 => Self::Power,
4294901845 => Self::Unknown0055,
4294901846 => Self::Unknown0056,
4294901849 => Self::Unknown0059,
4294901852 => Self::Unknown005C,
4294901853 => Self::Unknown005D,
4294901854 => Self::Unknown005E,
4294901881 => Self::Unknown0079,
4294901882 => Self::Unknown007A,
4294901883 => Self::Unknown007B,
4294901884 => Self::Unknown007C,
4294901893 => Self::Unknown0085,
4294901895 => Self::Unknown0087,
4294901897 => Self::Unknown0089,
4294901916 => Self::Unknown009C,
4294901919 => Self::Unknown009F,
4294901920 => Self::Unknown00A0,
4294901922 => Self::Unknown00A2,
4294901923 => Self::Unknown00A3,
4294901925 => Self::Unknown00A5,
4294901926 => Self::Unknown00A6,
4294901927 => Self::Unknown00A7,
4294901928 => Self::Unknown00A8,
4294901929 => Self::Unknown00A9,
4294901933 => Self::Unknown00Ad,
4294901937 => Self::Unknown00B1,
4294901938 => Self::Unknown00B2,
4294901939 => Self::Unknown00B3,
4294901940 => Self::Unknown00B4,
4294901961 => Self::Unknown00C9,
4294901967 => Self::Unknown00Cf,
4294901968 => Self::Unknown00D0,
4294901972 => Self::Unknown00D4,
4294901986 => Self::Unknown00E2,
4294902048 => Self::Unknown0120,
4294902049 => Self::Unknown0121,
4294902050 => Self::Unknown0122,
4294902051 => Self::Unknown0123,
4294902052 => Self::Unknown0124,
4294902053 => Self::Unknown0125,
4294902054 => Self::Unknown0126,
4294902055 => Self::Unknown0127,
4294902056 => Self::Unknown0128,
4294902057 => Self::Unknown0129,
4294902058 => Self::Unknown012A,
4294902059 => Self::Unknown012B,
4294902060 => Self::Unknown012C,
4294902061 => Self::Unknown012D,
4294902062 => Self::Unknown012E,
4294902063 => Self::Unknown012F,
4294902064 => Self::Unknown0130,
4294902065 => Self::Unknown0131,
4294902066 => Self::Unknown0132,
4294902067 => Self::Unknown0133,
4294902068 => Self::Unknown0134,
4294902069 => Self::Unknown0135,
4294902070 => Self::Unknown0136,
4294902071 => Self::Unknown0137,
4294902072 => Self::Unknown0138,
4294902073 => Self::Unknown0139,
4294902074 => Self::Unknown013A,
4294902075 => Self::Unknown013B,
4294902076 => Self::Unknown013C,
4294902077 => Self::Unknown013D,
4294902078 => Self::Unknown013E,
4294902113 => Self::Unknown0161,
4294902122 => Self::Unknown016A,
4294902126 => Self::Unknown016E,
4294902130 => Self::Unknown0172,
4294902137 => Self::Unknown0179,
4294902158 => Self::Unknown018E,
4294902159 => Self::Unknown018F,
4294902160 => Self::Unknown0190,
4294902161 => Self::Unknown0191,
4294902162 => Self::Unknown0192,
4294902163 => Self::Unknown0193,
4294902165 => Self::Unknown0195,
4294902224 => Self::Unknown01D0,
4294902282 => Self::Unknown020A,
4294902283 => Self::Unknown020B,
unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
}
}
#[inline]
pub fn unknown() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0x0 }
}
#[inline]
pub const fn into_primitive(self) -> u32 {
match self {
Self::Unknown => 0,
Self::A => 458756,
Self::B => 458757,
Self::C => 458758,
Self::D => 458759,
Self::E => 458760,
Self::F => 458761,
Self::G => 458762,
Self::H => 458763,
Self::I => 458764,
Self::J => 458765,
Self::K => 458766,
Self::L => 458767,
Self::M => 458768,
Self::N => 458769,
Self::O => 458770,
Self::P => 458771,
Self::Q => 458772,
Self::R => 458773,
Self::S => 458774,
Self::T => 458775,
Self::U => 458776,
Self::V => 458777,
Self::W => 458778,
Self::X => 458779,
Self::Y => 458780,
Self::Z => 458781,
Self::Key1 => 458782,
Self::Key2 => 458783,
Self::Key3 => 458784,
Self::Key4 => 458785,
Self::Key5 => 458786,
Self::Key6 => 458787,
Self::Key7 => 458788,
Self::Key8 => 458789,
Self::Key9 => 458790,
Self::Key0 => 458791,
Self::Enter => 458792,
Self::Escape => 458793,
Self::Backspace => 458794,
Self::Tab => 458795,
Self::Space => 458796,
Self::Minus => 458797,
Self::Equals => 458798,
Self::LeftBrace => 458799,
Self::RightBrace => 458800,
Self::Backslash => 458801,
Self::NonUsHash => 458802,
Self::Semicolon => 458803,
Self::Apostrophe => 458804,
Self::GraveAccent => 458805,
Self::Comma => 458806,
Self::Dot => 458807,
Self::Slash => 458808,
Self::CapsLock => 458809,
Self::F1 => 458810,
Self::F2 => 458811,
Self::F3 => 458812,
Self::F4 => 458813,
Self::F5 => 458814,
Self::F6 => 458815,
Self::F7 => 458816,
Self::F8 => 458817,
Self::F9 => 458818,
Self::F10 => 458819,
Self::F11 => 458820,
Self::F12 => 458821,
Self::PrintScreen => 458822,
Self::ScrollLock => 458823,
Self::Pause => 458824,
Self::Insert => 458825,
Self::Home => 458826,
Self::PageUp => 458827,
Self::Delete => 458828,
Self::End => 458829,
Self::PageDown => 458830,
Self::Right => 458831,
Self::Left => 458832,
Self::Down => 458833,
Self::Up => 458834,
Self::NumLock => 458835,
Self::KeypadSlash => 458836,
Self::KeypadAsterisk => 458837,
Self::KeypadMinus => 458838,
Self::KeypadPlus => 458839,
Self::KeypadEnter => 458840,
Self::Keypad1 => 458841,
Self::Keypad2 => 458842,
Self::Keypad3 => 458843,
Self::Keypad4 => 458844,
Self::Keypad5 => 458845,
Self::Keypad6 => 458846,
Self::Keypad7 => 458847,
Self::Keypad8 => 458848,
Self::Keypad9 => 458849,
Self::Keypad0 => 458850,
Self::KeypadDot => 458851,
Self::NonUsBackslash => 458852,
Self::KeypadEquals => 458855,
Self::Menu => 458870,
Self::LeftCtrl => 458976,
Self::LeftShift => 458977,
Self::LeftAlt => 458978,
Self::LeftMeta => 458979,
Self::RightCtrl => 458980,
Self::RightShift => 458981,
Self::RightAlt => 458982,
Self::RightMeta => 458983,
Self::Mute => 458879,
Self::VolumeDown => 458881,
Self::VolumeUp => 458880,
Self::PlayPause => 786637,
Self::MediaMute => 786658,
Self::MediaVolumeIncrement => 786665,
Self::MediaVolumeDecrement => 786666,
Self::AcBack => 786980,
Self::AcRefresh => 786983,
Self::AcFullScreenView => 786992,
Self::AcSelectTaskApplication => 786850,
Self::BrightnessDown => 786543,
Self::BrightnessUp => 786544,
Self::Assistant => 4294901761,
Self::Power => 4294901762,
Self::Unknown0055 => 4294901845,
Self::Unknown0056 => 4294901846,
Self::Unknown0059 => 4294901849,
Self::Unknown005C => 4294901852,
Self::Unknown005D => 4294901853,
Self::Unknown005E => 4294901854,
Self::Unknown0079 => 4294901881,
Self::Unknown007A => 4294901882,
Self::Unknown007B => 4294901883,
Self::Unknown007C => 4294901884,
Self::Unknown0085 => 4294901893,
Self::Unknown0087 => 4294901895,
Self::Unknown0089 => 4294901897,
Self::Unknown009C => 4294901916,
Self::Unknown009F => 4294901919,
Self::Unknown00A0 => 4294901920,
Self::Unknown00A2 => 4294901922,
Self::Unknown00A3 => 4294901923,
Self::Unknown00A5 => 4294901925,
Self::Unknown00A6 => 4294901926,
Self::Unknown00A7 => 4294901927,
Self::Unknown00A8 => 4294901928,
Self::Unknown00A9 => 4294901929,
Self::Unknown00Ad => 4294901933,
Self::Unknown00B1 => 4294901937,
Self::Unknown00B2 => 4294901938,
Self::Unknown00B3 => 4294901939,
Self::Unknown00B4 => 4294901940,
Self::Unknown00C9 => 4294901961,
Self::Unknown00Cf => 4294901967,
Self::Unknown00D0 => 4294901968,
Self::Unknown00D4 => 4294901972,
Self::Unknown00E2 => 4294901986,
Self::Unknown0120 => 4294902048,
Self::Unknown0121 => 4294902049,
Self::Unknown0122 => 4294902050,
Self::Unknown0123 => 4294902051,
Self::Unknown0124 => 4294902052,
Self::Unknown0125 => 4294902053,
Self::Unknown0126 => 4294902054,
Self::Unknown0127 => 4294902055,
Self::Unknown0128 => 4294902056,
Self::Unknown0129 => 4294902057,
Self::Unknown012A => 4294902058,
Self::Unknown012B => 4294902059,
Self::Unknown012C => 4294902060,
Self::Unknown012D => 4294902061,
Self::Unknown012E => 4294902062,
Self::Unknown012F => 4294902063,
Self::Unknown0130 => 4294902064,
Self::Unknown0131 => 4294902065,
Self::Unknown0132 => 4294902066,
Self::Unknown0133 => 4294902067,
Self::Unknown0134 => 4294902068,
Self::Unknown0135 => 4294902069,
Self::Unknown0136 => 4294902070,
Self::Unknown0137 => 4294902071,
Self::Unknown0138 => 4294902072,
Self::Unknown0139 => 4294902073,
Self::Unknown013A => 4294902074,
Self::Unknown013B => 4294902075,
Self::Unknown013C => 4294902076,
Self::Unknown013D => 4294902077,
Self::Unknown013E => 4294902078,
Self::Unknown0161 => 4294902113,
Self::Unknown016A => 4294902122,
Self::Unknown016E => 4294902126,
Self::Unknown0172 => 4294902130,
Self::Unknown0179 => 4294902137,
Self::Unknown018E => 4294902158,
Self::Unknown018F => 4294902159,
Self::Unknown0190 => 4294902160,
Self::Unknown0191 => 4294902161,
Self::Unknown0192 => 4294902162,
Self::Unknown0193 => 4294902163,
Self::Unknown0195 => 4294902165,
Self::Unknown01D0 => 4294902224,
Self::Unknown020A => 4294902282,
Self::Unknown020B => 4294902283,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { unknown_ordinal: _ } => true,
_ => false,
}
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum KeymapId {
UsQwerty,
FrAzerty,
UsDvorak,
UsColemak,
#[doc(hidden)]
__SourceBreaking { unknown_ordinal: u32 },
}
#[macro_export]
macro_rules! KeymapIdUnknown {
() => {
_
};
}
impl KeymapId {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
0 => Some(Self::UsQwerty),
1 => Some(Self::FrAzerty),
2 => Some(Self::UsDvorak),
3 => Some(Self::UsColemak),
_ => None,
}
}
#[inline]
pub fn from_primitive_allow_unknown(prim: u32) -> Self {
match prim {
0 => Self::UsQwerty,
1 => Self::FrAzerty,
2 => Self::UsDvorak,
3 => Self::UsColemak,
unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
}
}
#[inline]
pub fn unknown() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
}
#[inline]
pub const fn into_primitive(self) -> u32 {
match self {
Self::UsQwerty => 0,
Self::FrAzerty => 1,
Self::UsDvorak => 2,
Self::UsColemak => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { unknown_ordinal: _ } => true,
_ => false,
}
}
}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for Key {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
false
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for Key {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Key {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Key {
#[inline(always)]
fn new_empty() -> Self {
Self::unknown()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive_allow_unknown(prim);
Ok(())
}
}
unsafe impl fidl::encoding::TypeMarker for KeymapId {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
false
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for KeymapId {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for KeymapId {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for KeymapId {
#[inline(always)]
fn new_empty() -> Self {
Self::unknown()
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive_allow_unknown(prim);
Ok(())
}
}
}