objc2_game_kit/generated/
GKNotificationBanner.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// Asynchronously shows a notification banner like the one used for Game Center’s “Welcome Back” message.
12    /// If a banner is already being displayed, additional banners will be shown in sequence. Use this to notify the user of game events, high scores, completed achievements, etc.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/gamekit/gknotificationbanner?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[deprecated = "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit."]
18    pub struct GKNotificationBanner;
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for GKNotificationBanner {}
23);
24
25impl GKNotificationBanner {
26    extern_methods!(
27        #[cfg(feature = "block2")]
28        #[deprecated = "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit."]
29        #[unsafe(method(showBannerWithTitle:message:completionHandler:))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn showBannerWithTitle_message_completionHandler(
32            title: Option<&NSString>,
33            message: Option<&NSString>,
34            completion_handler: Option<&block2::DynBlock<dyn Fn()>>,
35        );
36
37        #[cfg(feature = "block2")]
38        #[deprecated = "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit."]
39        #[unsafe(method(showBannerWithTitle:message:duration:completionHandler:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn showBannerWithTitle_message_duration_completionHandler(
42            title: Option<&NSString>,
43            message: Option<&NSString>,
44            duration: NSTimeInterval,
45            completion_handler: Option<&block2::DynBlock<dyn Fn()>>,
46        );
47    );
48}
49
50/// Methods declared on superclass `NSObject`.
51impl GKNotificationBanner {
52    extern_methods!(
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[unsafe(method(new))]
58        #[unsafe(method_family = new)]
59        pub unsafe fn new() -> Retained<Self>;
60    );
61}