objc2_intents/generated/
INImage.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct INImage;
15);
16
17extern_conformance!(
18 unsafe impl NSCoding for INImage {}
19);
20
21extern_conformance!(
22 unsafe impl NSCopying for INImage {}
23);
24
25unsafe impl CopyingHelper for INImage {
26 type Result = Self;
27}
28
29extern_conformance!(
30 unsafe impl NSObjectProtocol for INImage {}
31);
32
33extern_conformance!(
34 unsafe impl NSSecureCoding for INImage {}
35);
36
37impl INImage {
38 extern_methods!(
39 #[unsafe(method(imageNamed:))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn imageNamed(name: &NSString) -> Retained<Self>;
42
43 #[unsafe(method(systemImageNamed:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn systemImageNamed(system_image_name: &NSString) -> Retained<Self>;
46
47 #[unsafe(method(imageWithImageData:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn imageWithImageData(image_data: &NSData) -> Retained<Self>;
50
51 #[unsafe(method(imageWithURL:))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn imageWithURL(url: &NSURL) -> Option<Retained<Self>>;
54
55 #[unsafe(method(imageWithURL:width:height:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn imageWithURL_width_height(
58 url: &NSURL,
59 width: c_double,
60 height: c_double,
61 ) -> Option<Retained<Self>>;
62 );
63}
64
65impl INImage {
67 extern_methods!(
68 #[unsafe(method(init))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72 #[unsafe(method(new))]
73 #[unsafe(method_family = new)]
74 pub unsafe fn new() -> Retained<Self>;
75 );
76}