objc2_watch_kit/generated/
WKInterfaceSwitch.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(WKInterfaceObject, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "WKInterfaceObject")]
17 pub struct WKInterfaceSwitch;
18);
19
20#[cfg(feature = "WKInterfaceObject")]
21extern_conformance!(
22 unsafe impl NSObjectProtocol for WKInterfaceSwitch {}
23);
24
25#[cfg(feature = "WKInterfaceObject")]
26impl WKInterfaceSwitch {
27 extern_methods!(
28 #[unsafe(method(setTitle:))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn setTitle(&self, title: Option<&NSString>);
31
32 #[unsafe(method(setAttributedTitle:))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>);
35
36 #[unsafe(method(setEnabled:))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn setEnabled(&self, enabled: bool);
39
40 #[unsafe(method(setOn:))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn setOn(&self, on: bool);
43
44 #[cfg(feature = "objc2-ui-kit")]
45 #[unsafe(method(setColor:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn setColor(&self, color: Option<&UIColor>);
48 );
49}
50
51#[cfg(feature = "WKInterfaceObject")]
53impl WKInterfaceSwitch {
54 extern_methods!(
55 #[unsafe(method(init))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58 );
59}
60
61#[cfg(feature = "WKInterfaceObject")]
63impl WKInterfaceSwitch {
64 extern_methods!(
65 #[unsafe(method(new))]
66 #[unsafe(method_family = new)]
67 pub unsafe fn new() -> Retained<Self>;
68 );
69}