objc2-av-foundation 0.3.2

Bindings to the AVFoundation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    /// 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.
    ///
    ///
    /// Various concrete subclasses of `AVCaptureControl` are provided by AVFoundation to allow your application to both leverage common system controls and define unique custom controls.
    ///
    /// Controls may be added to an `AVCaptureSession` using `-[AVCaptureSession addControl:]`.
    ///
    /// For controls that use symbols to represent them, only SF Symbols may be used.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturecontrol?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVCaptureControl;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for AVCaptureControl {}
);

impl AVCaptureControl {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        /// Indicates whether the control should be enabled for user interaction.
        ///
        ///
        /// 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`.
        #[unsafe(method(isEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isEnabled(&self) -> bool;

        /// Setter for [`isEnabled`][Self::isEnabled].
        #[unsafe(method(setEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEnabled(&self, enabled: bool);
    );
}