bare::ffi::objc::subclass
API 參考只有英文版,由標準函式庫原始碼中的英文文件註解產生。
classes made at run time
(objc_allocateClassPair): Nabi functions as an Objective-C class's
methods, for delegates and the classes an API wants subclassed.
A method's implementation is an extern "C" fn(this: CPtr<u8>, cmd: Sel, ..) with the arguments its selector takes; types is its
Objective-C type encoding ("v@:@": returns void, takes self,
_cmd and an object).
Structs
ClassBuilderSource
pub struct ClassBuilderA class being made: add its methods and protocols, then register.
A new class
namewhose superclass issup;nonewhen a class of that name exists.Method
selrunningimp, the address of anextern "C" fntaking the receiver, the selector andsel's arguments, of type encodingtypes. A method of the superclass it overrides must have its signature.Safety:
impis such a function, andtypessays its signature.Conform to protocol
name(NSApplicationDelegate), which a linked framework declares.Register the class with the runtime; its class object, whose
alloc/newmake instances.