objc2_ui_kit/generated/
UIImageConfiguration.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/uikit/uiimageconfiguration?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct UIImageConfiguration;
14);
15
16unsafe impl Send for UIImageConfiguration {}
17
18unsafe impl Sync for UIImageConfiguration {}
19
20extern_conformance!(
21    unsafe impl NSCoding for UIImageConfiguration {}
22);
23
24extern_conformance!(
25    unsafe impl NSCopying for UIImageConfiguration {}
26);
27
28unsafe impl CopyingHelper for UIImageConfiguration {
29    type Result = Self;
30}
31
32extern_conformance!(
33    unsafe impl NSObjectProtocol for UIImageConfiguration {}
34);
35
36extern_conformance!(
37    unsafe impl NSSecureCoding for UIImageConfiguration {}
38);
39
40impl UIImageConfiguration {
41    extern_methods!(
42        #[unsafe(method(new))]
43        #[unsafe(method_family = new)]
44        pub unsafe fn new() -> Retained<Self>;
45
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[cfg(feature = "UITraitCollection")]
51        /// This property is not atomic.
52        ///
53        /// # Safety
54        ///
55        /// This might not be thread-safe.
56        #[unsafe(method(traitCollection))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn traitCollection(&self) -> Option<Retained<UITraitCollection>>;
59
60        #[cfg(feature = "UITraitCollection")]
61        #[unsafe(method(configurationWithTraitCollection:))]
62        #[unsafe(method_family = none)]
63        pub fn configurationWithTraitCollection(
64            &self,
65            trait_collection: Option<&UITraitCollection>,
66        ) -> Retained<Self>;
67
68        #[cfg(feature = "UITraitCollection")]
69        #[unsafe(method(configurationWithTraitCollection:))]
70        #[unsafe(method_family = none)]
71        pub fn configurationWithTraitCollection_class(
72            trait_collection: Option<&UITraitCollection>,
73        ) -> Retained<Self>;
74
75        /// This property is not atomic.
76        ///
77        /// # Safety
78        ///
79        /// This might not be thread-safe.
80        #[unsafe(method(locale))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;
83
84        #[unsafe(method(configurationWithLocale:))]
85        #[unsafe(method_family = none)]
86        pub fn configurationWithLocale(&self, locale: Option<&NSLocale>) -> Retained<Self>;
87
88        #[unsafe(method(configurationWithLocale:))]
89        #[unsafe(method_family = none)]
90        pub fn configurationWithLocale_class(locale: Option<&NSLocale>) -> Retained<Self>;
91
92        #[unsafe(method(configurationByApplyingConfiguration:))]
93        #[unsafe(method_family = none)]
94        pub fn configurationByApplyingConfiguration(
95            &self,
96            other_configuration: Option<&UIImageConfiguration>,
97        ) -> Retained<Self>;
98    );
99}