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.