use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use objc2_core_foundation::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;
#[cfg(feature = "objc2-io-surface")]
use objc2_io_surface::*;
use crate::*;
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct MAFlashingLightsProcessorResult;
);
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for MAFlashingLightsProcessorResult {}
);
#[cfg(feature = "objc2")]
impl MAFlashingLightsProcessorResult {
extern_methods!(
#[unsafe(method(surfaceProcessed))]
#[unsafe(method_family = none)]
pub unsafe fn surfaceProcessed(&self) -> bool;
#[unsafe(method(mitigationLevel))]
#[unsafe(method_family = none)]
pub unsafe fn mitigationLevel(&self) -> c_float;
#[unsafe(method(intensityLevel))]
#[unsafe(method_family = none)]
pub unsafe fn intensityLevel(&self) -> c_float;
);
}
#[cfg(feature = "objc2")]
impl MAFlashingLightsProcessorResult {
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>;
);
}
#[cfg(feature = "objc2-foundation")]
pub type MAFlashingLightsProcessorOptionKey = NSString;
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct MAFlashingLightsProcessor;
);
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for MAFlashingLightsProcessor {}
);
#[cfg(feature = "objc2")]
impl MAFlashingLightsProcessor {
extern_methods!(
#[cfg(feature = "objc2-io-surface")]
#[unsafe(method(canProcessSurface:))]
#[unsafe(method_family = none)]
pub unsafe fn canProcessSurface(&self, surface: &IOSurfaceRef) -> bool;
#[cfg(all(feature = "objc2-foundation", feature = "objc2-io-surface"))]
#[unsafe(method(processSurface:outSurface:timestamp:options:))]
#[unsafe(method_family = none)]
pub unsafe fn processSurface_outSurface_timestamp_options(
&self,
in_surface: &IOSurfaceRef,
out_surface: &IOSurfaceRef,
timestamp: CFAbsoluteTime,
options: Option<&NSDictionary<MAFlashingLightsProcessorOptionKey, AnyObject>>,
) -> Retained<MAFlashingLightsProcessorResult>;
);
}
#[cfg(feature = "objc2")]
impl MAFlashingLightsProcessor {
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>;
);
}