objc2_game_kit/generated/
GKChallengesViewController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/gamekit/gkchallengesviewcontroller?language=objc)
15    #[unsafe(super(NSViewController, NSResponder, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "objc2-app-kit")]
18    #[cfg(target_os = "macos")]
19    #[deprecated = "No longer supported"]
20    pub struct GKChallengesViewController;
21);
22
23#[cfg(all(feature = "GKDialogController", feature = "objc2-app-kit"))]
24#[cfg(target_os = "macos")]
25extern_conformance!(
26    unsafe impl GKViewController for GKChallengesViewController {}
27);
28
29#[cfg(feature = "objc2-app-kit")]
30#[cfg(target_os = "macos")]
31extern_conformance!(
32    unsafe impl NSCoding for GKChallengesViewController {}
33);
34
35#[cfg(feature = "objc2-app-kit")]
36#[cfg(target_os = "macos")]
37extern_conformance!(
38    unsafe impl NSEditor for GKChallengesViewController {}
39);
40
41#[cfg(feature = "objc2-app-kit")]
42#[cfg(target_os = "macos")]
43extern_conformance!(
44    unsafe impl NSObjectProtocol for GKChallengesViewController {}
45);
46
47#[cfg(feature = "objc2-app-kit")]
48#[cfg(target_os = "macos")]
49extern_conformance!(
50    unsafe impl NSSeguePerforming for GKChallengesViewController {}
51);
52
53#[cfg(feature = "objc2-app-kit")]
54#[cfg(target_os = "macos")]
55extern_conformance!(
56    unsafe impl NSUserInterfaceItemIdentification for GKChallengesViewController {}
57);
58
59#[cfg(feature = "objc2-app-kit")]
60#[cfg(target_os = "macos")]
61impl GKChallengesViewController {
62    extern_methods!(
63        #[deprecated = "No longer supported"]
64        #[unsafe(method(challengeDelegate))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn challengeDelegate(
67            &self,
68        ) -> Option<Retained<ProtocolObject<dyn GKChallengesViewControllerDelegate>>>;
69
70        /// Setter for [`challengeDelegate`][Self::challengeDelegate].
71        ///
72        /// This is a [weak property][objc2::topics::weak_property].
73        ///
74        /// # Safety
75        ///
76        /// `challenge_delegate` might not allow `None`.
77        #[deprecated = "No longer supported"]
78        #[unsafe(method(setChallengeDelegate:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn setChallengeDelegate(
81            &self,
82            challenge_delegate: Option<&ProtocolObject<dyn GKChallengesViewControllerDelegate>>,
83        );
84    );
85}
86
87/// Methods declared on superclass `NSViewController`.
88#[cfg(feature = "objc2-app-kit")]
89#[cfg(target_os = "macos")]
90impl GKChallengesViewController {
91    extern_methods!(
92        #[unsafe(method(initWithNibName:bundle:))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn initWithNibName_bundle(
95            this: Allocated<Self>,
96            nib_name_or_nil: Option<&NSNibName>,
97            nib_bundle_or_nil: Option<&NSBundle>,
98        ) -> Retained<Self>;
99
100        /// # Safety
101        ///
102        /// `coder` possibly has further requirements.
103        #[unsafe(method(initWithCoder:))]
104        #[unsafe(method_family = init)]
105        pub unsafe fn initWithCoder(
106            this: Allocated<Self>,
107            coder: &NSCoder,
108        ) -> Option<Retained<Self>>;
109    );
110}
111
112/// Methods declared on superclass `NSResponder`.
113#[cfg(feature = "objc2-app-kit")]
114#[cfg(target_os = "macos")]
115impl GKChallengesViewController {
116    extern_methods!(
117        #[unsafe(method(init))]
118        #[unsafe(method_family = init)]
119        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120    );
121}
122
123/// Methods declared on superclass `NSObject`.
124#[cfg(feature = "objc2-app-kit")]
125#[cfg(target_os = "macos")]
126impl GKChallengesViewController {
127    extern_methods!(
128        #[unsafe(method(new))]
129        #[unsafe(method_family = new)]
130        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
131    );
132}
133
134extern_protocol!(
135    /// [Apple's documentation](https://developer.apple.com/documentation/gamekit/gkchallengesviewcontrollerdelegate?language=objc)
136    #[deprecated = "No longer supported"]
137    pub unsafe trait GKChallengesViewControllerDelegate {
138        #[cfg(feature = "objc2-app-kit")]
139        #[cfg(target_os = "macos")]
140        /// # Safety
141        ///
142        /// `view_controller` might not allow `None`.
143        #[deprecated = "No longer supported"]
144        #[unsafe(method(challengesViewControllerDidFinish:))]
145        #[unsafe(method_family = none)]
146        unsafe fn challengesViewControllerDidFinish(
147            &self,
148            view_controller: Option<&GKChallengesViewController>,
149        );
150    }
151);