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))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
45
46 #[unsafe(method(setTarget:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
50
51 #[unsafe(method(selector))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn selector(&self) -> Sel;
54
55 #[unsafe(method(setSelector:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn setSelector(&self, selector: Sel);
59
60 #[unsafe(method(getReturnValue:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn getReturnValue(&self, ret_loc: NonNull<c_void>);
63
64 #[unsafe(method(setReturnValue:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setReturnValue(&self, ret_loc: NonNull<c_void>);
67
68 #[unsafe(method(getArgument:atIndex:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn getArgument_atIndex(
71 &self,
72 argument_location: NonNull<c_void>,
73 idx: NSInteger,
74 );
75
76 #[unsafe(method(setArgument:atIndex:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn setArgument_atIndex(
79 &self,
80 argument_location: NonNull<c_void>,
81 idx: NSInteger,
82 );
83
84 #[unsafe(method(invoke))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn invoke(&self);
87
88 #[unsafe(method(invokeWithTarget:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn invokeWithTarget(&self, target: &AnyObject);
91
92 #[unsafe(method(invokeUsingIMP:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn invokeUsingIMP(&self, imp: Option<Imp>);
95 );
96}
97
98impl NSInvocation {
100 extern_methods!(
101 #[unsafe(method(init))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
104
105 #[unsafe(method(new))]
106 #[unsafe(method_family = new)]
107 pub unsafe fn new() -> Retained<Self>;
108 );
109}