use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
pub struct ScreenSaverView;
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSAccessibility for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSAppearanceCustomization for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSCoding for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSDraggingDestination for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSObjectProtocol for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for ScreenSaverView {}
);
#[cfg(feature = "objc2-app-kit")]
impl ScreenSaverView {
extern_methods!(
#[unsafe(method(backingStoreType))]
#[unsafe(method_family = none)]
pub unsafe fn backingStoreType(mtm: MainThreadMarker) -> NSBackingStoreType;
#[unsafe(method(performGammaFade))]
#[unsafe(method_family = none)]
pub unsafe fn performGammaFade(mtm: MainThreadMarker) -> bool;
#[unsafe(method(initWithFrame:isPreview:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame_isPreview(
this: Allocated<Self>,
frame: NSRect,
is_preview: bool,
) -> Option<Retained<Self>>;
#[unsafe(method(animationTimeInterval))]
#[unsafe(method_family = none)]
pub unsafe fn animationTimeInterval(&self) -> NSTimeInterval;
#[unsafe(method(setAnimationTimeInterval:))]
#[unsafe(method_family = none)]
pub unsafe fn setAnimationTimeInterval(&self, animation_time_interval: NSTimeInterval);
#[unsafe(method(startAnimation))]
#[unsafe(method_family = none)]
pub unsafe fn startAnimation(&self);
#[unsafe(method(stopAnimation))]
#[unsafe(method_family = none)]
pub unsafe fn stopAnimation(&self);
#[unsafe(method(isAnimating))]
#[unsafe(method_family = none)]
pub unsafe fn isAnimating(&self) -> bool;
#[unsafe(method(drawRect:))]
#[unsafe(method_family = none)]
pub unsafe fn drawRect(&self, rect: NSRect);
#[unsafe(method(animateOneFrame))]
#[unsafe(method_family = none)]
pub unsafe fn animateOneFrame(&self);
#[unsafe(method(hasConfigureSheet))]
#[unsafe(method_family = none)]
pub unsafe fn hasConfigureSheet(&self) -> bool;
#[unsafe(method(configureSheet))]
#[unsafe(method_family = none)]
pub unsafe fn configureSheet(&self) -> Option<Retained<NSWindow>>;
#[unsafe(method(isPreview))]
#[unsafe(method_family = none)]
pub unsafe fn isPreview(&self) -> bool;
);
}
#[cfg(feature = "objc2-app-kit")]
impl ScreenSaverView {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "objc2-app-kit")]
impl ScreenSaverView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
impl ScreenSaverView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}