objc2_ui_kit/generated/
UIReferenceLibraryViewController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uireferencelibraryviewcontroller?language=objc)
11    #[unsafe(super(UIViewController, UIResponder, NSObject))]
12    #[thread_kind = MainThreadOnly]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
15    pub struct UIReferenceLibraryViewController;
16);
17
18#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
19unsafe impl NSCoding for UIReferenceLibraryViewController {}
20
21#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
22unsafe impl NSObjectProtocol for UIReferenceLibraryViewController {}
23
24#[cfg(all(
25    feature = "UIAppearance",
26    feature = "UIResponder",
27    feature = "UIViewController"
28))]
29unsafe impl UIAppearanceContainer for UIReferenceLibraryViewController {}
30
31#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
32unsafe impl UIContentContainer for UIReferenceLibraryViewController {}
33
34#[cfg(all(
35    feature = "UIFocus",
36    feature = "UIResponder",
37    feature = "UIViewController"
38))]
39unsafe impl UIFocusEnvironment for UIReferenceLibraryViewController {}
40
41#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
42unsafe impl UIResponderStandardEditActions for UIReferenceLibraryViewController {}
43
44#[cfg(all(
45    feature = "UIResponder",
46    feature = "UITraitCollection",
47    feature = "UIViewController"
48))]
49unsafe impl UITraitEnvironment for UIReferenceLibraryViewController {}
50
51#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
52impl UIReferenceLibraryViewController {
53    extern_methods!(
54        /// Returns YES if any installed dictionary has a definition for the provided term.
55        #[unsafe(method(dictionaryHasDefinitionForTerm:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn dictionaryHasDefinitionForTerm(
58            term: &NSString,
59            mtm: MainThreadMarker,
60        ) -> bool;
61
62        /// Initializes an instance of a UIReferenceLibraryViewController with the term provided.
63        #[unsafe(method(initWithTerm:))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn initWithTerm(this: Allocated<Self>, term: &NSString) -> Retained<Self>;
66
67        #[unsafe(method(initWithCoder:))]
68        #[unsafe(method_family = init)]
69        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
70
71        #[unsafe(method(initWithNibName:bundle:))]
72        #[unsafe(method_family = init)]
73        pub unsafe fn initWithNibName_bundle(
74            this: Allocated<Self>,
75            nib_name_or_nil: Option<&NSString>,
76            nib_bundle_or_nil: Option<&NSBundle>,
77        ) -> Retained<Self>;
78
79        #[unsafe(method(init))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82    );
83}
84
85/// Methods declared on superclass `NSObject`.
86#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
87impl UIReferenceLibraryViewController {
88    extern_methods!(
89        #[unsafe(method(new))]
90        #[unsafe(method_family = new)]
91        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
92    );
93}