objc2_ui_kit/generated/
UITableViewController.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/uikit/uitableviewcontroller?language=objc)
12    #[unsafe(super(UIViewController, UIResponder, NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
16    pub struct UITableViewController;
17);
18
19#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
20extern_conformance!(
21    unsafe impl NSCoding for UITableViewController {}
22);
23
24#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for UITableViewController {}
27);
28
29#[cfg(all(
30    feature = "UIAppearance",
31    feature = "UIResponder",
32    feature = "UIViewController"
33))]
34extern_conformance!(
35    unsafe impl UIAppearanceContainer for UITableViewController {}
36);
37
38#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
39extern_conformance!(
40    unsafe impl UIContentContainer for UITableViewController {}
41);
42
43#[cfg(all(
44    feature = "UIFocus",
45    feature = "UIResponder",
46    feature = "UIViewController"
47))]
48extern_conformance!(
49    unsafe impl UIFocusEnvironment for UITableViewController {}
50);
51
52#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
53extern_conformance!(
54    unsafe impl UIResponderStandardEditActions for UITableViewController {}
55);
56
57#[cfg(all(
58    feature = "UIResponder",
59    feature = "UIScrollView",
60    feature = "UIViewController"
61))]
62extern_conformance!(
63    unsafe impl UIScrollViewDelegate for UITableViewController {}
64);
65
66#[cfg(all(
67    feature = "UIResponder",
68    feature = "UITableView",
69    feature = "UIViewController"
70))]
71extern_conformance!(
72    unsafe impl UITableViewDataSource for UITableViewController {}
73);
74
75#[cfg(all(
76    feature = "UIResponder",
77    feature = "UIScrollView",
78    feature = "UITableView",
79    feature = "UIViewController"
80))]
81extern_conformance!(
82    unsafe impl UITableViewDelegate for UITableViewController {}
83);
84
85#[cfg(all(
86    feature = "UIResponder",
87    feature = "UITraitCollection",
88    feature = "UIViewController"
89))]
90extern_conformance!(
91    unsafe impl UITraitEnvironment for UITableViewController {}
92);
93
94#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
95impl UITableViewController {
96    extern_methods!(
97        #[cfg(feature = "UITableView")]
98        #[unsafe(method(initWithStyle:))]
99        #[unsafe(method_family = init)]
100        pub unsafe fn initWithStyle(
101            this: Allocated<Self>,
102            style: UITableViewStyle,
103        ) -> Retained<Self>;
104
105        #[unsafe(method(initWithNibName:bundle:))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn initWithNibName_bundle(
108            this: Allocated<Self>,
109            nib_name_or_nil: Option<&NSString>,
110            nib_bundle_or_nil: Option<&NSBundle>,
111        ) -> Retained<Self>;
112
113        #[unsafe(method(initWithCoder:))]
114        #[unsafe(method_family = init)]
115        pub unsafe fn initWithCoder(
116            this: Allocated<Self>,
117            coder: &NSCoder,
118        ) -> Option<Retained<Self>>;
119
120        #[cfg(all(feature = "UIScrollView", feature = "UITableView", feature = "UIView"))]
121        #[unsafe(method(tableView))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn tableView(&self) -> Option<Retained<UITableView>>;
124
125        #[cfg(all(feature = "UIScrollView", feature = "UITableView", feature = "UIView"))]
126        /// Setter for [`tableView`][Self::tableView].
127        #[unsafe(method(setTableView:))]
128        #[unsafe(method_family = none)]
129        pub unsafe fn setTableView(&self, table_view: Option<&UITableView>);
130
131        #[unsafe(method(clearsSelectionOnViewWillAppear))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn clearsSelectionOnViewWillAppear(&self) -> bool;
134
135        /// Setter for [`clearsSelectionOnViewWillAppear`][Self::clearsSelectionOnViewWillAppear].
136        #[unsafe(method(setClearsSelectionOnViewWillAppear:))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn setClearsSelectionOnViewWillAppear(
139            &self,
140            clears_selection_on_view_will_appear: bool,
141        );
142
143        #[cfg(all(
144            feature = "UIControl",
145            feature = "UIRefreshControl",
146            feature = "UIView"
147        ))]
148        #[unsafe(method(refreshControl))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn refreshControl(&self) -> Option<Retained<UIRefreshControl>>;
151
152        #[cfg(all(
153            feature = "UIControl",
154            feature = "UIRefreshControl",
155            feature = "UIView"
156        ))]
157        /// Setter for [`refreshControl`][Self::refreshControl].
158        #[unsafe(method(setRefreshControl:))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn setRefreshControl(&self, refresh_control: Option<&UIRefreshControl>);
161    );
162}
163
164/// Methods declared on superclass `NSObject`.
165#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
166impl UITableViewController {
167    extern_methods!(
168        #[unsafe(method(init))]
169        #[unsafe(method_family = init)]
170        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
171
172        #[unsafe(method(new))]
173        #[unsafe(method_family = new)]
174        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
175    );
176}