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 unsafe 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:))]
33 #[unsafe(method_family = init)]
34 pub unsafe fn initWithName_target_selector(
35 this: Allocated<Self>,
36 name: &NSString,
37 target: &ProtocolObject<dyn NSObjectProtocol>,
38 selector: Sel,
39 ) -> Retained<Self>;
40
41 #[unsafe(method(name))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn name(&self) -> Retained<NSString>;
44
45 #[unsafe(method(setName:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn setName(&self, name: &NSString);
49
50 #[cfg(feature = "block2")]
51 #[unsafe(method(handler))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn handler(&self) -> *mut block2::DynBlock<dyn Fn() -> Bool>;
54
55 #[cfg(feature = "block2")]
56 #[unsafe(method(setHandler:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn setHandler(&self, handler: Option<&block2::DynBlock<dyn Fn() -> Bool>>);
60
61 #[unsafe(method(target))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn target(&self) -> Option<Retained<ProtocolObject<dyn NSObjectProtocol>>>;
64
65 #[unsafe(method(setTarget:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn setTarget(&self, target: Option<&ProtocolObject<dyn NSObjectProtocol>>);
70
71 #[unsafe(method(selector))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn selector(&self) -> Option<Sel>;
74
75 #[unsafe(method(setSelector:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn setSelector(&self, selector: Option<Sel>);
79 );
80}
81
82impl NSAccessibilityCustomAction {
84 extern_methods!(
85 #[unsafe(method(init))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88
89 #[unsafe(method(new))]
90 #[unsafe(method_family = new)]
91 pub unsafe fn new() -> Retained<Self>;
92 );
93}