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 unsafe fn imageRepWithData(pict_data: &NSData) -> Option<Retained<Self>>;
43
44        #[unsafe(method(initWithData:))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn initWithData(
47            this: Allocated<Self>,
48            pict_data: &NSData,
49        ) -> Option<Retained<Self>>;
50
51        #[unsafe(method(PICTRepresentation))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn PICTRepresentation(&self) -> Retained<NSData>;
54
55        #[unsafe(method(boundingBox))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn boundingBox(&self) -> NSRect;
58    );
59}
60
61/// Methods declared on superclass `NSImageRep`.
62#[cfg(feature = "NSImageRep")]
63impl NSPICTImageRep {
64    extern_methods!(
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
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 unsafe fn new() -> Retained<Self>;
85    );
86}