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:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setParentWindow(&self, parent_window: Option<&NSWindow>);
52
53 #[unsafe(method(presentViewController:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn presentViewController(&self, view_controller: &NSViewController) -> bool;
56
57 #[unsafe(method(dismiss:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn dismiss(&self, sender: &AnyObject);
60 );
61}
62
63#[cfg(feature = "objc2-app-kit")]
65#[cfg(target_os = "macos")]
66impl GKDialogController {
67 extern_methods!(
68 #[unsafe(method(init))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72 #[unsafe(method(initWithCoder:))]
73 #[unsafe(method_family = init)]
74 pub unsafe fn initWithCoder(
75 this: Allocated<Self>,
76 coder: &NSCoder,
77 ) -> Option<Retained<Self>>;
78 );
79}
80
81#[cfg(feature = "objc2-app-kit")]
83#[cfg(target_os = "macos")]
84impl GKDialogController {
85 extern_methods!(
86 #[unsafe(method(new))]
87 #[unsafe(method_family = new)]
88 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
89 );
90}
91
92#[cfg(feature = "objc2-app-kit")]
94#[cfg(target_os = "macos")]
95impl GKDialogController {
96 extern_methods!(
97 #[unsafe(method(sharedDialogController))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn sharedDialogController(mtm: MainThreadMarker)
100 -> Retained<GKDialogController>;
101 );
102}