objc2_home_kit/generated/
HMCameraSource.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// Abstract class for source of data from a camera.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmcamerasource?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct HMCameraSource;
16);
17
18unsafe impl Send for HMCameraSource {}
19
20unsafe impl Sync for HMCameraSource {}
21
22unsafe impl NSObjectProtocol for HMCameraSource {}
23
24impl HMCameraSource {
25    extern_methods!(
26        /// Represents the aspect ratio of the camera source, defined as width over height.
27        #[unsafe(method(aspectRatio))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn aspectRatio(&self) -> c_double;
30
31        #[deprecated = "HMCameraSource is a base class for other types. Directly creating them is not supported."]
32        #[unsafe(method(init))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35    );
36}
37
38/// Methods declared on superclass `NSObject`.
39impl HMCameraSource {
40    extern_methods!(
41        #[unsafe(method(new))]
42        #[unsafe(method_family = new)]
43        pub unsafe fn new() -> Retained<Self>;
44    );
45}