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 unsafe fn primaryAction(&self) -> Option<Retained<UIAction>>;
45
46 #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
47 #[unsafe(method(setPrimaryAction:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn setPrimaryAction(&self, primary_action: Option<&UIAction>);
51
52 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
53 #[unsafe(method(menu))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn menu(&self) -> Option<Retained<UIMenu>>;
57
58 #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
59 #[unsafe(method(setMenu:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn setMenu(&self, menu: Option<&UIMenu>);
63
64 #[unsafe(method(isEnabled))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn isEnabled(&self) -> bool;
68
69 #[unsafe(method(setEnabled:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setEnabled(&self, enabled: bool);
73
74 #[cfg(feature = "UIButton")]
75 #[unsafe(method(role))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn role(&self) -> UIButtonRole;
79
80 #[cfg(feature = "UIButton")]
81 #[unsafe(method(setRole:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn setRole(&self, role: UIButtonRole);
85 );
86}
87
88impl UIContentUnavailableButtonProperties {
90 extern_methods!(
91 #[unsafe(method(init))]
92 #[unsafe(method_family = init)]
93 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
94
95 #[unsafe(method(new))]
96 #[unsafe(method_family = new)]
97 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
98 );
99}