use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSImageRep, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSImageRep")]
#[deprecated = "`NSEPSImageRep` instances cannot be created on macOS 14.0 and later"]
pub struct NSEPSImageRep;
);
#[cfg(feature = "NSImageRep")]
extern_conformance!(
unsafe impl NSCoding for NSEPSImageRep {}
);
#[cfg(feature = "NSImageRep")]
extern_conformance!(
unsafe impl NSCopying for NSEPSImageRep {}
);
#[cfg(feature = "NSImageRep")]
unsafe impl CopyingHelper for NSEPSImageRep {
type Result = Self;
}
#[cfg(feature = "NSImageRep")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSEPSImageRep {}
);
#[cfg(feature = "NSImageRep")]
impl NSEPSImageRep {
extern_methods!(
#[unsafe(method(imageRepWithData:))]
#[unsafe(method_family = none)]
pub fn imageRepWithData(eps_data: &NSData) -> Option<Retained<Self>>;
#[unsafe(method(initWithData:))]
#[unsafe(method_family = init)]
pub fn initWithData(this: Allocated<Self>, eps_data: &NSData) -> Option<Retained<Self>>;
#[unsafe(method(boundingBox))]
#[unsafe(method_family = none)]
pub fn boundingBox(&self) -> NSRect;
#[unsafe(method(EPSRepresentation))]
#[unsafe(method_family = none)]
pub fn EPSRepresentation(&self) -> Retained<NSData>;
#[deprecated]
#[unsafe(method(prepareGState))]
#[unsafe(method_family = none)]
pub fn prepareGState(&self);
);
}
#[cfg(feature = "NSImageRep")]
impl NSEPSImageRep {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "NSImageRep")]
impl NSEPSImageRep {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
#[cfg(feature = "NSImageRep")]
impl DefaultRetained for NSEPSImageRep {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}