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))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn delegate(
38 &self,
39 ) -> Option<Retained<ProtocolObject<dyn HMCameraSnapshotControlDelegate>>>;
40
41 #[unsafe(method(setDelegate:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn setDelegate(
46 &self,
47 delegate: Option<&ProtocolObject<dyn HMCameraSnapshotControlDelegate>>,
48 );
49
50 #[cfg(all(feature = "HMCameraSnapshot", feature = "HMCameraSource"))]
51 #[unsafe(method(mostRecentSnapshot))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn mostRecentSnapshot(&self) -> Option<Retained<HMCameraSnapshot>>;
55
56 #[unsafe(method(takeSnapshot))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn takeSnapshot(&self);
60
61 #[deprecated = "HMCameraSnapshotControl objects are created by their parent container objects. Directly creating them is not supported."]
62 #[unsafe(method(init))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
65 );
66}
67
68#[cfg(feature = "HMCameraControl")]
70impl HMCameraSnapshotControl {
71 extern_methods!(
72 #[unsafe(method(new))]
73 #[unsafe(method_family = new)]
74 pub unsafe fn new() -> Retained<Self>;
75 );
76}
77
78extern_protocol!(
79 pub unsafe trait HMCameraSnapshotControlDelegate: NSObjectProtocol {
83 #[cfg(all(
84 feature = "HMCameraControl",
85 feature = "HMCameraSnapshot",
86 feature = "HMCameraSource"
87 ))]
88 #[optional]
99 #[unsafe(method(cameraSnapshotControl:didTakeSnapshot:error:))]
100 #[unsafe(method_family = none)]
101 unsafe fn cameraSnapshotControl_didTakeSnapshot_error(
102 &self,
103 camera_snapshot_control: &HMCameraSnapshotControl,
104 snapshot: Option<&HMCameraSnapshot>,
105 error: Option<&NSError>,
106 );
107
108 #[cfg(feature = "HMCameraControl")]
109 #[optional]
114 #[unsafe(method(cameraSnapshotControlDidUpdateMostRecentSnapshot:))]
115 #[unsafe(method_family = none)]
116 unsafe fn cameraSnapshotControlDidUpdateMostRecentSnapshot(
117 &self,
118 camera_snapshot_control: &HMCameraSnapshotControl,
119 );
120 }
121);