search for: swfdecasobject

Displaying 20 results from an estimated 201 matches for "swfdecasobject".

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
...ype (). diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index e2071b6..b72e43b 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -160,9 +160,9 @@ swfdec_as_array_append (SwfdecAsArray *a /*** AS CODE ***/ static void -swfdec_as_array_toString (SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) +swfdec_as_array_toString (SwfdecAsContext *cx, SwfdecAsObject *object, + guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - SwfdecAsContext *cx = object->context; int i, length; const char *s, *str; SwfdecAsValue...
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
...libswfdec/swfdec_video_movie.c | 2 - 9 files changed, 50 insertions(+), 51 deletions(-) New commits: diff-tree 4e35fceb28469c2bc9ee49c9ec71573d6df8861e (from cb77cc43c823c4f3260d6341cf5ed04b65783deb) Author: Benjamin Otte <otte at gnome.org> Date: Sun Aug 19 20:16:59 2007 +0200 SwfdecAsObject->set() now takes a default_flags parameter This parameter is used to set the default set of flags, when a variable is newly created. Now we don't have the need to call set_flags() after every init function diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array...
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
...c_as_string.h \ swfdec_as_strings.h \ diff --git a/doc/swfdec-docs.sgml b/doc/swfdec-docs.sgml index 2c7787f..553dfb1 100644 --- a/doc/swfdec-docs.sgml +++ b/doc/swfdec-docs.sgml @@ -27,5 +27,6 @@ <xi:include href="xml/SwfdecAsContext.xml"/> <xi:include href="xml/SwfdecAsObject.xml"/> <xi:include href="xml/SwfdecAsArray.xml"/> + <xi:include href="xml/SwfdecAsFunction.xml"/> </chapter> </book> diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index fd2f296..7773b37 100644 --- a/doc/swfdec-sections...
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
...2:44:52 2007 +0200 Fix some crashes/asserts when this is null diff --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 *obje...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
..."swfdec_as_strings.h" #include "swfdec_debug.h" +#include "swfdec_player_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-&...
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
...: Fri Aug 17 19:41:41 2007 +0200 we have a handler more now... diff --git a/vivified/core/vivi_breakpoint.h b/vivified/core/vivi_breakpoint.h index 87b2220..35a8d28 100644 --- a/vivified/core/vivi_breakpoint.h +++ b/vivified/core/vivi_breakpoint.h @@ -41,7 +41,7 @@ struct _ViviBreakpoint SwfdecAsObject object; gboolean active; /* only active breakpoints receive events */ - gulong handlers[4]; /* handlers for every signal of the debugger or 0 */ + gulong handlers[5]; /* handlers for every signal of the debugger or 0 */ }; struct _ViviBreakpointClass diff-tree 571b80372d3a7c4e2970a40...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
...ut in special cases, this is not true. diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index ef60c0b..c64df5e 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -164,10 +164,10 @@ swfdec_as_function_call (SwfdecAsFunction *function, SwfdecAsObject *thisp, guin if (frame == NULL) return; if (thisp != NULL) { - swfdec_as_super_new (frame, thisp, FALSE); + swfdec_as_super_new (frame, thisp, thisp->prototype); } else { SWFDEC_FIXME ("does the super object really reference the function when thisp is NULL?");...
2007 Oct 14
0
3 commits - doc/Makefile.am libswfdec/swfdec_text_field_movie_as.c
...fdec/swfdec_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -36,6 +36,23 @@ #include "swfdec_internal.h" #include "swfdec_player_internal.h" +// does nothing but calls valueOf +static void +swfdec_text_field_movie_set_readonly (SwfdecAsContext *cx, + SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, + SwfdecAsValue *ret) +{ + SwfdecTextFieldMovie *text; + + SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); + + if (argc > 0) + swfdec_as_value_to_number (cx, &argv[0]); +} + +/* + * Native properties: Text + */ stat...
2007 May 21
0
Branch 'as' - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c
...+0200 add swfdec_as_frame_set_this to allow calling functions without a this object diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c index 23b3c41..75e0534 100644 --- a/libswfdec/swfdec_as_frame.c +++ b/libswfdec/swfdec_as_frame.c @@ -68,7 +68,8 @@ swfdec_as_frame_mark (SwfdecAsObject *ob if (frame->script) { swfdec_as_object_mark (frame->var_object); } - swfdec_as_object_mark (frame->thisp); + if (frame->thisp) + swfdec_as_object_mark (frame->thisp); if (frame->target) swfdec_as_object_mark (frame->target); if (frame->function)...
2007 Aug 15
0
4 commits - 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_net_stream.c libswfdec/swfdec_sprite_movie.c test/trace
...ith that object. diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index b1d06e5..8999597 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -172,8 +172,8 @@ swfdec_as_object_hash_create (SwfdecAsOb } static gboolean -swfdec_as_object_do_get (SwfdecAsObject *object, const char *variable, - SwfdecAsValue *val, guint *flags) +swfdec_as_object_do_get (SwfdecAsObject *object, SwfdecAsObject *orig, + const char *variable, SwfdecAsValue *val, guint *flags) { SwfdecAsVariable *var = swfdec_as_object_hash_lookup (object, variable); @@ -184,7 +184...
2007 Apr 16
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...ED (value); /* just to be sure */ + var->value.funcs.get (object, value); + } else { + *value = var->value.value; + } return; } if (i == 256) { @@ -420,6 +428,44 @@ swfdec_as_object_add_function (SwfdecAsO } /** + * swfdec_as_object_add_variable: + * @object: a #SwfdecAsObject + * @name: name of the function. The string does not have to be + * garbage-collected. + * @set: function to set this value or %NULL if the value should be read-only + * @get: function to get the value. + * + * Adds a new property with name @name to @object. The property is native, so + * t...
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
...c_interval.h" +#include "swfdec_as_context.h" +#include "swfdec_as_function.h" +#include "swfdec_debug.h" +#include "swfdec_player_internal.h" + +G_DEFINE_TYPE (SwfdecInterval, swfdec_interval, SWFDEC_TYPE_AS_OBJECT) + +static void +swfdec_interval_mark (SwfdecAsObject *object) +{ + guint i; + SwfdecInterval *interval = SWFDEC_INTERVAL (object); + + swfdec_as_object_mark (interval->object); + if (interval->fun_name) + swfdec_as_string_mark (interval->fun_name); + for (i = 0; i < interval->n_args; i++) { + swfdec_as_value_mark (&inter...
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
...INED (value); + } + } +} + diff --git a/libswfdec/swfdec_as_types.h b/libswfdec/swfdec_as_types.h index e89a656..2d02b48 100644 --- a/libswfdec/swfdec_as_types.h +++ b/libswfdec/swfdec_as_types.h @@ -215,6 +215,7 @@ double swfdec_as_value_to_number (Swfde const SwfdecAsValue * value); SwfdecAsObject *swfdec_as_value_to_object (SwfdecAsContext * context, const SwfdecAsValue * value); +void swfdec_as_value_to_primitive (SwfdecAsValue * value); const char * swfdec_as_value_to_printable (SwfdecAsContext * context, const SwfdecAsValue * value); const char * swfdec_as_value_to_str...
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
...Remove the swfdec_as_object_to_string and just use local helper function diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index f166b37..28a1dd7 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -1237,27 +1237,3 @@ swfdec_as_object_resolve (SwfdecAsObject return klass->resolve (object); } - -/** - * swfdec_as_object_to_string: - * @context: a #SwfdecAsContext - * @object: a #SwfdecAsObject - * - * Converts @object to a string according to the rules of Flash. This might - * cause calling back into the script engine. - * <warning>Never...
2008 Jan 07
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_types.c libswfdec/swfdec_xml.c
...wfdec_as_double_to_string (object->context, start_index)); + swfdec_as_integer_to_string (object->context, start_index)); } else { ForeachRemoveRangeData fdata = { start_index, num }; swfdec_as_object_foreach_remove (object, @@ -208,7 +208,7 @@ swfdec_as_array_foreach_move_range (SwfdecAsObject *object, return variable; if (idx >= fdata->start_index && idx < fdata->start_index + fdata->num) { - return swfdec_as_double_to_string (object->context, + return swfdec_as_integer_to_string (object->context, fdata->to_index + idx - fdata->start_...
2007 Sep 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_scope.c libswfdec/swfdec_as_scope.h libswfdec/swfdec_as_script_function.c
...do not - * want to expose it to scripts. Call swfdec_as_object_resolve () on the - * returned value to be sure of not having an internal object.</note> - * - * Returns: the object that contains @variable or %NULL if none. + * Returns: Object in scope chain that contained the variable. **/ SwfdecAsObject * -swfdec_as_frame_find_variable (SwfdecAsFrame *frame, const char *variable) +swfdec_as_frame_get_variable_and_flags (SwfdecAsFrame *frame, const char *variable, + SwfdecAsValue *value, guint *flags, SwfdecAsObject **pobject) { GSList *walk; - SwfdecAsValue val; g_return_val_if_fail (...
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
...io frame->function_name = function->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_OB...
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
...able is not implemented properly, so only properties of the parent movie will work at the moment diff --git a/libswfdec/swfdec_movie.c b/libswfdec/swfdec_movie.c index 3d8bade..a5ffa00 100644 --- a/libswfdec/swfdec_movie.c +++ b/libswfdec/swfdec_movie.c @@ -947,12 +947,18 @@ swfdec_movie_mark (SwfdecAsObject *object) { SwfdecMovie *movie = SWFDEC_MOVIE (object); GList *walk; + GSList *iter; swfdec_as_string_mark (movie->original_name); swfdec_as_string_mark (movie->name); for (walk = movie->list; walk; walk = walk->next) { swfdec_as_object_mark (walk->data); }...
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
...ext *cx /* stack looks like this: [ function, this, arg1, arg2, ... ] */ /* stack must be at least 2 elements big */ static gboolean -swfdec_action_call (SwfdecAsContext *cx, guint n_args) +swfdec_action_call (SwfdecAsContext *cx, guint n_args, gboolean use_super) { SwfdecAsFunction *fun; SwfdecAsObject *thisp; @@ -591,6 +592,13 @@ swfdec_action_call (SwfdecAsContext *cx, swfdec_as_stack_pop_n (frame->stack, n_args); swfdec_as_function_call (fun, thisp, n_args, swfdec_as_stack_peek (frame->stack, 0), swfdec_as_stack_peek (frame->stack, 1)); + if (use_super) { + g_print...
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...mes the watch function has been called without returning */ }; +typedef struct { + SwfdecAsFunction * watch; /* watcher or %NULL */ + SwfdecAsValue watch_data; /* user data to watcher */ + guint refcount; /* refcount - misused for recursion detection */ +} SwfdecAsWatch; + G_DEFINE_TYPE (SwfdecAsObject, swfdec_as_object, G_TYPE_OBJECT) static void @@ -141,22 +144,28 @@ swfdec_as_object_mark_property (gpointer if (var->set) swfdec_as_object_mark (SWFDEC_AS_OBJECT (var->set)); } else { - if (var->watch) { - swfdec_as_object_mark (SWFDEC_AS_OBJECT (var->watch));...