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
16unsafe impl NSObjectProtocol for NSInvocation {}
17
18impl NSInvocation {
19 extern_methods!(
20 #[cfg(feature = "NSMethodSignature")]
21 #[unsafe(method(invocationWithMethodSignature:))]
22 #[unsafe(method_family = none)]
23 pub unsafe fn invocationWithMethodSignature(
24 sig: &NSMethodSignature,
25 ) -> Retained<NSInvocation>;
26
27 #[cfg(feature = "NSMethodSignature")]
28 #[unsafe(method(methodSignature))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn methodSignature(&self) -> Retained<NSMethodSignature>;
31
32 #[unsafe(method(retainArguments))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn retainArguments(&self);
35
36 #[unsafe(method(argumentsRetained))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn argumentsRetained(&self) -> bool;
39
40 #[unsafe(method(target))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
43
44 #[unsafe(method(setTarget:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
48
49 #[unsafe(method(selector))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn selector(&self) -> Sel;
52
53 #[unsafe(method(setSelector:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setSelector(&self, selector: Sel);
57
58 #[unsafe(method(getReturnValue:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn getReturnValue(&self, ret_loc: NonNull<c_void>);
61
62 #[unsafe(method(setReturnValue:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setReturnValue(&self, ret_loc: NonNull<c_void>);
65
66 #[unsafe(method(getArgument:atIndex:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn getArgument_atIndex(
69 &self,
70 argument_location: NonNull<c_void>,
71 idx: NSInteger,
72 );
73
74 #[unsafe(method(setArgument:atIndex:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setArgument_atIndex(
77 &self,
78 argument_location: NonNull<c_void>,
79 idx: NSInteger,
80 );
81
82 #[unsafe(method(invoke))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn invoke(&self);
85
86 #[unsafe(method(invokeWithTarget:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn invokeWithTarget(&self, target: &AnyObject);
89
90 #[unsafe(method(invokeUsingIMP:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn invokeUsingIMP(&self, imp: Option<Imp>);
93 );
94}
95
96impl NSInvocation {
98 extern_methods!(
99 #[unsafe(method(init))]
100 #[unsafe(method_family = init)]
101 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
102
103 #[unsafe(method(new))]
104 #[unsafe(method_family = new)]
105 pub unsafe fn new() -> Retained<Self>;
106 );
107}