3 Routines for handling Flash2 AVM2 ABC Actionscript (header file)
5 Extension module for the rfxswf library.
6 Part of the swftools package.
8 Copyright (c) 2008 Matthias Kramm <kramm@quiss.org>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
31 DECLARE(abc_method_body);
32 DECLARE(abc_interface);
38 typedef struct _abc_method {
39 multiname_t*return_type;
40 multiname_list_t*parameters;
43 abc_method_body_t*body;
45 int index; //filled in during writing
56 array_t*method_bodies;
59 abc_file_t*abc_file_new();
62 #define TRAIT_METHOD 1
63 #define TRAIT_GETTER 2
64 #define TRAIT_SETTER 3
66 #define TRAIT_FUNCTION 5
71 unsigned char attributes;
82 multiname_t*type_name;
92 multiname_t*classname;
93 multiname_t*superclass;
94 const char*protectedNS;
96 multiname_list_t*interfaces;
98 abc_method_t*constructor;
101 abc_method_t*static_constructor;
103 trait_list_t*static_constructor_traits;
106 int index; //filled in during writing
109 abc_class_t* abc_class_new(abc_file_t*pool, char*classname, char*superclass);
110 void abc_class_sealed(abc_class_t*c);
111 void abc_class_final(abc_class_t*c);
112 void abc_class_interface(abc_class_t*c);
113 void abc_class_protectedNS(abc_class_t*c, char*namespace);
115 abc_method_body_t* abc_class_staticconstructor(abc_class_t*cls, char*returntype, int num_params, ...);
116 abc_method_body_t* abc_class_constructor(abc_class_t*cls, char*returntype, int num_params, ...);
117 abc_method_body_t* abc_class_method(abc_class_t*cls, char*returntype, char*name, int num_params, ...);
128 struct _abc_method_body {
135 int init_scope_depth;
140 int index; // filled in during writing
143 typedef struct _abc_label {
146 typedef struct _abc_script {
152 abc_script_t* abc_initscript(abc_file_t*pool, char*returntype, int num_params, ...);