//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsmethodsignature?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSMethodSignature;
);

unsafe impl NSObjectProtocol for NSMethodSignature {}

impl NSMethodSignature {
    extern_methods!(
        #[unsafe(method(signatureWithObjCTypes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn signatureWithObjCTypes(
            types: NonNull<c_char>,
        ) -> Option<Retained<NSMethodSignature>>;

        #[unsafe(method(numberOfArguments))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfArguments(&self) -> NSUInteger;

        #[unsafe(method(getArgumentTypeAtIndex:))]
        #[unsafe(method_family = none)]
        pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull<c_char>;

        #[unsafe(method(frameLength))]
        #[unsafe(method_family = none)]
        pub unsafe fn frameLength(&self) -> NSUInteger;

        #[unsafe(method(isOneway))]
        #[unsafe(method_family = none)]
        pub unsafe fn isOneway(&self) -> bool;

        #[unsafe(method(methodReturnType))]
        #[unsafe(method_family = none)]
        pub unsafe fn methodReturnType(&self) -> NonNull<c_char>;

        #[unsafe(method(methodReturnLength))]
        #[unsafe(method_family = none)]
        pub unsafe fn methodReturnLength(&self) -> NSUInteger;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSMethodSignature {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
