Runtime
module Protocol : sig ... end
module Inspect : sig ... end
module Objc_type : sig ... end
module Define : sig ... end
module Sel : sig ... end
module Object : sig ... end
val selector :
string ->
Runtime__.Type_description.Types.objc_selector Ctypes.structure
Ctypes_static.ptr
Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value. If the method name has already been registered, this function simply returns the selector.
val string_of_selector :
Runtime__.Type_description.Types.objc_selector Ctypes.structure
Ctypes_static.ptr ->
string
Returns the selector name as string.
module Objc : sig ... end
val nil : Objc.objc_object Ctypes.structure Ctypes_static.ptr
val alloc :
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr
Returns a new instance of the receiving class.
val _new_ :
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr
Allocates a new instance of the receiving class, sends it an init message, and returns the initialized object.
val init :
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr
Implemented by subclasses to initialize a new object (the receiver) immediately after memory for it has been allocated.
val _copy_ :
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr
Returns the object returned by copyWithZone:
val retain :
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr
Increments the receiver’s reference count.
val release : Objc.objc_object Ctypes.structure Ctypes_static.ptr -> unit
Decrements the receiver’s reference count.
val autorelease : Objc.objc_object Ctypes.structure Ctypes_static.ptr -> unit
Decrements the receiver’s retain count at the end of the current autorelease pool block.
val gc_autorelease :
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr
Release ObjC object when OCaml ptr is garbage collected.
val alloc_object :
string ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr
Allocates an object given a class name.
val new_object : string -> Objc.objc_object Ctypes.structure Ctypes_static.ptr
Allocates an object and sends it init
and gc_autorelease
.
val new_string : string -> Objc.objc_object Ctypes.structure Ctypes_static.ptr
Creates a new NSString object autoreleased by OCaml's GC.
val msg_send :
Objc.objc_selector Ctypes.structure Ctypes_static.ptr ->
self:Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
args:('a, 'b) Objc_type.tlist ->
return:'b Objc_type.t ->
'a
Sends a message with a simple return value to an instance of a class.
val msg_super :
Objc.objc_selector Ctypes.structure Ctypes_static.ptr ->
self:
Runtime__.Type_description.Types.objc_object Ctypes.structure
Ctypes_static.ptr ->
args:('a, 'b) Objc_type.tlist ->
return:'b Objc_type.t ->
'a
Sends a message with a simple return value to the superclass of an instance of a class.
val get_ivar :
'a. string ->
'a Objc_type.t ->
Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes.ptr ->
'a
Returns the value of an ivar reading it directly.
val set_ivar :
'a. string ->
'a ->
'a Objc_type.t ->
Runtime__.Type_description.Types.objc_object Ctypes.structure Ctypes.ptr ->
unit
Sets the value of an ivar writing it directly.
val get_property :
string ->
'a Objc.typ ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
'a
val set_property :
string ->
'a ->
'a Objc.typ ->
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
unit
module Property : sig ... end
module Class : sig ... end
module Bitmask : sig ... end
Represents a set of options or flags using a single integer value.
module Block_descriptor : sig ... end
module Block : sig ... end
Represents a single task or unit of behavior. Blocks are Objective-C objects, which means they can be added to collections like NSArray
or NSDictionary
.
module Method : sig ... end
module Ivar : sig ... end
val set_uncaught_exception_handler :
(Runtime__.Type_description.Types.objc_object Ctypes.structure
Ctypes_static.ptr ->
unit) ->
unit
Changes the top-level error handler.
val default_uncaught_exception_handler :
Objc.objc_object Ctypes.structure Ctypes_static.ptr ->
'a