icrate/generated/GameKit/
GKNotificationBanner.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::AppKit::*;
5use crate::Foundation::*;
6use crate::GameKit::*;
7
8extern_class!(
9    #[derive(Debug, PartialEq, Eq, Hash)]
10    #[cfg(feature = "GameKit_GKNotificationBanner")]
11    #[deprecated = "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit."]
12    pub struct GKNotificationBanner;
13
14    #[cfg(feature = "GameKit_GKNotificationBanner")]
15    unsafe impl ClassType for GKNotificationBanner {
16        type Super = NSObject;
17        type Mutability = InteriorMutable;
18    }
19);
20
21#[cfg(feature = "GameKit_GKNotificationBanner")]
22unsafe impl NSObjectProtocol for GKNotificationBanner {}
23
24extern_methods!(
25    #[cfg(feature = "GameKit_GKNotificationBanner")]
26    unsafe impl GKNotificationBanner {
27        #[cfg(feature = "Foundation_NSString")]
28        #[deprecated = "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit."]
29        #[method(showBannerWithTitle:message:completionHandler:)]
30        pub unsafe fn showBannerWithTitle_message_completionHandler(
31            title: Option<&NSString>,
32            message: Option<&NSString>,
33            completion_handler: Option<&Block<(), ()>>,
34        );
35
36        #[cfg(feature = "Foundation_NSString")]
37        #[deprecated = "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit."]
38        #[method(showBannerWithTitle:message:duration:completionHandler:)]
39        pub unsafe fn showBannerWithTitle_message_duration_completionHandler(
40            title: Option<&NSString>,
41            message: Option<&NSString>,
42            duration: NSTimeInterval,
43            completion_handler: Option<&Block<(), ()>>,
44        );
45    }
46);
47
48extern_methods!(
49    /// Methods declared on superclass `NSObject`
50    #[cfg(feature = "GameKit_GKNotificationBanner")]
51    unsafe impl GKNotificationBanner {
52        #[method_id(@__retain_semantics Init init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
54
55        #[method_id(@__retain_semantics New new)]
56        pub unsafe fn new() -> Id<Self>;
57    }
58);