objc2_watch_kit/generated/
WKInterfaceLabel.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfacelabel?language=objc)
14    #[unsafe(super(WKInterfaceObject, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "WKInterfaceObject")]
17    pub struct WKInterfaceLabel;
18);
19
20#[cfg(feature = "WKInterfaceObject")]
21extern_conformance!(
22    unsafe impl NSObjectProtocol for WKInterfaceLabel {}
23);
24
25#[cfg(feature = "WKInterfaceObject")]
26impl WKInterfaceLabel {
27    extern_methods!(
28        #[unsafe(method(setText:))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn setText(&self, text: Option<&NSString>);
31
32        #[cfg(feature = "objc2-ui-kit")]
33        #[unsafe(method(setTextColor:))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn setTextColor(&self, color: Option<&UIColor>);
36
37        #[unsafe(method(setAttributedText:))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn setAttributedText(&self, attributed_text: Option<&NSAttributedString>);
40    );
41}
42
43/// Methods declared on superclass `WKInterfaceObject`.
44#[cfg(feature = "WKInterfaceObject")]
45impl WKInterfaceLabel {
46    extern_methods!(
47        #[unsafe(method(init))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50    );
51}
52
53/// Methods declared on superclass `NSObject`.
54#[cfg(feature = "WKInterfaceObject")]
55impl WKInterfaceLabel {
56    extern_methods!(
57        #[unsafe(method(new))]
58        #[unsafe(method_family = new)]
59        pub unsafe fn new() -> Retained<Self>;
60    );
61}