1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIPopoverArrowDirection(pub NSUInteger);
bitflags::bitflags! {
    impl UIPopoverArrowDirection: NSUInteger {
        #[doc(alias = "UIPopoverArrowDirectionUp")]
        const Up = 1<<0;
        #[doc(alias = "UIPopoverArrowDirectionDown")]
        const Down = 1<<1;
        #[doc(alias = "UIPopoverArrowDirectionLeft")]
        const Left = 1<<2;
        #[doc(alias = "UIPopoverArrowDirectionRight")]
        const Right = 1<<3;
        #[doc(alias = "UIPopoverArrowDirectionAny")]
        const Any = UIPopoverArrowDirection::Up.0|UIPopoverArrowDirection::Down.0|UIPopoverArrowDirection::Left.0|UIPopoverArrowDirection::Right.0;
        #[doc(alias = "UIPopoverArrowDirectionUnknown")]
        const Unknown = NSUIntegerMax as _;
    }
}

unsafe impl Encode for UIPopoverArrowDirection {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for UIPopoverArrowDirection {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_methods!(
    /// UIPopoverController
    #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
    unsafe impl UIViewController {
        #[deprecated]
        #[method(isModalInPopover)]
        pub unsafe fn isModalInPopover(&self) -> bool;

        #[deprecated]
        #[method(setModalInPopover:)]
        pub unsafe fn setModalInPopover(&self, modal_in_popover: bool);

        #[deprecated]
        #[method(contentSizeForViewInPopover)]
        pub unsafe fn contentSizeForViewInPopover(&self) -> CGSize;

        #[deprecated]
        #[method(setContentSizeForViewInPopover:)]
        pub unsafe fn setContentSizeForViewInPopover(
            &self,
            content_size_for_view_in_popover: CGSize,
        );
    }
);