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
25extern_conformance!(
26 unsafe impl NSObjectProtocol for AVCaptureControl {}
27);
28
29impl AVCaptureControl {
30 extern_methods!(
31 #[unsafe(method(init))]
32 #[unsafe(method_family = init)]
33 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
34
35 #[unsafe(method(new))]
36 #[unsafe(method_family = new)]
37 pub unsafe fn new() -> Retained<Self>;
38
39 /// Indicates whether the control should be enabled for user interaction.
40 ///
41 ///
42 /// 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`.
43 #[unsafe(method(isEnabled))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn isEnabled(&self) -> bool;
46
47 /// Setter for [`isEnabled`][Self::isEnabled].
48 #[unsafe(method(setEnabled:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn setEnabled(&self, enabled: bool);
51 );
52}