use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSGlassEffectViewStyle(pub NSInteger);
impl NSGlassEffectViewStyle {
#[doc(alias = "NSGlassEffectViewStyleRegular")]
pub const Regular: Self = Self(0);
#[doc(alias = "NSGlassEffectViewStyleClear")]
pub const Clear: Self = Self(1);
}
unsafe impl Encode for NSGlassEffectViewStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSGlassEffectViewStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
pub struct NSGlassEffectView;
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibility for NSGlassEffectView {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSGlassEffectView {}
);
#[cfg(all(feature = "NSAnimation", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for NSGlassEffectView {}
);
#[cfg(all(feature = "NSAppearance", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSAppearanceCustomization for NSGlassEffectView {}
);
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSCoding for NSGlassEffectView {}
);
#[cfg(all(feature = "NSDragging", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSDraggingDestination for NSGlassEffectView {}
);
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for NSGlassEffectView {}
);
#[cfg(all(
feature = "NSResponder",
feature = "NSUserInterfaceItemIdentification",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSGlassEffectView {}
);
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectView {
extern_methods!(
#[unsafe(method(contentView))]
#[unsafe(method_family = none)]
pub fn contentView(&self) -> Option<Retained<NSView>>;
#[unsafe(method(setContentView:))]
#[unsafe(method_family = none)]
pub fn setContentView(&self, content_view: Option<&NSView>);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(cornerRadius))]
#[unsafe(method_family = none)]
pub fn cornerRadius(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setCornerRadius:))]
#[unsafe(method_family = none)]
pub fn setCornerRadius(&self, corner_radius: CGFloat);
#[cfg(feature = "NSColor")]
#[unsafe(method(tintColor))]
#[unsafe(method_family = none)]
pub fn tintColor(&self) -> Option<Retained<NSColor>>;
#[cfg(feature = "NSColor")]
#[unsafe(method(setTintColor:))]
#[unsafe(method_family = none)]
pub fn setTintColor(&self, tint_color: Option<&NSColor>);
#[unsafe(method(style))]
#[unsafe(method_family = none)]
pub fn style(&self) -> NSGlassEffectViewStyle;
#[unsafe(method(setStyle:))]
#[unsafe(method_family = none)]
pub fn setStyle(&self, style: NSGlassEffectViewStyle);
);
}
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectView {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub 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(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
pub struct NSGlassEffectContainerView;
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibility for NSGlassEffectContainerView {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSGlassEffectContainerView {}
);
#[cfg(all(feature = "NSAnimation", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for NSGlassEffectContainerView {}
);
#[cfg(all(feature = "NSAppearance", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSAppearanceCustomization for NSGlassEffectContainerView {}
);
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSCoding for NSGlassEffectContainerView {}
);
#[cfg(all(feature = "NSDragging", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSDraggingDestination for NSGlassEffectContainerView {}
);
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for NSGlassEffectContainerView {}
);
#[cfg(all(
feature = "NSResponder",
feature = "NSUserInterfaceItemIdentification",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSGlassEffectContainerView {}
);
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectContainerView {
extern_methods!(
#[unsafe(method(contentView))]
#[unsafe(method_family = none)]
pub fn contentView(&self) -> Option<Retained<NSView>>;
#[unsafe(method(setContentView:))]
#[unsafe(method_family = none)]
pub fn setContentView(&self, content_view: Option<&NSView>);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(spacing))]
#[unsafe(method_family = none)]
pub fn spacing(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setSpacing:))]
#[unsafe(method_family = none)]
pub fn setSpacing(&self, spacing: CGFloat);
);
}
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectContainerView {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub 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(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectContainerView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
impl NSGlassEffectContainerView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}