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:))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn WKCrownDelegate>>);
31
32 #[unsafe(method(rotationsPerSecond))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn rotationsPerSecond(&self) -> c_double;
35
36 #[unsafe(method(isIdle))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn isIdle(&self) -> bool;
39
40 #[unsafe(method(isHapticFeedbackEnabled))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn isHapticFeedbackEnabled(&self) -> bool;
43
44 #[unsafe(method(setHapticFeedbackEnabled:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn setHapticFeedbackEnabled(&self, haptic_feedback_enabled: bool);
48
49 #[unsafe(method(init))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53 #[unsafe(method(focus))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn focus(&self);
56
57 #[unsafe(method(resignFocus))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn resignFocus(&self);
60 );
61}
62
63impl WKCrownSequencer {
65 extern_methods!(
66 #[unsafe(method(new))]
67 #[unsafe(method_family = new)]
68 pub unsafe fn new() -> Retained<Self>;
69 );
70}
71
72extern_protocol!(
73 pub unsafe trait WKCrownDelegate: NSObjectProtocol {
75 #[optional]
76 #[unsafe(method(crownDidRotate:rotationalDelta:))]
77 #[unsafe(method_family = none)]
78 unsafe fn crownDidRotate_rotationalDelta(
79 &self,
80 crown_sequencer: Option<&WKCrownSequencer>,
81 rotational_delta: c_double,
82 );
83
84 #[optional]
85 #[unsafe(method(crownDidBecomeIdle:))]
86 #[unsafe(method_family = none)]
87 unsafe fn crownDidBecomeIdle(&self, crown_sequencer: Option<&WKCrownSequencer>);
88 }
89);