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
22extern_conformance!(
23    unsafe impl NSObjectProtocol for HMCameraSource {}
24);
25
26impl HMCameraSource {
27    extern_methods!(
28        /// Represents the aspect ratio of the camera source, defined as width over height.
29        #[unsafe(method(aspectRatio))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn aspectRatio(&self) -> c_double;
32
33        #[deprecated = "HMCameraSource is a base class for other types. Directly creating them is not supported."]
34        #[unsafe(method(init))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
37    );
38}
39
40/// Methods declared on superclass `NSObject`.
41impl HMCameraSource {
42    extern_methods!(
43        #[unsafe(method(new))]
44        #[unsafe(method_family = new)]
45        pub unsafe fn new() -> Retained<Self>;
46    );
47}