-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add haiku support * run cargo fmt * update note on BDirectWindow Co-authored-by: Al Hoang <3811822-hoanga@users.noreply.gitlab.com>
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use core::ffi::c_void; | ||
use core::ptr; | ||
|
||
/// Raw window handle for Haiku. | ||
/// | ||
/// ## Construction | ||
/// ``` | ||
/// # use raw_window_handle::HaikuHandle; | ||
/// let mut handle = HaikuHandle::empty(); | ||
/// /* set fields */ | ||
/// ``` | ||
#[non_exhaustive] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
pub struct HaikuHandle { | ||
/// A pointer to a BWindow object | ||
pub b_window: *mut c_void, | ||
/// A pointer to a BDirectWindow object that might be null | ||
pub b_direct_window: *mut c_void, | ||
} | ||
|
||
impl HaikuHandle { | ||
pub fn empty() -> Self { | ||
Self { | ||
b_window: ptr::null_mut(), | ||
b_direct_window: ptr::null_mut(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters