objc2-app-kit 0.2.2

Bindings to the AppKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
    pub struct NSTitlebarAccessoryViewController;

    #[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
    unsafe impl ClassType for NSTitlebarAccessoryViewController {
        #[inherits(NSResponder, NSObject)]
        type Super = NSViewController;
        type Mutability = MainThreadOnly;
    }
);

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

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

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

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

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

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

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

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

        #[cfg(feature = "NSLayoutConstraint")]
        #[method(setLayoutAttribute:)]
        pub unsafe fn setLayoutAttribute(&self, layout_attribute: NSLayoutAttribute);

        #[method(fullScreenMinHeight)]
        pub unsafe fn fullScreenMinHeight(&self) -> CGFloat;

        #[method(setFullScreenMinHeight:)]
        pub unsafe fn setFullScreenMinHeight(&self, full_screen_min_height: CGFloat);

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

        #[method(setHidden:)]
        pub unsafe fn setHidden(&self, hidden: bool);

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

        #[method(setAutomaticallyAdjustsSize:)]
        pub unsafe fn setAutomaticallyAdjustsSize(&self, automatically_adjusts_size: bool);

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

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

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

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

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    }
);

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

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