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:
白山風露 2024-03-04 03:53:22 +09:00 committed by GitHub
parent a88df2c103
commit 69e0474ebb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 1610 additions and 33 deletions

View 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
}
}