objc2_ui_kit/generated/
UIImageAsset.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiimageasset?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct UIImageAsset;
15);
16
17unsafe impl Send for UIImageAsset {}
18
19unsafe impl Sync for UIImageAsset {}
20
21unsafe impl NSCoding for UIImageAsset {}
22
23unsafe impl NSObjectProtocol for UIImageAsset {}
24
25unsafe impl NSSecureCoding for UIImageAsset {}
26
27impl UIImageAsset {
28    extern_methods!(
29        #[unsafe(method(init))]
30        #[unsafe(method_family = init)]
31        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33        #[unsafe(method(initWithCoder:))]
34        #[unsafe(method_family = init)]
35        pub unsafe fn initWithCoder(
36            this: Allocated<Self>,
37            coder: &NSCoder,
38        ) -> Option<Retained<Self>>;
39
40        #[cfg(all(feature = "UIImage", feature = "UIImageConfiguration"))]
41        #[unsafe(method(imageWithConfiguration:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn imageWithConfiguration(
44            &self,
45            configuration: &UIImageConfiguration,
46        ) -> Retained<UIImage>;
47
48        #[cfg(all(feature = "UIImage", feature = "UIImageConfiguration"))]
49        #[unsafe(method(registerImage:withConfiguration:))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn registerImage_withConfiguration(
52            &self,
53            image: &UIImage,
54            configuration: &UIImageConfiguration,
55        );
56
57        #[cfg(feature = "UIImageConfiguration")]
58        #[unsafe(method(unregisterImageWithConfiguration:))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn unregisterImageWithConfiguration(&self, configuration: &UIImageConfiguration);
61
62        #[cfg(all(feature = "UIImage", feature = "UITraitCollection"))]
63        #[unsafe(method(imageWithTraitCollection:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn imageWithTraitCollection(
66            &self,
67            trait_collection: &UITraitCollection,
68        ) -> Retained<UIImage>;
69
70        #[cfg(all(feature = "UIImage", feature = "UITraitCollection"))]
71        #[unsafe(method(registerImage:withTraitCollection:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn registerImage_withTraitCollection(
74            &self,
75            image: &UIImage,
76            trait_collection: &UITraitCollection,
77        );
78
79        #[cfg(feature = "UITraitCollection")]
80        #[unsafe(method(unregisterImageWithTraitCollection:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn unregisterImageWithTraitCollection(
83            &self,
84            trait_collection: &UITraitCollection,
85        );
86    );
87}
88
89/// Methods declared on superclass `NSObject`.
90impl UIImageAsset {
91    extern_methods!(
92        #[unsafe(method(new))]
93        #[unsafe(method_family = new)]
94        pub unsafe fn new() -> Retained<Self>;
95    );
96}