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        #[deprecated = "Use initWithStyle:target:action:"]
45        #[unsafe(method(initWithTarget:action:))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn initWithTarget_action(
48            this: Allocated<Self>,
49            target: Option<&AnyObject>,
50            action: Sel,
51        ) -> Retained<Self>;
52
53        #[unsafe(method(initWithStyle:target:action:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithStyle_target_action(
56            this: Allocated<Self>,
57            style: WKInterfaceAuthorizationAppleIDButtonStyle,
58            target: Option<&AnyObject>,
59            action: Sel,
60        ) -> Retained<Self>;
61    );
62}
63
64/// Methods declared on superclass `WKInterfaceObject`.
65#[cfg(feature = "WKInterfaceObject")]
66impl WKInterfaceAuthorizationAppleIDButton {
67    extern_methods!(
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75#[cfg(feature = "WKInterfaceObject")]
76impl WKInterfaceAuthorizationAppleIDButton {
77    extern_methods!(
78        #[unsafe(method(new))]
79        #[unsafe(method_family = new)]
80        pub unsafe fn new() -> Retained<Self>;
81    );
82}