objc2_app_kit/generated/
NSAccessibilityCustomAction.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 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct NSAccessibilityCustomAction;
15);
16
17extern_conformance!(
18 unsafe impl NSObjectProtocol for NSAccessibilityCustomAction {}
19);
20
21impl NSAccessibilityCustomAction {
22 extern_methods!(
23 #[cfg(feature = "block2")]
24 #[unsafe(method(initWithName:handler:))]
25 #[unsafe(method_family = init)]
26 pub fn initWithName_handler(
27 this: Allocated<Self>,
28 name: &NSString,
29 handler: Option<&block2::DynBlock<dyn Fn() -> Bool>>,
30 ) -> Retained<Self>;
31
32 #[unsafe(method(initWithName:target:selector:))]
37 #[unsafe(method_family = init)]
38 pub unsafe fn initWithName_target_selector(
39 this: Allocated<Self>,
40 name: &NSString,
41 target: &ProtocolObject<dyn NSObjectProtocol>,
42 selector: Sel,
43 ) -> Retained<Self>;
44
45 #[unsafe(method(name))]
46 #[unsafe(method_family = none)]
47 pub fn name(&self) -> Retained<NSString>;
48
49 #[unsafe(method(setName:))]
53 #[unsafe(method_family = none)]
54 pub fn setName(&self, name: &NSString);
55
56 #[cfg(feature = "block2")]
57 #[unsafe(method(handler))]
58 #[unsafe(method_family = none)]
59 pub fn handler(&self) -> *mut block2::DynBlock<dyn Fn() -> Bool>;
60
61 #[cfg(feature = "block2")]
62 #[unsafe(method(setHandler:))]
66 #[unsafe(method_family = none)]
67 pub fn setHandler(&self, handler: Option<&block2::DynBlock<dyn Fn() -> Bool>>);
68
69 #[unsafe(method(target))]
70 #[unsafe(method_family = none)]
71 pub fn target(&self) -> Option<Retained<ProtocolObject<dyn NSObjectProtocol>>>;
72
73 #[unsafe(method(setTarget:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setTarget(&self, target: Option<&ProtocolObject<dyn NSObjectProtocol>>);
83
84 #[unsafe(method(selector))]
85 #[unsafe(method_family = none)]
86 pub fn selector(&self) -> Option<Sel>;
87
88 #[unsafe(method(setSelector:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn setSelector(&self, selector: Option<Sel>);
96 );
97}
98
99impl NSAccessibilityCustomAction {
101 extern_methods!(
102 #[unsafe(method(init))]
103 #[unsafe(method_family = init)]
104 pub fn init(this: Allocated<Self>) -> Retained<Self>;
105
106 #[unsafe(method(new))]
107 #[unsafe(method_family = new)]
108 pub fn new() -> Retained<Self>;
109 );
110}
111
112impl DefaultRetained for NSAccessibilityCustomAction {
113 #[inline]
114 fn default_retained() -> Retained<Self> {
115 Self::new()
116 }
117}