objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipopoverarrowdirection?language=objc)
// 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);
}

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

        /// Setter for [`isModalInPopover`][Self::isModalInPopover].
        #[deprecated]
        #[unsafe(method(setModalInPopover:))]
        #[unsafe(method_family = none)]
        pub fn setModalInPopover(&self, modal_in_popover: bool);

        #[cfg(feature = "objc2-core-foundation")]
        #[deprecated]
        #[unsafe(method(contentSizeForViewInPopover))]
        #[unsafe(method_family = none)]
        pub fn contentSizeForViewInPopover(&self) -> CGSize;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`contentSizeForViewInPopover`][Self::contentSizeForViewInPopover].
        #[deprecated]
        #[unsafe(method(setContentSizeForViewInPopover:))]
        #[unsafe(method_family = none)]
        pub fn setContentSizeForViewInPopover(&self, content_size_for_view_in_popover: CGSize);
    );
}