Displaying 20 results from an estimated 26 matches for "swfdec_as_object_new_empty".
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_object.c NEWS player/swfplay.c
...nt
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index f6e07af..d24c337 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -494,12 +494,12 @@ swfdec_as_object_new (SwfdecAsContext *c
g_assert (context->Object_prototype);
object = swfdec_as_object_new_empty (context);
- SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype);
- swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__,
- &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object);...
2007 Jul 13
0
12 commits - AUTHORS doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...all
-swfdec_as_object_collect
-swfdec_as_object_create
-swfdec_as_object_delete_variable
-swfdec_as_object_foreach
-swfdec_as_object_get_debug
-swfdec_as_object_get_variable
-swfdec_as_object_get_variable_and_flags
-swfdec_as_object_has_function
-swfdec_as_object_init_context
swfdec_as_object_new
swfdec_as_object_new_empty
-swfdec_as_object_resolve
-swfdec_as_object_run
+swfdec_as_object_create
+swfdec_as_object_add
swfdec_as_object_set_constructor
+SwfdecAsVariableFlag
+swfdec_as_object_get_variable
+swfdec_as_object_get_variable_and_flags
swfdec_as_object_set_variable
swfdec_as_object_set_variable_flags
swfdec_...
2007 Jul 04
0
Branch 'as' - 25 commits - libswfdec/Makefile.am libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...xt, SwfdecAsObject *fun,
+ guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
+{
+ SwfdecAsObject *thisp;
+
+ if (argc > 0) {
+ thisp = swfdec_as_value_to_object (context, &argv[0]);
+ argc -= 1;
+ argv++;
+ } else {
+ thisp = NULL;
+ }
+ if (thisp == NULL)
+ thisp = swfdec_as_object_new_empty (context);
+ swfdec_as_function_call (SWFDEC_AS_FUNCTION (fun), thisp, argc, argv, ret);
+ swfdec_as_context_run (context);
+}
+
void
swfdec_as_function_init_context (SwfdecAsContext *context, guint version)
{
@@ -126,6 +146,9 @@ swfdec_as_function_init_context (SwfdecA
SWFDEC_AS_VALUE_SE...
2007 Nov 01
0
libswfdec/swfdec_as_interpret.c
...c/swfdec_as_interpret.c
index 234ba33..24e1bb9 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -2321,7 +2321,7 @@ swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, gu
super = SWFDEC_AS_VALUE_GET_OBJECT (superclass);
prototype = swfdec_as_object_new_empty (cx);
if (prototype == NULL)
- return;
+ goto fail;
swfdec_as_object_get_variable (super, SWFDEC_AS_STR_prototype, &proto);
swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___proto__, &proto);
if (cx->version > 5) {
2007 Sep 14
0
4 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.c test/trace
...AsContext *cx, SwfdecAsObject *fun,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
+ SwfdecAsValue *argv_pass = NULL;
+ int length = 0;
SwfdecAsObject *thisp;
if (argc > 0) {
@@ -182,11 +184,10 @@ swfdec_as_function_apply (SwfdecAsContex
if (thisp == NULL)
thisp = swfdec_as_object_new_empty (cx);
- if (argc > 1 && SWFDEC_AS_VALUE_IS_OBJECT (&argv[1]))
- {
- int length, i;
+ if (argc > 1 && SWFDEC_AS_VALUE_IS_OBJECT (&argv[1])) {
+ int i;
SwfdecAsObject *array;
- SwfdecAsValue val, *argv_pass;
+ SwfdecAsValue val;
array = SWFDE...
2007 Aug 21
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c libswfdec/swfdec_color_as.c test/trace
...TYPE_AS_NUMBER, swfdec_as_number_valueOf, 0);
}
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index 83ad4cf..873c3cd 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -494,9 +494,13 @@ swfdec_as_object_new (SwfdecAsContext *c
object = swfdec_as_object_new_empty (context);
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype);
- swfdec_as_object_set_variable (object, SWFDEC_AS_STR___proto__, &val);
+ swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIAB...
2007 Nov 01
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie.c test/image
...iff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index 665b608..f8b8f77 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -687,6 +687,8 @@ swfdec_as_object_new (SwfdecAsContext *context)
g_assert (context->Object_prototype);
object = swfdec_as_object_new_empty (context);
+ if (object == NULL)
+ return NULL;
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object);
swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor,
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
2007 Sep 03
0
4 commits - libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_interpret.c test/trace
...ject);
-
- SWFDEC_AS_VALUE_SET_BOOLEAN (ret, b->boolean);
-}
-
-void
-swfdec_as_boolean_init_context (SwfdecAsContext *context, guint version)
-{
- SwfdecAsObject *boolean, *proto;
- SwfdecAsValue val;
+ SwfdecAsBoolean *b;
- g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
-
- proto = swfdec_as_object_new_empty (context);
- if (proto == NULL)
- return;
- boolean = SWFDEC_AS_OBJECT (swfdec_as_object_add_constructor (context->global,
- SWFDEC_AS_STR_Boolean, 0, SWFDEC_TYPE_AS_BOOLEAN,
- swfdec_as_boolean_construct, 0, proto));
- if (!boolean)
+ if (!SWFDEC_IS_AS_BOOLEAN (object))
r...
2007 Nov 12
0
20 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_string.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player_as.c
...tion *fun;
SwfdecAsObject *thisp;
- if (argc > 0) {
- thisp = swfdec_as_value_to_object (cx, &argv[0]);
- } else {
- thisp = NULL;
- }
- if (thisp == NULL)
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_FUNCTION, &fun, "O", &thisp);
+
+ if (thisp == NULL) {
thisp = swfdec_as_object_new_empty (cx);
+ if (thisp == NULL)
+ return;
+ }
if (argc > 1 && SWFDEC_AS_VALUE_IS_OBJECT (&argv[1])) {
int i;
@@ -209,8 +210,7 @@ swfdec_as_function_apply (SwfdecAsContext *cx, SwfdecAsObject *fun,
}
}
- swfdec_as_function_call (SWFDEC_AS_FUNCTION (fun), thisp...
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
...(&val, function);
- swfdec_as_object_set_variable (function, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_constructor,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
if (version > 5) {
proto = swfdec_as_object_new_empty (context);
if (!proto)
diff --git a/libswfdec/swfdec_as_math.c b/libswfdec/swfdec_as_math.c
index 126e7be..5f6a24d 100644
--- a/libswfdec/swfdec_as_math.c
+++ b/libswfdec/swfdec_as_math.c
@@ -144,21 +144,37 @@ swfdec_as_math_init_context (SwfdecAsCon
/* set the right properties on the Mat...
2007 Sep 13
0
3 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c
...+239,17 @@ swfdec_as_function_init_context (SwfdecA
SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_constructor,
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
- if (version > 5) {
- proto = swfdec_as_object_new_empty (context);
- if (!proto)
- return;
- context->Function_prototype = proto;
- SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
- swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__,
- &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
- swf...
2007 Jul 12
0
15 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt INSTALL libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.h
...object_delete_variable
+swfdec_as_object_foreach
+swfdec_as_object_foreach_remove
+swfdec_as_object_foreach_rename
+swfdec_as_object_get_debug
+swfdec_as_object_get_variable
+swfdec_as_object_get_variable_and_flags
+swfdec_as_object_has_function
+swfdec_as_object_init_context
+swfdec_as_object_new
+swfdec_as_object_new_empty
+swfdec_as_object_resolve
+swfdec_as_object_run
+swfdec_as_object_set_constructor
+swfdec_as_object_set_variable
+swfdec_as_object_set_variable_flags
+swfdec_as_object_unset_variable_flags
+<SUBSECTION Standard>
+swfdec_as_object_get_type
+SwfdecAsObjectClass
+SWFDEC_AS_OBJECT
+SWFDEC_AS_OBJE...
2007 Jul 27
0
11 commits - libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite_movie_as.c test/trace
...>depth);
}
+static void
+swfdec_sprite_movie_getBounds (SwfdecAsContext *cx, SwfdecAsObject *obj,
+ guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
+{
+ int x0, x1, y0, y1;
+ SwfdecAsValue val;
+ SwfdecAsObject *object;
+ SwfdecMovie *movie = SWFDEC_MOVIE (obj);
+
+ object = swfdec_as_object_new_empty (cx);
+ if (object == NULL)
+ return;
+
+ if (swfdec_rect_is_empty (&movie->extents)) {
+ x0 = x1 = y0 = y1 = 0x7FFFFFF;
+ } else {
+ x0 = movie->extents.x0;
+ y0 = movie->extents.y0;
+ x1 = movie->extents.x1;
+ y1 = movie->extents.y1;
+ }
+ SWFDEC_AS_VALUE...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...@@ -89,25 +89,21 @@ swfdec_as_boolean_init_context (SwfdecAs
g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
- boolean = SWFDEC_AS_OBJECT (swfdec_as_object_add_function (context->global,
- SWFDEC_AS_STR_Boolean, SWFDEC_TYPE_AS_BOOLEAN, swfdec_as_boolean_construct, 0));
+ proto = swfdec_as_object_new_empty (context);
+ if (proto == NULL)
+ return;
+ boolean = SWFDEC_AS_OBJECT (swfdec_as_object_add_constructor (context->global,
+ SWFDEC_AS_STR_Boolean, SWFDEC_TYPE_AS_BOOLEAN, SWFDEC_TYPE_AS_BOOLEAN,
+ swfdec_as_boolean_construct, 0, proto));
if (!boolean)
return;
- swfdec_a...
2008 Jan 19
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/image test/swfdec_test.c test/swfdec_test_image.c test/trace
...;context->version >= 8) {
+ if (swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (xml),
+ SWFDEC_AS_STR_idMap, &val)) {
+ if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) {
+ object = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+ } else {
+ return;
+ }
+ } else {
+ object = swfdec_as_object_new_empty (SWFDEC_AS_OBJECT (xml)->context);
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, object);
+ swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (xml),
+ SWFDEC_AS_STR_idMap, &val);
+ }
+ } else {
+ object = SWFDEC_AS_OBJECT (xml);
+ }
+
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFD...
2007 Aug 23
0
23 commits - doc/.gitignore doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_keys.c libswfdec-gtk/swfdec_gtk_keys.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec/Makefile.am
...wfdec_xml_init (SwfdecXml *xml)
+{
+}
+
+void
+swfdec_xml_init_context (SwfdecPlayer *player, guint version)
+{
+ SwfdecAsContext *context;
+ SwfdecAsObject *xml, *proto;
+ SwfdecAsValue val;
+
+ g_return_if_fail (SWFDEC_IS_PLAYER (player));
+
+ context = SWFDEC_AS_CONTEXT (player);
+ proto = swfdec_as_object_new_empty (context);
+ if (proto == NULL)
+ return;
+ xml = SWFDEC_AS_OBJECT (swfdec_as_object_add_constructor (context->global,
+ SWFDEC_AS_STR_XML, 0, SWFDEC_TYPE_XML, NULL, 0, proto));
+ if (xml == NULL)
+ return;
+ /* set the right properties on the NetStream.prototype object */
+ SWF...
2007 Sep 11
0
8 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c test/trace
..._function_apply (SwfdecAsContext *cx, SwfdecAsObject *fun,
+ guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
+{
+ SwfdecAsObject *thisp;
+
+ if (argc > 0) {
+ thisp = swfdec_as_value_to_object (cx, &argv[0]);
+ } else {
+ thisp = NULL;
+ }
+ if (thisp == NULL)
+ thisp = swfdec_as_object_new_empty (cx);
+
+ if (argc > 1 && SWFDEC_AS_VALUE_IS_OBJECT (&argv[1]))
+ {
+ int length, i;
+ SwfdecAsObject *array;
+ SwfdecAsValue val, *argv_pass;
+
+ array = SWFDEC_AS_VALUE_GET_OBJECT (&argv[1]);
+
+ swfdec_as_object_get_variable (array, SWFDEC_AS_STR_length, &...
2007 Sep 13
0
2 commits - libswfdec/swfdec_as_function.c test/trace
...nitialize correctly than to delete later ;)
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index b00f765..6cc40a4 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -242,16 +242,15 @@ swfdec_as_function_init_context (SwfdecA
proto = swfdec_as_object_new_empty (context);
if (!proto)
return;
- context->Function_prototype = proto;
+ if (version > 5)
+ context->Function_prototype = proto;
SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
- swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__,
- &val, SWFD...
2007 Sep 03
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c
...bject);
+ SwfdecAsNumber *num;
- SWFDEC_AS_VALUE_SET_NUMBER (ret, num->number);
-}
-
-void
-swfdec_as_number_init_context (SwfdecAsContext *context, guint version)
-{
- SwfdecAsObject *number, *proto;
- SwfdecAsValue val;
-
- g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
-
- proto = swfdec_as_object_new_empty (context);
- if (proto == NULL)
+ if (!SWFDEC_IS_AS_NUMBER (object))
return;
- number = SWFDEC_AS_OBJECT (swfdec_as_object_add_constructor (context->global,
- SWFDEC_AS_STR_Number, 0, SWFDEC_TYPE_AS_NUMBER,
- swfdec_as_number_construct, 0, proto));
- if (!number)
- return;...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...video_movie_as.c
+++ b/libswfdec/swfdec_video_movie_as.c
@@ -74,7 +74,7 @@ swfdec_video_movie_init_context (SwfdecPlayer *player, guint version)
SWFDEC_AS_STR_Video, 0, NULL, 0));
if (video == NULL)
return;
- player->Video = video;
+ player->priv->Video = video;
proto = swfdec_as_object_new_empty (context);
if (proto == NULL)
return;
diff --git a/test/dump.c b/test/dump.c
index 01a1776..48f037d 100644
--- a/test/dump.c
+++ b/test/dump.c
@@ -402,8 +402,8 @@ main (int argc, char *argv[])
}
player = swfdec_player_new_from_file (argv[1]);
- if (player->resource->loader-&g...