objc2-app-kit 0.3.2

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

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstitlebaraccessoryviewcontroller?language=objc)
    #[unsafe(super(NSViewController, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
    pub struct NSTitlebarAccessoryViewController;
);

#[cfg(all(
    feature = "NSAnimation",
    feature = "NSResponder",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSAnimatablePropertyContainer for NSTitlebarAccessoryViewController {}
);

#[cfg(all(
    feature = "NSAnimation",
    feature = "NSResponder",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSAnimationDelegate for NSTitlebarAccessoryViewController {}
);

#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
extern_conformance!(
    unsafe impl NSCoding for NSTitlebarAccessoryViewController {}
);

#[cfg(all(
    feature = "NSKeyValueBinding",
    feature = "NSResponder",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSEditor for NSTitlebarAccessoryViewController {}
);

#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSTitlebarAccessoryViewController {}
);

#[cfg(all(
    feature = "NSResponder",
    feature = "NSStoryboardSegue",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSSeguePerforming for NSTitlebarAccessoryViewController {}
);

#[cfg(all(
    feature = "NSResponder",
    feature = "NSUserInterfaceItemIdentification",
    feature = "NSViewController"
))]
extern_conformance!(
    unsafe impl NSUserInterfaceItemIdentification for NSTitlebarAccessoryViewController {}
);

#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSTitlebarAccessoryViewController {
    extern_methods!(
        #[cfg(feature = "NSLayoutConstraint")]
        #[unsafe(method(layoutAttribute))]
        #[unsafe(method_family = none)]
        pub fn layoutAttribute(&self) -> NSLayoutAttribute;

        #[cfg(feature = "NSLayoutConstraint")]
        /// Setter for [`layoutAttribute`][Self::layoutAttribute].
        #[unsafe(method(setLayoutAttribute:))]
        #[unsafe(method_family = none)]
        pub fn setLayoutAttribute(&self, layout_attribute: NSLayoutAttribute);

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

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`fullScreenMinHeight`][Self::fullScreenMinHeight].
        #[unsafe(method(setFullScreenMinHeight:))]
        #[unsafe(method_family = none)]
        pub fn setFullScreenMinHeight(&self, full_screen_min_height: CGFloat);

        #[unsafe(method(isHidden))]
        #[unsafe(method_family = none)]
        pub fn isHidden(&self) -> bool;

        /// Setter for [`isHidden`][Self::isHidden].
        #[unsafe(method(setHidden:))]
        #[unsafe(method_family = none)]
        pub fn setHidden(&self, hidden: bool);

        #[unsafe(method(automaticallyAdjustsSize))]
        #[unsafe(method_family = none)]
        pub fn automaticallyAdjustsSize(&self) -> bool;

        /// Setter for [`automaticallyAdjustsSize`][Self::automaticallyAdjustsSize].
        #[unsafe(method(setAutomaticallyAdjustsSize:))]
        #[unsafe(method_family = none)]
        pub fn setAutomaticallyAdjustsSize(&self, automatically_adjusts_size: bool);

        #[unsafe(method(viewWillAppear))]
        #[unsafe(method_family = none)]
        pub fn viewWillAppear(&self);

        #[unsafe(method(viewDidAppear))]
        #[unsafe(method_family = none)]
        pub fn viewDidAppear(&self);

        #[unsafe(method(viewDidDisappear))]
        #[unsafe(method_family = none)]
        pub fn viewDidDisappear(&self);
    );
}

/// Methods declared on superclass `NSViewController`.
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSTitlebarAccessoryViewController {
    extern_methods!(
        #[cfg(feature = "NSNib")]
        #[unsafe(method(initWithNibName:bundle:))]
        #[unsafe(method_family = init)]
        pub fn initWithNibName_bundle(
            this: Allocated<Self>,
            nib_name_or_nil: Option<&NSNibName>,
            nib_bundle_or_nil: Option<&NSBundle>,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSResponder`.
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSTitlebarAccessoryViewController {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
impl NSTitlebarAccessoryViewController {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}