objc2_ui_kit/generated/
UIViewConfigurationState.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/uiviewconfigurationstate?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct UIViewConfigurationState;
16);
17
18unsafe impl NSCoding for UIViewConfigurationState {}
19
20unsafe impl NSCopying for UIViewConfigurationState {}
21
22unsafe impl CopyingHelper for UIViewConfigurationState {
23    type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for UIViewConfigurationState {}
27
28unsafe impl NSSecureCoding for UIViewConfigurationState {}
29
30#[cfg(feature = "UIConfigurationState")]
31unsafe impl UIConfigurationState for UIViewConfigurationState {}
32
33impl UIViewConfigurationState {
34    extern_methods!(
35        #[cfg(feature = "UITraitCollection")]
36        /// Returns a new instance with the specified trait collection.
37        #[unsafe(method(initWithTraitCollection:))]
38        #[unsafe(method_family = init)]
39        pub unsafe fn initWithTraitCollection(
40            this: Allocated<Self>,
41            trait_collection: &UITraitCollection,
42        ) -> Retained<Self>;
43
44        #[unsafe(method(initWithCoder:))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn initWithCoder(
47            this: Allocated<Self>,
48            coder: &NSCoder,
49        ) -> Option<Retained<Self>>;
50
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54
55        #[unsafe(method(new))]
56        #[unsafe(method_family = new)]
57        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
58
59        #[cfg(feature = "UITraitCollection")]
60        #[unsafe(method(traitCollection))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn traitCollection(&self) -> Retained<UITraitCollection>;
63
64        #[cfg(feature = "UITraitCollection")]
65        /// Setter for [`traitCollection`][Self::traitCollection].
66        #[unsafe(method(setTraitCollection:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setTraitCollection(&self, trait_collection: &UITraitCollection);
69
70        #[unsafe(method(isDisabled))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn isDisabled(&self) -> bool;
73
74        /// Setter for [`isDisabled`][Self::isDisabled].
75        #[unsafe(method(setDisabled:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn setDisabled(&self, disabled: bool);
78
79        #[unsafe(method(isHighlighted))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn isHighlighted(&self) -> bool;
82
83        /// Setter for [`isHighlighted`][Self::isHighlighted].
84        #[unsafe(method(setHighlighted:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn setHighlighted(&self, highlighted: bool);
87
88        #[unsafe(method(isSelected))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn isSelected(&self) -> bool;
91
92        /// Setter for [`isSelected`][Self::isSelected].
93        #[unsafe(method(setSelected:))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn setSelected(&self, selected: bool);
96
97        #[unsafe(method(isFocused))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn isFocused(&self) -> bool;
100
101        /// Setter for [`isFocused`][Self::isFocused].
102        #[unsafe(method(setFocused:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn setFocused(&self, focused: bool);
105
106        #[unsafe(method(isPinned))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn isPinned(&self) -> bool;
109
110        /// Setter for [`isPinned`][Self::isPinned].
111        #[unsafe(method(setPinned:))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn setPinned(&self, pinned: bool);
114    );
115}