objc2_watch_kit/generated/
WKInterfaceButton.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 WKInterfaceButton;
18);
19
20#[cfg(feature = "WKInterfaceObject")]
21extern_conformance!(
22 unsafe impl NSObjectProtocol for WKInterfaceButton {}
23);
24
25#[cfg(feature = "WKInterfaceObject")]
26impl WKInterfaceButton {
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 #[cfg(feature = "objc2-ui-kit")]
37 #[unsafe(method(setBackgroundColor:))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn setBackgroundColor(&self, color: Option<&UIColor>);
40
41 #[cfg(feature = "objc2-ui-kit")]
42 #[unsafe(method(setBackgroundImage:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn setBackgroundImage(&self, image: Option<&UIImage>);
45
46 #[unsafe(method(setBackgroundImageData:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn setBackgroundImageData(&self, image_data: Option<&NSData>);
49
50 #[unsafe(method(setBackgroundImageNamed:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setBackgroundImageNamed(&self, image_name: Option<&NSString>);
53
54 #[unsafe(method(setEnabled:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setEnabled(&self, enabled: bool);
57 );
58}
59
60#[cfg(feature = "WKInterfaceObject")]
62impl WKInterfaceButton {
63 extern_methods!(
64 #[unsafe(method(init))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67 );
68}
69
70#[cfg(feature = "WKInterfaceObject")]
72impl WKInterfaceButton {
73 extern_methods!(
74 #[unsafe(method(new))]
75 #[unsafe(method_family = new)]
76 pub unsafe fn new() -> Retained<Self>;
77 );
78}