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")]
27unsafe impl NSObjectProtocol for HMCameraSnapshotControl {}
28
29#[cfg(feature = "HMCameraControl")]
30impl HMCameraSnapshotControl {
31 extern_methods!(
32 #[unsafe(method(delegate))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn delegate(
36 &self,
37 ) -> Option<Retained<ProtocolObject<dyn HMCameraSnapshotControlDelegate>>>;
38
39 #[unsafe(method(setDelegate:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setDelegate(
44 &self,
45 delegate: Option<&ProtocolObject<dyn HMCameraSnapshotControlDelegate>>,
46 );
47
48 #[cfg(all(feature = "HMCameraSnapshot", feature = "HMCameraSource"))]
49 #[unsafe(method(mostRecentSnapshot))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn mostRecentSnapshot(&self) -> Option<Retained<HMCameraSnapshot>>;
53
54 #[unsafe(method(takeSnapshot))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn takeSnapshot(&self);
58
59 #[deprecated = "HMCameraSnapshotControl objects are created by their parent container objects. Directly creating them is not supported."]
60 #[unsafe(method(init))]
61 #[unsafe(method_family = init)]
62 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
63 );
64}
65
66#[cfg(feature = "HMCameraControl")]
68impl HMCameraSnapshotControl {
69 extern_methods!(
70 #[unsafe(method(new))]
71 #[unsafe(method_family = new)]
72 pub unsafe fn new() -> Retained<Self>;
73 );
74}
75
76extern_protocol!(
77 pub unsafe trait HMCameraSnapshotControlDelegate: NSObjectProtocol {
81 #[cfg(all(
82 feature = "HMCameraControl",
83 feature = "HMCameraSnapshot",
84 feature = "HMCameraSource"
85 ))]
86 #[optional]
97 #[unsafe(method(cameraSnapshotControl:didTakeSnapshot:error:))]
98 #[unsafe(method_family = none)]
99 unsafe fn cameraSnapshotControl_didTakeSnapshot_error(
100 &self,
101 camera_snapshot_control: &HMCameraSnapshotControl,
102 snapshot: Option<&HMCameraSnapshot>,
103 error: Option<&NSError>,
104 );
105
106 #[cfg(feature = "HMCameraControl")]
107 #[optional]
112 #[unsafe(method(cameraSnapshotControlDidUpdateMostRecentSnapshot:))]
113 #[unsafe(method_family = none)]
114 unsafe fn cameraSnapshotControlDidUpdateMostRecentSnapshot(
115 &self,
116 camera_snapshot_control: &HMCameraSnapshotControl,
117 );
118 }
119);