1use std::os::raw::c_char;
2#[cfg(any(doc, not(feature = "unstable-objfw")))]
3use std::os::raw::c_uint;
4
5#[cfg(any(doc, not(feature = "unstable-objfw")))]
6use crate::IMP;
7use crate::{objc_selector, OpaqueData};
8
9#[repr(C)]
11pub struct objc_method {
12 _priv: [u8; 0],
13 _p: OpaqueData,
14}
15
16#[repr(C)]
18#[derive(Debug, Copy, Clone)]
19pub struct objc_method_description {
20 pub name: *const objc_selector,
22 pub types: *const c_char,
24}
25
26extern_c! {
27 #[cfg(any(doc, not(feature = "unstable-objfw")))]
28 pub fn method_copyArgumentType(method: *const objc_method, index: c_uint) -> *mut c_char;
30 #[cfg(any(doc, not(feature = "unstable-objfw")))]
31 pub fn method_copyReturnType(method: *const objc_method) -> *mut c_char;
33 #[cfg(any(doc, not(feature = "unstable-objfw")))]
34 pub fn method_exchangeImplementations(method1: *mut objc_method, method2: *mut objc_method);
35 #[cfg(any(doc, not(feature = "unstable-objfw")))]
36 pub fn method_getArgumentType(
37 method: *const objc_method,
38 index: c_uint,
39 dst: *mut c_char,
40 dst_len: usize,
41 );
42 #[cfg(any(doc, target_vendor = "apple"))]
43 pub fn method_getDescription(m: *const objc_method) -> *const objc_method_description;
44 #[cfg(any(doc, not(feature = "unstable-objfw")))]
45 pub fn method_getImplementation(method: *const objc_method) -> IMP;
46 #[cfg(any(doc, not(feature = "unstable-objfw")))]
47 pub fn method_getName(method: *const objc_method) -> *const objc_selector;
48 #[cfg(any(doc, not(feature = "unstable-objfw")))]
49 pub fn method_getNumberOfArguments(method: *const objc_method) -> c_uint;
50 #[cfg(any(doc, not(feature = "unstable-objfw")))]
51 pub fn method_getReturnType(method: *const objc_method, dst: *mut c_char, dst_len: usize);
52 #[cfg(any(doc, not(feature = "unstable-objfw")))]
53 pub fn method_getTypeEncoding(method: *const objc_method) -> *const c_char;
54 #[cfg(any(doc, not(feature = "unstable-objfw")))]
55 pub fn method_setImplementation(method: *const objc_method, imp: IMP) -> IMP;
56}