objc2_game_kit/generated/
GKNotificationBanner.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[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
50impl 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}