objc2_av_foundation/generated/AVCaptureControl.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 /// AVCaptureControl is an abstract class that defines an interface for a unique type of control which allows deep integration with the camera system through AVCaptureSession.
11 ///
12 ///
13 /// Various concrete subclasses of `AVCaptureControl` are provided by AVFoundation to allow your application to both leverage common system controls and define unique custom controls.
14 ///
15 /// Controls may be added to an `AVCaptureSession` using `-[AVCaptureSession addControl:]`.
16 ///
17 /// For controls that use symbols to represent them, only SF Symbols may be used.
18 ///
19 /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturecontrol?language=objc)
20 #[unsafe(super(NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 pub struct AVCaptureControl;
23);
24
25unsafe impl NSObjectProtocol for AVCaptureControl {}
26
27impl AVCaptureControl {
28 extern_methods!(
29 #[unsafe(method(init))]
30 #[unsafe(method_family = init)]
31 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33 #[unsafe(method(new))]
34 #[unsafe(method_family = new)]
35 pub unsafe fn new() -> Retained<Self>;
36
37 /// Indicates whether the control should be enabled for user interaction.
38 ///
39 ///
40 /// The value of this property is a `BOOL` that determines whether the control should be enabled for user interaction. Clients can set this property to keep a control added to an `AVCaptureSession` but prevent it from being interacted with by the user. A control's value may still be changed while it is disabled. The default value is `YES`.
41 #[unsafe(method(isEnabled))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn isEnabled(&self) -> bool;
44
45 /// Setter for [`isEnabled`][Self::isEnabled].
46 #[unsafe(method(setEnabled:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn setEnabled(&self, enabled: bool);
49 );
50}