factor/basis/cocoa/runtime/runtime.factor

81 lines
2.4 KiB
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
! Copyright (C) 2006, 2007 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax classes.struct ;
2007-09-20 18:09:08 -04:00
IN: cocoa.runtime
TYPEDEF: void* SEL
TYPEDEF: void* id
FUNCTION: c-string sel_getName ( SEL aSelector ) ;
2007-09-20 18:09:08 -04:00
2008-09-13 12:32:47 -04:00
FUNCTION: char sel_isMapped ( SEL aSelector ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: SEL sel_registerName ( c-string str ) ;
2007-09-20 18:09:08 -04:00
TYPEDEF: void* Class
TYPEDEF: void* Method
TYPEDEF: void* Protocol
STRUCT: objc-super
{ receiver id }
{ class Class } ;
2007-09-20 18:09:08 -04:00
CONSTANT: CLS_CLASS HEX: 1
CONSTANT: CLS_META HEX: 2
CONSTANT: CLS_INITIALIZED HEX: 4
CONSTANT: CLS_POSING HEX: 8
CONSTANT: CLS_MAPPED HEX: 10
CONSTANT: CLS_FLUSH_CACHE HEX: 20
CONSTANT: CLS_GROW_CACHE HEX: 40
CONSTANT: CLS_NEED_BIND HEX: 80
CONSTANT: CLS_METHOD_ARRAY HEX: 100
2007-09-20 18:09:08 -04:00
FUNCTION: int objc_getClassList ( void* buffer, int bufferLen ) ;
FUNCTION: Class objc_getClass ( c-string class ) ;
FUNCTION: Class objc_getMetaClass ( c-string class ) ;
FUNCTION: Protocol objc_getProtocol ( c-string class ) ;
FUNCTION: Class objc_allocateClassPair ( Class superclass, c-string name, size_t extraBytes ) ;
2008-09-09 01:47:20 -04:00
FUNCTION: void objc_registerClassPair ( Class cls ) ;
FUNCTION: id class_createInstance ( Class class, uint additionalByteCount ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: id class_createInstanceFromZone ( Class class, uint additionalByteCount, void* zone ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: Method class_getInstanceMethod ( Class class, SEL selector ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: Method class_getClassMethod ( Class class, SEL selector ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: Method* class_copyMethodList ( Class class, uint* outCount ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: Class class_getSuperclass ( Class cls ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: c-string class_getName ( Class cls ) ;
2008-09-13 12:32:47 -04:00
FUNCTION: char class_addMethod ( Class class, SEL name, void* imp, void* types ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: char class_addProtocol ( Class class, Protocol protocol ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: uint method_getNumberOfArguments ( Method method ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: uint method_getSizeOfArguments ( Method method ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: uint method_getArgumentInfo ( Method method, int argIndex, c-string* type, int* offset ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: void* method_copyReturnType ( Method method ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: void* method_copyArgumentType ( Method method, uint index ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: void* method_getTypeEncoding ( Method method ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: SEL method_getName ( Method method ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: void* method_setImplementation ( Method method, void* imp ) ;
2008-09-13 12:32:47 -04:00
FUNCTION: void* method_getImplementation ( Method method ) ;
2007-09-20 18:09:08 -04:00
FUNCTION: Class object_getClass ( id object ) ;