objc2_app_kit/generated/
NSPICTImageRep.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspictimagerep?language=objc)
11    #[unsafe(super(NSImageRep, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "NSImageRep")]
14    pub struct NSPICTImageRep;
15);
16
17#[cfg(feature = "NSImageRep")]
18extern_conformance!(
19    unsafe impl NSCoding for NSPICTImageRep {}
20);
21
22#[cfg(feature = "NSImageRep")]
23extern_conformance!(
24    unsafe impl NSCopying for NSPICTImageRep {}
25);
26
27#[cfg(feature = "NSImageRep")]
28unsafe impl CopyingHelper for NSPICTImageRep {
29    type Result = Self;
30}
31
32#[cfg(feature = "NSImageRep")]
33extern_conformance!(
34    unsafe impl NSObjectProtocol for NSPICTImageRep {}
35);
36
37#[cfg(feature = "NSImageRep")]
38impl NSPICTImageRep {
39    extern_methods!(
40        #[unsafe(method(imageRepWithData:))]
41        #[unsafe(method_family = none)]
42        pub fn imageRepWithData(pict_data: &NSData) -> Option<Retained<Self>>;
43
44        #[unsafe(method(initWithData:))]
45        #[unsafe(method_family = init)]
46        pub fn initWithData(this: Allocated<Self>, pict_data: &NSData) -> Option<Retained<Self>>;
47
48        #[unsafe(method(PICTRepresentation))]
49        #[unsafe(method_family = none)]
50        pub fn PICTRepresentation(&self) -> Retained<NSData>;
51
52        #[unsafe(method(boundingBox))]
53        #[unsafe(method_family = none)]
54        pub fn boundingBox(&self) -> NSRect;
55    );
56}
57
58/// Methods declared on superclass `NSImageRep`.
59#[cfg(feature = "NSImageRep")]
60impl NSPICTImageRep {
61    extern_methods!(
62        #[unsafe(method(init))]
63        #[unsafe(method_family = init)]
64        pub fn init(this: Allocated<Self>) -> Retained<Self>;
65
66        /// # Safety
67        ///
68        /// `coder` possibly has further requirements.
69        #[unsafe(method(initWithCoder:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithCoder(
72            this: Allocated<Self>,
73            coder: &NSCoder,
74        ) -> Option<Retained<Self>>;
75    );
76}
77
78/// Methods declared on superclass `NSObject`.
79#[cfg(feature = "NSImageRep")]
80impl NSPICTImageRep {
81    extern_methods!(
82        #[unsafe(method(new))]
83        #[unsafe(method_family = new)]
84        pub fn new() -> Retained<Self>;
85    );
86}
87
88#[cfg(feature = "NSImageRep")]
89impl DefaultRetained for NSPICTImageRep {
90    #[inline]
91    fn default_retained() -> Retained<Self> {
92        Self::new()
93    }
94}