search for: swfdecasvalue

Displaying 20 results from an estimated 182 matches for "swfdecasvalue".

2007 Jun 12
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c
...t;thisp != NULL && - g_type_is_a (G_OBJECT_TYPE (frame->thisp), native->type)))) { + g_type_is_a (G_OBJECT_TYPE (frame->thisp), native->type))) { /* FIXME FIXME FIXME: no casting here please! */ native->native (context, frame->thisp, frame->argc, (SwfdecAsValue *) frame->argv, frame->return_value); diff-tree ed4f2f63fe303a3c06be46a52c3ed8ea07cbe29a (from 6096f55dc8f87d0ae8096bcb73dada791637fee5) Author: Benjamin Otte <otte at gnome.org> Date: Tue Jun 12 21:54:02 2007 +0200 add documentation for SwfdecAsNative diff --git a/libswfdec/swf...
2007 Oct 14
0
3 commits - doc/Makefile.am libswfdec/swfdec_text_field_movie_as.c
..._AS_STR_color, ret); + SWFDEC_AS_VALUE_SET_NUMBER (ret, text->format_new->color); } // This doesn't work the same way as TextFormat's color setting @@ -631,18 +630,16 @@ swfdec_text_field_movie_set_textColor (SwfdecAsContext *cx, { SwfdecTextFieldMovie *text; int value; - SwfdecAsValue val; SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "i", &value); if (value < 0) { - SWFDEC_AS_VALUE_SET_NUMBER (&val, 16777216 + value % 16777216); + value = 16777216 + value % 16777216; } else { - SWFDEC_AS_VALUE_SET_NUMBER (&val, value);...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
...layer_internal.h" G_DEFINE_TYPE (SwfdecAsArray, swfdec_as_array, SWFDEC_TYPE_AS_OBJECT) @@ -73,7 +74,7 @@ swfdec_as_array_to_index (const char *st } static gint32 -swfdec_as_array_get_length (SwfdecAsObject *object) +swfdec_as_array_get_length_as_integer (SwfdecAsObject *object) { SwfdecAsValue val; gint32 length; @@ -83,6 +84,16 @@ swfdec_as_array_get_length (SwfdecAsObje swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &val); length = swfdec_as_value_to_integer (object->context, &val); + return length; +} + +static gint32 +swfdec_as_array_get_length (S...
2007 Jun 01
0
Branch 'as' - 2 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c libswfdec/swfdec_interval.c libswfdec/swfdec_interval.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c
...asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); + + object_class->dispose = swfdec_interval_dispose; + + asobject_class->mark = swfdec_interval_mark; +} + +static void +swfdec_interval_init (SwfdecInterval *array) +{ +} + +static void +swfdec_interval_trigger (SwfdecTimeout *timeout) +{ + SwfdecAsValue ret; + SwfdecInterval *interval = SWFDEC_INTERVAL (((guchar *) timeout) + - G_STRUCT_OFFSET (SwfdecInterval, timeout)); + SwfdecAsContext *context = SWFDEC_AS_OBJECT (interval)->context; + + if (interval->repeat) { + timeout->timestamp += SWFDEC_MSECS_TO_TICKS (interval->mse...
2007 Aug 24
0
7 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_string.c test/trace
.... - * <warning>Never use this function for debugging purposes.</warning> - * - * Returns: a garbage-collected string representing @object. The value will - * never be %NULL. - **/ -const char * -swfdec_as_object_to_string (SwfdecAsContext *context, SwfdecAsObject *object) -{ - SwfdecAsValue val; - - g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), NULL); - - SWFDEC_AS_VALUE_SET_OBJECT (&val, object); - - return swfdec_as_value_to_string (context, &val); -} diff --git a/libswfdec/swfdec_as_string.c b/libswfdec/swfdec_as_string.c index c9739c9..c05156f 100644 --- a/libswfd...
2007 Aug 17
0
Branch 'vivi' - 9 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c
...ng + * swfdec_as_object_set_constructor() with the right arguments. **/ -SwfdecAsFunction * -swfdec_as_function_create (SwfdecAsContext *context, GType type, guint size) +void +swfdec_as_function_set_constructor (SwfdecAsFunction *fun) { + SwfdecAsContext *context; + SwfdecAsObject *object; SwfdecAsValue val; - SwfdecAsObject *fun; - g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); - g_return_val_if_fail (g_type_is_a (type, SWFDEC_TYPE_AS_FUNCTION), NULL); - g_return_val_if_fail (size >= sizeof (SwfdecAsFunction), NULL); - - if (!swfdec_as_context_use_mem (context, size)) -...
2007 Jun 28
0
Branch 'as' - 4 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...+ b/doc/swfdec-docs.sgml @@ -20,4 +20,8 @@ <xi:include href="xml/SwfdecBuffer.xml"/> <xi:include href="xml/SwfdecLoader.xml"/> </chapter> + <chapter> + <title>Actionscript interpreter</title> + <xi:include href="xml/SwfdecAsValue.xml"/> + </chapter> </book> diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index e0454c7..30ac93b 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -178,3 +178,16 @@ SWFDEC_IS_GTK_LOADER SWFDEC_IS_GTK_LOADER_CLASS SWFDEC_TYPE_GTK_LOADER &...
2007 Oct 26
0
8 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c test/trace
...lue); + swfdec_as_value_mark (&context->exception_value); swfdec_as_object_mark (context->Function); swfdec_as_object_mark (context->Function_prototype); swfdec_as_object_mark (context->Object); @@ -685,10 +685,10 @@ swfdec_as_context_throw (SwfdecAsContext *context, const SwfdecAsValue *value) { g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); g_return_if_fail (SWFDEC_IS_AS_VALUE (value)); - g_return_if_fail (!context->throwing); + g_return_if_fail (!context->exception); - context->throwing = TRUE; - context->throw_value = *value; + context->excepti...
2007 Aug 19
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_with.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite_movie.c
...wfdec_as_array.c b/libswfdec/swfdec_as_array.c index a64b165..495bff1 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -332,7 +332,7 @@ swfdec_as_array_add (SwfdecAsObject *obj static void swfdec_as_array_set (SwfdecAsObject *object, const char *variable, - const SwfdecAsValue *val) + const SwfdecAsValue *val, guint flags) { char *end; gboolean indexvar = TRUE; @@ -353,7 +353,7 @@ swfdec_as_array_set (SwfdecAsObject *obj } SWFDEC_AS_OBJECT_CLASS (swfdec_as_array_parent_class)->set (object, variable, - val); + val, flags); // if we adde...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c 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 libswfdec/swfdec_as_function.h
...nction->name; } else { frame = swfdec_as_frame_new (thisp, function->script); - /* FIXME: do the preloading here */ + SWFDEC_ERROR ("do the preloading here"); } } +/*** AS CODE ***/ + +static void +swfdec_as_function_construct (SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +{ + +} + +void +swfdec_as_function_init_context (SwfdecAsContext *context, guint version) +{ + SwfdecAsObject *function, *proto; + SwfdecAsValue val; + + g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); + + function = SWFDEC_AS_OBJECT (swfdec_as_object_add_function...
2007 Nov 14
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c libswfdec/swfdec_color_as.c libswfdec/swfdec_initialize.as
...f --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index 4c30399..3c6cde5 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -589,6 +589,9 @@ swfdec_as_array_join (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, const char *var, *str, *sep; SwfdecAsValue val; + if (object == NULL) + return; + if (argc > 0) { sep = swfdec_as_value_to_string (cx, &argv[0]); } else { @@ -623,6 +626,9 @@ void swfdec_as_array_toString (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { + if...
2007 Oct 17
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...function) + break; + } + if (iter == NULL) + return; + + movie->variable_listeners = + g_slist_remove (movie->variable_listeners, iter->data); + g_free (iter->data); +} + +static void +swfdec_movie_call_variable_listeners (SwfdecMovie *movie, const char *name, + const SwfdecAsValue *val) +{ + GSList *iter; + + for (iter = movie->variable_listeners; iter != NULL; iter = iter->next) { + SwfdecMovieVariableListener *listener = iter->data; + + if (listener->name != name && + (SWFDEC_AS_OBJECT (movie)->context->version >= 7 || + !swfdec_str_ca...
2007 May 24
0
Branch 'as' - 11 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c
...diff --git a/libswfdec/swfdec_as_types.c b/libswfdec/swfdec_as_types.c index 07aa538..2004e71 100644 --- a/libswfdec/swfdec_as_types.c +++ b/libswfdec/swfdec_as_types.c @@ -230,24 +230,29 @@ swfdec_as_value_to_printable (SwfdecAsCo double swfdec_as_value_to_number (SwfdecAsContext *context, const SwfdecAsValue *value) { + SwfdecAsValue tmp; + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0.0); g_return_val_if_fail (SWFDEC_IS_AS_VALUE (value), 0.0); - switch (value->type) { + tmp = *value; + swfdec_as_value_to_primitive (&tmp); + + switch (tmp.type) { case SWFDEC_AS_TYPE_...
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...; Date: Mon Sep 10 22:00:48 2007 +0200 rewrite (un)watch functions diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index 1fbf1d0..a331030 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -113,11 +113,14 @@ struct _SwfdecAsVariable { SwfdecAsValue value; /* value of property */ SwfdecAsFunction * get; /* getter set with swfdec_as_object_add_property */ SwfdecAsFunction * set; /* setter or %NULL */ - SwfdecAsFunction * watch; /* watcher or %NULL */ - SwfdecAsValue * watch_data; /* user data to watcher */ - gint8 watch_recu...
2007 Jun 27
0
Branch 'as' - libswfdec/swfdec_as_strings.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...ec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -327,6 +327,49 @@ swfdec_net_stream_dispose (GObject *obje G_OBJECT_CLASS (swfdec_net_stream_parent_class)->dispose (object); } +static gboolean +swfdec_net_stream_get_variable (SwfdecAsObject *object, const char *variable, + SwfdecAsValue *val, guint *flags) +{ + SwfdecNetStream *stream; + + if (SWFDEC_AS_OBJECT_CLASS (swfdec_net_stream_parent_class)->get (object, variable, val, flags)) + return TRUE; + + stream = SWFDEC_NET_STREAM (object); + /* FIXME: need case insensitive comparisons? */ + if (variable == SWFDEC_AS_STR...
2007 Nov 07
0
7 commits - doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_decoder.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_movie_asprops.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c
...3f2af12..d6b5703 100644 --- a/libswfdec/swfdec_resource.c +++ b/libswfdec/swfdec_resource.c @@ -104,11 +104,13 @@ swfdec_resource_loader_target_image (SwfdecResource *instance) /* NB: name must be GC'ed */ static void -swfdec_resource_emit_signal (SwfdecResource *resource, const char *name, SwfdecAsValue *args, guint n_args) +swfdec_resource_emit_signal (SwfdecResource *resource, const char *name, gboolean progress, + SwfdecAsValue *args, guint n_args) { SwfdecAsContext *cx; SwfdecAsObject *movie; - SwfdecAsValue vals[n_args + 2]; + guint skip = progress ? 4 : 2; + SwfdecAsValue vals[...
2007 Sep 04
0
5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h
...header contains all the non-exported symbols that can't go into * exported headers */ +#define SWFDEC_AS_NATIVE(x, y, func) SWFDEC_AS_CONSTRUCTOR (x, y, func, NULL) +#define SWFDEC_AS_CONSTRUCTOR(x, y, func, type) void func (SwfdecAsContext *cx, \ + SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret); + /* swfdec_as_array.c */ void swfdec_as_array_init_context (SwfdecAsContext * context, diff --git a/libswfdec/swfdec_as_number.c b/libswfdec/swfdec_as_number.c index f047165..4387301 100644 --- a/libswfdec/swfdec_as_number.c +++ b/libswfdec/swfdec_as_number.c...
2007 Oct 15
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...(ret, g_utf8_strlen (text->text_display, -1)); } /* @@ -453,6 +453,69 @@ swfdec_text_field_movie_set_condenseWhite (SwfdecAsContext *cx, text->condense_white = value; } +static void +swfdec_text_field_movie_get_multiline (SwfdecAsContext *cx, + SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, + SwfdecAsValue *ret) +{ + SwfdecTextFieldMovie *text; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); + + SWFDEC_AS_VALUE_SET_BOOLEAN (ret, text->text->multiline); +} + +static void +swfdec_text_field_movie_set_multiline (SwfdecAsContext *cx, + Sw...
2007 Jun 10
0
Branch 'as' - 5 commits - libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie_asprops.c test/trace
...--git a/libswfdec/swfdec_mouse_as.c b/libswfdec/swfdec_mouse_as.c index f060bfb..81187a3 100644 --- a/libswfdec/swfdec_mouse_as.c +++ b/libswfdec/swfdec_mouse_as.c @@ -47,15 +47,21 @@ swfdec_mouse_removeListener (SwfdecAsObj } static void -swfdec_mouse_show (SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *return_value) +swfdec_mouse_show (SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval) { - SWFDEC_PLAYER (object->context)->mouse_visible = TRUE; + SwfdecPlayer *player = SWFDEC_PLAYER (object->context); + + SWFDEC_AS_VALUE_SET_INT (retv...
2007 Aug 27
0
7 commits - libswfdec/Makefile.am libswfdec/swfdec_as_string.c libswfdec/swfdec_as_string.h libswfdec/swfdec_as_strings.c libswfdec/swfdec.h libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player.c
...clude "swfdec.h" +#include "swfdec_as_string.h" #include "swfdec_as_strings.h" +#include "swfdec_codec_audio.h" +#include "swfdec_debug.h" #include "swfdec_player_internal.h" +static void +swfdec_system_has_audio (SwfdecPlayer *player, SwfdecAsValue *ret) +{ + /* FIXME: allow setting this? */ + SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE); +} + +static void +swfdec_system_has_streaming_audio (SwfdecPlayer *player, SwfdecAsValue *ret) +{ + SWFDEC_AS_VALUE_SET_BOOLEAN (ret, TRUE); +} + +static void +swfdec_system_has_streaming_video (SwfdecPlayer...