[INFO] cloning repository https://github.com/florin-saftoiu/sound [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/florin-saftoiu/sound" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflorin-saftoiu%2Fsound", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflorin-saftoiu%2Fsound'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3ca19c299fb3d210901e06d73faab0879c8b2d60 [INFO] testing florin-saftoiu/sound against try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl for musl_upgrade_1_2_5_in_2025-retry-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflorin-saftoiu%2Fsound" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/florin-saftoiu/sound [INFO] finished tweaking git repo https://github.com/florin-saftoiu/sound [INFO] tweaked toml for git repo https://github.com/florin-saftoiu/sound written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/florin-saftoiu/sound on toolchain 8de4c7234dd9b97c9d76b58671343fdbbc9a433e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/florin-saftoiu/sound already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded windows_macros v0.20.1 [INFO] [stderr] Downloaded windows_quote v0.20.1 [INFO] [stderr] Downloaded windows v0.20.1 [INFO] [stderr] Downloaded windows_gen v0.20.1 [INFO] [stderr] Downloaded windows_reader v0.20.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e7d70dff533a3a5f922bda2f854fc6b52b641bf13e6a3466fd2683d9f3ffd46a [INFO] running `Command { std: "docker" "start" "-a" "e7d70dff533a3a5f922bda2f854fc6b52b641bf13e6a3466fd2683d9f3ffd46a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e7d70dff533a3a5f922bda2f854fc6b52b641bf13e6a3466fd2683d9f3ffd46a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e7d70dff533a3a5f922bda2f854fc6b52b641bf13e6a3466fd2683d9f3ffd46a", kill_on_drop: false }` [INFO] [stdout] e7d70dff533a3a5f922bda2f854fc6b52b641bf13e6a3466fd2683d9f3ffd46a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "build" "--frozen" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] b39b4c12565632a63a878af4c0aa16c2b3cebd2864a98807417819f805296c69 [INFO] running `Command { std: "docker" "start" "-a" "b39b4c12565632a63a878af4c0aa16c2b3cebd2864a98807417819f805296c69", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.27 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling syn v1.0.73 [INFO] [stderr] Compiling windows_reader v0.20.1 [INFO] [stderr] Compiling libc v0.2.97 [INFO] [stderr] Compiling windows_quote v0.20.1 [INFO] [stderr] Compiling const-sha1 v0.2.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.10 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Compiling windows_gen v0.20.1 [INFO] [stderr] Compiling getrandom v0.2.3 [INFO] [stderr] Compiling rand_core v0.6.3 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.4 [INFO] [stderr] Compiling windows_macros v0.20.1 [INFO] [stderr] Compiling windows v0.20.1 [INFO] [stderr] Compiling sound v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 30.98s [INFO] running `Command { std: "docker" "inspect" "b39b4c12565632a63a878af4c0aa16c2b3cebd2864a98807417819f805296c69", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b39b4c12565632a63a878af4c0aa16c2b3cebd2864a98807417819f805296c69", kill_on_drop: false }` [INFO] [stdout] b39b4c12565632a63a878af4c0aa16c2b3cebd2864a98807417819f805296c69 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--no-run" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 94d2e9ce050f75056b932a635d336a8533953283b34422510a14c6ae3326789a [INFO] running `Command { std: "docker" "start" "-a" "94d2e9ce050f75056b932a635d336a8533953283b34422510a14c6ae3326789a", kill_on_drop: false }` [INFO] [stderr] Compiling sound v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stdout] | [INFO] [stdout] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 2.03s [INFO] running `Command { std: "docker" "inspect" "94d2e9ce050f75056b932a635d336a8533953283b34422510a14c6ae3326789a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "94d2e9ce050f75056b932a635d336a8533953283b34422510a14c6ae3326789a", kill_on_drop: false }` [INFO] [stdout] 94d2e9ce050f75056b932a635d336a8533953283b34422510a14c6ae3326789a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "test" "--frozen" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 7a7eeda05e213078abb58c73944fc28b98e5cfcc6b0a1c47b7e5712f34fc9d86 [INFO] running `Command { std: "docker" "start" "-a" "7a7eeda05e213078abb58c73944fc28b98e5cfcc6b0a1c47b7e5712f34fc9d86", kill_on_drop: false }` [INFO] [stderr] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stderr] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:12186 [INFO] [stderr] | [INFO] [stderr] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stderr] = note: `#[warn(unused_must_use)]` on by default [INFO] [stderr] help: use `let _ = ...` to ignore the resulting value [INFO] [stderr] | [INFO] [stderr] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stderr] | +++++++ [INFO] [stderr] [INFO] [stderr] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stderr] --> /opt/rustwide/target/x86_64-unknown-linux-musl/debug/build/sound-02e314f40583ce3e/out/windows.rs:1:13608 [INFO] [stderr] | [INFO] [stderr] 1 | ...aram { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stderr] help: use `let _ = ...` to ignore the resulting value [INFO] [stderr] | [INFO] [stderr] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VirtualKey ( pub i32 ) ; impl VirtualKey { pub const None : VirtualKey = VirtualKey ( 0i32 ) ; pub const LeftButton : VirtualKey = VirtualKey ( 1i32 ) ; pub const RightButton : VirtualKey = VirtualKey ( 2i32 ) ; pub const Cancel : VirtualKey = VirtualKey ( 3i32 ) ; pub const MiddleButton : VirtualKey = VirtualKey ( 4i32 ) ; pub const XButton1 : VirtualKey = VirtualKey ( 5i32 ) ; pub const XButton2 : VirtualKey = VirtualKey ( 6i32 ) ; pub const Back : VirtualKey = VirtualKey ( 8i32 ) ; pub const Tab : VirtualKey = VirtualKey ( 9i32 ) ; pub const Clear : VirtualKey = VirtualKey ( 12i32 ) ; pub const Enter : VirtualKey = VirtualKey ( 13i32 ) ; pub const Shift : VirtualKey = VirtualKey ( 16i32 ) ; pub const Control : VirtualKey = VirtualKey ( 17i32 ) ; pub const Menu : VirtualKey = VirtualKey ( 18i32 ) ; pub const Pause : VirtualKey = VirtualKey ( 19i32 ) ; pub const CapitalLock : VirtualKey = VirtualKey ( 20i32 ) ; pub const Kana : VirtualKey = VirtualKey ( 21i32 ) ; pub const Hangul : VirtualKey = VirtualKey ( 21i32 ) ; pub const ImeOn : VirtualKey = VirtualKey ( 22i32 ) ; pub const Junja : VirtualKey = VirtualKey ( 23i32 ) ; pub const Final : VirtualKey = VirtualKey ( 24i32 ) ; pub const Hanja : VirtualKey = VirtualKey ( 25i32 ) ; pub const Kanji : VirtualKey = VirtualKey ( 25i32 ) ; pub const ImeOff : VirtualKey = VirtualKey ( 26i32 ) ; pub const Escape : VirtualKey = VirtualKey ( 27i32 ) ; pub const Convert : VirtualKey = VirtualKey ( 28i32 ) ; pub const NonConvert : VirtualKey = VirtualKey ( 29i32 ) ; pub const Accept : VirtualKey = VirtualKey ( 30i32 ) ; pub const ModeChange : VirtualKey = VirtualKey ( 31i32 ) ; pub const Space : VirtualKey = VirtualKey ( 32i32 ) ; pub const PageUp : VirtualKey = VirtualKey ( 33i32 ) ; pub const PageDown : VirtualKey = VirtualKey ( 34i32 ) ; pub const End : VirtualKey = VirtualKey ( 35i32 ) ; pub const Home : VirtualKey = VirtualKey ( 36i32 ) ; pub const Left : VirtualKey = VirtualKey ( 37i32 ) ; pub const Up : VirtualKey = VirtualKey ( 38i32 ) ; pub const Right : VirtualKey = VirtualKey ( 39i32 ) ; pub const Down : VirtualKey = VirtualKey ( 40i32 ) ; pub const Select : VirtualKey = VirtualKey ( 41i32 ) ; pub const Print : VirtualKey = VirtualKey ( 42i32 ) ; pub const Execute : VirtualKey = VirtualKey ( 43i32 ) ; pub const Snapshot : VirtualKey = VirtualKey ( 44i32 ) ; pub const Insert : VirtualKey = VirtualKey ( 45i32 ) ; pub const Delete : VirtualKey = VirtualKey ( 46i32 ) ; pub const Help : VirtualKey = VirtualKey ( 47i32 ) ; pub const Number0 : VirtualKey = VirtualKey ( 48i32 ) ; pub const Number1 : VirtualKey = VirtualKey ( 49i32 ) ; pub const Number2 : VirtualKey = VirtualKey ( 50i32 ) ; pub const Number3 : VirtualKey = VirtualKey ( 51i32 ) ; pub const Number4 : VirtualKey = VirtualKey ( 52i32 ) ; pub const Number5 : VirtualKey = VirtualKey ( 53i32 ) ; pub const Number6 : VirtualKey = VirtualKey ( 54i32 ) ; pub const Number7 : VirtualKey = VirtualKey ( 55i32 ) ; pub const Number8 : VirtualKey = VirtualKey ( 56i32 ) ; pub const Number9 : VirtualKey = VirtualKey ( 57i32 ) ; pub const A : VirtualKey = VirtualKey ( 65i32 ) ; pub const B : VirtualKey = VirtualKey ( 66i32 ) ; pub const C : VirtualKey = VirtualKey ( 67i32 ) ; pub const D : VirtualKey = VirtualKey ( 68i32 ) ; pub const E : VirtualKey = VirtualKey ( 69i32 ) ; pub const F : VirtualKey = VirtualKey ( 70i32 ) ; pub const G : VirtualKey = VirtualKey ( 71i32 ) ; pub const H : VirtualKey = VirtualKey ( 72i32 ) ; pub const I : VirtualKey = VirtualKey ( 73i32 ) ; pub const J : VirtualKey = VirtualKey ( 74i32 ) ; pub const K : VirtualKey = VirtualKey ( 75i32 ) ; pub const L : VirtualKey = VirtualKey ( 76i32 ) ; pub const M : VirtualKey = VirtualKey ( 77i32 ) ; pub const N : VirtualKey = VirtualKey ( 78i32 ) ; pub const O : VirtualKey = VirtualKey ( 79i32 ) ; pub const P : VirtualKey = VirtualKey ( 80i32 ) ; pub const Q : VirtualKey = VirtualKey ( 81i32 ) ; pub const R : VirtualKey = VirtualKey ( 82i32 ) ; pub const S : VirtualKey = VirtualKey ( 83i32 ) ; pub const T : VirtualKey = VirtualKey ( 84i32 ) ; pub const U : VirtualKey = VirtualKey ( 85i32 ) ; pub const V : VirtualKey = VirtualKey ( 86i32 ) ; pub const W : VirtualKey = VirtualKey ( 87i32 ) ; pub const X : VirtualKey = VirtualKey ( 88i32 ) ; pub const Y : VirtualKey = VirtualKey ( 89i32 ) ; pub const Z : VirtualKey = VirtualKey ( 90i32 ) ; pub const LeftWindows : VirtualKey = VirtualKey ( 91i32 ) ; pub const RightWindows : VirtualKey = VirtualKey ( 92i32 ) ; pub const Application : VirtualKey = VirtualKey ( 93i32 ) ; pub const Sleep : VirtualKey = VirtualKey ( 95i32 ) ; pub const NumberPad0 : VirtualKey = VirtualKey ( 96i32 ) ; pub const NumberPad1 : VirtualKey = VirtualKey ( 97i32 ) ; pub const NumberPad2 : VirtualKey = VirtualKey ( 98i32 ) ; pub const NumberPad3 : VirtualKey = VirtualKey ( 99i32 ) ; pub const NumberPad4 : VirtualKey = VirtualKey ( 100i32 ) ; pub const NumberPad5 : VirtualKey = VirtualKey ( 101i32 ) ; pub const NumberPad6 : VirtualKey = VirtualKey ( 102i32 ) ; pub const NumberPad7 : VirtualKey = VirtualKey ( 103i32 ) ; pub const NumberPad8 : VirtualKey = VirtualKey ( 104i32 ) ; pub const NumberPad9 : VirtualKey = VirtualKey ( 105i32 ) ; pub const Multiply : VirtualKey = VirtualKey ( 106i32 ) ; pub const Add : VirtualKey = VirtualKey ( 107i32 ) ; pub const Separator : VirtualKey = VirtualKey ( 108i32 ) ; pub const Subtract : VirtualKey = VirtualKey ( 109i32 ) ; pub const Decimal : VirtualKey = VirtualKey ( 110i32 ) ; pub const Divide : VirtualKey = VirtualKey ( 111i32 ) ; pub const F1 : VirtualKey = VirtualKey ( 112i32 ) ; pub const F2 : VirtualKey = VirtualKey ( 113i32 ) ; pub const F3 : VirtualKey = VirtualKey ( 114i32 ) ; pub const F4 : VirtualKey = VirtualKey ( 115i32 ) ; pub const F5 : VirtualKey = VirtualKey ( 116i32 ) ; pub const F6 : VirtualKey = VirtualKey ( 117i32 ) ; pub const F7 : VirtualKey = VirtualKey ( 118i32 ) ; pub const F8 : VirtualKey = VirtualKey ( 119i32 ) ; pub const F9 : VirtualKey = VirtualKey ( 120i32 ) ; pub const F10 : VirtualKey = VirtualKey ( 121i32 ) ; pub const F11 : VirtualKey = VirtualKey ( 122i32 ) ; pub const F12 : VirtualKey = VirtualKey ( 123i32 ) ; pub const F13 : VirtualKey = VirtualKey ( 124i32 ) ; pub const F14 : VirtualKey = VirtualKey ( 125i32 ) ; pub const F15 : VirtualKey = VirtualKey ( 126i32 ) ; pub const F16 : VirtualKey = VirtualKey ( 127i32 ) ; pub const F17 : VirtualKey = VirtualKey ( 128i32 ) ; pub const F18 : VirtualKey = VirtualKey ( 129i32 ) ; pub const F19 : VirtualKey = VirtualKey ( 130i32 ) ; pub const F20 : VirtualKey = VirtualKey ( 131i32 ) ; pub const F21 : VirtualKey = VirtualKey ( 132i32 ) ; pub const F22 : VirtualKey = VirtualKey ( 133i32 ) ; pub const F23 : VirtualKey = VirtualKey ( 134i32 ) ; pub const F24 : VirtualKey = VirtualKey ( 135i32 ) ; pub const NavigationView : VirtualKey = VirtualKey ( 136i32 ) ; pub const NavigationMenu : VirtualKey = VirtualKey ( 137i32 ) ; pub const NavigationUp : VirtualKey = VirtualKey ( 138i32 ) ; pub const NavigationDown : VirtualKey = VirtualKey ( 139i32 ) ; pub const NavigationLeft : VirtualKey = VirtualKey ( 140i32 ) ; pub const NavigationRight : VirtualKey = VirtualKey ( 141i32 ) ; pub const NavigationAccept : VirtualKey = VirtualKey ( 142i32 ) ; pub const NavigationCancel : VirtualKey = VirtualKey ( 143i32 ) ; pub const NumberKeyLock : VirtualKey = VirtualKey ( 144i32 ) ; pub const Scroll : VirtualKey = VirtualKey ( 145i32 ) ; pub const LeftShift : VirtualKey = VirtualKey ( 160i32 ) ; pub const RightShift : VirtualKey = VirtualKey ( 161i32 ) ; pub const LeftControl : VirtualKey = VirtualKey ( 162i32 ) ; pub const RightControl : VirtualKey = VirtualKey ( 163i32 ) ; pub const LeftMenu : VirtualKey = VirtualKey ( 164i32 ) ; pub const RightMenu : VirtualKey = VirtualKey ( 165i32 ) ; pub const GoBack : VirtualKey = VirtualKey ( 166i32 ) ; pub const GoForward : VirtualKey = VirtualKey ( 167i32 ) ; pub const Refresh : VirtualKey = VirtualKey ( 168i32 ) ; pub const Stop : VirtualKey = VirtualKey ( 169i32 ) ; pub const Search : VirtualKey = VirtualKey ( 170i32 ) ; pub const Favorites : VirtualKey = VirtualKey ( 171i32 ) ; pub const GoHome : VirtualKey = VirtualKey ( 172i32 ) ; pub const GamepadA : VirtualKey = VirtualKey ( 195i32 ) ; pub const GamepadB : VirtualKey = VirtualKey ( 196i32 ) ; pub const GamepadX : VirtualKey = VirtualKey ( 197i32 ) ; pub const GamepadY : VirtualKey = VirtualKey ( 198i32 ) ; pub const GamepadRightShoulder : VirtualKey = VirtualKey ( 199i32 ) ; pub const GamepadLeftShoulder : VirtualKey = VirtualKey ( 200i32 ) ; pub const GamepadLeftTrigger : VirtualKey = VirtualKey ( 201i32 ) ; pub const GamepadRightTrigger : VirtualKey = VirtualKey ( 202i32 ) ; pub const GamepadDPadUp : VirtualKey = VirtualKey ( 203i32 ) ; pub const GamepadDPadDown : VirtualKey = VirtualKey ( 204i32 ) ; pub const GamepadDPadLeft : VirtualKey = VirtualKey ( 205i32 ) ; pub const GamepadDPadRight : VirtualKey = VirtualKey ( 206i32 ) ; pub const GamepadMenu : VirtualKey = VirtualKey ( 207i32 ) ; pub const GamepadView : VirtualKey = VirtualKey ( 208i32 ) ; pub const GamepadLeftThumbstickButton : VirtualKey = VirtualKey ( 209i32 ) ; pub const GamepadRightThumbstickButton : VirtualKey = VirtualKey ( 210i32 ) ; pub const GamepadLeftThumbstickUp : VirtualKey = VirtualKey ( 211i32 ) ; pub const GamepadLeftThumbstickDown : VirtualKey = VirtualKey ( 212i32 ) ; pub const GamepadLeftThumbstickRight : VirtualKey = VirtualKey ( 213i32 ) ; pub const GamepadLeftThumbstickLeft : VirtualKey = VirtualKey ( 214i32 ) ; pub const GamepadRightThumbstickUp : VirtualKey = VirtualKey ( 215i32 ) ; pub const GamepadRightThumbstickDown : VirtualKey = VirtualKey ( 216i32 ) ; pub const GamepadRightThumbstickRight : VirtualKey = VirtualKey ( 217i32 ) ; pub const GamepadRightThumbstickLeft : VirtualKey = VirtualKey ( 218i32 ) ; } impl :: std :: convert :: From < i32 > for VirtualKey { fn from ( value : i32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VirtualKey { type Abi = Self ; type DefaultType = Self ; } unsafe impl :: windows :: RuntimeType for VirtualKey { const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"enum(Windows.System.VirtualKey;i4)" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWND ( pub isize ) ; impl :: std :: default :: Default for HWND { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWND { } unsafe impl :: windows :: Abi for HWND { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct PWSTR ( pub * mut u16 ) ; impl PWSTR { pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PWSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } unsafe impl :: windows :: Abi for PWSTR { type Abi = Self ; type DefaultType = Self ; unsafe fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & str { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_utf16 ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for & :: std :: ffi :: OsStr { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } # [ cfg ( windows ) ] impl < 'a > :: windows :: IntoParam < 'a , PWSTR > for :: std :: ffi :: OsString { fn into_param ( self ) -> :: windows :: Param < 'a , PWSTR > { use std :: os :: windows :: ffi :: OsStrExt ; :: windows :: Param :: Boxed ( PWSTR ( :: std :: boxed :: Box :: < [ u16 ] > :: into_raw ( self . encode_wide ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u16 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Media { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Multimedia { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: fmt :: Debug , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq ) ] # [ repr ( transparent ) ] pub struct HWAVEOUT ( pub isize ) ; impl :: std :: default :: Default for HWAVEOUT { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } unsafe impl :: windows :: Handle for HWAVEOUT { } unsafe impl :: windows :: Abi for HWAVEOUT { type Abi = Self ; type DefaultType = Self ; } pub const MAXERRORLENGTH : u32 = 256u32 ; # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct MIDI_WAVE_OPEN_TYPE ( pub u32 ) ; pub const CALLBACK_TYPEMASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 458752u32 ) ; pub const CALLBACK_NULL : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 0u32 ) ; pub const CALLBACK_WINDOW : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 65536u32 ) ; pub const CALLBACK_TASK : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_FUNCTION : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 196608u32 ) ; pub const CALLBACK_THREAD : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 131072u32 ) ; pub const CALLBACK_EVENT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 327680u32 ) ; pub const WAVE_FORMAT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 1u32 ) ; pub const WAVE_ALLOWSYNC : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 2u32 ) ; pub const WAVE_MAPPED : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 4u32 ) ; pub const WAVE_FORMAT_DIRECT : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 8u32 ) ; pub const WAVE_FORMAT_DIRECT_QUERY : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 9u32 ) ; pub const WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 16u32 ) ; pub const MIDI_IO_STATUS : MIDI_WAVE_OPEN_TYPE = MIDI_WAVE_OPEN_TYPE ( 32u32 ) ; impl :: std :: convert :: From < u32 > for MIDI_WAVE_OPEN_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for MIDI_WAVE_OPEN_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for MIDI_WAVE_OPEN_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for MIDI_WAVE_OPEN_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } impl :: std :: ops :: Not for MIDI_WAVE_OPEN_TYPE { type Output = Self ; fn not ( self ) -> Self { Self ( self . 0 . not ( ) ) } } pub const MMSYSERR_NOERROR : u32 = 0u32 ; pub const MM_WOM_DONE : u32 = 957u32 ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEFORMATEX { pub wFormatTag : u16 , pub nChannels : u16 , pub nSamplesPerSec : u32 , pub nAvgBytesPerSec : u32 , pub nBlockAlign : u16 , pub wBitsPerSample : u16 , pub cbSize : u16 } impl WAVEFORMATEX { } impl :: std :: default :: Default for WAVEFORMATEX { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEFORMATEX { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEFORMATEX { } unsafe impl :: windows :: Abi for WAVEFORMATEX { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEHDR { pub lpData : super::super::Foundation:: PSTR , pub dwBufferLength : u32 , pub dwBytesRecorded : u32 , pub dwUser : usize , pub dwFlags : u32 , pub dwLoops : u32 , pub lpNext : * mut WAVEHDR , pub reserved : usize } impl WAVEHDR { } impl :: std :: default :: Default for WAVEHDR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEHDR { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEHDR { } unsafe impl :: windows :: Abi for WAVEHDR { type Abi = Self ; type DefaultType = Self ; } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C , packed ( 1 ) ) ] pub struct WAVEOUTCAPSW { pub wMid : u16 , pub wPid : u16 , pub vDriverVersion : u32 , pub szPname : [ u16 ;32 ] , pub dwFormats : u32 , pub wChannels : u16 , pub wReserved1 : u16 , pub dwSupport : u32 } impl WAVEOUTCAPSW { } impl :: std :: default :: Default for WAVEOUTCAPSW { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: cmp :: PartialEq for WAVEOUTCAPSW { fn eq ( & self , _other : & Self ) -> bool { unimplemented ! ( ) } } impl :: std :: cmp :: Eq for WAVEOUTCAPSW { } unsafe impl :: windows :: Abi for WAVEOUTCAPSW { type Abi = Self ; type DefaultType = Self ; } pub const WAVE_FORMAT_PCM : u32 = 1u32 ; pub const WHDR_PREPARED : u32 = 2u32 ; pub unsafe fn waveOutGetDevCapsW < > ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetDevCapsW ( udeviceid : usize , pwoc : * mut WAVEOUTCAPSW , cbwoc : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetDevCapsW ( :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwoc ) , :: std :: mem :: transmute ( cbwoc ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetErrorTextW < > ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetErrorTextW ( mmrerror : u32 , psztext : super::super::Foundation:: PWSTR , cchtext : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetErrorTextW ( :: std :: mem :: transmute ( mmrerror ) , :: std :: mem :: transmute ( psztext ) , :: std :: mem :: transmute ( cchtext ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutGetNumDevs < > ( ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutGetNumDevs ( ) -> u32 ; } :: std :: mem :: transmute ( waveOutGetNumDevs ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutOpen < > ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutOpen ( phwo : * mut HWAVEOUT , udeviceid : u32 , pwfx : * const WAVEFORMATEX , dwcallback : usize , dwinstance : usize , fdwopen : MIDI_WAVE_OPEN_TYPE ) -> u32 ; } :: std :: mem :: transmute ( waveOutOpen ( :: std :: mem :: transmute ( phwo ) , :: std :: mem :: transmute ( udeviceid ) , :: std :: mem :: transmute ( pwfx ) , :: std :: mem :: transmute ( dwcallback ) , :: std :: mem :: transmute ( dwinstance ) , :: std :: mem :: transmute ( fdwopen ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutPrepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutPrepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutPrepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutUnprepareHeader < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutUnprepareHeader ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutUnprepareHeader ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn waveOutWrite < 'a , > ( hwo : impl :: windows :: IntoParam < 'a , HWAVEOUT > , pwh : * mut WAVEHDR , cbwh : u32 , ) -> u32 { # [ cfg ( windows ) ] { # [ link ( name ="winmm" ) ] extern "system" { fn waveOutWrite ( hwo : HWAVEOUT , pwh : * mut WAVEHDR , cbwh : u32 ) -> u32 ; } :: std :: mem :: transmute ( waveOutWrite ( hwo . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( pwh ) , :: std :: mem :: transmute ( cbwh ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Console { pub unsafe fn GetConsoleWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="kernel32" ) ] extern "system" { fn GetConsoleWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetConsoleWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod UI { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod KeyboardAndMouseInput { pub unsafe fn GetAsyncKeyState < > ( vkey : i32 , ) -> i16 { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetAsyncKeyState ( vkey : i32 ) -> i16 ; } :: std :: mem :: transmute ( GetAsyncKeyState ( :: std :: mem :: transmute ( vkey ) ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod WindowsAndMessaging { pub unsafe fn GetForegroundWindow < > ( ) -> super::super::Foundation:: HWND { # [ cfg ( windows ) ] { # [ link ( name ="user32" ) ] extern "system" { fn GetForegroundWindow ( ) -> super::super::Foundation:: HWND ; } :: std :: mem :: transmute ( GetForegroundWindow ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } } } [INFO] [stderr] | +++++++ [INFO] [stderr] [INFO] [stderr] warning: `sound` (bin "oscillator" test) generated 2 warnings [INFO] [stderr] warning: `sound` (bin "sine_wave" test) generated 2 warnings (2 duplicates) [INFO] [stderr] warning: `sound` (bin "sequencer" test) generated 2 warnings (2 duplicates) [INFO] [stderr] warning: `sound` (bin "polyphony" test) generated 2 warnings (2 duplicates) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.06s [INFO] [stderr] Running unittests src/bin/oscillator.rs (/opt/rustwide/target/x86_64-unknown-linux-musl/debug/deps/oscillator-c9956532721159f5) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Running unittests src/bin/polyphony.rs (/opt/rustwide/target/x86_64-unknown-linux-musl/debug/deps/polyphony-eed89cc0f9604009) [INFO] [stderr] Running unittests src/bin/sequencer.rs (/opt/rustwide/target/x86_64-unknown-linux-musl/debug/deps/sequencer-40e312ff8cebfefe) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Running unittests src/bin/sine_wave.rs (/opt/rustwide/target/x86_64-unknown-linux-musl/debug/deps/sine_wave-1398fa3d8c1e0fe9) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "7a7eeda05e213078abb58c73944fc28b98e5cfcc6b0a1c47b7e5712f34fc9d86", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7a7eeda05e213078abb58c73944fc28b98e5cfcc6b0a1c47b7e5712f34fc9d86", kill_on_drop: false }` [INFO] [stdout] 7a7eeda05e213078abb58c73944fc28b98e5cfcc6b0a1c47b7e5712f34fc9d86