objc2_ui_kit/generated/
UIPopoverSupport.rs1use core::ffi::*;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct UIPopoverArrowDirection(pub NSUInteger);
15bitflags::bitflags! {
16 impl UIPopoverArrowDirection: NSUInteger {
17 #[doc(alias = "UIPopoverArrowDirectionUp")]
18 const Up = 1<<0;
19 #[doc(alias = "UIPopoverArrowDirectionDown")]
20 const Down = 1<<1;
21 #[doc(alias = "UIPopoverArrowDirectionLeft")]
22 const Left = 1<<2;
23 #[doc(alias = "UIPopoverArrowDirectionRight")]
24 const Right = 1<<3;
25 #[doc(alias = "UIPopoverArrowDirectionAny")]
26 const Any = UIPopoverArrowDirection::Up.0|UIPopoverArrowDirection::Down.0|UIPopoverArrowDirection::Left.0|UIPopoverArrowDirection::Right.0;
27 #[doc(alias = "UIPopoverArrowDirectionUnknown")]
28 const Unknown = NSUIntegerMax as _;
29 }
30}
31
32unsafe impl Encode for UIPopoverArrowDirection {
33 const ENCODING: Encoding = NSUInteger::ENCODING;
34}
35
36unsafe impl RefEncode for UIPopoverArrowDirection {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
42impl UIViewController {
43 extern_methods!(
44 #[deprecated]
45 #[unsafe(method(isModalInPopover))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn isModalInPopover(&self) -> bool;
48
49 #[deprecated]
51 #[unsafe(method(setModalInPopover:))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn setModalInPopover(&self, modal_in_popover: bool);
54
55 #[cfg(feature = "objc2-core-foundation")]
56 #[deprecated]
57 #[unsafe(method(contentSizeForViewInPopover))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn contentSizeForViewInPopover(&self) -> CGSize;
60
61 #[cfg(feature = "objc2-core-foundation")]
62 #[deprecated]
64 #[unsafe(method(setContentSizeForViewInPopover:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setContentSizeForViewInPopover(
67 &self,
68 content_size_for_view_in_popover: CGSize,
69 );
70 );
71}