objc2-watch-kit 0.3.2

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

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfaceauthorizationappleidbuttonstyle?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct WKInterfaceAuthorizationAppleIDButtonStyle(pub NSInteger);
impl WKInterfaceAuthorizationAppleIDButtonStyle {
    #[doc(alias = "WKInterfaceAuthorizationAppleIDButtonStyleDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "WKInterfaceAuthorizationAppleIDButtonStyleWhite")]
    pub const White: Self = Self(1);
}

unsafe impl Encode for WKInterfaceAuthorizationAppleIDButtonStyle {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfaceauthorizationappleidbutton?language=objc)
    #[unsafe(super(WKInterfaceObject, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "WKInterfaceObject")]
    pub struct WKInterfaceAuthorizationAppleIDButton;
);

#[cfg(feature = "WKInterfaceObject")]
extern_conformance!(
    unsafe impl NSObjectProtocol for WKInterfaceAuthorizationAppleIDButton {}
);

#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceAuthorizationAppleIDButton {
    extern_methods!(
        /// # Safety
        ///
        /// - `target` should be of the correct type.
        /// - `action` must be a valid selector.
        #[deprecated = "Use initWithStyle:target:action:"]
        #[unsafe(method(initWithTarget:action:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTarget_action(
            this: Allocated<Self>,
            target: Option<&AnyObject>,
            action: Sel,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// - `target` should be of the correct type.
        /// - `action` must be a valid selector.
        #[unsafe(method(initWithStyle:target:action:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithStyle_target_action(
            this: Allocated<Self>,
            style: WKInterfaceAuthorizationAppleIDButtonStyle,
            target: Option<&AnyObject>,
            action: Sel,
        ) -> Retained<Self>;
    );
}

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

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "WKInterfaceObject")]
impl WKInterfaceAuthorizationAppleIDButton {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}