Windows gpui platform (#8490)
First implementation of gpui platform for Windows. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
a88df2c103
commit
69e0474ebb
11 changed files with 1610 additions and 33 deletions
26
crates/gpui/src/platform/windows/util.rs
Normal file
26
crates/gpui/src/platform/windows/util.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
use windows::Win32::Foundation::{LPARAM, WPARAM};
|
||||
|
||||
pub(crate) trait HiLoWord {
|
||||
fn hiword(&self) -> u16;
|
||||
fn loword(&self) -> u16;
|
||||
}
|
||||
|
||||
impl HiLoWord for WPARAM {
|
||||
fn hiword(&self) -> u16 {
|
||||
((self.0 >> 16) & 0xFFFF) as u16
|
||||
}
|
||||
|
||||
fn loword(&self) -> u16 {
|
||||
(self.0 & 0xFFFF) as u16
|
||||
}
|
||||
}
|
||||
|
||||
impl HiLoWord for LPARAM {
|
||||
fn hiword(&self) -> u16 {
|
||||
((self.0 >> 16) & 0xFFFF) as u16
|
||||
}
|
||||
|
||||
fn loword(&self) -> u16 {
|
||||
(self.0 & 0xFFFF) as u16
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue