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 #[deprecated]
33 #[doc(alias = "UISplitViewControllerDisplayModePrimaryHidden")]
34 pub const PrimaryHidden: Self = Self(UISplitViewControllerDisplayMode::SecondaryOnly.0);
35 #[deprecated]
36 #[doc(alias = "UISplitViewControllerDisplayModeAllVisible")]
37 pub const AllVisible: Self = Self(UISplitViewControllerDisplayMode::OneBesideSecondary.0);
38 #[deprecated]
39 #[doc(alias = "UISplitViewControllerDisplayModePrimaryOverlay")]
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 #[deprecated]
98 #[doc(alias = "UISplitViewControllerStyleUnspecified")]
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}
129
130unsafe impl Encode for UISplitViewControllerColumn {
131 const ENCODING: Encoding = NSInteger::ENCODING;
132}
133
134unsafe impl RefEncode for UISplitViewControllerColumn {
135 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
136}
137
138#[repr(transparent)]
141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
142pub struct UISplitViewControllerSplitBehavior(pub NSInteger);
143impl UISplitViewControllerSplitBehavior {
144 #[doc(alias = "UISplitViewControllerSplitBehaviorAutomatic")]
145 pub const Automatic: Self = Self(0);
146 #[doc(alias = "UISplitViewControllerSplitBehaviorTile")]
147 pub const Tile: Self = Self(1);
148 #[doc(alias = "UISplitViewControllerSplitBehaviorOverlay")]
149 pub const Overlay: Self = Self(2);
150 #[doc(alias = "UISplitViewControllerSplitBehaviorDisplace")]
151 pub const Displace: Self = Self(3);
152}
153
154unsafe impl Encode for UISplitViewControllerSplitBehavior {
155 const ENCODING: Encoding = NSInteger::ENCODING;
156}
157
158unsafe impl RefEncode for UISplitViewControllerSplitBehavior {
159 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
160}
161
162#[repr(transparent)]
165#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
166pub struct UISplitViewControllerDisplayModeButtonVisibility(pub NSInteger);
167impl UISplitViewControllerDisplayModeButtonVisibility {
168 #[doc(alias = "UISplitViewControllerDisplayModeButtonVisibilityAutomatic")]
169 pub const Automatic: Self = Self(0);
170 #[doc(alias = "UISplitViewControllerDisplayModeButtonVisibilityNever")]
171 pub const Never: Self = Self(1);
172 #[doc(alias = "UISplitViewControllerDisplayModeButtonVisibilityAlways")]
173 pub const Always: Self = Self(2);
174}
175
176unsafe impl Encode for UISplitViewControllerDisplayModeButtonVisibility {
177 const ENCODING: Encoding = NSInteger::ENCODING;
178}
179
180unsafe impl RefEncode for UISplitViewControllerDisplayModeButtonVisibility {
181 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
182}
183
184extern "C" {
185 #[cfg(feature = "objc2-core-foundation")]
187 pub static UISplitViewControllerAutomaticDimension: CGFloat;
188}
189
190extern_class!(
191 #[unsafe(super(UIViewController, UIResponder, NSObject))]
193 #[thread_kind = MainThreadOnly]
194 #[derive(Debug, PartialEq, Eq, Hash)]
195 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
196 pub struct UISplitViewController;
197);
198
199#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
200unsafe impl NSCoding for UISplitViewController {}
201
202#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
203unsafe impl NSObjectProtocol for UISplitViewController {}
204
205#[cfg(all(
206 feature = "UIAppearance",
207 feature = "UIResponder",
208 feature = "UIViewController"
209))]
210unsafe impl UIAppearanceContainer for UISplitViewController {}
211
212#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
213unsafe impl UIContentContainer for UISplitViewController {}
214
215#[cfg(all(
216 feature = "UIFocus",
217 feature = "UIResponder",
218 feature = "UIViewController"
219))]
220unsafe impl UIFocusEnvironment for UISplitViewController {}
221
222#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
223unsafe impl UIResponderStandardEditActions for UISplitViewController {}
224
225#[cfg(all(
226 feature = "UIResponder",
227 feature = "UITraitCollection",
228 feature = "UIViewController"
229))]
230unsafe impl UITraitEnvironment for UISplitViewController {}
231
232#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
233impl UISplitViewController {
234 extern_methods!(
235 #[unsafe(method(initWithCoder:))]
236 #[unsafe(method_family = init)]
237 pub unsafe fn initWithCoder(
238 this: Allocated<Self>,
239 coder: &NSCoder,
240 ) -> Option<Retained<Self>>;
241
242 #[unsafe(method(initWithNibName:bundle:))]
243 #[unsafe(method_family = init)]
244 pub unsafe fn initWithNibName_bundle(
245 this: Allocated<Self>,
246 nib_name_or_nil: Option<&NSString>,
247 nib_bundle_or_nil: Option<&NSBundle>,
248 ) -> Retained<Self>;
249
250 #[unsafe(method(initWithStyle:))]
251 #[unsafe(method_family = init)]
252 pub unsafe fn initWithStyle(
253 this: Allocated<Self>,
254 style: UISplitViewControllerStyle,
255 ) -> Retained<Self>;
256
257 #[unsafe(method(style))]
258 #[unsafe(method_family = none)]
259 pub unsafe fn style(&self) -> UISplitViewControllerStyle;
260
261 #[unsafe(method(delegate))]
262 #[unsafe(method_family = none)]
263 pub unsafe fn delegate(
264 &self,
265 ) -> Option<Retained<ProtocolObject<dyn UISplitViewControllerDelegate>>>;
266
267 #[unsafe(method(setDelegate:))]
270 #[unsafe(method_family = none)]
271 pub unsafe fn setDelegate(
272 &self,
273 delegate: Option<&ProtocolObject<dyn UISplitViewControllerDelegate>>,
274 );
275
276 #[unsafe(method(showsSecondaryOnlyButton))]
277 #[unsafe(method_family = none)]
278 pub unsafe fn showsSecondaryOnlyButton(&self) -> bool;
279
280 #[unsafe(method(setShowsSecondaryOnlyButton:))]
282 #[unsafe(method_family = none)]
283 pub unsafe fn setShowsSecondaryOnlyButton(&self, shows_secondary_only_button: bool);
284
285 #[unsafe(method(preferredSplitBehavior))]
286 #[unsafe(method_family = none)]
287 pub unsafe fn preferredSplitBehavior(&self) -> UISplitViewControllerSplitBehavior;
288
289 #[unsafe(method(setPreferredSplitBehavior:))]
291 #[unsafe(method_family = none)]
292 pub unsafe fn setPreferredSplitBehavior(
293 &self,
294 preferred_split_behavior: UISplitViewControllerSplitBehavior,
295 );
296
297 #[unsafe(method(splitBehavior))]
298 #[unsafe(method_family = none)]
299 pub unsafe fn splitBehavior(&self) -> UISplitViewControllerSplitBehavior;
300
301 #[unsafe(method(setViewController:forColumn:))]
302 #[unsafe(method_family = none)]
303 pub unsafe fn setViewController_forColumn(
304 &self,
305 vc: Option<&UIViewController>,
306 column: UISplitViewControllerColumn,
307 );
308
309 #[unsafe(method(viewControllerForColumn:))]
310 #[unsafe(method_family = none)]
311 pub unsafe fn viewControllerForColumn(
312 &self,
313 column: UISplitViewControllerColumn,
314 ) -> Option<Retained<UIViewController>>;
315
316 #[unsafe(method(hideColumn:))]
317 #[unsafe(method_family = none)]
318 pub unsafe fn hideColumn(&self, column: UISplitViewControllerColumn);
319
320 #[unsafe(method(showColumn:))]
321 #[unsafe(method_family = none)]
322 pub unsafe fn showColumn(&self, column: UISplitViewControllerColumn);
323
324 #[unsafe(method(viewControllers))]
325 #[unsafe(method_family = none)]
326 pub unsafe fn viewControllers(&self) -> Retained<NSArray<UIViewController>>;
327
328 #[unsafe(method(setViewControllers:))]
330 #[unsafe(method_family = none)]
331 pub unsafe fn setViewControllers(&self, view_controllers: &NSArray<UIViewController>);
332
333 #[unsafe(method(presentsWithGesture))]
334 #[unsafe(method_family = none)]
335 pub unsafe fn presentsWithGesture(&self) -> bool;
336
337 #[unsafe(method(setPresentsWithGesture:))]
339 #[unsafe(method_family = none)]
340 pub unsafe fn setPresentsWithGesture(&self, presents_with_gesture: bool);
341
342 #[unsafe(method(isCollapsed))]
343 #[unsafe(method_family = none)]
344 pub unsafe fn isCollapsed(&self) -> bool;
345
346 #[unsafe(method(preferredDisplayMode))]
347 #[unsafe(method_family = none)]
348 pub unsafe fn preferredDisplayMode(&self) -> UISplitViewControllerDisplayMode;
349
350 #[unsafe(method(setPreferredDisplayMode:))]
352 #[unsafe(method_family = none)]
353 pub unsafe fn setPreferredDisplayMode(
354 &self,
355 preferred_display_mode: UISplitViewControllerDisplayMode,
356 );
357
358 #[unsafe(method(displayMode))]
359 #[unsafe(method_family = none)]
360 pub unsafe fn displayMode(&self) -> UISplitViewControllerDisplayMode;
361
362 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
363 #[unsafe(method(displayModeButtonItem))]
364 #[unsafe(method_family = none)]
365 pub unsafe fn displayModeButtonItem(&self) -> Retained<UIBarButtonItem>;
366
367 #[unsafe(method(displayModeButtonVisibility))]
368 #[unsafe(method_family = none)]
369 pub unsafe fn displayModeButtonVisibility(
370 &self,
371 ) -> UISplitViewControllerDisplayModeButtonVisibility;
372
373 #[unsafe(method(setDisplayModeButtonVisibility:))]
375 #[unsafe(method_family = none)]
376 pub unsafe fn setDisplayModeButtonVisibility(
377 &self,
378 display_mode_button_visibility: UISplitViewControllerDisplayModeButtonVisibility,
379 );
380
381 #[cfg(feature = "objc2-core-foundation")]
382 #[unsafe(method(preferredPrimaryColumnWidthFraction))]
383 #[unsafe(method_family = none)]
384 pub unsafe fn preferredPrimaryColumnWidthFraction(&self) -> CGFloat;
385
386 #[cfg(feature = "objc2-core-foundation")]
387 #[unsafe(method(setPreferredPrimaryColumnWidthFraction:))]
389 #[unsafe(method_family = none)]
390 pub unsafe fn setPreferredPrimaryColumnWidthFraction(
391 &self,
392 preferred_primary_column_width_fraction: CGFloat,
393 );
394
395 #[cfg(feature = "objc2-core-foundation")]
396 #[unsafe(method(preferredPrimaryColumnWidth))]
397 #[unsafe(method_family = none)]
398 pub unsafe fn preferredPrimaryColumnWidth(&self) -> CGFloat;
399
400 #[cfg(feature = "objc2-core-foundation")]
401 #[unsafe(method(setPreferredPrimaryColumnWidth:))]
403 #[unsafe(method_family = none)]
404 pub unsafe fn setPreferredPrimaryColumnWidth(
405 &self,
406 preferred_primary_column_width: CGFloat,
407 );
408
409 #[cfg(feature = "objc2-core-foundation")]
410 #[unsafe(method(minimumPrimaryColumnWidth))]
411 #[unsafe(method_family = none)]
412 pub unsafe fn minimumPrimaryColumnWidth(&self) -> CGFloat;
413
414 #[cfg(feature = "objc2-core-foundation")]
415 #[unsafe(method(setMinimumPrimaryColumnWidth:))]
417 #[unsafe(method_family = none)]
418 pub unsafe fn setMinimumPrimaryColumnWidth(&self, minimum_primary_column_width: CGFloat);
419
420 #[cfg(feature = "objc2-core-foundation")]
421 #[unsafe(method(maximumPrimaryColumnWidth))]
422 #[unsafe(method_family = none)]
423 pub unsafe fn maximumPrimaryColumnWidth(&self) -> CGFloat;
424
425 #[cfg(feature = "objc2-core-foundation")]
426 #[unsafe(method(setMaximumPrimaryColumnWidth:))]
428 #[unsafe(method_family = none)]
429 pub unsafe fn setMaximumPrimaryColumnWidth(&self, maximum_primary_column_width: CGFloat);
430
431 #[cfg(feature = "objc2-core-foundation")]
432 #[unsafe(method(primaryColumnWidth))]
433 #[unsafe(method_family = none)]
434 pub unsafe fn primaryColumnWidth(&self) -> CGFloat;
435
436 #[cfg(feature = "objc2-core-foundation")]
437 #[unsafe(method(preferredSupplementaryColumnWidthFraction))]
438 #[unsafe(method_family = none)]
439 pub unsafe fn preferredSupplementaryColumnWidthFraction(&self) -> CGFloat;
440
441 #[cfg(feature = "objc2-core-foundation")]
442 #[unsafe(method(setPreferredSupplementaryColumnWidthFraction:))]
444 #[unsafe(method_family = none)]
445 pub unsafe fn setPreferredSupplementaryColumnWidthFraction(
446 &self,
447 preferred_supplementary_column_width_fraction: CGFloat,
448 );
449
450 #[cfg(feature = "objc2-core-foundation")]
451 #[unsafe(method(preferredSupplementaryColumnWidth))]
452 #[unsafe(method_family = none)]
453 pub unsafe fn preferredSupplementaryColumnWidth(&self) -> CGFloat;
454
455 #[cfg(feature = "objc2-core-foundation")]
456 #[unsafe(method(setPreferredSupplementaryColumnWidth:))]
458 #[unsafe(method_family = none)]
459 pub unsafe fn setPreferredSupplementaryColumnWidth(
460 &self,
461 preferred_supplementary_column_width: CGFloat,
462 );
463
464 #[cfg(feature = "objc2-core-foundation")]
465 #[unsafe(method(minimumSupplementaryColumnWidth))]
466 #[unsafe(method_family = none)]
467 pub unsafe fn minimumSupplementaryColumnWidth(&self) -> CGFloat;
468
469 #[cfg(feature = "objc2-core-foundation")]
470 #[unsafe(method(setMinimumSupplementaryColumnWidth:))]
472 #[unsafe(method_family = none)]
473 pub unsafe fn setMinimumSupplementaryColumnWidth(
474 &self,
475 minimum_supplementary_column_width: CGFloat,
476 );
477
478 #[cfg(feature = "objc2-core-foundation")]
479 #[unsafe(method(maximumSupplementaryColumnWidth))]
480 #[unsafe(method_family = none)]
481 pub unsafe fn maximumSupplementaryColumnWidth(&self) -> CGFloat;
482
483 #[cfg(feature = "objc2-core-foundation")]
484 #[unsafe(method(setMaximumSupplementaryColumnWidth:))]
486 #[unsafe(method_family = none)]
487 pub unsafe fn setMaximumSupplementaryColumnWidth(
488 &self,
489 maximum_supplementary_column_width: CGFloat,
490 );
491
492 #[cfg(feature = "objc2-core-foundation")]
493 #[unsafe(method(supplementaryColumnWidth))]
494 #[unsafe(method_family = none)]
495 pub unsafe fn supplementaryColumnWidth(&self) -> CGFloat;
496
497 #[unsafe(method(primaryEdge))]
498 #[unsafe(method_family = none)]
499 pub unsafe fn primaryEdge(&self) -> UISplitViewControllerPrimaryEdge;
500
501 #[unsafe(method(setPrimaryEdge:))]
503 #[unsafe(method_family = none)]
504 pub unsafe fn setPrimaryEdge(&self, primary_edge: UISplitViewControllerPrimaryEdge);
505
506 #[unsafe(method(showViewController:sender:))]
507 #[unsafe(method_family = none)]
508 pub unsafe fn showViewController_sender(
509 &self,
510 vc: &UIViewController,
511 sender: Option<&AnyObject>,
512 );
513
514 #[unsafe(method(showDetailViewController:sender:))]
515 #[unsafe(method_family = none)]
516 pub unsafe fn showDetailViewController_sender(
517 &self,
518 vc: &UIViewController,
519 sender: Option<&AnyObject>,
520 );
521
522 #[unsafe(method(primaryBackgroundStyle))]
523 #[unsafe(method_family = none)]
524 pub unsafe fn primaryBackgroundStyle(&self) -> UISplitViewControllerBackgroundStyle;
525
526 #[unsafe(method(setPrimaryBackgroundStyle:))]
528 #[unsafe(method_family = none)]
529 pub unsafe fn setPrimaryBackgroundStyle(
530 &self,
531 primary_background_style: UISplitViewControllerBackgroundStyle,
532 );
533 );
534}
535
536#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
538impl UISplitViewController {
539 extern_methods!(
540 #[unsafe(method(init))]
541 #[unsafe(method_family = init)]
542 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
543
544 #[unsafe(method(new))]
545 #[unsafe(method_family = new)]
546 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
547 );
548}
549
550extern_protocol!(
551 pub unsafe trait UISplitViewControllerDelegate: MainThreadOnly {
553 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
554 #[optional]
555 #[unsafe(method(splitViewController:willChangeToDisplayMode:))]
556 #[unsafe(method_family = none)]
557 unsafe fn splitViewController_willChangeToDisplayMode(
558 &self,
559 svc: &UISplitViewController,
560 display_mode: UISplitViewControllerDisplayMode,
561 );
562
563 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
564 #[optional]
565 #[unsafe(method(targetDisplayModeForActionInSplitViewController:))]
566 #[unsafe(method_family = none)]
567 unsafe fn targetDisplayModeForActionInSplitViewController(
568 &self,
569 svc: &UISplitViewController,
570 ) -> UISplitViewControllerDisplayMode;
571
572 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
573 #[optional]
574 #[unsafe(method(splitViewController:showViewController:sender:))]
575 #[unsafe(method_family = none)]
576 unsafe fn splitViewController_showViewController_sender(
577 &self,
578 split_view_controller: &UISplitViewController,
579 vc: &UIViewController,
580 sender: Option<&AnyObject>,
581 ) -> bool;
582
583 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
584 #[optional]
585 #[unsafe(method(splitViewController:showDetailViewController:sender:))]
586 #[unsafe(method_family = none)]
587 unsafe fn splitViewController_showDetailViewController_sender(
588 &self,
589 split_view_controller: &UISplitViewController,
590 vc: &UIViewController,
591 sender: Option<&AnyObject>,
592 ) -> bool;
593
594 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
595 #[optional]
596 #[unsafe(method(primaryViewControllerForCollapsingSplitViewController:))]
597 #[unsafe(method_family = none)]
598 unsafe fn primaryViewControllerForCollapsingSplitViewController(
599 &self,
600 split_view_controller: &UISplitViewController,
601 ) -> Option<Retained<UIViewController>>;
602
603 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
604 #[optional]
605 #[unsafe(method(primaryViewControllerForExpandingSplitViewController:))]
606 #[unsafe(method_family = none)]
607 unsafe fn primaryViewControllerForExpandingSplitViewController(
608 &self,
609 split_view_controller: &UISplitViewController,
610 ) -> Option<Retained<UIViewController>>;
611
612 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
613 #[optional]
614 #[unsafe(method(splitViewController:collapseSecondaryViewController:ontoPrimaryViewController:))]
615 #[unsafe(method_family = none)]
616 unsafe fn splitViewController_collapseSecondaryViewController_ontoPrimaryViewController(
617 &self,
618 split_view_controller: &UISplitViewController,
619 secondary_view_controller: &UIViewController,
620 primary_view_controller: &UIViewController,
621 ) -> bool;
622
623 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
624 #[optional]
625 #[unsafe(method(splitViewController:separateSecondaryViewControllerFromPrimaryViewController:))]
626 #[unsafe(method_family = none)]
627 unsafe fn splitViewController_separateSecondaryViewControllerFromPrimaryViewController(
628 &self,
629 split_view_controller: &UISplitViewController,
630 primary_view_controller: &UIViewController,
631 ) -> Option<Retained<UIViewController>>;
632
633 #[cfg(all(
634 feature = "UIOrientation",
635 feature = "UIResponder",
636 feature = "UIViewController"
637 ))]
638 #[optional]
639 #[unsafe(method(splitViewControllerSupportedInterfaceOrientations:))]
640 #[unsafe(method_family = none)]
641 unsafe fn splitViewControllerSupportedInterfaceOrientations(
642 &self,
643 split_view_controller: &UISplitViewController,
644 ) -> UIInterfaceOrientationMask;
645
646 #[cfg(all(
647 feature = "UIOrientation",
648 feature = "UIResponder",
649 feature = "UIViewController"
650 ))]
651 #[optional]
652 #[unsafe(method(splitViewControllerPreferredInterfaceOrientationForPresentation:))]
653 #[unsafe(method_family = none)]
654 unsafe fn splitViewControllerPreferredInterfaceOrientationForPresentation(
655 &self,
656 split_view_controller: &UISplitViewController,
657 ) -> UIInterfaceOrientation;
658
659 #[cfg(all(
660 feature = "UIBarButtonItem",
661 feature = "UIBarItem",
662 feature = "UIPopoverController",
663 feature = "UIResponder",
664 feature = "UIViewController"
665 ))]
666 #[deprecated = "Use splitViewController:willChangeToDisplayMode: and displayModeButtonItem instead"]
667 #[optional]
668 #[unsafe(method(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:))]
669 #[unsafe(method_family = none)]
670 unsafe fn splitViewController_willHideViewController_withBarButtonItem_forPopoverController(
671 &self,
672 svc: &UISplitViewController,
673 a_view_controller: &UIViewController,
674 bar_button_item: &UIBarButtonItem,
675 pc: &UIPopoverController,
676 );
677
678 #[cfg(all(
679 feature = "UIBarButtonItem",
680 feature = "UIBarItem",
681 feature = "UIResponder",
682 feature = "UIViewController"
683 ))]
684 #[deprecated = "Use splitViewController:willChangeToDisplayMode: and displayModeButtonItem instead"]
685 #[optional]
686 #[unsafe(method(splitViewController:willShowViewController:invalidatingBarButtonItem:))]
687 #[unsafe(method_family = none)]
688 unsafe fn splitViewController_willShowViewController_invalidatingBarButtonItem(
689 &self,
690 svc: &UISplitViewController,
691 a_view_controller: &UIViewController,
692 bar_button_item: &UIBarButtonItem,
693 );
694
695 #[cfg(all(
696 feature = "UIPopoverController",
697 feature = "UIResponder",
698 feature = "UIViewController"
699 ))]
700 #[deprecated]
701 #[optional]
702 #[unsafe(method(splitViewController:popoverController:willPresentViewController:))]
703 #[unsafe(method_family = none)]
704 unsafe fn splitViewController_popoverController_willPresentViewController(
705 &self,
706 svc: &UISplitViewController,
707 pc: &UIPopoverController,
708 a_view_controller: &UIViewController,
709 );
710
711 #[cfg(all(
712 feature = "UIOrientation",
713 feature = "UIResponder",
714 feature = "UIViewController"
715 ))]
716 #[deprecated]
717 #[optional]
718 #[unsafe(method(splitViewController:shouldHideViewController:inOrientation:))]
719 #[unsafe(method_family = none)]
720 unsafe fn splitViewController_shouldHideViewController_inOrientation(
721 &self,
722 svc: &UISplitViewController,
723 vc: &UIViewController,
724 orientation: UIInterfaceOrientation,
725 ) -> bool;
726
727 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
728 #[optional]
729 #[unsafe(method(splitViewController:topColumnForCollapsingToProposedTopColumn:))]
730 #[unsafe(method_family = none)]
731 unsafe fn splitViewController_topColumnForCollapsingToProposedTopColumn(
732 &self,
733 svc: &UISplitViewController,
734 proposed_top_column: UISplitViewControllerColumn,
735 ) -> UISplitViewControllerColumn;
736
737 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
738 #[optional]
739 #[unsafe(method(splitViewController:displayModeForExpandingToProposedDisplayMode:))]
740 #[unsafe(method_family = none)]
741 unsafe fn splitViewController_displayModeForExpandingToProposedDisplayMode(
742 &self,
743 svc: &UISplitViewController,
744 proposed_display_mode: UISplitViewControllerDisplayMode,
745 ) -> UISplitViewControllerDisplayMode;
746
747 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
748 #[optional]
749 #[unsafe(method(splitViewControllerDidCollapse:))]
750 #[unsafe(method_family = none)]
751 unsafe fn splitViewControllerDidCollapse(&self, svc: &UISplitViewController);
752
753 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
754 #[optional]
755 #[unsafe(method(splitViewControllerDidExpand:))]
756 #[unsafe(method_family = none)]
757 unsafe fn splitViewControllerDidExpand(&self, svc: &UISplitViewController);
758
759 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
760 #[optional]
761 #[unsafe(method(splitViewController:willShowColumn:))]
762 #[unsafe(method_family = none)]
763 unsafe fn splitViewController_willShowColumn(
764 &self,
765 svc: &UISplitViewController,
766 column: UISplitViewControllerColumn,
767 );
768
769 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
770 #[optional]
771 #[unsafe(method(splitViewController:willHideColumn:))]
772 #[unsafe(method_family = none)]
773 unsafe fn splitViewController_willHideColumn(
774 &self,
775 svc: &UISplitViewController,
776 column: UISplitViewControllerColumn,
777 );
778
779 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
780 #[optional]
781 #[unsafe(method(splitViewControllerInteractivePresentationGestureWillBegin:))]
782 #[unsafe(method_family = none)]
783 unsafe fn splitViewControllerInteractivePresentationGestureWillBegin(
784 &self,
785 svc: &UISplitViewController,
786 );
787
788 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
789 #[optional]
790 #[unsafe(method(splitViewControllerInteractivePresentationGestureDidEnd:))]
791 #[unsafe(method_family = none)]
792 unsafe fn splitViewControllerInteractivePresentationGestureDidEnd(
793 &self,
794 svc: &UISplitViewController,
795 );
796 }
797);
798
799#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
801impl UIViewController {
802 extern_methods!(
803 #[unsafe(method(splitViewController))]
804 #[unsafe(method_family = none)]
805 pub unsafe fn splitViewController(&self) -> Option<Retained<UISplitViewController>>;
806
807 #[unsafe(method(collapseSecondaryViewController:forSplitViewController:))]
808 #[unsafe(method_family = none)]
809 pub unsafe fn collapseSecondaryViewController_forSplitViewController(
810 &self,
811 secondary_view_controller: &UIViewController,
812 split_view_controller: &UISplitViewController,
813 );
814
815 #[unsafe(method(separateSecondaryViewControllerForSplitViewController:))]
816 #[unsafe(method_family = none)]
817 pub unsafe fn separateSecondaryViewControllerForSplitViewController(
818 &self,
819 split_view_controller: &UISplitViewController,
820 ) -> Option<Retained<UIViewController>>;
821 );
822}