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