objc2_safari_services/generated/
SFSafariExtensionViewController.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::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/safariservices/sfsafariextensionviewcontroller?language=objc)
15    #[unsafe(super(NSViewController, NSResponder, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "objc2-app-kit")]
18    #[cfg(target_os = "macos")]
19    pub struct SFSafariExtensionViewController;
20);
21
22#[cfg(feature = "objc2-app-kit")]
23#[cfg(target_os = "macos")]
24extern_conformance!(
25    unsafe impl NSCoding for SFSafariExtensionViewController {}
26);
27
28#[cfg(feature = "objc2-app-kit")]
29#[cfg(target_os = "macos")]
30extern_conformance!(
31    unsafe impl NSEditor for SFSafariExtensionViewController {}
32);
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36extern_conformance!(
37    unsafe impl NSObjectProtocol for SFSafariExtensionViewController {}
38);
39
40#[cfg(feature = "objc2-app-kit")]
41#[cfg(target_os = "macos")]
42extern_conformance!(
43    unsafe impl NSSeguePerforming for SFSafariExtensionViewController {}
44);
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48extern_conformance!(
49    unsafe impl NSUserInterfaceItemIdentification for SFSafariExtensionViewController {}
50);
51
52#[cfg(feature = "objc2-app-kit")]
53#[cfg(target_os = "macos")]
54impl SFSafariExtensionViewController {
55    extern_methods!(
56        #[unsafe(method(dismissPopover))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn dismissPopover(&self);
59    );
60}
61
62/// Methods declared on superclass `NSViewController`.
63#[cfg(feature = "objc2-app-kit")]
64#[cfg(target_os = "macos")]
65impl SFSafariExtensionViewController {
66    extern_methods!(
67        #[unsafe(method(initWithNibName:bundle:))]
68        #[unsafe(method_family = init)]
69        pub unsafe fn initWithNibName_bundle(
70            this: Allocated<Self>,
71            nib_name_or_nil: Option<&NSNibName>,
72            nib_bundle_or_nil: Option<&NSBundle>,
73        ) -> Retained<Self>;
74
75        /// # Safety
76        ///
77        /// `coder` possibly has further requirements.
78        #[unsafe(method(initWithCoder:))]
79        #[unsafe(method_family = init)]
80        pub unsafe fn initWithCoder(
81            this: Allocated<Self>,
82            coder: &NSCoder,
83        ) -> Option<Retained<Self>>;
84    );
85}
86
87/// Methods declared on superclass `NSResponder`.
88#[cfg(feature = "objc2-app-kit")]
89#[cfg(target_os = "macos")]
90impl SFSafariExtensionViewController {
91    extern_methods!(
92        #[unsafe(method(init))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
95    );
96}
97
98/// Methods declared on superclass `NSObject`.
99#[cfg(feature = "objc2-app-kit")]
100#[cfg(target_os = "macos")]
101impl SFSafariExtensionViewController {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
106    );
107}