objc2_watch_kit/generated/
WKInterfaceImage.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_protocol!(
13 pub unsafe trait WKImageAnimatable: NSObjectProtocol {
15 #[unsafe(method(startAnimating))]
16 #[unsafe(method_family = none)]
17 unsafe fn startAnimating(&self);
18
19 #[unsafe(method(startAnimatingWithImagesInRange:duration:repeatCount:))]
20 #[unsafe(method_family = none)]
21 unsafe fn startAnimatingWithImagesInRange_duration_repeatCount(
22 &self,
23 image_range: NSRange,
24 duration: NSTimeInterval,
25 repeat_count: NSInteger,
26 );
27
28 #[unsafe(method(stopAnimating))]
29 #[unsafe(method_family = none)]
30 unsafe fn stopAnimating(&self);
31 }
32);
33
34extern_class!(
35 #[unsafe(super(WKInterfaceObject, NSObject))]
37 #[derive(Debug, PartialEq, Eq, Hash)]
38 #[cfg(feature = "WKInterfaceObject")]
39 pub struct WKInterfaceImage;
40);
41
42#[cfg(feature = "WKInterfaceObject")]
43extern_conformance!(
44 unsafe impl NSObjectProtocol for WKInterfaceImage {}
45);
46
47#[cfg(feature = "WKInterfaceObject")]
48extern_conformance!(
49 unsafe impl WKImageAnimatable for WKInterfaceImage {}
50);
51
52#[cfg(feature = "WKInterfaceObject")]
53impl WKInterfaceImage {
54 extern_methods!(
55 #[cfg(feature = "objc2-ui-kit")]
56 #[unsafe(method(setImage:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn setImage(&self, image: Option<&UIImage>);
59
60 #[unsafe(method(setImageData:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn setImageData(&self, image_data: Option<&NSData>);
63
64 #[unsafe(method(setImageNamed:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setImageNamed(&self, image_name: Option<&NSString>);
67
68 #[cfg(feature = "objc2-ui-kit")]
69 #[unsafe(method(setTintColor:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>);
72 );
73}
74
75#[cfg(feature = "WKInterfaceObject")]
77impl WKInterfaceImage {
78 extern_methods!(
79 #[unsafe(method(init))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82 );
83}
84
85#[cfg(feature = "WKInterfaceObject")]
87impl WKInterfaceImage {
88 extern_methods!(
89 #[unsafe(method(new))]
90 #[unsafe(method_family = new)]
91 pub unsafe fn new() -> Retained<Self>;
92 );
93}