USING: alien alien.destructors alien.syntax alien.libraries generalizations kernel sequences ; IN: smoke.ffi << "lsmoke" "libsmokewrapper.so" "cdecl" add-library >> LIBRARY: lsmoke TYPEDEF: void Smoke TYPEDEF: void StackItem TYPEDEF: short Index C-STRUCT: ModuleIndex { "Smoke*" "smoke" } { "Index" "index" } ; C-STRUCT: Class { "char*" "className" } ! Name of the class { "bool" "external" } ! Whether the class is in another module { "Index" "parents" } ! Index into inheritanceList { "void*" "classFn" } ! Calls any method in the class { "void*" "enumFn" } ! Handles enum pointers { "ushort" "flags" } ; ! ClassFlags C-STRUCT: Method { "Index" "classId" } ! Index into classes { "Index" "name" } ! Index into methodNames; real name { "Index" "args" } ! Index into argumentList { "uchar" "numArgs" } ! Number of arguments { "uchar" "flags" } ! MethodFlags (const/static/etc...) { "Index" "ret" } ! Index into types for the return type { "Index" "method" } ; ! Passed to Class.classFn, to call method C-STRUCT: Type { "char*" "name" } ! Stringified type name { "Index" "classId" } ! Index into classes. -1 for none { "ushort" "flags" } ; ! TypeFlags C-STRUCT: MethodMap { "Index" "classId" } ! Index into classes { "Index" "name" } ! Index into methodNames; munged name { "Index" "method" } ; ! Index into methods FUNCTION: void init_qt_smoke ( ) ; FUNCTION: Smoke* qt_smoke ( ) ; FUNCTION: void delete_qt_smoke ( ) ; FUNCTION: Type* smoke_types ( Smoke* s ) ; FUNCTION: Class* smoke_classes ( Smoke* s ) ; FUNCTION: Method* smoke_methods ( Smoke* s ) ; FUNCTION: Index* smoke_inheritanceList ( Smoke* s ) ; FUNCTION: Index* smoke_argumentList ( Smoke* s ) ; FUNCTION: Index* smoke_ambiguousMethodList ( Smoke* s ) ; FUNCTION: MethodMap* smoke_methodMaps ( Smoke* s ) ; FUNCTION: char** smoke_methodNames ( Smoke* s ) ; FUNCTION: Index smoke_numTypes ( Smoke* s ) ; FUNCTION: Index smoke_numClasses ( Smoke* s ) ; FUNCTION: Index smoke_numMethods ( Smoke* s ) ; FUNCTION: Index smoke_numMethodMaps ( Smoke* s ) ; FUNCTION: Index smoke_numMethodNames ( Smoke* s ) ; FUNCTION: ModuleIndex smoke_findClass ( Smoke* s, char* c ) ; FUNCTION: ModuleIndex smoke_findMethod ( Smoke* s, char* c, char* name ) ;