1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct UISplitViewControllerDisplayMode(pub NSInteger);
17impl UISplitViewControllerDisplayMode {
18 #[doc(alias = "UISplitViewControllerDisplayModeAutomatic")]
19 pub const Automatic: Self = Self(0);
20 #[doc(alias = "UISplitViewControllerDisplayModeSecondaryOnly")]
21 pub const SecondaryOnly: Self = Self(1);
22 #[doc(alias = "UISplitViewControllerDisplayModeOneBesideSecondary")]
23 pub const OneBesideSecondary: Self = Self(2);
24 #[doc(alias = "UISplitViewControllerDisplayModeOneOverSecondary")]
25 pub const OneOverSecondary: Self = Self(3);
26 #[doc(alias = "UISplitViewControllerDisplayModeTwoBesideSecondary")]
27 pub const TwoBesideSecondary: Self = Self(4);
28 #[doc(alias = "UISplitViewControllerDisplayModeTwoOverSecondary")]
29 pub const TwoOverSecondary: Self = Self(5);
30 #[doc(alias = "UISplitViewControllerDisplayModeTwoDisplaceSecondary")]
31 pub const TwoDisplaceSecondary: Self = Self(6);
32 #[doc(alias = "UISplitViewControllerDisplayModePrimaryHidden")]
33 #[deprecated]
34 pub const PrimaryHidden: Self = Self(UISplitViewControllerDisplayMode::SecondaryOnly.0);
35 #[doc(alias = "UISplitViewControllerDisplayModeAllVisible")]
36 #[deprecated]
37 pub const AllVisible: Self = Self(UISplitViewControllerDisplayMode::OneBesideSecondary.0);
38 #[doc(alias = "UISplitViewControllerDisplayModePrimaryOverlay")]
39 #[deprecated]
40 pub const PrimaryOverlay: Self = Self(UISplitViewControllerDisplayMode::OneOverSecondary.0);
41}
42
43unsafe impl Encode for UISplitViewControllerDisplayMode {
44 const ENCODING: Encoding = NSInteger::ENCODING;
45}
46
47unsafe impl RefEncode for UISplitViewControllerDisplayMode {
48 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
49}
50
51#[repr(transparent)]
54#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
55pub struct UISplitViewControllerPrimaryEdge(pub NSInteger);
56impl UISplitViewControllerPrimaryEdge {
57 #[doc(alias = "UISplitViewControllerPrimaryEdgeLeading")]
58 pub const Leading: Self = Self(0);
59 #[doc(alias = "UISplitViewControllerPrimaryEdgeTrailing")]
60 pub const Trailing: Self = Self(1);
61}
62
63unsafe impl Encode for UISplitViewControllerPrimaryEdge {
64 const ENCODING: Encoding = NSInteger::ENCODING;
65}
66
67unsafe impl RefEncode for UISplitViewControllerPrimaryEdge {
68 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
69}
70
71#[repr(transparent)]
74#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
75pub struct UISplitViewControllerBackgroundStyle(pub NSInteger);
76impl UISplitViewControllerBackgroundStyle {
77 #[doc(alias = "UISplitViewControllerBackgroundStyleNone")]
78 pub const None: Self = Self(0);
79 #[doc(alias = "UISplitViewControllerBackgroundStyleSidebar")]
80 pub const Sidebar: Self = Self(1);
81}
82
83unsafe impl Encode for UISplitViewControllerBackgroundStyle {
84 const ENCODING: Encoding = NSInteger::ENCODING;
85}
86
87unsafe impl RefEncode for UISplitViewControllerBackgroundStyle {
88 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
89}
90
91#[repr(transparent)]
94#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
95pub struct UISplitViewControllerStyle(pub NSInteger);
96impl UISplitViewControllerStyle {
97 #[doc(alias = "UISplitViewControllerStyleUnspecified")]
98 #[deprecated]
99 pub const Unspecified: Self = Self(0);
100 #[doc(alias = "UISplitViewControllerStyleDoubleColumn")]
101 pub const DoubleColumn: Self = Self(1);
102 #[doc(alias = "UISplitViewControllerStyleTripleColumn")]
103 pub const TripleColumn: Self = Self(2);
104}
105
106unsafe impl Encode for UISplitViewControllerStyle {
107 const ENCODING: Encoding = NSInteger::ENCODING;
108}
109
110unsafe impl RefEncode for UISplitViewControllerStyle {
111 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
112}
113
114#[repr(transparent)]
117#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
118pub struct UISplitViewControllerColumn(pub NSInteger);
119impl UISplitViewControllerColumn {
120 #[doc(alias = "UISplitViewControllerColumnPrimary")]
121 pub const Primary: Self = Self(0);
122 #[doc(alias = "UISplitViewControllerColumnSupplementary")]
123 pub const Supplementary: Self = Self(1);
124 #[doc(alias = "UISplitViewControllerColumnSecondary")]
125 pub const Secondary: Self = Self(2);
126 #[doc(alias = "UISplitViewControllerColumnCompact")]
127 pub const Compact: Self = Self(3);
128 #[doc(alias = "UISplitViewControllerColumnInspector")]
129 pub const Inspector: Self = Self(4);
130}
131
132unsafe impl Encode for UISplitViewControllerColumn {
133 const ENCODING: Encoding = NSInteger::ENCODING;
134}
135
136unsafe impl RefEncode for UISplitViewControllerColumn {
137 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
138}
139
140#[repr(transparent)]
143#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
144pub struct UISplitViewControllerSplitBehavior(pub NSInteger);
145impl UISplitViewControllerSplitBehavior {
146 #[doc(alias = "UISplitViewControllerSplitBehaviorAutomatic")]
147 pub const Automatic: Self = Self(0);
148 #[doc(alias = "UISplitViewControllerSplitBehaviorTile")]
149 pub const Tile: Self = Self(1);
150 #[doc(alias = "UISplitViewControllerSplitBehaviorOverlay")]
151 pub const Overlay: Self = Self(2);
152 #[doc(alias = "UISplitViewControllerSplitBehaviorDisplace")]
153 pub const Displace: Self = Self(3);
154}
155
156unsafe impl Encode for UISplitViewControllerSplitBehavior {
157 const ENCODING: Encoding = NSInteger::ENCODING;
158}
159
160unsafe impl RefEncode for UISplitViewControllerSplitBehavior {
161 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
162}
163
164#[repr(transparent)]
167#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
168pub struct UISplitViewControllerDisplayModeButtonVisibility(pub NSInteger);
169impl UISplitViewControllerDisplayModeButtonVisibility {
170 #[doc(alias = "UISplitViewControllerDisplayModeButtonVisibilityAutomatic")]
171 pub const Automatic: Self = Self(0);
172 #[doc(alias = "UISplitViewControllerDisplayModeButtonVisibilityNever")]
173 pub const Never: Self = Self(1);
174 #[doc(alias = "UISplitViewControllerDisplayModeButtonVisibilityAlways")]
175 pub const Always: Self = Self(2);
176}
177
178unsafe impl Encode for UISplitViewControllerDisplayModeButtonVisibility {
179 const ENCODING: Encoding = NSInteger::ENCODING;
180}
181
182unsafe impl RefEncode for UISplitViewControllerDisplayModeButtonVisibility {
183 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
184}
185
186extern "C" {
187 #[cfg(feature = "objc2-core-foundation")]
189 pub static UISplitViewControllerAutomaticDimension: CGFloat;
190}
191
192extern_class!(
193 #[unsafe(super(UIViewController, UIResponder, NSObject))]
195 #[thread_kind = MainThreadOnly]
196 #[derive(Debug, PartialEq, Eq, Hash)]
197 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
198 pub struct UISplitViewController;
199);
200
201#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
202extern_conformance!(
203 unsafe impl NSCoding for UISplitViewController {}
204);
205
206#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
207extern_conformance!(
208 unsafe impl NSObjectProtocol for UISplitViewController {}
209);
210
211#[cfg(all(
212 feature = "UIAppearance",
213 feature = "UIResponder",
214 feature = "UIViewController"
215))]
216extern_conformance!(
217 unsafe impl UIAppearanceContainer for UISplitViewController {}
218);
219
220#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
221extern_conformance!(
222 unsafe impl UIContentContainer for UISplitViewController {}
223);
224
225#[cfg(all(
226 feature = "UIFocus",
227 feature = "UIResponder",
228 feature = "UIViewController"
229))]
230extern_conformance!(
231 unsafe impl UIFocusEnvironment for UISplitViewController {}
232);
233
234#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
235extern_conformance!(
236 unsafe impl UIResponderStandardEditActions for UISplitViewController {}
237);
238
239#[cfg(all(
240 feature = "UIResponder",
241 feature = "UITraitCollection",
242 feature = "UIViewController"
243))]
244extern_conformance!(
245 unsafe impl UITraitEnvironment for UISplitViewController {}
246);
247
248#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
249impl UISplitViewController {
250 extern_methods!(
251 #[unsafe(method(initWithCoder:))]
255 #[unsafe(method_family = init)]
256 pub unsafe fn initWithCoder(
257 this: Allocated<Self>,
258 coder: &NSCoder,
259 ) -> Option<Retained<Self>>;
260
261 #[unsafe(method(initWithNibName:bundle:))]
262 #[unsafe(method_family = init)]
263 pub fn initWithNibName_bundle(
264 this: Allocated<Self>,
265 nib_name_or_nil: Option<&NSString>,
266 nib_bundle_or_nil: Option<&NSBundle>,
267 ) -> Retained<Self>;
268
269 #[unsafe(method(initWithStyle:))]
270 #[unsafe(method_family = init)]
271 pub fn initWithStyle(
272 this: Allocated<Self>,
273 style: UISplitViewControllerStyle,
274 ) -> Retained<Self>;
275
276 #[unsafe(method(style))]
277 #[unsafe(method_family = none)]
278 pub fn style(&self) -> UISplitViewControllerStyle;
279
280 #[unsafe(method(delegate))]
281 #[unsafe(method_family = none)]
282 pub fn delegate(
283 &self,
284 ) -> Option<Retained<ProtocolObject<dyn UISplitViewControllerDelegate>>>;
285
286 #[unsafe(method(setDelegate:))]
290 #[unsafe(method_family = none)]
291 pub fn setDelegate(
292 &self,
293 delegate: Option<&ProtocolObject<dyn UISplitViewControllerDelegate>>,
294 );
295
296 #[unsafe(method(showsSecondaryOnlyButton))]
297 #[unsafe(method_family = none)]
298 pub fn showsSecondaryOnlyButton(&self) -> bool;
299
300 #[unsafe(method(setShowsSecondaryOnlyButton:))]
302 #[unsafe(method_family = none)]
303 pub fn setShowsSecondaryOnlyButton(&self, shows_secondary_only_button: bool);
304
305 #[unsafe(method(preferredSplitBehavior))]
306 #[unsafe(method_family = none)]
307 pub fn preferredSplitBehavior(&self) -> UISplitViewControllerSplitBehavior;
308
309 #[unsafe(method(setPreferredSplitBehavior:))]
311 #[unsafe(method_family = none)]
312 pub fn setPreferredSplitBehavior(
313 &self,
314 preferred_split_behavior: UISplitViewControllerSplitBehavior,
315 );
316
317 #[unsafe(method(splitBehavior))]
318 #[unsafe(method_family = none)]
319 pub fn splitBehavior(&self) -> UISplitViewControllerSplitBehavior;
320
321 #[unsafe(method(setViewController:forColumn:))]
322 #[unsafe(method_family = none)]
323 pub fn setViewController_forColumn(
324 &self,
325 vc: Option<&UIViewController>,
326 column: UISplitViewControllerColumn,
327 );
328
329 #[unsafe(method(viewControllerForColumn:))]
330 #[unsafe(method_family = none)]
331 pub fn viewControllerForColumn(
332 &self,
333 column: UISplitViewControllerColumn,
334 ) -> Option<Retained<UIViewController>>;
335
336 #[unsafe(method(hideColumn:))]
337 #[unsafe(method_family = none)]
338 pub fn hideColumn(&self, column: UISplitViewControllerColumn);
339
340 #[unsafe(method(showColumn:))]
341 #[unsafe(method_family = none)]
342 pub fn showColumn(&self, column: UISplitViewControllerColumn);
343
344 #[unsafe(method(isShowingColumn:))]
345 #[unsafe(method_family = none)]
346 pub fn isShowingColumn(&self, column: UISplitViewControllerColumn) -> bool;
347
348 #[unsafe(method(viewControllers))]
349 #[unsafe(method_family = none)]
350 pub fn viewControllers(&self) -> Retained<NSArray<UIViewController>>;
351
352 #[unsafe(method(setViewControllers:))]
356 #[unsafe(method_family = none)]
357 pub fn setViewControllers(&self, view_controllers: &NSArray<UIViewController>);
358
359 #[unsafe(method(presentsWithGesture))]
360 #[unsafe(method_family = none)]
361 pub fn presentsWithGesture(&self) -> bool;
362
363 #[unsafe(method(setPresentsWithGesture:))]
365 #[unsafe(method_family = none)]
366 pub fn setPresentsWithGesture(&self, presents_with_gesture: bool);
367
368 #[unsafe(method(isCollapsed))]
369 #[unsafe(method_family = none)]
370 pub fn isCollapsed(&self) -> bool;
371
372 #[unsafe(method(preferredDisplayMode))]
373 #[unsafe(method_family = none)]
374 pub fn preferredDisplayMode(&self) -> UISplitViewControllerDisplayMode;
375
376 #[unsafe(method(setPreferredDisplayMode:))]
378 #[unsafe(method_family = none)]
379 pub fn setPreferredDisplayMode(
380 &self,
381 preferred_display_mode: UISplitViewControllerDisplayMode,
382 );
383
384 #[unsafe(method(displayMode))]
385 #[unsafe(method_family = none)]
386 pub fn displayMode(&self) -> UISplitViewControllerDisplayMode;
387
388 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
389 #[unsafe(method(displayModeButtonItem))]
390 #[unsafe(method_family = none)]
391 pub fn displayModeButtonItem(&self) -> Retained<UIBarButtonItem>;
392
393 #[unsafe(method(displayModeButtonVisibility))]
394 #[unsafe(method_family = none)]
395 pub fn displayModeButtonVisibility(
396 &self,
397 ) -> UISplitViewControllerDisplayModeButtonVisibility;
398
399 #[unsafe(method(setDisplayModeButtonVisibility:))]
401 #[unsafe(method_family = none)]
402 pub fn setDisplayModeButtonVisibility(
403 &self,
404 display_mode_button_visibility: UISplitViewControllerDisplayModeButtonVisibility,
405 );
406
407 #[cfg(feature = "objc2-core-foundation")]
408 #[unsafe(method(preferredPrimaryColumnWidthFraction))]
409 #[unsafe(method_family = none)]
410 pub fn preferredPrimaryColumnWidthFraction(&self) -> CGFloat;
411
412 #[cfg(feature = "objc2-core-foundation")]
413 #[unsafe(method(setPreferredPrimaryColumnWidthFraction:))]
415 #[unsafe(method_family = none)]
416 pub fn setPreferredPrimaryColumnWidthFraction(
417 &self,
418 preferred_primary_column_width_fraction: CGFloat,
419 );
420
421 #[cfg(feature = "objc2-core-foundation")]
422 #[unsafe(method(preferredPrimaryColumnWidth))]
423 #[unsafe(method_family = none)]
424 pub fn preferredPrimaryColumnWidth(&self) -> CGFloat;
425
426 #[cfg(feature = "objc2-core-foundation")]
427 #[unsafe(method(setPreferredPrimaryColumnWidth:))]
429 #[unsafe(method_family = none)]
430 pub fn setPreferredPrimaryColumnWidth(&self, preferred_primary_column_width: CGFloat);
431
432 #[cfg(feature = "objc2-core-foundation")]
433 #[unsafe(method(minimumPrimaryColumnWidth))]
434 #[unsafe(method_family = none)]
435 pub fn minimumPrimaryColumnWidth(&self) -> CGFloat;
436
437 #[cfg(feature = "objc2-core-foundation")]
438 #[unsafe(method(setMinimumPrimaryColumnWidth:))]
440 #[unsafe(method_family = none)]
441 pub fn setMinimumPrimaryColumnWidth(&self, minimum_primary_column_width: CGFloat);
442
443 #[cfg(feature = "objc2-core-foundation")]
444 #[unsafe(method(maximumPrimaryColumnWidth))]
445 #[unsafe(method_family = none)]
446 pub fn maximumPrimaryColumnWidth(&self) -> CGFloat;
447
448 #[cfg(feature = "objc2-core-foundation")]
449 #[unsafe(method(setMaximumPrimaryColumnWidth:))]
451 #[unsafe(method_family = none)]
452 pub fn setMaximumPrimaryColumnWidth(&self, maximum_primary_column_width: CGFloat);
453
454 #[cfg(feature = "objc2-core-foundation")]
455 #[unsafe(method(primaryColumnWidth))]
456 #[unsafe(method_family = none)]
457 pub fn primaryColumnWidth(&self) -> CGFloat;
458
459 #[cfg(feature = "objc2-core-foundation")]
460 #[unsafe(method(preferredSupplementaryColumnWidthFraction))]
461 #[unsafe(method_family = none)]
462 pub fn preferredSupplementaryColumnWidthFraction(&self) -> CGFloat;
463
464 #[cfg(feature = "objc2-core-foundation")]
465 #[unsafe(method(setPreferredSupplementaryColumnWidthFraction:))]
467 #[unsafe(method_family = none)]
468 pub fn setPreferredSupplementaryColumnWidthFraction(
469 &self,
470 preferred_supplementary_column_width_fraction: CGFloat,
471 );
472
473 #[cfg(feature = "objc2-core-foundation")]
474 #[unsafe(method(preferredSupplementaryColumnWidth))]
475 #[unsafe(method_family = none)]
476 pub fn preferredSupplementaryColumnWidth(&self) -> CGFloat;
477
478 #[cfg(feature = "objc2-core-foundation")]
479 #[unsafe(method(setPreferredSupplementaryColumnWidth:))]
481 #[unsafe(method_family = none)]
482 pub fn setPreferredSupplementaryColumnWidth(
483 &self,
484 preferred_supplementary_column_width: CGFloat,
485 );
486
487 #[cfg(feature = "objc2-core-foundation")]
488 #[unsafe(method(minimumSupplementaryColumnWidth))]
489 #[unsafe(method_family = none)]
490 pub fn minimumSupplementaryColumnWidth(&self) -> CGFloat;
491
492 #[cfg(feature = "objc2-core-foundation")]
493 #[unsafe(method(setMinimumSupplementaryColumnWidth:))]
495 #[unsafe(method_family = none)]
496 pub fn setMinimumSupplementaryColumnWidth(
497 &self,
498 minimum_supplementary_column_width: CGFloat,
499 );
500
501 #[cfg(feature = "objc2-core-foundation")]
502 #[unsafe(method(maximumSupplementaryColumnWidth))]
503 #[unsafe(method_family = none)]
504 pub fn maximumSupplementaryColumnWidth(&self) -> CGFloat;
505
506 #[cfg(feature = "objc2-core-foundation")]
507 #[unsafe(method(setMaximumSupplementaryColumnWidth:))]
509 #[unsafe(method_family = none)]
510 pub fn setMaximumSupplementaryColumnWidth(
511 &self,
512 maximum_supplementary_column_width: CGFloat,
513 );
514
515 #[cfg(feature = "objc2-core-foundation")]
516 #[unsafe(method(supplementaryColumnWidth))]
517 #[unsafe(method_family = none)]
518 pub fn supplementaryColumnWidth(&self) -> CGFloat;
519
520 #[cfg(feature = "objc2-core-foundation")]
521 #[unsafe(method(preferredSecondaryColumnWidthFraction))]
522 #[unsafe(method_family = none)]
523 pub fn preferredSecondaryColumnWidthFraction(&self) -> CGFloat;
524
525 #[cfg(feature = "objc2-core-foundation")]
526 #[unsafe(method(setPreferredSecondaryColumnWidthFraction:))]
528 #[unsafe(method_family = none)]
529 pub fn setPreferredSecondaryColumnWidthFraction(
530 &self,
531 preferred_secondary_column_width_fraction: CGFloat,
532 );
533
534 #[cfg(feature = "objc2-core-foundation")]
535 #[unsafe(method(preferredSecondaryColumnWidth))]
536 #[unsafe(method_family = none)]
537 pub fn preferredSecondaryColumnWidth(&self) -> CGFloat;
538
539 #[cfg(feature = "objc2-core-foundation")]
540 #[unsafe(method(setPreferredSecondaryColumnWidth:))]
542 #[unsafe(method_family = none)]
543 pub fn setPreferredSecondaryColumnWidth(&self, preferred_secondary_column_width: CGFloat);
544
545 #[cfg(feature = "objc2-core-foundation")]
546 #[unsafe(method(minimumSecondaryColumnWidth))]
547 #[unsafe(method_family = none)]
548 pub fn minimumSecondaryColumnWidth(&self) -> CGFloat;
549
550 #[cfg(feature = "objc2-core-foundation")]
551 #[unsafe(method(setMinimumSecondaryColumnWidth:))]
553 #[unsafe(method_family = none)]
554 pub fn setMinimumSecondaryColumnWidth(&self, minimum_secondary_column_width: CGFloat);
555
556 #[cfg(feature = "objc2-core-foundation")]
557 #[unsafe(method(preferredInspectorColumnWidthFraction))]
558 #[unsafe(method_family = none)]
559 pub fn preferredInspectorColumnWidthFraction(&self) -> CGFloat;
560
561 #[cfg(feature = "objc2-core-foundation")]
562 #[unsafe(method(setPreferredInspectorColumnWidthFraction:))]
564 #[unsafe(method_family = none)]
565 pub fn setPreferredInspectorColumnWidthFraction(
566 &self,
567 preferred_inspector_column_width_fraction: CGFloat,
568 );
569
570 #[cfg(feature = "objc2-core-foundation")]
571 #[unsafe(method(preferredInspectorColumnWidth))]
572 #[unsafe(method_family = none)]
573 pub fn preferredInspectorColumnWidth(&self) -> CGFloat;
574
575 #[cfg(feature = "objc2-core-foundation")]
576 #[unsafe(method(setPreferredInspectorColumnWidth:))]
578 #[unsafe(method_family = none)]
579 pub fn setPreferredInspectorColumnWidth(&self, preferred_inspector_column_width: CGFloat);
580
581 #[cfg(feature = "objc2-core-foundation")]
582 #[unsafe(method(minimumInspectorColumnWidth))]
583 #[unsafe(method_family = none)]
584 pub fn minimumInspectorColumnWidth(&self) -> CGFloat;
585
586 #[cfg(feature = "objc2-core-foundation")]
587 #[unsafe(method(setMinimumInspectorColumnWidth:))]
589 #[unsafe(method_family = none)]
590 pub fn setMinimumInspectorColumnWidth(&self, minimum_inspector_column_width: CGFloat);
591
592 #[cfg(feature = "objc2-core-foundation")]
593 #[unsafe(method(maximumInspectorColumnWidth))]
594 #[unsafe(method_family = none)]
595 pub fn maximumInspectorColumnWidth(&self) -> CGFloat;
596
597 #[cfg(feature = "objc2-core-foundation")]
598 #[unsafe(method(setMaximumInspectorColumnWidth:))]
600 #[unsafe(method_family = none)]
601 pub fn setMaximumInspectorColumnWidth(&self, maximum_inspector_column_width: CGFloat);
602
603 #[unsafe(method(primaryEdge))]
604 #[unsafe(method_family = none)]
605 pub fn primaryEdge(&self) -> UISplitViewControllerPrimaryEdge;
606
607 #[unsafe(method(setPrimaryEdge:))]
609 #[unsafe(method_family = none)]
610 pub fn setPrimaryEdge(&self, primary_edge: UISplitViewControllerPrimaryEdge);
611
612 #[unsafe(method(showViewController:sender:))]
616 #[unsafe(method_family = none)]
617 pub unsafe fn showViewController_sender(
618 &self,
619 vc: &UIViewController,
620 sender: Option<&AnyObject>,
621 );
622
623 #[unsafe(method(showDetailViewController:sender:))]
627 #[unsafe(method_family = none)]
628 pub unsafe fn showDetailViewController_sender(
629 &self,
630 vc: &UIViewController,
631 sender: Option<&AnyObject>,
632 );
633
634 #[unsafe(method(primaryBackgroundStyle))]
635 #[unsafe(method_family = none)]
636 pub fn primaryBackgroundStyle(&self) -> UISplitViewControllerBackgroundStyle;
637
638 #[unsafe(method(setPrimaryBackgroundStyle:))]
640 #[unsafe(method_family = none)]
641 pub fn setPrimaryBackgroundStyle(
642 &self,
643 primary_background_style: UISplitViewControllerBackgroundStyle,
644 );
645 );
646}
647
648#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
650impl UISplitViewController {
651 extern_methods!(
652 #[unsafe(method(init))]
653 #[unsafe(method_family = init)]
654 pub fn init(this: Allocated<Self>) -> Retained<Self>;
655
656 #[unsafe(method(new))]
657 #[unsafe(method_family = new)]
658 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
659 );
660}
661
662extern_protocol!(
663 pub unsafe trait UISplitViewControllerDelegate: MainThreadOnly {
665 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
666 #[optional]
667 #[unsafe(method(splitViewController:willChangeToDisplayMode:))]
668 #[unsafe(method_family = none)]
669 fn splitViewController_willChangeToDisplayMode(
670 &self,
671 svc: &UISplitViewController,
672 display_mode: UISplitViewControllerDisplayMode,
673 );
674
675 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
676 #[optional]
677 #[unsafe(method(targetDisplayModeForActionInSplitViewController:))]
678 #[unsafe(method_family = none)]
679 fn targetDisplayModeForActionInSplitViewController(
680 &self,
681 svc: &UISplitViewController,
682 ) -> UISplitViewControllerDisplayMode;
683
684 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
685 #[optional]
689 #[unsafe(method(splitViewController:showViewController:sender:))]
690 #[unsafe(method_family = none)]
691 unsafe fn splitViewController_showViewController_sender(
692 &self,
693 split_view_controller: &UISplitViewController,
694 vc: &UIViewController,
695 sender: Option<&AnyObject>,
696 ) -> bool;
697
698 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
699 #[optional]
703 #[unsafe(method(splitViewController:showDetailViewController:sender:))]
704 #[unsafe(method_family = none)]
705 unsafe fn splitViewController_showDetailViewController_sender(
706 &self,
707 split_view_controller: &UISplitViewController,
708 vc: &UIViewController,
709 sender: Option<&AnyObject>,
710 ) -> bool;
711
712 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
713 #[optional]
714 #[unsafe(method(primaryViewControllerForCollapsingSplitViewController:))]
715 #[unsafe(method_family = none)]
716 fn primaryViewControllerForCollapsingSplitViewController(
717 &self,
718 split_view_controller: &UISplitViewController,
719 ) -> Option<Retained<UIViewController>>;
720
721 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
722 #[optional]
723 #[unsafe(method(primaryViewControllerForExpandingSplitViewController:))]
724 #[unsafe(method_family = none)]
725 fn primaryViewControllerForExpandingSplitViewController(
726 &self,
727 split_view_controller: &UISplitViewController,
728 ) -> Option<Retained<UIViewController>>;
729
730 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
731 #[optional]
732 #[unsafe(method(splitViewController:collapseSecondaryViewController:ontoPrimaryViewController:))]
733 #[unsafe(method_family = none)]
734 fn splitViewController_collapseSecondaryViewController_ontoPrimaryViewController(
735 &self,
736 split_view_controller: &UISplitViewController,
737 secondary_view_controller: &UIViewController,
738 primary_view_controller: &UIViewController,
739 ) -> bool;
740
741 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
742 #[optional]
743 #[unsafe(method(splitViewController:separateSecondaryViewControllerFromPrimaryViewController:))]
744 #[unsafe(method_family = none)]
745 fn splitViewController_separateSecondaryViewControllerFromPrimaryViewController(
746 &self,
747 split_view_controller: &UISplitViewController,
748 primary_view_controller: &UIViewController,
749 ) -> Option<Retained<UIViewController>>;
750
751 #[cfg(all(
752 feature = "UIOrientation",
753 feature = "UIResponder",
754 feature = "UIViewController"
755 ))]
756 #[optional]
757 #[unsafe(method(splitViewControllerSupportedInterfaceOrientations:))]
758 #[unsafe(method_family = none)]
759 fn splitViewControllerSupportedInterfaceOrientations(
760 &self,
761 split_view_controller: &UISplitViewController,
762 ) -> UIInterfaceOrientationMask;
763
764 #[cfg(all(
765 feature = "UIOrientation",
766 feature = "UIResponder",
767 feature = "UIViewController"
768 ))]
769 #[optional]
770 #[unsafe(method(splitViewControllerPreferredInterfaceOrientationForPresentation:))]
771 #[unsafe(method_family = none)]
772 fn splitViewControllerPreferredInterfaceOrientationForPresentation(
773 &self,
774 split_view_controller: &UISplitViewController,
775 ) -> UIInterfaceOrientation;
776
777 #[cfg(all(
778 feature = "UIBarButtonItem",
779 feature = "UIBarItem",
780 feature = "UIPopoverController",
781 feature = "UIResponder",
782 feature = "UIViewController"
783 ))]
784 #[deprecated = "Use splitViewController:willChangeToDisplayMode: and displayModeButtonItem instead"]
785 #[optional]
786 #[unsafe(method(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:))]
787 #[unsafe(method_family = none)]
788 fn splitViewController_willHideViewController_withBarButtonItem_forPopoverController(
789 &self,
790 svc: &UISplitViewController,
791 a_view_controller: &UIViewController,
792 bar_button_item: &UIBarButtonItem,
793 pc: &UIPopoverController,
794 );
795
796 #[cfg(all(
797 feature = "UIBarButtonItem",
798 feature = "UIBarItem",
799 feature = "UIResponder",
800 feature = "UIViewController"
801 ))]
802 #[deprecated = "Use splitViewController:willChangeToDisplayMode: and displayModeButtonItem instead"]
803 #[optional]
804 #[unsafe(method(splitViewController:willShowViewController:invalidatingBarButtonItem:))]
805 #[unsafe(method_family = none)]
806 fn splitViewController_willShowViewController_invalidatingBarButtonItem(
807 &self,
808 svc: &UISplitViewController,
809 a_view_controller: &UIViewController,
810 bar_button_item: &UIBarButtonItem,
811 );
812
813 #[cfg(all(
814 feature = "UIPopoverController",
815 feature = "UIResponder",
816 feature = "UIViewController"
817 ))]
818 #[deprecated]
819 #[optional]
820 #[unsafe(method(splitViewController:popoverController:willPresentViewController:))]
821 #[unsafe(method_family = none)]
822 fn splitViewController_popoverController_willPresentViewController(
823 &self,
824 svc: &UISplitViewController,
825 pc: &UIPopoverController,
826 a_view_controller: &UIViewController,
827 );
828
829 #[cfg(all(
830 feature = "UIOrientation",
831 feature = "UIResponder",
832 feature = "UIViewController"
833 ))]
834 #[deprecated]
835 #[optional]
836 #[unsafe(method(splitViewController:shouldHideViewController:inOrientation:))]
837 #[unsafe(method_family = none)]
838 fn splitViewController_shouldHideViewController_inOrientation(
839 &self,
840 svc: &UISplitViewController,
841 vc: &UIViewController,
842 orientation: UIInterfaceOrientation,
843 ) -> bool;
844
845 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
846 #[optional]
847 #[unsafe(method(splitViewController:topColumnForCollapsingToProposedTopColumn:))]
848 #[unsafe(method_family = none)]
849 fn splitViewController_topColumnForCollapsingToProposedTopColumn(
850 &self,
851 svc: &UISplitViewController,
852 proposed_top_column: UISplitViewControllerColumn,
853 ) -> UISplitViewControllerColumn;
854
855 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
856 #[optional]
857 #[unsafe(method(splitViewController:displayModeForExpandingToProposedDisplayMode:))]
858 #[unsafe(method_family = none)]
859 fn splitViewController_displayModeForExpandingToProposedDisplayMode(
860 &self,
861 svc: &UISplitViewController,
862 proposed_display_mode: UISplitViewControllerDisplayMode,
863 ) -> UISplitViewControllerDisplayMode;
864
865 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
866 #[optional]
867 #[unsafe(method(splitViewControllerDidCollapse:))]
868 #[unsafe(method_family = none)]
869 fn splitViewControllerDidCollapse(&self, svc: &UISplitViewController);
870
871 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
872 #[optional]
873 #[unsafe(method(splitViewControllerDidExpand:))]
874 #[unsafe(method_family = none)]
875 fn splitViewControllerDidExpand(&self, svc: &UISplitViewController);
876
877 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
878 #[optional]
879 #[unsafe(method(splitViewController:willShowColumn:))]
880 #[unsafe(method_family = none)]
881 fn splitViewController_willShowColumn(
882 &self,
883 svc: &UISplitViewController,
884 column: UISplitViewControllerColumn,
885 );
886
887 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
888 #[optional]
889 #[unsafe(method(splitViewController:willHideColumn:))]
890 #[unsafe(method_family = none)]
891 fn splitViewController_willHideColumn(
892 &self,
893 svc: &UISplitViewController,
894 column: UISplitViewControllerColumn,
895 );
896
897 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
898 #[optional]
899 #[unsafe(method(splitViewController:didShowColumn:))]
900 #[unsafe(method_family = none)]
901 fn splitViewController_didShowColumn(
902 &self,
903 svc: &UISplitViewController,
904 column: UISplitViewControllerColumn,
905 );
906
907 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
908 #[optional]
909 #[unsafe(method(splitViewController:didHideColumn:))]
910 #[unsafe(method_family = none)]
911 fn splitViewController_didHideColumn(
912 &self,
913 svc: &UISplitViewController,
914 column: UISplitViewControllerColumn,
915 );
916
917 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
918 #[optional]
919 #[unsafe(method(splitViewControllerInteractivePresentationGestureWillBegin:))]
920 #[unsafe(method_family = none)]
921 fn splitViewControllerInteractivePresentationGestureWillBegin(
922 &self,
923 svc: &UISplitViewController,
924 );
925
926 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
927 #[optional]
928 #[unsafe(method(splitViewControllerInteractivePresentationGestureDidEnd:))]
929 #[unsafe(method_family = none)]
930 fn splitViewControllerInteractivePresentationGestureDidEnd(
931 &self,
932 svc: &UISplitViewController,
933 );
934 }
935);
936
937#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
939impl UIViewController {
940 extern_methods!(
941 #[unsafe(method(splitViewController))]
942 #[unsafe(method_family = none)]
943 pub fn splitViewController(&self) -> Option<Retained<UISplitViewController>>;
944
945 #[unsafe(method(collapseSecondaryViewController:forSplitViewController:))]
946 #[unsafe(method_family = none)]
947 pub fn collapseSecondaryViewController_forSplitViewController(
948 &self,
949 secondary_view_controller: &UIViewController,
950 split_view_controller: &UISplitViewController,
951 );
952
953 #[unsafe(method(separateSecondaryViewControllerForSplitViewController:))]
954 #[unsafe(method_family = none)]
955 pub fn separateSecondaryViewControllerForSplitViewController(
956 &self,
957 split_view_controller: &UISplitViewController,
958 ) -> Option<Retained<UIViewController>>;
959 );
960}