objc2_watch_kit/generated/
WKInterfaceAuthorizationAppleIDButton.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8/// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfaceauthorizationappleidbuttonstyle?language=objc)
9// NS_ENUM
10#[repr(transparent)]
11#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
12pub struct WKInterfaceAuthorizationAppleIDButtonStyle(pub NSInteger);
13impl WKInterfaceAuthorizationAppleIDButtonStyle {
14    #[doc(alias = "WKInterfaceAuthorizationAppleIDButtonStyleDefault")]
15    pub const Default: Self = Self(0);
16    #[doc(alias = "WKInterfaceAuthorizationAppleIDButtonStyleWhite")]
17    pub const White: Self = Self(1);
18}
19
20unsafe impl Encode for WKInterfaceAuthorizationAppleIDButtonStyle {
21    const ENCODING: Encoding = NSInteger::ENCODING;
22}
23
24unsafe impl RefEncode for WKInterfaceAuthorizationAppleIDButtonStyle {
25    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
26}
27
28extern_class!(
29    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfaceauthorizationappleidbutton?language=objc)
30    #[unsafe(super(WKInterfaceObject, NSObject))]
31    #[derive(Debug, PartialEq, Eq, Hash)]
32    #[cfg(feature = "WKInterfaceObject")]
33    pub struct WKInterfaceAuthorizationAppleIDButton;
34);
35
36#[cfg(feature = "WKInterfaceObject")]
37extern_conformance!(
38    unsafe impl NSObjectProtocol for WKInterfaceAuthorizationAppleIDButton {}
39);
40
41#[cfg(feature = "WKInterfaceObject")]
42impl WKInterfaceAuthorizationAppleIDButton {
43    extern_methods!(
44        /// # Safety
45        ///
46        /// - `target` should be of the correct type.
47        /// - `action` must be a valid selector.
48        #[deprecated = "Use initWithStyle:target:action:"]
49        #[unsafe(method(initWithTarget:action:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithTarget_action(
52            this: Allocated<Self>,
53            target: Option<&AnyObject>,
54            action: Sel,
55        ) -> Retained<Self>;
56
57        /// # Safety
58        ///
59        /// - `target` should be of the correct type.
60        /// - `action` must be a valid selector.
61        #[unsafe(method(initWithStyle:target:action:))]
62        #[unsafe(method_family = init)]
63        pub unsafe fn initWithStyle_target_action(
64            this: Allocated<Self>,
65            style: WKInterfaceAuthorizationAppleIDButtonStyle,
66            target: Option<&AnyObject>,
67            action: Sel,
68        ) -> Retained<Self>;
69    );
70}
71
72/// Methods declared on superclass `WKInterfaceObject`.
73#[cfg(feature = "WKInterfaceObject")]
74impl WKInterfaceAuthorizationAppleIDButton {
75    extern_methods!(
76        #[unsafe(method(init))]
77        #[unsafe(method_family = init)]
78        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
79    );
80}
81
82/// Methods declared on superclass `NSObject`.
83#[cfg(feature = "WKInterfaceObject")]
84impl WKInterfaceAuthorizationAppleIDButton {
85    extern_methods!(
86        #[unsafe(method(new))]
87        #[unsafe(method_family = new)]
88        pub unsafe fn new() -> Retained<Self>;
89    );
90}