objc2_game_kit/generated/
GKDialogController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_protocol!(
14 pub unsafe trait GKViewController {}
16);
17
18extern_class!(
19 #[unsafe(super(NSResponder, NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 #[cfg(feature = "objc2-app-kit")]
23 #[cfg(target_os = "macos")]
24 pub struct GKDialogController;
25);
26
27#[cfg(feature = "objc2-app-kit")]
28#[cfg(target_os = "macos")]
29extern_conformance!(
30 unsafe impl NSCoding for GKDialogController {}
31);
32
33#[cfg(feature = "objc2-app-kit")]
34#[cfg(target_os = "macos")]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for GKDialogController {}
37);
38
39#[cfg(feature = "objc2-app-kit")]
40#[cfg(target_os = "macos")]
41impl GKDialogController {
42 extern_methods!(
43 #[unsafe(method(parentWindow))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn parentWindow(&self) -> Option<Retained<NSWindow>>;
46
47 #[unsafe(method(setParentWindow:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setParentWindow(&self, parent_window: Option<&NSWindow>);
53
54 #[unsafe(method(presentViewController:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn presentViewController(&self, view_controller: &NSViewController) -> bool;
60
61 #[unsafe(method(dismiss:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn dismiss(&self, sender: &AnyObject);
67 );
68}
69
70#[cfg(feature = "objc2-app-kit")]
72#[cfg(target_os = "macos")]
73impl GKDialogController {
74 extern_methods!(
75 #[unsafe(method(init))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78
79 #[unsafe(method(initWithCoder:))]
83 #[unsafe(method_family = init)]
84 pub unsafe fn initWithCoder(
85 this: Allocated<Self>,
86 coder: &NSCoder,
87 ) -> Option<Retained<Self>>;
88 );
89}
90
91#[cfg(feature = "objc2-app-kit")]
93#[cfg(target_os = "macos")]
94impl GKDialogController {
95 extern_methods!(
96 #[unsafe(method(new))]
97 #[unsafe(method_family = new)]
98 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
99 );
100}
101
102#[cfg(feature = "objc2-app-kit")]
104#[cfg(target_os = "macos")]
105impl GKDialogController {
106 extern_methods!(
107 #[unsafe(method(sharedDialogController))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn sharedDialogController(mtm: MainThreadMarker)
110 -> Retained<GKDialogController>;
111 );
112}