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
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 unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39        #[unsafe(method(initWithCoder:))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn initWithCoder(
42            this: Allocated<Self>,
43            coder: &NSCoder,
44        ) -> Option<Retained<Self>>;
45
46        #[cfg(all(feature = "UIImage", feature = "UIImageConfiguration"))]
47        #[unsafe(method(imageWithConfiguration:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn imageWithConfiguration(
50            &self,
51            configuration: &UIImageConfiguration,
52        ) -> Retained<UIImage>;
53
54        #[cfg(all(feature = "UIImage", feature = "UIImageConfiguration"))]
55        #[unsafe(method(registerImage:withConfiguration:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn registerImage_withConfiguration(
58            &self,
59            image: &UIImage,
60            configuration: &UIImageConfiguration,
61        );
62
63        #[cfg(feature = "UIImageConfiguration")]
64        #[unsafe(method(unregisterImageWithConfiguration:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn unregisterImageWithConfiguration(&self, configuration: &UIImageConfiguration);
67
68        #[cfg(all(feature = "UIImage", feature = "UITraitCollection"))]
69        #[unsafe(method(imageWithTraitCollection:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn imageWithTraitCollection(
72            &self,
73            trait_collection: &UITraitCollection,
74        ) -> Retained<UIImage>;
75
76        #[cfg(all(feature = "UIImage", feature = "UITraitCollection"))]
77        #[unsafe(method(registerImage:withTraitCollection:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn registerImage_withTraitCollection(
80            &self,
81            image: &UIImage,
82            trait_collection: &UITraitCollection,
83        );
84
85        #[cfg(feature = "UITraitCollection")]
86        #[unsafe(method(unregisterImageWithTraitCollection:))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn unregisterImageWithTraitCollection(
89            &self,
90            trait_collection: &UITraitCollection,
91        );
92    );
93}
94
95/// Methods declared on superclass `NSObject`.
96impl UIImageAsset {
97    extern_methods!(
98        #[unsafe(method(new))]
99        #[unsafe(method_family = new)]
100        pub unsafe fn new() -> Retained<Self>;
101    );
102}