objc2_notification_center/generated/
NCWidgetController.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    /// [Apple's documentation](https://developer.apple.com/documentation/notificationcenter/ncwidgetcontroller?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[deprecated = "Use WidgetKit instead. Today View extensions have been deprecated."]
15    pub struct NCWidgetController;
16);
17
18extern_conformance!(
19    unsafe impl NSObjectProtocol for NCWidgetController {}
20);
21
22impl NCWidgetController {
23    extern_methods!(
24        #[unsafe(method(widgetController))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn widgetController() -> Retained<Self>;
27
28        #[deprecated]
29        #[unsafe(method(defaultWidgetController))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn defaultWidgetController() -> Retained<NCWidgetController>;
32
33        #[unsafe(method(setHasContent:forWidgetWithBundleIdentifier:))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn setHasContent_forWidgetWithBundleIdentifier(
36            &self,
37            flag: bool,
38            bundle_id: &NSString,
39        );
40    );
41}
42
43/// Methods declared on superclass `NSObject`.
44impl NCWidgetController {
45    extern_methods!(
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53    );
54}