objc2_ui_kit/generated/
UIContentUnavailableButtonProperties.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 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct UIContentUnavailableButtonProperties;
16);
17
18extern_conformance!(
19 unsafe impl NSCoding for UIContentUnavailableButtonProperties {}
20);
21
22extern_conformance!(
23 unsafe impl NSCopying for UIContentUnavailableButtonProperties {}
24);
25
26unsafe impl CopyingHelper for UIContentUnavailableButtonProperties {
27 type Result = Self;
28}
29
30extern_conformance!(
31 unsafe impl NSObjectProtocol for UIContentUnavailableButtonProperties {}
32);
33
34extern_conformance!(
35 unsafe impl NSSecureCoding for UIContentUnavailableButtonProperties {}
36);
37
38impl UIContentUnavailableButtonProperties {
39 extern_methods!(
40 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
41 #[unsafe(method(primaryAction))]
43 #[unsafe(method_family = none)]
44 pub fn primaryAction(&self) -> Option<Retained<UIAction>>;
45
46 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
47 #[unsafe(method(setPrimaryAction:))]
51 #[unsafe(method_family = none)]
52 pub fn setPrimaryAction(&self, primary_action: Option<&UIAction>);
53
54 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
55 #[unsafe(method(menu))]
57 #[unsafe(method_family = none)]
58 pub fn menu(&self) -> Option<Retained<UIMenu>>;
59
60 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
61 #[unsafe(method(setMenu:))]
65 #[unsafe(method_family = none)]
66 pub fn setMenu(&self, menu: Option<&UIMenu>);
67
68 #[unsafe(method(isEnabled))]
70 #[unsafe(method_family = none)]
71 pub fn isEnabled(&self) -> bool;
72
73 #[unsafe(method(setEnabled:))]
75 #[unsafe(method_family = none)]
76 pub fn setEnabled(&self, enabled: bool);
77
78 #[cfg(feature = "UIButton")]
79 #[unsafe(method(role))]
81 #[unsafe(method_family = none)]
82 pub fn role(&self) -> UIButtonRole;
83
84 #[cfg(feature = "UIButton")]
85 #[unsafe(method(setRole:))]
87 #[unsafe(method_family = none)]
88 pub fn setRole(&self, role: UIButtonRole);
89 );
90}
91
92impl UIContentUnavailableButtonProperties {
94 extern_methods!(
95 #[unsafe(method(init))]
96 #[unsafe(method_family = init)]
97 pub fn init(this: Allocated<Self>) -> Retained<Self>;
98
99 #[unsafe(method(new))]
100 #[unsafe(method_family = new)]
101 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
102 );
103}