objc2_watch_kit/generated/
WKCrownSequencer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct WKCrownSequencer;
14);
15
16extern_conformance!(
17 unsafe impl NSObjectProtocol for WKCrownSequencer {}
18);
19
20impl WKCrownSequencer {
21 extern_methods!(
22 #[unsafe(method(delegate))]
23 #[unsafe(method_family = none)]
24 pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn WKCrownDelegate>>>;
25
26 #[unsafe(method(setDelegate:))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn WKCrownDelegate>>);
32
33 #[unsafe(method(rotationsPerSecond))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn rotationsPerSecond(&self) -> c_double;
36
37 #[unsafe(method(isIdle))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn isIdle(&self) -> bool;
40
41 #[unsafe(method(isHapticFeedbackEnabled))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn isHapticFeedbackEnabled(&self) -> bool;
44
45 #[unsafe(method(setHapticFeedbackEnabled:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn setHapticFeedbackEnabled(&self, haptic_feedback_enabled: bool);
49
50 #[unsafe(method(init))]
51 #[unsafe(method_family = init)]
52 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53
54 #[unsafe(method(focus))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn focus(&self);
57
58 #[unsafe(method(resignFocus))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn resignFocus(&self);
61 );
62}
63
64impl WKCrownSequencer {
66 extern_methods!(
67 #[unsafe(method(new))]
68 #[unsafe(method_family = new)]
69 pub unsafe fn new() -> Retained<Self>;
70 );
71}
72
73extern_protocol!(
74 pub unsafe trait WKCrownDelegate: NSObjectProtocol {
76 #[optional]
77 #[unsafe(method(crownDidRotate:rotationalDelta:))]
78 #[unsafe(method_family = none)]
79 unsafe fn crownDidRotate_rotationalDelta(
80 &self,
81 crown_sequencer: Option<&WKCrownSequencer>,
82 rotational_delta: c_double,
83 );
84
85 #[optional]
86 #[unsafe(method(crownDidBecomeIdle:))]
87 #[unsafe(method_family = none)]
88 unsafe fn crownDidBecomeIdle(&self, crown_sequencer: Option<&WKCrownSequencer>);
89 }
90);