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"))]
19extern_conformance!(
20    unsafe impl NSCoding for UIReferenceLibraryViewController {}
21);
22
23#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
24extern_conformance!(
25    unsafe impl NSObjectProtocol for UIReferenceLibraryViewController {}
26);
27
28#[cfg(all(
29    feature = "UIAppearance",
30    feature = "UIResponder",
31    feature = "UIViewController"
32))]
33extern_conformance!(
34    unsafe impl UIAppearanceContainer for UIReferenceLibraryViewController {}
35);
36
37#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
38extern_conformance!(
39    unsafe impl UIContentContainer for UIReferenceLibraryViewController {}
40);
41
42#[cfg(all(
43    feature = "UIFocus",
44    feature = "UIResponder",
45    feature = "UIViewController"
46))]
47extern_conformance!(
48    unsafe impl UIFocusEnvironment for UIReferenceLibraryViewController {}
49);
50
51#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
52extern_conformance!(
53    unsafe impl UIResponderStandardEditActions for UIReferenceLibraryViewController {}
54);
55
56#[cfg(all(
57    feature = "UIResponder",
58    feature = "UITraitCollection",
59    feature = "UIViewController"
60))]
61extern_conformance!(
62    unsafe impl UITraitEnvironment for UIReferenceLibraryViewController {}
63);
64
65#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
66impl UIReferenceLibraryViewController {
67    extern_methods!(
68        /// Returns YES if any installed dictionary has a definition for the provided term.
69        #[unsafe(method(dictionaryHasDefinitionForTerm:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn dictionaryHasDefinitionForTerm(
72            term: &NSString,
73            mtm: MainThreadMarker,
74        ) -> bool;
75
76        /// Initializes an instance of a UIReferenceLibraryViewController with the term provided.
77        #[unsafe(method(initWithTerm:))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn initWithTerm(this: Allocated<Self>, term: &NSString) -> Retained<Self>;
80
81        #[unsafe(method(initWithCoder:))]
82        #[unsafe(method_family = init)]
83        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
84
85        #[unsafe(method(initWithNibName:bundle:))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn initWithNibName_bundle(
88            this: Allocated<Self>,
89            nib_name_or_nil: Option<&NSString>,
90            nib_bundle_or_nil: Option<&NSBundle>,
91        ) -> Retained<Self>;
92
93        #[unsafe(method(init))]
94        #[unsafe(method_family = init)]
95        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
96    );
97}
98
99/// Methods declared on superclass `NSObject`.
100#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
101impl UIReferenceLibraryViewController {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
106    );
107}