14
14
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
17
<refsynopsisdiv role="synopsis">
17
<refsynopsisdiv id="SwfdecAsObject.synopsis" role="synopsis">
18
18
<title role="synopsis.title">Synopsis</title>
22
22
#include <swfdec/swfdec.h>
25
24
<link linkend="SwfdecAsObject-struct">SwfdecAsObject</link>;
26
25
<link linkend="SwfdecAsObject">SwfdecAsObject</link>* <link linkend="swfdec-as-object-new">swfdec_as_object_new</link> (<link linkend="SwfdecAsContext">SwfdecAsContext</link> *context);
27
26
<link linkend="SwfdecAsObject">SwfdecAsObject</link>* <link linkend="swfdec-as-object-new-empty">swfdec_as_object_new_empty</link> (<link linkend="SwfdecAsContext">SwfdecAsContext</link> *context);
95
94
<link linkend="SwfdecAsObject">SwfdecAsObject</link> *prototype);
96
95
<link linkend="char">char</link>* <link linkend="swfdec-as-object-get-debug">swfdec_as_object_get_debug</link> (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object);
97
96
<link linkend="SwfdecAsObject">SwfdecAsObject</link>* <link linkend="swfdec-as-object-resolve">swfdec_as_object_resolve</link> (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object);
102
<refsect1 role="object_hierarchy">
100
<refsect1 id="SwfdecAsObject.object-hierarchy" role="object_hierarchy">
103
101
<title role="object_hierarchy.title">Object Hierarchy</title>
106
103
<link linkend="GObject">GObject</link>
107
104
+----SwfdecAsObject
108
105
+----<link linkend="SwfdecAsArray">SwfdecAsArray</link>
141
<refsect1 role="details">
138
<refsect1 id="SwfdecAsObject.details" role="details">
142
139
<title role="details.title">Details</title>
144
<title><anchor id="SwfdecAsObject-struct" role="struct"/>SwfdecAsObject</title>
145
<indexterm><primary>SwfdecAsObject</primary></indexterm><programlisting>typedef struct _SwfdecAsObject SwfdecAsObject;</programlisting>
140
<refsect2 id="SwfdecAsObject-struct" role="struct">
141
<title>SwfdecAsObject</title>
142
<indexterm zone="SwfdecAsObject-struct"><primary>SwfdecAsObject</primary></indexterm><programlisting>typedef struct _SwfdecAsObject SwfdecAsObject;</programlisting>
147
144
Every object value inside the Swfdec script engine must be a SwfdecAsObject.
148
145
If you want to add custom objects to your script engine, you need to create a
153
150
</para></refsect2>
155
<title><anchor id="swfdec-as-object-new" role="function"/>swfdec_as_object_new ()</title>
156
<indexterm><primary>swfdec_as_object_new</primary></indexterm><programlisting><link linkend="SwfdecAsObject">SwfdecAsObject</link>* swfdec_as_object_new (<link linkend="SwfdecAsContext">SwfdecAsContext</link> *context);</programlisting>
151
<refsect2 id="swfdec-as-object-new" role="function">
152
<title>swfdec_as_object_new ()</title>
153
<indexterm zone="swfdec-as-object-new"><primary>swfdec_as_object_new</primary></indexterm><programlisting><link linkend="SwfdecAsObject">SwfdecAsObject</link>* swfdec_as_object_new (<link linkend="SwfdecAsContext">SwfdecAsContext</link> *context);</programlisting>
158
155
Allocates a new Object. This does the same as the Actionscript code
159
156
"new <link linkend="Object"><function>Object()</function></link>".</para>
166
163
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the new object or NULL on out of memory.
167
164
</simpara></listitem></varlistentry>
168
165
</variablelist></refsect2>
170
<title><anchor id="swfdec-as-object-new-empty" role="function"/>swfdec_as_object_new_empty ()</title>
171
<indexterm><primary>swfdec_as_object_new_empty</primary></indexterm><programlisting><link linkend="SwfdecAsObject">SwfdecAsObject</link>* swfdec_as_object_new_empty (<link linkend="SwfdecAsContext">SwfdecAsContext</link> *context);</programlisting>
166
<refsect2 id="swfdec-as-object-new-empty" role="function">
167
<title>swfdec_as_object_new_empty ()</title>
168
<indexterm zone="swfdec-as-object-new-empty"><primary>swfdec_as_object_new_empty</primary></indexterm><programlisting><link linkend="SwfdecAsObject">SwfdecAsObject</link>* swfdec_as_object_new_empty (<link linkend="SwfdecAsContext">SwfdecAsContext</link> *context);</programlisting>
173
170
Creates an empty object. The prototype and constructor properties of the
174
171
returned object will not be set. You probably want to call
183
180
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A new <link linkend="SwfdecAsObject"><type>SwfdecAsObject</type></link> adde to <parameter>context</parameter> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on OOM.
184
181
</simpara></listitem></varlistentry>
185
182
</variablelist></refsect2>
187
<title><anchor id="swfdec-as-object-create" role="function"/>swfdec_as_object_create ()</title>
188
<indexterm><primary>swfdec_as_object_create</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_create (<link linkend="SwfdecAsFunction">SwfdecAsFunction</link> *fun,
183
<refsect2 id="swfdec-as-object-create" role="function">
184
<title>swfdec_as_object_create ()</title>
185
<indexterm zone="swfdec-as-object-create"><primary>swfdec_as_object_create</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_create (<link linkend="SwfdecAsFunction">SwfdecAsFunction</link> *fun,
189
186
<link linkend="guint">guint</link> n_args,
190
187
const <link linkend="SwfdecAsValue">SwfdecAsValue</link> *args,
191
188
<link linkend="SwfdecAsValue">SwfdecAsValue</link> *return_value);</programlisting>
211
208
</simpara></listitem></varlistentry>
212
209
</variablelist></refsect2>
214
<title><anchor id="swfdec-as-object-add" role="function"/>swfdec_as_object_add ()</title>
215
<indexterm><primary>swfdec_as_object_add</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_add (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
210
<refsect2 id="swfdec-as-object-add" role="function">
211
<title>swfdec_as_object_add ()</title>
212
<indexterm zone="swfdec-as-object-add"><primary>swfdec_as_object_add</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_add (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
216
213
<link linkend="SwfdecAsContext">SwfdecAsContext</link> *context,
217
214
<link linkend="gsize">gsize</link> size);</programlisting>
234
231
<listitem><simpara> size the object currently uses
235
232
</simpara></listitem></varlistentry>
236
233
</variablelist></refsect2>
238
<title><anchor id="swfdec-as-object-set-constructor" role="function"/>swfdec_as_object_set_constructor ()</title>
239
<indexterm><primary>swfdec_as_object_set_constructor</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_set_constructor (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
234
<refsect2 id="swfdec-as-object-set-constructor" role="function">
235
<title>swfdec_as_object_set_constructor ()</title>
236
<indexterm zone="swfdec-as-object-set-constructor"><primary>swfdec_as_object_set_constructor</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_set_constructor (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
240
237
<link linkend="SwfdecAsObject">SwfdecAsObject</link> *construct);</programlisting>
242
239
Sets the constructor variables for <parameter>object</parameter>. Most objects get these
255
252
<listitem><simpara> the constructor of <parameter>object</parameter>
256
253
</simpara></listitem></varlistentry>
257
254
</variablelist></refsect2>
259
<title><anchor id="SwfdecAsVariableFlag" role="enum"/>enum SwfdecAsVariableFlag</title>
260
<indexterm><primary>SwfdecAsVariableFlag</primary></indexterm><programlisting>typedef enum {
255
<refsect2 id="SwfdecAsVariableFlag" role="enum">
256
<title>enum SwfdecAsVariableFlag</title>
257
<indexterm zone="SwfdecAsVariableFlag"><primary>SwfdecAsVariableFlag</primary></indexterm><programlisting>typedef enum {
261
258
SWFDEC_AS_VARIABLE_HIDDEN = (1 << 0),
262
259
SWFDEC_AS_VARIABLE_PERMANENT = (1 << 1),
263
260
SWFDEC_AS_VARIABLE_CONSTANT = (1 << 2),
277
274
</para><variablelist role="enum">
279
<term><anchor id="SWFDEC-AS-VARIABLE-HIDDEN:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_HIDDEN</literal></term>
275
<varlistentry id="SWFDEC-AS-VARIABLE-HIDDEN:CAPS" role="constant">
276
<term><literal>SWFDEC_AS_VARIABLE_HIDDEN</literal></term>
280
277
<listitem><simpara> Do not include variable in enumerations and
281
278
<link linkend="swfdec-as-object-foreach"><function>swfdec_as_object_foreach()</function></link>.
282
279
</simpara></listitem>
285
<term><anchor id="SWFDEC-AS-VARIABLE-PERMANENT:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_PERMANENT</literal></term>
281
<varlistentry id="SWFDEC-AS-VARIABLE-PERMANENT:CAPS" role="constant">
282
<term><literal>SWFDEC_AS_VARIABLE_PERMANENT</literal></term>
286
283
<listitem><simpara> Do not allow <link linkend="swfdec-as-object-delete-variable"><function>swfdec_as_object_delete_variable()</function></link>
287
284
to delete this variable.
288
285
</simpara></listitem>
291
<term><anchor id="SWFDEC-AS-VARIABLE-CONSTANT:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_CONSTANT</literal></term>
287
<varlistentry id="SWFDEC-AS-VARIABLE-CONSTANT:CAPS" role="constant">
288
<term><literal>SWFDEC_AS_VARIABLE_CONSTANT</literal></term>
292
289
<listitem><simpara> Do not allow changing the value with
293
290
<link linkend="swfdec-as-object-set-variable"><function>swfdec_as_object_set_variable()</function></link>.
294
291
</simpara></listitem>
297
<term><anchor id="SWFDEC-AS-VARIABLE-VERSION-6-UP:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_VERSION_6_UP</literal></term>
293
<varlistentry id="SWFDEC-AS-VARIABLE-VERSION-6-UP:CAPS" role="constant">
294
<term><literal>SWFDEC_AS_VARIABLE_VERSION_6_UP</literal></term>
298
295
<listitem><simpara> This symbol is only visible in version 6
300
297
</simpara></listitem>
303
<term><anchor id="SWFDEC-AS-VARIABLE-VERSION-NOT-6:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_VERSION_NOT_6</literal></term>
299
<varlistentry id="SWFDEC-AS-VARIABLE-VERSION-NOT-6:CAPS" role="constant">
300
<term><literal>SWFDEC_AS_VARIABLE_VERSION_NOT_6</literal></term>
304
301
<listitem><simpara> This symbols is visible in all versions
306
303
</simpara></listitem>
309
<term><anchor id="SWFDEC-AS-VARIABLE-VERSION-7-UP:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_VERSION_7_UP</literal></term>
305
<varlistentry id="SWFDEC-AS-VARIABLE-VERSION-7-UP:CAPS" role="constant">
306
<term><literal>SWFDEC_AS_VARIABLE_VERSION_7_UP</literal></term>
310
307
<listitem><simpara> This symbol is only visible in version 7
312
309
</simpara></listitem>
315
<term><anchor id="SWFDEC-AS-VARIABLE-VERSION-8-UP:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_VERSION_8_UP</literal></term>
311
<varlistentry id="SWFDEC-AS-VARIABLE-VERSION-8-UP:CAPS" role="constant">
312
<term><literal>SWFDEC_AS_VARIABLE_VERSION_8_UP</literal></term>
316
313
<listitem><simpara> This symbol is only visible in version 8
318
315
</simpara></listitem>
321
<term><anchor id="SWFDEC-AS-VARIABLE-VERSION-9-UP:CAPS" role="constant"/><literal>SWFDEC_AS_VARIABLE_VERSION_9_UP</literal></term>
317
<varlistentry id="SWFDEC-AS-VARIABLE-VERSION-9-UP:CAPS" role="constant">
318
<term><literal>SWFDEC_AS_VARIABLE_VERSION_9_UP</literal></term>
322
319
<listitem><simpara> This symbol is only visible in version 9
324
321
</simpara></listitem>
326
323
</variablelist></refsect2>
328
<title><anchor id="swfdec-as-object-get-variable" role="macro"/>swfdec_as_object_get_variable()</title>
329
<indexterm><primary>swfdec_as_object_get_variable</primary></indexterm><programlisting>#define swfdec_as_object_get_variable(object, variable, value)</programlisting>
324
<refsect2 id="swfdec-as-object-get-variable" role="macro">
325
<title>swfdec_as_object_get_variable()</title>
326
<indexterm zone="swfdec-as-object-get-variable"><primary>swfdec_as_object_get_variable</primary></indexterm><programlisting>#define swfdec_as_object_get_variable(object, variable, value)</programlisting>
331
328
Gets the value of the given <parameter>variable</parameter> on <parameter>object</parameter>. It walks the prototype
332
329
chain. This is a shortcut macro for
344
341
<listitem><simpara> pointer to a <link linkend="SwfdecAsValue"><type>SwfdecAsValue</type></link> that takes the return value or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
345
342
</simpara></listitem></varlistentry>
346
343
</variablelist></refsect2>
348
<title><anchor id="swfdec-as-object-get-variable-and-flags" role="function"/>swfdec_as_object_get_variable_and_flags ()</title>
349
<indexterm><primary>swfdec_as_object_get_variable_and_flags</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> swfdec_as_object_get_variable_and_flags
344
<refsect2 id="swfdec-as-object-get-variable-and-flags" role="function">
345
<title>swfdec_as_object_get_variable_and_flags ()</title>
346
<indexterm zone="swfdec-as-object-get-variable-and-flags"><primary>swfdec_as_object_get_variable_and_flags</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> swfdec_as_object_get_variable_and_flags
350
347
(<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
351
348
const <link linkend="char">char</link> *variable,
352
349
<link linkend="SwfdecAsValue">SwfdecAsValue</link> *value,
378
375
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the variable exists, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise
379
376
</simpara></listitem></varlistentry>
380
377
</variablelist></refsect2>
382
<title><anchor id="swfdec-as-object-set-variable" role="macro"/>swfdec_as_object_set_variable()</title>
383
<indexterm><primary>swfdec_as_object_set_variable</primary></indexterm><programlisting>#define swfdec_as_object_set_variable(object, variable, value)</programlisting>
378
<refsect2 id="swfdec-as-object-set-variable" role="macro">
379
<title>swfdec_as_object_set_variable()</title>
380
<indexterm zone="swfdec-as-object-set-variable"><primary>swfdec_as_object_set_variable</primary></indexterm><programlisting>#define swfdec_as_object_set_variable(object, variable, value)</programlisting>
385
382
Sets a variable on <parameter>object</parameter>. It is not guaranteed that getting the variable
386
383
after setting it results in the same value. This is a mcaro that calls
398
395
<listitem><simpara> value to set the variable to
399
396
</simpara></listitem></varlistentry>
400
397
</variablelist></refsect2>
402
<title><anchor id="swfdec-as-object-set-variable-and-flags" role="function"/>swfdec_as_object_set_variable_and_flags ()</title>
403
<indexterm><primary>swfdec_as_object_set_variable_and_flags</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_set_variable_and_flags
398
<refsect2 id="swfdec-as-object-set-variable-and-flags" role="function">
399
<title>swfdec_as_object_set_variable_and_flags ()</title>
400
<indexterm zone="swfdec-as-object-set-variable-and-flags"><primary>swfdec_as_object_set_variable_and_flags</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_set_variable_and_flags
404
401
(<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
405
402
const <link linkend="char">char</link> *variable,
406
403
const <link linkend="SwfdecAsValue">SwfdecAsValue</link> *value,
427
424
be ignored if the property already exists.
428
425
</simpara></listitem></varlistentry>
429
426
</variablelist></refsect2>
431
<title><anchor id="swfdec-as-object-add-variable" role="function"/>swfdec_as_object_add_variable ()</title>
432
<indexterm><primary>swfdec_as_object_add_variable</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_add_variable (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
427
<refsect2 id="swfdec-as-object-add-variable" role="function">
428
<title>swfdec_as_object_add_variable ()</title>
429
<indexterm zone="swfdec-as-object-add-variable"><primary>swfdec_as_object_add_variable</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_add_variable (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
433
430
const <link linkend="char">char</link> *variable,
434
431
<link linkend="SwfdecAsFunction">SwfdecAsFunction</link> *get,
435
432
<link linkend="SwfdecAsFunction">SwfdecAsFunction</link> *set,
459
456
be ignored if the property already exists.
460
457
</simpara></listitem></varlistentry>
461
458
</variablelist></refsect2>
463
<title><anchor id="swfdec-as-object-set-variable-flags" role="function"/>swfdec_as_object_set_variable_flags ()</title>
464
<indexterm><primary>swfdec_as_object_set_variable_flags</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_set_variable_flags (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
459
<refsect2 id="swfdec-as-object-set-variable-flags" role="function">
460
<title>swfdec_as_object_set_variable_flags ()</title>
461
<indexterm zone="swfdec-as-object-set-variable-flags"><primary>swfdec_as_object_set_variable_flags</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_set_variable_flags (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
465
462
const <link linkend="char">char</link> *variable,
466
463
<link linkend="SwfdecAsVariableFlag">SwfdecAsVariableFlag</link> flags);</programlisting>
479
476
<listitem><simpara> flags to set
480
477
</simpara></listitem></varlistentry>
481
478
</variablelist></refsect2>
483
<title><anchor id="swfdec-as-object-unset-variable-flags" role="function"/>swfdec_as_object_unset_variable_flags ()</title>
484
<indexterm><primary>swfdec_as_object_unset_variable_flags</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_unset_variable_flags
479
<refsect2 id="swfdec-as-object-unset-variable-flags" role="function">
480
<title>swfdec_as_object_unset_variable_flags ()</title>
481
<indexterm zone="swfdec-as-object-unset-variable-flags"><primary>swfdec_as_object_unset_variable_flags</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_unset_variable_flags
485
482
(<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
486
483
const <link linkend="char">char</link> *variable,
487
484
<link linkend="SwfdecAsVariableFlag">SwfdecAsVariableFlag</link> flags);</programlisting>
501
498
<listitem><simpara> flags to unset
502
499
</simpara></listitem></varlistentry>
503
500
</variablelist></refsect2>
505
<title><anchor id="swfdec-as-object-has-variable" role="function"/>swfdec_as_object_has_variable ()</title>
506
<indexterm><primary>swfdec_as_object_has_variable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> swfdec_as_object_has_variable (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
501
<refsect2 id="swfdec-as-object-has-variable" role="function">
502
<title>swfdec_as_object_has_variable ()</title>
503
<indexterm zone="swfdec-as-object-has-variable"><primary>swfdec_as_object_has_variable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> swfdec_as_object_has_variable (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
507
504
const <link linkend="char">char</link> *variable);</programlisting>
509
506
Checks if a user-set <parameter>variable</parameter> with the given name exists on <parameter>object</parameter>. This
521
518
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>object</parameter> contains the given <parameter>variable</parameter>
522
519
</simpara></listitem></varlistentry>
523
520
</variablelist></refsect2>
525
<title><anchor id="swfdec-as-object-delete-variable" role="function"/>swfdec_as_object_delete_variable ()</title>
526
<indexterm><primary>swfdec_as_object_delete_variable</primary></indexterm><programlisting><link linkend="SwfdecAsDeleteReturn">SwfdecAsDeleteReturn</link> swfdec_as_object_delete_variable (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
521
<refsect2 id="swfdec-as-object-delete-variable" role="function">
522
<title>swfdec_as_object_delete_variable ()</title>
523
<indexterm zone="swfdec-as-object-delete-variable"><primary>swfdec_as_object_delete_variable</primary></indexterm><programlisting><link linkend="SwfdecAsDeleteReturn">SwfdecAsDeleteReturn</link> swfdec_as_object_delete_variable (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
527
524
const <link linkend="char">char</link> *variable);</programlisting>
529
526
Deletes the given variable if possible. If the variable is protected from
540
537
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> See <link linkend="SwfdecAsDeleteReturn"><type>SwfdecAsDeleteReturn</type></link> for details of the return value.
541
538
</simpara></listitem></varlistentry>
542
539
</variablelist></refsect2>
544
<title><anchor id="swfdec-as-object-delete-all-variables" role="function"/>swfdec_as_object_delete_all_variables ()</title>
545
<indexterm><primary>swfdec_as_object_delete_all_variables</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_delete_all_variables
540
<refsect2 id="swfdec-as-object-delete-all-variables" role="function">
541
<title>swfdec_as_object_delete_all_variables ()</title>
542
<indexterm zone="swfdec-as-object-delete-all-variables"><primary>swfdec_as_object_delete_all_variables</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_delete_all_variables
546
543
(<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object);</programlisting>
548
545
Deletes all user-set variables from the given object.</para>
553
550
<listitem><simpara> a <link linkend="SwfdecAsObject"><type>SwfdecAsObject</type></link>
554
551
</simpara></listitem></varlistentry>
555
552
</variablelist></refsect2>
557
<title><anchor id="SwfdecAsVariableForeach" role="function"/>SwfdecAsVariableForeach ()</title>
558
<indexterm><primary>SwfdecAsVariableForeach</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*SwfdecAsVariableForeach) (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
553
<refsect2 id="SwfdecAsVariableForeach" role="function">
554
<title>SwfdecAsVariableForeach ()</title>
555
<indexterm zone="SwfdecAsVariableForeach"><primary>SwfdecAsVariableForeach</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> (*SwfdecAsVariableForeach) (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
559
556
const <link linkend="char">char</link> *variable,
560
557
<link linkend="SwfdecAsValue">SwfdecAsValue</link> *value,
561
558
<link linkend="guint">guint</link> flags,
583
580
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to continue running the foreach function, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> to stop
584
581
</simpara></listitem></varlistentry>
585
582
</variablelist></refsect2>
587
<title><anchor id="swfdec-as-object-foreach" role="function"/>swfdec_as_object_foreach ()</title>
588
<indexterm><primary>swfdec_as_object_foreach</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> swfdec_as_object_foreach (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
583
<refsect2 id="swfdec-as-object-foreach" role="function">
584
<title>swfdec_as_object_foreach ()</title>
585
<indexterm zone="swfdec-as-object-foreach"><primary>swfdec_as_object_foreach</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> swfdec_as_object_foreach (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
589
586
<link linkend="SwfdecAsVariableForeach">SwfdecAsVariableForeach</link> func,
590
587
<link linkend="gpointer">gpointer</link> data);</programlisting>
606
603
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>func</parameter> always returned <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>
607
604
</simpara></listitem></varlistentry>
608
605
</variablelist></refsect2>
610
<title><anchor id="swfdec-as-object-run" role="function"/>swfdec_as_object_run ()</title>
611
<indexterm><primary>swfdec_as_object_run</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_run (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
606
<refsect2 id="swfdec-as-object-run" role="function">
607
<title>swfdec_as_object_run ()</title>
608
<indexterm zone="swfdec-as-object-run"><primary>swfdec_as_object_run</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_run (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
612
609
<link linkend="SwfdecScript">SwfdecScript</link> *script);</programlisting>
614
611
Executes the given <parameter>script</parameter> with <parameter>object</parameter> as this pointer.</para>
622
619
<listitem><simpara> script to execute
623
620
</simpara></listitem></varlistentry>
624
621
</variablelist></refsect2>
626
<title><anchor id="swfdec-as-object-call" role="function"/>swfdec_as_object_call ()</title>
627
<indexterm><primary>swfdec_as_object_call</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_call (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
622
<refsect2 id="swfdec-as-object-call" role="function">
623
<title>swfdec_as_object_call ()</title>
624
<indexterm zone="swfdec-as-object-call"><primary>swfdec_as_object_call</primary></indexterm><programlisting><link linkend="void">void</link> swfdec_as_object_call (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
628
625
const <link linkend="char">char</link> *name,
629
626
<link linkend="guint">guint</link> argc,
630
627
<link linkend="SwfdecAsValue">SwfdecAsValue</link> *argv,
655
652
ignore the return value.
656
653
</simpara></listitem></varlistentry>
657
654
</variablelist></refsect2>
659
<title><anchor id="swfdec-as-object-add-function" role="function"/>swfdec_as_object_add_function ()</title>
660
<indexterm><primary>swfdec_as_object_add_function</primary></indexterm><programlisting><link linkend="SwfdecAsFunction">SwfdecAsFunction</link>* swfdec_as_object_add_function (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
655
<refsect2 id="swfdec-as-object-add-function" role="function">
656
<title>swfdec_as_object_add_function ()</title>
657
<indexterm zone="swfdec-as-object-add-function"><primary>swfdec_as_object_add_function</primary></indexterm><programlisting><link linkend="SwfdecAsFunction">SwfdecAsFunction</link>* swfdec_as_object_add_function (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
661
658
const <link linkend="char">char</link> *name,
662
659
<link linkend="GType">GType</link> type,
663
660
<link linkend="SwfdecAsNative">SwfdecAsNative</link> native,
688
685
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly created <link linkend="SwfdecAsFunction"><type>SwfdecAsFunction</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on error.
689
686
</simpara></listitem></varlistentry>
690
687
</variablelist></refsect2>
692
<title><anchor id="swfdec-as-object-add-constructor" role="function"/>swfdec_as_object_add_constructor ()</title>
693
<indexterm><primary>swfdec_as_object_add_constructor</primary></indexterm><programlisting><link linkend="SwfdecAsFunction">SwfdecAsFunction</link>* swfdec_as_object_add_constructor (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
688
<refsect2 id="swfdec-as-object-add-constructor" role="function">
689
<title>swfdec_as_object_add_constructor ()</title>
690
<indexterm zone="swfdec-as-object-add-constructor"><primary>swfdec_as_object_add_constructor</primary></indexterm><programlisting><link linkend="SwfdecAsFunction">SwfdecAsFunction</link>* swfdec_as_object_add_constructor (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object,
694
691
const <link linkend="char">char</link> *name,
695
692
<link linkend="GType">GType</link> type,
696
693
<link linkend="GType">GType</link> construct_type,
731
728
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly created <link linkend="SwfdecAsFunction"><type>SwfdecAsFunction</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on error.
732
729
</simpara></listitem></varlistentry>
733
730
</variablelist></refsect2>
735
<title><anchor id="swfdec-as-object-get-debug" role="function"/>swfdec_as_object_get_debug ()</title>
736
<indexterm><primary>swfdec_as_object_get_debug</primary></indexterm><programlisting><link linkend="char">char</link>* swfdec_as_object_get_debug (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object);</programlisting>
731
<refsect2 id="swfdec-as-object-get-debug" role="function">
732
<title>swfdec_as_object_get_debug ()</title>
733
<indexterm zone="swfdec-as-object-get-debug"><primary>swfdec_as_object_get_debug</primary></indexterm><programlisting><link linkend="char">char</link>* swfdec_as_object_get_debug (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object);</programlisting>
738
735
Gets a representation string suitable for debugging. This function is
739
736
guaranteed to not modify the state of the script engine, unlike
747
744
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly allocated string. Free it with <link linkend="g-free"><function>g_free()</function></link> after use.
748
745
</simpara></listitem></varlistentry>
749
746
</variablelist></refsect2>
751
<title><anchor id="swfdec-as-object-resolve" role="function"/>swfdec_as_object_resolve ()</title>
752
<indexterm><primary>swfdec_as_object_resolve</primary></indexterm><programlisting><link linkend="SwfdecAsObject">SwfdecAsObject</link>* swfdec_as_object_resolve (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object);</programlisting>
747
<refsect2 id="swfdec-as-object-resolve" role="function">
748
<title>swfdec_as_object_resolve ()</title>
749
<indexterm zone="swfdec-as-object-resolve"><primary>swfdec_as_object_resolve</primary></indexterm><programlisting><link linkend="SwfdecAsObject">SwfdecAsObject</link>* swfdec_as_object_resolve (<link linkend="SwfdecAsObject">SwfdecAsObject</link> *object);</programlisting>
754
751
Resolves the object to its real object. Some internal objects should not be
755
752
exposed to scripts, for example <link linkend="SwfdecAsFrame"><type>SwfdecAsFrame</type></link> objects. If an object you want