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 UIGlassEffectStyle(pub NSInteger);
impl UIGlassEffectStyle {
#[doc(alias = "UIGlassEffectStyleRegular")]
pub const Regular: Self = Self(0);
#[doc(alias = "UIGlassEffectStyleClear")]
pub const Clear: Self = Self(1);
}
unsafe impl Encode for UIGlassEffectStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UIGlassEffectStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(UIVisualEffect, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIVisualEffect")]
pub struct UIGlassEffect;
);
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSCoding for UIGlassEffect {}
);
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSCopying for UIGlassEffect {}
);
#[cfg(feature = "UIVisualEffect")]
unsafe impl CopyingHelper for UIGlassEffect {
type Result = Self;
}
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSObjectProtocol for UIGlassEffect {}
);
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSSecureCoding for UIGlassEffect {}
);
#[cfg(feature = "UIVisualEffect")]
impl UIGlassEffect {
extern_methods!(
#[unsafe(method(isInteractive))]
#[unsafe(method_family = none)]
pub fn isInteractive(&self) -> bool;
#[unsafe(method(setInteractive:))]
#[unsafe(method_family = none)]
pub fn setInteractive(&self, interactive: bool);
#[cfg(feature = "UIColor")]
#[unsafe(method(tintColor))]
#[unsafe(method_family = none)]
pub fn tintColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setTintColor:))]
#[unsafe(method_family = none)]
pub fn setTintColor(&self, tint_color: Option<&UIColor>);
#[unsafe(method(effectWithStyle:))]
#[unsafe(method_family = none)]
pub fn effectWithStyle(
style: UIGlassEffectStyle,
mtm: MainThreadMarker,
) -> Retained<UIGlassEffect>;
);
}
#[cfg(feature = "UIVisualEffect")]
impl UIGlassEffect {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(UIVisualEffect, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIVisualEffect")]
pub struct UIGlassContainerEffect;
);
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSCoding for UIGlassContainerEffect {}
);
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSCopying for UIGlassContainerEffect {}
);
#[cfg(feature = "UIVisualEffect")]
unsafe impl CopyingHelper for UIGlassContainerEffect {
type Result = Self;
}
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSObjectProtocol for UIGlassContainerEffect {}
);
#[cfg(feature = "UIVisualEffect")]
extern_conformance!(
unsafe impl NSSecureCoding for UIGlassContainerEffect {}
);
#[cfg(feature = "UIVisualEffect")]
impl UIGlassContainerEffect {
extern_methods!(
#[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(feature = "UIVisualEffect")]
impl UIGlassContainerEffect {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}