use core::ffi::c_void;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
use std::os::raw::c_char;
use std::os::raw::c_int;
#[cfg(any(doc, target_vendor = "apple"))]
use std::os::raw::c_uint;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
use crate::{objc_AssociationPolicy, BOOL};
use crate::{objc_object, OpaqueData};
#[repr(C)]
pub struct objc_ivar {
_priv: [u8; 0],
_p: OpaqueData,
}
#[cfg(not(feature = "unstable-c-unwind"))]
type InnerImp = unsafe extern "C" fn();
#[cfg(feature = "unstable-c-unwind")]
type InnerImp = unsafe extern "C-unwind" fn();
pub type IMP = Option<InnerImp>;
extern_c_unwind! {
#[cfg(any(doc, target_vendor = "apple", feature = "unstable-objfw"))]
pub fn objc_enumerationMutation(obj: *mut objc_object);
}
extern_c! {
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn imp_getBlock(imp: IMP) -> *mut objc_object;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn imp_implementationWithBlock(block: *mut objc_object) -> IMP;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn imp_removeBlock(imp: IMP) -> BOOL;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn ivar_getName(ivar: *const objc_ivar) -> *const c_char;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn ivar_getOffset(ivar: *const objc_ivar) -> isize;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn ivar_getTypeEncoding(ivar: *const objc_ivar) -> *const c_char;
#[cfg(any(doc, target_vendor = "apple"))]
pub fn objc_copyClassNamesForImage(
image: *const c_char,
out_len: *mut c_uint,
) -> *mut *const c_char;
#[cfg(any(doc, target_vendor = "apple"))]
pub fn objc_copyImageNames(out_len: *mut c_uint) -> *mut *const c_char;
#[cfg(any(doc, target_vendor = "apple", feature = "unstable-objfw"))]
pub fn objc_setEnumerationMutationHandler(
handler: Option<unsafe extern "C" fn(obj: *mut objc_object)>,
);
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn objc_getAssociatedObject(
object: *const objc_object,
key: *const c_void,
) -> *const objc_object;
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn objc_setAssociatedObject(
object: *mut objc_object,
key: *const c_void,
value: *mut objc_object,
policy: objc_AssociationPolicy,
);
#[cfg(any(doc, not(feature = "unstable-objfw")))]
pub fn objc_removeAssociatedObjects(object: *mut objc_object);
#[cfg(any(doc, target_vendor = "apple", feature = "unstable-objfw"))]
pub fn objc_setForwardHandler(fwd: *mut c_void, fwd_stret: *mut c_void);
pub fn objc_sync_enter(obj: *mut objc_object) -> c_int;
pub fn objc_sync_exit(obj: *mut objc_object) -> c_int;
}