objc2_watch_kit/generated/
WKInterfaceTimer.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/wkinterfacetimer?language=objc)
14    #[unsafe(super(WKInterfaceObject, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "WKInterfaceObject")]
17    pub struct WKInterfaceTimer;
18);
19
20#[cfg(feature = "WKInterfaceObject")]
21extern_conformance!(
22    unsafe impl NSObjectProtocol for WKInterfaceTimer {}
23);
24
25#[cfg(feature = "WKInterfaceObject")]
26impl WKInterfaceTimer {
27    extern_methods!(
28        #[cfg(feature = "objc2-ui-kit")]
29        #[unsafe(method(setTextColor:))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn setTextColor(&self, color: Option<&UIColor>);
32
33        #[unsafe(method(setDate:))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn setDate(&self, date: &NSDate);
36
37        #[unsafe(method(start))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn start(&self);
40
41        #[unsafe(method(stop))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn stop(&self);
44    );
45}
46
47/// Methods declared on superclass `WKInterfaceObject`.
48#[cfg(feature = "WKInterfaceObject")]
49impl WKInterfaceTimer {
50    extern_methods!(
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54    );
55}
56
57/// Methods declared on superclass `NSObject`.
58#[cfg(feature = "WKInterfaceObject")]
59impl WKInterfaceTimer {
60    extern_methods!(
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new() -> Retained<Self>;
64    );
65}