objc2_foundation/generated/
NSMethodSignature.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsmethodsignature?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct NSMethodSignature;
14);
15
16unsafe impl NSObjectProtocol for NSMethodSignature {}
17
18impl NSMethodSignature {
19    extern_methods!(
20        #[unsafe(method(signatureWithObjCTypes:))]
21        #[unsafe(method_family = none)]
22        pub unsafe fn signatureWithObjCTypes(
23            types: NonNull<c_char>,
24        ) -> Option<Retained<NSMethodSignature>>;
25
26        #[unsafe(method(numberOfArguments))]
27        #[unsafe(method_family = none)]
28        pub unsafe fn numberOfArguments(&self) -> NSUInteger;
29
30        #[unsafe(method(getArgumentTypeAtIndex:))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull<c_char>;
33
34        #[unsafe(method(frameLength))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn frameLength(&self) -> NSUInteger;
37
38        #[unsafe(method(isOneway))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn isOneway(&self) -> bool;
41
42        #[unsafe(method(methodReturnType))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn methodReturnType(&self) -> NonNull<c_char>;
45
46        #[unsafe(method(methodReturnLength))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn methodReturnLength(&self) -> NSUInteger;
49    );
50}
51
52/// Methods declared on superclass `NSObject`.
53impl NSMethodSignature {
54    extern_methods!(
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}