objc2_foundation/generated/
NSInvocation.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSInvocation;
14);
15
16extern_conformance!(
17 unsafe impl NSObjectProtocol for NSInvocation {}
18);
19
20impl NSInvocation {
21 extern_methods!(
22 #[cfg(feature = "NSMethodSignature")]
23 #[unsafe(method(invocationWithMethodSignature:))]
24 #[unsafe(method_family = none)]
25 pub unsafe fn invocationWithMethodSignature(
26 sig: &NSMethodSignature,
27 ) -> Retained<NSInvocation>;
28
29 #[cfg(feature = "NSMethodSignature")]
30 #[unsafe(method(methodSignature))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn methodSignature(&self) -> Retained<NSMethodSignature>;
33
34 #[unsafe(method(retainArguments))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn retainArguments(&self);
37
38 #[unsafe(method(argumentsRetained))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn argumentsRetained(&self) -> bool;
41
42 #[unsafe(method(target))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
48
49 #[unsafe(method(setTarget:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
58
59 #[unsafe(method(selector))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn selector(&self) -> Sel;
62
63 #[unsafe(method(setSelector:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn setSelector(&self, selector: Sel);
71
72 #[unsafe(method(getReturnValue:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn getReturnValue(&self, ret_loc: NonNull<c_void>);
78
79 #[unsafe(method(setReturnValue:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn setReturnValue(&self, ret_loc: NonNull<c_void>);
85
86 #[unsafe(method(getArgument:atIndex:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn getArgument_atIndex(
92 &self,
93 argument_location: NonNull<c_void>,
94 idx: NSInteger,
95 );
96
97 #[unsafe(method(setArgument:atIndex:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setArgument_atIndex(
103 &self,
104 argument_location: NonNull<c_void>,
105 idx: NSInteger,
106 );
107
108 #[unsafe(method(invoke))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn invoke(&self);
111
112 #[unsafe(method(invokeWithTarget:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn invokeWithTarget(&self, target: &AnyObject);
118
119 #[unsafe(method(invokeUsingIMP:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn invokeUsingIMP(&self, imp: Option<Imp>);
125 );
126}
127
128impl NSInvocation {
130 extern_methods!(
131 #[unsafe(method(init))]
132 #[unsafe(method_family = init)]
133 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
134
135 #[unsafe(method(new))]
136 #[unsafe(method_family = new)]
137 pub unsafe fn new() -> Retained<Self>;
138 );
139}