Module Inspect.Objc

val get_class : string -> Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr

Returns the class definition of a specified class.

val get_meta_class : string -> Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr

Returns the metaclass definition of a specified class.

val get_protocol : string -> Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr
val register_class : Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr -> unit

Registers a class that was allocated using allocate_class.

val get_class_list : Runtime__.Type_description.Types.objc_class Ctypes.structure Ctypes_static.ptr Ctypes_static.ptr -> int -> int

Obtains the list of registered class definitions. get_class_list buffer buffer_count buffer An array of Class values. On output, each Class value points to one class definition, up to either bufferCount or the total number of registered classes, whichever is less. You can pass NULL to obtain the total number of registered class definitions without actually retrieving any class definitions.

  • parameter buffer_count

    An integer value. Pass the number of pointers for which you have allocated space in buffer. On return, this function fills in only this number of elements. If this number is less than the number of registered classes, this function returns an arbitrary subset of the registered classes.

val get_protocol_list : Unsigned.uint Ctypes_static.ptr -> Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr Ctypes_static.ptr

Returns an array of all the protocols known to the runtime.

val allocate_class : ?extra_bytes:Unsigned.size_t -> superclass: Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr -> string -> Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr

Creates a new class and metaclass. extra_bytes: the number of bytes to allocate for indexed ivars at the end of the class and metaclass objects.

val copy_image_names : Unsigned.uint Ctypes_static.ptr -> string Ctypes_static.ptr

Returns the names of all the loaded Objective-C frameworks and dynamic libraries.

val copy_image_class_names : string -> Unsigned.uint Ctypes_static.ptr -> string Ctypes_static.ptr

Returns the names of all the classes within a specified library or framework.

val get_image_name : Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes_static.ptr -> string

Returns the name of the dynamic library a class originated from.