//! 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::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uimenudisplaypreferences?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIMenuDisplayPreferences;
);

extern_conformance!(
    unsafe impl NSCoding for UIMenuDisplayPreferences {}
);

extern_conformance!(
    unsafe impl NSCopying for UIMenuDisplayPreferences {}
);

unsafe impl CopyingHelper for UIMenuDisplayPreferences {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for UIMenuDisplayPreferences {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for UIMenuDisplayPreferences {}
);

impl UIMenuDisplayPreferences {
    extern_methods!(
        /// Maximum number of title and subtitle lines displayed for this menu's elements. Defaults to NSNotFound, indicating no preference.
        #[unsafe(method(maximumNumberOfTitleLines))]
        #[unsafe(method_family = none)]
        pub fn maximumNumberOfTitleLines(&self) -> NSInteger;

        /// Setter for [`maximumNumberOfTitleLines`][Self::maximumNumberOfTitleLines].
        #[unsafe(method(setMaximumNumberOfTitleLines:))]
        #[unsafe(method_family = none)]
        pub fn setMaximumNumberOfTitleLines(&self, maximum_number_of_title_lines: NSInteger);
    );
}

/// Methods declared on superclass `NSObject`.
impl UIMenuDisplayPreferences {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}
