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        #[unsafe(method(defaultWidgetController))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn defaultWidgetController() -> Retained<NCWidgetController>;
31
32        #[unsafe(method(setHasContent:forWidgetWithBundleIdentifier:))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn setHasContent_forWidgetWithBundleIdentifier(
35            &self,
36            flag: bool,
37            bundle_id: &NSString,
38        );
39    );
40}
41
42/// Methods declared on superclass `NSObject`.
43impl NCWidgetController {
44    extern_methods!(
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new() -> Retained<Self>;
52    );
53}