objc2_ui_kit/generated/
UIImageAsset.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 UIImageAsset;
15);
16
17unsafe impl Send for UIImageAsset {}
18
19unsafe impl Sync for UIImageAsset {}
20
21extern_conformance!(
22 unsafe impl NSCoding for UIImageAsset {}
23);
24
25extern_conformance!(
26 unsafe impl NSObjectProtocol for UIImageAsset {}
27);
28
29extern_conformance!(
30 unsafe impl NSSecureCoding for UIImageAsset {}
31);
32
33impl UIImageAsset {
34 extern_methods!(
35 #[unsafe(method(init))]
36 #[unsafe(method_family = init)]
37 pub fn init(this: Allocated<Self>) -> Retained<Self>;
38
39 #[unsafe(method(initWithCoder:))]
43 #[unsafe(method_family = init)]
44 pub unsafe fn initWithCoder(
45 this: Allocated<Self>,
46 coder: &NSCoder,
47 ) -> Option<Retained<Self>>;
48
49 #[cfg(all(feature = "UIImage", feature = "UIImageConfiguration"))]
50 #[unsafe(method(imageWithConfiguration:))]
51 #[unsafe(method_family = none)]
52 pub fn imageWithConfiguration(
53 &self,
54 configuration: &UIImageConfiguration,
55 ) -> Retained<UIImage>;
56
57 #[cfg(all(feature = "UIImage", feature = "UIImageConfiguration"))]
58 #[unsafe(method(registerImage:withConfiguration:))]
59 #[unsafe(method_family = none)]
60 pub fn registerImage_withConfiguration(
61 &self,
62 image: &UIImage,
63 configuration: &UIImageConfiguration,
64 );
65
66 #[cfg(feature = "UIImageConfiguration")]
67 #[unsafe(method(unregisterImageWithConfiguration:))]
68 #[unsafe(method_family = none)]
69 pub fn unregisterImageWithConfiguration(&self, configuration: &UIImageConfiguration);
70
71 #[cfg(all(feature = "UIImage", feature = "UITraitCollection"))]
72 #[unsafe(method(imageWithTraitCollection:))]
73 #[unsafe(method_family = none)]
74 pub fn imageWithTraitCollection(
75 &self,
76 trait_collection: &UITraitCollection,
77 ) -> Retained<UIImage>;
78
79 #[cfg(all(feature = "UIImage", feature = "UITraitCollection"))]
80 #[unsafe(method(registerImage:withTraitCollection:))]
81 #[unsafe(method_family = none)]
82 pub fn registerImage_withTraitCollection(
83 &self,
84 image: &UIImage,
85 trait_collection: &UITraitCollection,
86 );
87
88 #[cfg(feature = "UITraitCollection")]
89 #[unsafe(method(unregisterImageWithTraitCollection:))]
90 #[unsafe(method_family = none)]
91 pub fn unregisterImageWithTraitCollection(&self, trait_collection: &UITraitCollection);
92 );
93}
94
95impl UIImageAsset {
97 extern_methods!(
98 #[unsafe(method(new))]
99 #[unsafe(method_family = new)]
100 pub fn new() -> Retained<Self>;
101 );
102}
103
104impl DefaultRetained for UIImageAsset {
105 #[inline]
106 fn default_retained() -> Retained<Self> {
107 Self::new()
108 }
109}