objc2_home_kit/generated/
HMCameraSnapshotControl.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(HMCameraControl, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "HMCameraControl")]
17 pub struct HMCameraSnapshotControl;
18);
19
20#[cfg(feature = "HMCameraControl")]
21unsafe impl Send for HMCameraSnapshotControl {}
22
23#[cfg(feature = "HMCameraControl")]
24unsafe impl Sync for HMCameraSnapshotControl {}
25
26#[cfg(feature = "HMCameraControl")]
27extern_conformance!(
28 unsafe impl NSObjectProtocol for HMCameraSnapshotControl {}
29);
30
31#[cfg(feature = "HMCameraControl")]
32impl HMCameraSnapshotControl {
33 extern_methods!(
34 #[unsafe(method(delegate))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn delegate(
44 &self,
45 ) -> Option<Retained<ProtocolObject<dyn HMCameraSnapshotControlDelegate>>>;
46
47 #[unsafe(method(setDelegate:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setDelegate(
57 &self,
58 delegate: Option<&ProtocolObject<dyn HMCameraSnapshotControlDelegate>>,
59 );
60
61 #[cfg(all(feature = "HMCameraSnapshot", feature = "HMCameraSource"))]
62 #[unsafe(method(mostRecentSnapshot))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn mostRecentSnapshot(&self) -> Option<Retained<HMCameraSnapshot>>;
72
73 #[unsafe(method(takeSnapshot))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn takeSnapshot(&self);
77
78 #[deprecated = "HMCameraSnapshotControl objects are created by their parent container objects. Directly creating them is not supported."]
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 = "HMCameraControl")]
87impl HMCameraSnapshotControl {
88 extern_methods!(
89 #[unsafe(method(new))]
90 #[unsafe(method_family = new)]
91 pub unsafe fn new() -> Retained<Self>;
92 );
93}
94
95extern_protocol!(
96 pub unsafe trait HMCameraSnapshotControlDelegate: NSObjectProtocol {
100 #[cfg(all(
101 feature = "HMCameraControl",
102 feature = "HMCameraSnapshot",
103 feature = "HMCameraSource"
104 ))]
105 #[optional]
116 #[unsafe(method(cameraSnapshotControl:didTakeSnapshot:error:))]
117 #[unsafe(method_family = none)]
118 unsafe fn cameraSnapshotControl_didTakeSnapshot_error(
119 &self,
120 camera_snapshot_control: &HMCameraSnapshotControl,
121 snapshot: Option<&HMCameraSnapshot>,
122 error: Option<&NSError>,
123 );
124
125 #[cfg(feature = "HMCameraControl")]
126 #[optional]
131 #[unsafe(method(cameraSnapshotControlDidUpdateMostRecentSnapshot:))]
132 #[unsafe(method_family = none)]
133 unsafe fn cameraSnapshotControlDidUpdateMostRecentSnapshot(
134 &self,
135 camera_snapshot_control: &HMCameraSnapshotControl,
136 );
137 }
138);