1#[cfg(any(doc, not(feature = "unstable-objfw")))]
2use core::ffi::c_void;
3use std::os::raw::c_char;
4
5#[cfg(any(doc, not(feature = "unstable-objfw")))]
6use crate::objc_ivar;
7#[cfg(any(doc, target_vendor = "apple"))]
8use crate::BOOL;
9use crate::{objc_class, OpaqueData};
10
11#[repr(C)]
13pub struct objc_object {
14 _priv: [u8; 0],
21 _p: OpaqueData,
22}
23
24extern_c! {
25 pub fn object_getClass(obj: *const objc_object) -> *const objc_class;
26 pub fn object_getClassName(obj: *const objc_object) -> *const c_char;
27 pub fn object_setClass(obj: *mut objc_object, cls: *const objc_class) -> *const objc_class;
28 #[cfg(any(doc, target_vendor = "apple"))]
29 pub fn object_isClass(obj: *const objc_object) -> BOOL;
30
31 #[cfg(any(doc, not(feature = "unstable-objfw")))]
32 pub fn object_getIndexedIvars(obj: *const objc_object) -> *const c_void;
33 #[cfg(any(doc, not(feature = "unstable-objfw")))]
34 pub fn object_getIvar(obj: *const objc_object, ivar: *const objc_ivar) -> *const objc_object;
35 #[cfg(any(doc, not(feature = "unstable-objfw")))]
36 pub fn object_setIvar(obj: *mut objc_object, ivar: *const objc_ivar, value: *mut objc_object);
37
38 #[deprecated = "Not needed since ARC"]
39 #[cfg(any(doc, target_vendor = "apple"))]
40 pub fn object_copy(obj: *const objc_object, size: usize) -> *mut objc_object;
41
42 #[deprecated = "Not needed since ARC"]
43 #[cfg(any(doc, not(feature = "unstable-objfw")))]
44 pub fn object_dispose(obj: *mut objc_object) -> *mut objc_object;
45
46 #[deprecated = "Not needed since ARC"]
47 #[cfg(any(doc, not(feature = "unstable-objfw")))]
48 pub fn object_setInstanceVariable(
49 obj: *mut objc_object,
50 name: *const c_char,
51 value: *mut c_void,
52 ) -> *const objc_ivar;
53
54 #[deprecated = "Not needed since ARC"]
64 #[cfg(any(doc, not(feature = "unstable-objfw")))]
65 pub fn object_getInstanceVariable(
66 obj: *const objc_object,
67 name: *const c_char,
68 out_value: *mut *const c_void,
69 ) -> *const objc_ivar;
70
71 #[deprecated = "Not needed since ARC"]
72 #[cfg(any(doc, target_vendor = "apple"))]
73 pub fn objc_getFutureClass(name: *const c_char) -> *const objc_class;
74 #[deprecated = "Not needed since ARC"]
75 #[cfg(any(doc, target_vendor = "apple"))]
76 pub fn objc_constructInstance(cls: *const objc_class, bytes: *mut c_void) -> *mut objc_object;
77 #[deprecated = "Not needed since ARC"]
78 #[cfg(any(doc, target_vendor = "apple"))]
79 pub fn objc_destructInstance(obj: *mut objc_object) -> *mut c_void;
80
81 }