1use core::ffi::c_void;
2use core::ptr;
3
4/// Raw display handle for AppKit.
5///
6/// ## Construction
7/// ```
8/// # use raw_window_handle::AppKitDisplayHandle;
9/// let mut display_handle = AppKitDisplayHandle::empty();
10/// /* set fields */
11/// ```
12#[non_exhaustive]
13#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
14pub struct AppKitDisplayHandle;
15
16impl AppKitDisplayHandle {
17 pub fn empty() -> Self {
18 Self {}
19 }
20}
21
22/// Raw window handle for AppKit.
23///
24/// ## Construction
25/// ```
26/// # use raw_window_handle::AppKitWindowHandle;
27/// let mut window_handle = AppKitWindowHandle::empty();
28/// /* set fields */
29/// ```
30#[non_exhaustive]
31#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
32pub struct AppKitWindowHandle {
33 /// A pointer to an `NSWindow` object.
34 pub ns_window: *mut c_void,
35 /// A pointer to an `NSView` object.
36 pub ns_view: *mut c_void,
37 // TODO: WHAT ABOUT ns_window_controller and ns_view_controller?
38}
39
40impl AppKitWindowHandle {
41 pub fn empty() -> Self {
42 Self {
43 ns_window: ptr::null_mut(),
44 ns_view: ptr::null_mut(),
45 }
46 }
47}
48