use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageAlignment(pub NSUInteger);
impl NSImageAlignment {
#[doc(alias = "NSImageAlignCenter")]
pub const AlignCenter: Self = Self(0);
#[doc(alias = "NSImageAlignTop")]
pub const AlignTop: Self = Self(1);
#[doc(alias = "NSImageAlignTopLeft")]
pub const AlignTopLeft: Self = Self(2);
#[doc(alias = "NSImageAlignTopRight")]
pub const AlignTopRight: Self = Self(3);
#[doc(alias = "NSImageAlignLeft")]
pub const AlignLeft: Self = Self(4);
#[doc(alias = "NSImageAlignBottom")]
pub const AlignBottom: Self = Self(5);
#[doc(alias = "NSImageAlignBottomLeft")]
pub const AlignBottomLeft: Self = Self(6);
#[doc(alias = "NSImageAlignBottomRight")]
pub const AlignBottomRight: Self = Self(7);
#[doc(alias = "NSImageAlignRight")]
pub const AlignRight: Self = Self(8);
}
unsafe impl Encode for NSImageAlignment {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSImageAlignment {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSImageFrameStyle(pub NSUInteger);
impl NSImageFrameStyle {
#[doc(alias = "NSImageFrameNone")]
pub const None: Self = Self(0);
#[doc(alias = "NSImageFramePhoto")]
pub const Photo: Self = Self(1);
#[doc(alias = "NSImageFrameGrayBezel")]
pub const GrayBezel: Self = Self(2);
#[doc(alias = "NSImageFrameGroove")]
pub const Groove: Self = Self(3);
#[doc(alias = "NSImageFrameButton")]
pub const Button: Self = Self(4);
}
unsafe impl Encode for NSImageFrameStyle {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSImageFrameStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSCell, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSCell")]
pub struct NSImageCell;
);
#[cfg(all(feature = "NSAccessibilityProtocols", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSAccessibility for NSImageCell {}
);
#[cfg(all(feature = "NSAccessibilityProtocols", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSImageCell {}
);
#[cfg(feature = "NSCell")]
extern_conformance!(
unsafe impl NSCoding for NSImageCell {}
);
#[cfg(feature = "NSCell")]
extern_conformance!(
unsafe impl NSCopying for NSImageCell {}
);
#[cfg(feature = "NSCell")]
unsafe impl CopyingHelper for NSImageCell {
type Result = Self;
}
#[cfg(feature = "NSCell")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSImageCell {}
);
#[cfg(all(feature = "NSCell", feature = "NSUserInterfaceItemIdentification"))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSImageCell {}
);
#[cfg(feature = "NSCell")]
impl NSImageCell {
extern_methods!(
#[unsafe(method(imageAlignment))]
#[unsafe(method_family = none)]
pub fn imageAlignment(&self) -> NSImageAlignment;
#[unsafe(method(setImageAlignment:))]
#[unsafe(method_family = none)]
pub fn setImageAlignment(&self, image_alignment: NSImageAlignment);
#[unsafe(method(imageScaling))]
#[unsafe(method_family = none)]
pub fn imageScaling(&self) -> NSImageScaling;
#[unsafe(method(setImageScaling:))]
#[unsafe(method_family = none)]
pub fn setImageScaling(&self, image_scaling: NSImageScaling);
#[unsafe(method(imageFrameStyle))]
#[unsafe(method_family = none)]
pub fn imageFrameStyle(&self) -> NSImageFrameStyle;
#[unsafe(method(setImageFrameStyle:))]
#[unsafe(method_family = none)]
pub fn setImageFrameStyle(&self, image_frame_style: NSImageFrameStyle);
);
}
#[cfg(feature = "NSCell")]
impl NSImageCell {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initTextCell:))]
#[unsafe(method_family = init)]
pub fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
#[cfg(feature = "NSImage")]
#[unsafe(method(initImageCell:))]
#[unsafe(method_family = init)]
pub fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
);
}
#[cfg(feature = "NSCell")]
impl NSImageCell {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}