fix build for --disable-gtk-doc
[swfdec.git] / swfdec / swfdec_as_interpret.h
blobf7a77a2061b1596907336f098b53a9122c1e2ef3
1 /* Swfdec
2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef _SWFDEC_AS_INTERPRET_H_
21 #define _SWFDEC_AS_INTERPRET_H_
23 #include <swfdec/swfdec_as_types.h>
25 G_BEGIN_DECLS
27 typedef struct {
28 const char * name; /* name identifying the action */
29 int remove; /* values removed from stack or -1 for dynamic */
30 int add; /* values added to the stack or -1 for dynamic */
31 void (* exec) (SwfdecAsContext *cx, guint action, const guint8 *data, guint len);
32 guint version; /* the version this action was introduced in */
33 } SwfdecActionSpec;
35 extern const SwfdecActionSpec swfdec_as_actions[256];
37 /* all known actions */
38 typedef enum {
39 SWFDEC_AS_ACTION_END = 0x00,
40 SWFDEC_AS_ACTION_NEXT_FRAME = 0x04,
41 SWFDEC_AS_ACTION_PREVIOUS_FRAME = 0x05,
42 SWFDEC_AS_ACTION_PLAY = 0x06,
43 SWFDEC_AS_ACTION_STOP = 0x07,
44 SWFDEC_AS_ACTION_TOGGLE_QUALITY = 0x08,
45 SWFDEC_AS_ACTION_STOP_SOUNDS = 0x09,
46 SWFDEC_AS_ACTION_ADD = 0x0A,
47 SWFDEC_AS_ACTION_SUBTRACT = 0x0B,
48 SWFDEC_AS_ACTION_MULTIPLY = 0x0C,
49 SWFDEC_AS_ACTION_DIVIDE = 0x0D,
50 SWFDEC_AS_ACTION_EQUALS = 0x0E,
51 SWFDEC_AS_ACTION_LESS = 0x0F,
52 SWFDEC_AS_ACTION_AND = 0x10,
53 SWFDEC_AS_ACTION_OR = 0x11,
54 SWFDEC_AS_ACTION_NOT = 0x12,
55 SWFDEC_AS_ACTION_STRING_EQUALS = 0x13,
56 SWFDEC_AS_ACTION_STRING_LENGTH = 0x14,
57 SWFDEC_AS_ACTION_STRING_EXTRACT = 0x15,
58 SWFDEC_AS_ACTION_POP = 0x17,
59 SWFDEC_AS_ACTION_TO_INTEGER = 0x18,
60 SWFDEC_AS_ACTION_GET_VARIABLE = 0x1C,
61 SWFDEC_AS_ACTION_SET_VARIABLE = 0x1D,
62 SWFDEC_AS_ACTION_SET_TARGET2 = 0x20,
63 SWFDEC_AS_ACTION_STRING_ADD = 0x21,
64 SWFDEC_AS_ACTION_GET_PROPERTY = 0x22,
65 SWFDEC_AS_ACTION_SET_PROPERTY = 0x23,
66 SWFDEC_AS_ACTION_CLONE_SPRITE = 0x24,
67 SWFDEC_AS_ACTION_REMOVE_SPRITE = 0x25,
68 SWFDEC_AS_ACTION_TRACE = 0x26,
69 SWFDEC_AS_ACTION_START_DRAG = 0x27,
70 SWFDEC_AS_ACTION_END_DRAG = 0x28,
71 SWFDEC_AS_ACTION_STRING_LESS = 0x29,
72 SWFDEC_AS_ACTION_THROW = 0x2A,
73 SWFDEC_AS_ACTION_CAST = 0x2B,
74 SWFDEC_AS_ACTION_IMPLEMENTS = 0x2C,
75 SWFDEC_AS_ACTION_RANDOM = 0x30,
76 SWFDEC_AS_ACTION_MB_STRING_LENGTH = 0x31,
77 SWFDEC_AS_ACTION_CHAR_TO_ASCII = 0x32,
78 SWFDEC_AS_ACTION_ASCII_TO_CHAR = 0x33,
79 SWFDEC_AS_ACTION_GET_TIME = 0x34,
80 SWFDEC_AS_ACTION_MB_STRING_EXTRACT = 0x35,
81 SWFDEC_AS_ACTION_MB_CHAR_TO_ASCII = 0x36,
82 SWFDEC_AS_ACTION_MB_ASCII_TO_CHAR = 0x37,
83 SWFDEC_AS_ACTION_DELETE = 0x3A,
84 SWFDEC_AS_ACTION_DELETE2 = 0x3B,
85 SWFDEC_AS_ACTION_DEFINE_LOCAL = 0x3C,
86 SWFDEC_AS_ACTION_CALL_FUNCTION = 0x3D,
87 SWFDEC_AS_ACTION_RETURN = 0x3E,
88 SWFDEC_AS_ACTION_MODULO = 0x3F,
89 SWFDEC_AS_ACTION_NEW_OBJECT = 0x40,
90 SWFDEC_AS_ACTION_DEFINE_LOCAL2 = 0x41,
91 SWFDEC_AS_ACTION_INIT_ARRAY = 0x42,
92 SWFDEC_AS_ACTION_INIT_OBJECT = 0x43,
93 SWFDEC_AS_ACTION_TYPE_OF = 0x44,
94 SWFDEC_AS_ACTION_TARGET_PATH = 0x45,
95 SWFDEC_AS_ACTION_ENUMERATE = 0x46,
96 SWFDEC_AS_ACTION_ADD2 = 0x47,
97 SWFDEC_AS_ACTION_LESS2 = 0x48,
98 SWFDEC_AS_ACTION_EQUALS2 = 0x49,
99 SWFDEC_AS_ACTION_TO_NUMBER = 0x4A,
100 SWFDEC_AS_ACTION_TO_STRING = 0x4B,
101 SWFDEC_AS_ACTION_PUSH_DUPLICATE = 0x4C,
102 SWFDEC_AS_ACTION_SWAP = 0x4D,
103 SWFDEC_AS_ACTION_GET_MEMBER = 0x4E,
104 SWFDEC_AS_ACTION_SET_MEMBER = 0x4F,
105 SWFDEC_AS_ACTION_INCREMENT = 0x50,
106 SWFDEC_AS_ACTION_DECREMENT = 0x51,
107 SWFDEC_AS_ACTION_CALL_METHOD = 0x52,
108 SWFDEC_AS_ACTION_NEW_METHOD = 0x53,
109 SWFDEC_AS_ACTION_INSTANCE_OF = 0x54,
110 SWFDEC_AS_ACTION_ENUMERATE2 = 0x55,
111 SWFDEC_AS_ACTION_BREAKPOINT = 0x5F,
112 SWFDEC_AS_ACTION_BIT_AND = 0x60,
113 SWFDEC_AS_ACTION_BIT_OR = 0x61,
114 SWFDEC_AS_ACTION_BIT_XOR = 0x62,
115 SWFDEC_AS_ACTION_BIT_LSHIFT = 0x63,
116 SWFDEC_AS_ACTION_BIT_RSHIFT = 0x64,
117 SWFDEC_AS_ACTION_BIT_URSHIFT = 0x65,
118 SWFDEC_AS_ACTION_STRICT_EQUALS = 0x66,
119 SWFDEC_AS_ACTION_GREATER = 0x67,
120 SWFDEC_AS_ACTION_STRING_GREATER = 0x68,
121 SWFDEC_AS_ACTION_EXTENDS = 0x69,
122 SWFDEC_AS_ACTION_GOTO_FRAME = 0x81,
123 SWFDEC_AS_ACTION_GET_URL = 0x83,
124 SWFDEC_AS_ACTION_STORE_REGISTER = 0x87,
125 SWFDEC_AS_ACTION_CONSTANT_POOL = 0x88,
126 SWFDEC_AS_ACTION_STRICT_MODE = 0x89,
127 SWFDEC_AS_ACTION_WAIT_FOR_FRAME = 0x8A,
128 SWFDEC_AS_ACTION_SET_TARGET = 0x8B,
129 SWFDEC_AS_ACTION_GOTO_LABEL = 0x8C,
130 SWFDEC_AS_ACTION_WAIT_FOR_FRAME2 = 0x8D,
131 SWFDEC_AS_ACTION_DEFINE_FUNCTION2 = 0x8E,
132 SWFDEC_AS_ACTION_TRY = 0x8F,
133 SWFDEC_AS_ACTION_WITH = 0x94,
134 SWFDEC_AS_ACTION_PUSH = 0x96,
135 SWFDEC_AS_ACTION_JUMP = 0x99,
136 SWFDEC_AS_ACTION_GET_URL2 = 0x9A,
137 SWFDEC_AS_ACTION_DEFINE_FUNCTION = 0x9B,
138 SWFDEC_AS_ACTION_IF = 0x9D,
139 SWFDEC_AS_ACTION_CALL = 0x9E,
140 SWFDEC_AS_ACTION_GOTO_FRAME2 = 0x9F
141 } SwfdecAsAction;
143 // FIXME: move
144 SwfdecAsObject * swfdec_action_lookup_object (SwfdecAsContext * cx,
145 SwfdecAsObject * o,
146 const char * path,
147 const char * end);
149 G_END_DECLS
150 #endif