X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fregistry.h;h=52ea55a6f7d8f55d6ca9164d297d4167cade3664;hb=71c8242a8242eeb6e8b6dcf57239550a6f35c88a;hp=2b916fa1e7dfe75b6cedae4de33fa2c9d855dd4d;hpb=91f2889c15fa9cd7290b840beae49218131b5636;p=swftools.git diff --git a/lib/as3/registry.h b/lib/as3/registry.h index 2b916fa..52ea55a 100644 --- a/lib/as3/registry.h +++ b/lib/as3/registry.h @@ -30,11 +30,14 @@ DECLARE(slotinfo); DECLARE(classinfo); DECLARE(memberinfo); DECLARE(methodinfo); +DECLARE(unresolvedinfo); DECLARE(varinfo); DECLARE_LIST(classinfo); +DECLARE_LIST(slotinfo); /* member/class flags */ #define FLAG_FINAL 1 +#define FLAG_BUILTIN 128 /* member flags */ #define FLAG_STATIC 2 @@ -48,6 +51,7 @@ DECLARE_LIST(classinfo); #define INFOTYPE_SLOT 1 #define INFOTYPE_METHOD 2 #define INFOTYPE_CLASS 3 +#define INFOTYPE_UNRESOLVED 4 #define SUBTYPE_GET 1 #define SUBTYPE_SET 2 #define SUBTYPE_GETSET 3 @@ -58,6 +62,13 @@ struct _slotinfo { const char*name; int slot; }; +struct _unresolvedinfo { + U8 kind,subtype,flags,access; + const char*package; + const char*name; + int slot; + namespace_list_t*nsset; +}; struct _classinfo { U8 kind,subtype,flags,access; const char*package; @@ -104,14 +115,18 @@ char slotinfo_equals(slotinfo_t*c1, slotinfo_t*c2); void registry_init(); classinfo_t* classinfo_register(int access, const char*package, const char*name, int num_interfaces); -methodinfo_t* methodinfo_register_onclass(classinfo_t*cls, U8 access, const char*name); +methodinfo_t* methodinfo_register_onclass(classinfo_t*cls, U8 access, const char*ns, const char*name); methodinfo_t* methodinfo_register_global(U8 access, const char*package, const char*name); -varinfo_t* varinfo_register_onclass(classinfo_t*cls, U8 access, const char*name); +varinfo_t* varinfo_register_onclass(classinfo_t*cls, U8 access, const char*ns, const char*name); varinfo_t* varinfo_register_global(U8 access, const char*package, const char*name); +slotinfo_t* registry_resolve(slotinfo_t*s); +void registry_resolve_all(); + slotinfo_t* registry_find(const char*package, const char*name); void registry_dump(); -memberinfo_t* registry_findmember(classinfo_t*cls, const char*name, char superclasses); +memberinfo_t* registry_findmember(classinfo_t*cls, const char*ns, const char*name, char superclasses); +memberinfo_t* registry_findmember_nsset(classinfo_t*cls, namespace_list_t*ns, const char*name, char superclasses); void registry_fill_multiname(multiname_t*m, namespace_t*n, slotinfo_t*c); multiname_t* classinfo_to_multiname(slotinfo_t*cls); @@ -137,6 +152,7 @@ classinfo_t* registry_getregexpclass(); classinfo_t* registry_getbooleanclass(); classinfo_t* registry_getMovieClip(); classinfo_t* registry_getclassclass(classinfo_t*a); +classinfo_t* registry_getnamespaceclass(); char* infotypename(slotinfo_t*s); @@ -158,6 +174,8 @@ char* infotypename(slotinfo_t*s); #define TYPE_IS_STRING(t) ((t) == registry_getstringclass()) #define TYPE_REGEXP registry_getregexpclass() #define TYPE_IS_REGEXP(t) ((t) == registry_getregexpclass()) +#define TYPE_NAMESPACE registry_getnamespaceclass() +#define TYPE_IS_NAMESPACE(t) ((t) == registry_getnamespaceclass()) #define TYPE_OBJECT registry_getobjectclass()