search for: swfdecascontext

Displaying 20 results from an estimated 216 matches for "swfdecascontext".

2007 Oct 14
0
3 commits - doc/Makefile.am libswfdec/swfdec_text_field_movie_as.c
...git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c index 43599a3..121fefc 100644 --- a/libswfdec/swfdec_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -604,10 +604,10 @@ swfdec_text_field_movie_set_embedFonts (SwfdecAsContext *cx, swfdec_as_value_to_number (cx, &argv[0]); - text->text->embed_fonts = value; - - if (text->text->embed_fonts) + if (!text->text->embed_fonts && value) SWFDEC_FIXME ("Using embed fonts in TextField not supported"); + + text->text->em...
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
...dec_as_native_function.c b/libswfdec/swfdec_as_native_function.c index 5d68ba4..f6a5d64 100644 --- a/libswfdec/swfdec_as_native_function.c +++ b/libswfdec/swfdec_as_native_function.c @@ -29,6 +29,17 @@ /*** GTK-DOC ***/ +/** + * SwfdecAsNative: + * context: #SwfdecAsContext + * thisp: the this object. <warning>Can be %NULL.</warning> + * argc: number of arguments passed to this function + * argv: the @argc arguments passed to this function + * retval: set to the return value. Initialized to undefined by default + * + * This is the prototype for all nat...
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
...200 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,...
2007 May 20
0
Branch 'as' - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_player.c
...context has a vfunc for getting the time. diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index 9f07f55..1bca426 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -316,6 +316,7 @@ swfdec_as_context_init (SwfdecAsContext g_assert (*s == 0); context->global = swfdec_as_object_new (context); context->rand = g_rand_new (); + g_get_current_time (&context->start_time); } /*** STRINGS ***/ @@ -359,6 +360,30 @@ swfdec_as_context_new (void) return g_object_new (SWFDEC_TYPE_AS_CONTEXT,...
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
...uot; #include "swfdec_as_script_function.h" #include "swfdec_as_stack.h" +#include "swfdec_as_string.h" #include "swfdec_as_strings.h" #include "swfdec_as_super.h" #include "swfdec_as_with.h" @@ -552,10 +553,14 @@ swfdec_action_trace (SwfdecAsContext *cx const char *s; val = swfdec_as_stack_peek (cx, 1); - if (val->type == SWFDEC_AS_TYPE_UNDEFINED) + if (val->type == SWFDEC_AS_TYPE_UNDEFINED) { s = SWFDEC_AS_STR_undefined; - else + } else if (val->type == SWFDEC_AS_TYPE_OBJECT && + SWFDEC_IS_AS_STRING (swf...
2007 Jun 29
0
Branch 'as' - 3 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h
...+), 26 deletions(-) New commits: diff-tree 2203783339a0ece4ce8d264d0ec28c77034c3288 (from bc23ec80d8afa3d49618a6b180ace50f7c7b19f3) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jun 29 02:00:55 2007 +0200 add an internals/garbage collection section and a stub for documenting SwfdecAsContext diff --git a/doc/Makefile.am b/doc/Makefile.am index f43e706..ce3ae3a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -56,6 +56,7 @@ IGNORE_HFILES= \ jpeg \ swfdec_amf.h \ swfdec_as_interpret.h \ + swfdec_as_math.h \ swfdec_as_number.h \ swfdec_as_st...
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
...hrow_value to exception_value diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index 403e03d..663a15c 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -361,7 +361,7 @@ static void swfdec_as_context_do_mark (SwfdecAsContext *context) { swfdec_as_object_mark (context->global); - swfdec_as_value_mark (&context->throw_value); + swfdec_as_value_mark (&context->exception_value); swfdec_as_object_mark (context->Function); swfdec_as_object_mark (context->Function_prototype); swfdec_as_ob...
2007 Nov 02
0
5 commits - libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c
...= swfdec_xml_node_new_no_properties ( SWFDEC_AS_OBJECT (node)->context, SWFDEC_XML_NODE_TEXT, unescaped); g_free (unescaped); + if (child == NULL) + return strchr (p, '\0'); swfdec_xml_node_appendChild (node, child); } @@ -700,6 +704,9 @@ swfdec_xml_do_parseXML (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, if (!SWFDEC_IS_XML (object)) return; + if (!SWFDEC_IS_VALID_XML_NODE (object)) + return; + if (argc < 1) return; @@ -729,6 +736,9 @@ swfdec_xml_createElement (SwfdecAsContext *cx, SwfdecAsObject *object, node = swfdec_xml_node...
2007 Apr 11
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...rpret.c index 249f9cc..3989186 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1831,41 +1831,24 @@ swfdec_action_enumerate2 (SwfdecAsContex JS_DestroyIdArray (cx, array); return JS_TRUE; } +#endif static void -swfdec_action_logical_5 (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) -{ - void l, r; - - l = swfdec_value_to_boolean_5 (cx, cx->fp->sp[-1]); - r = swfdec_value_to_boolean_5 (cx, cx->fp->sp[-2]); - - cx->fp->sp--; - if (action == 0x10) - cx->fp->sp[-1] = l && r ? JSVAL_TRUE : JS...
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
...eld is garbage-collected. Apart from the type + * member, use the provided macros to access this structure. + * <note>If you memset a SwfdecAsValue to 0, it is a valid undefined value.</note> + */ + +/*** actual code ***/ + +/** + * swfdec_as_str_concat: + * @cx: a #SwfdecAsContext + * @s1: first string + * @s2: second string + * + * Convenience function to concatenate two garbage-collected strings. This + * function is equivalent to g_strconcat (). + * + * Returns: A new garbage-collected string + **/ const char * swfdec_as_str_concat (SwfdecAsContext *cx, const char *...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
...= G_OBJECT_CLASS (klass); SwfdecAsObjectClass *asobject_class = SWFDEC_AS_OBJECT_CLASS (klass); - object_class->dispose = swfdec_as_array_dispose; - asobject_class->add = swfdec_as_array_add; asobject_class->set = swfdec_as_array_set; } @@ -374,7 +395,7 @@ swfdec_as_array_new (SwfdecAsContext *co g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (context->Array != NULL, NULL); - + if (!swfdec_as_context_use_mem (context, sizeof (SwfdecAsArray))) return FALSE; ret = g_object_new (SWFDEC_TYPE_AS_ARRAY, NULL); @@ -385,9 +406,10 @@ swf...
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
...constructor object will be set correctly. - * - * Returns: a new object of @type or %NULL on OOM + * Sets the constructor and prototype of @fun. This is a shortcut for calling + * 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_t...
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
...SwfdecTextFormat * format, guint start_index, guint end_index); +void swfdec_text_field_movie_set_scroll (SwfdecTextFieldMovie * text, + int value); /* implemented in swfdec_text_field_movie_as.c */ void swfdec_text_field_movie_init_properties (SwfdecAsContext * cx); diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c index 19aabd6..7e8e20e 100644 --- a/libswfdec/swfdec_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -420,7 +420,7 @@ swfdec_text_field_movie_get...
2007 Oct 22
0
2 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h
..._soft (SwfdecPlayer * player); void swfdec_player_unlock (SwfdecPlayer * player); void swfdec_player_unlock_soft (SwfdecPlayer * player); commit 6d52076dc837c3d4007971c44e1c83acc6c606ee Author: Benjamin Otte <otte at gnome.org> Date: Mon Oct 22 11:25:39 2007 +0200 add an "SwfdecAsContext::aborted" and swfdec_as_context_is_aborted() diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index e423b7a..2442538 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -300,6 +300,7 @@ SWFDEC_AS_VALUE_IS_OBJECT SwfdecAsContext...
2007 Jul 02
0
Branch 'as' - 24 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...DEC_AS_CONTEXT_RUNNING) goto error; diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 3195a8c..649ec36 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -321,7 +321,7 @@ swfdec_action_push (SwfdecAsContext *cx, while (swfdec_bits_left (&bits)) { guint type = swfdec_bits_get_u8 (&bits); SWFDEC_LOG ("push type %u", type); - swfdec_as_stack_ensure_left (stack, 1); + swfdec_as_stack_ensure_free (stack, 1); switch (type) { case 0: /* string */ { @...
2007 Jun 17
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_player.c
...1:49:08 2007 +0200 remove leftover g_print diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index b848ba3..4ea8f7b 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -250,7 +250,6 @@ swfdec_as_context_gc (SwfdecAsContext *c g_return_if_fail (context->state != SWFDEC_AS_CONTEXT_NEW); SWFDEC_INFO ("invoking the garbage collector"); - g_print ("invoking the garbage collector\n"); klass = SWFDEC_AS_CONTEXT_GET_CLASS (context); g_assert (klass->mark); klass->mark (context);...
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
..._as_internal.h @@ -28,6 +28,10 @@ G_BEGIN_DECLS /* This 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...
2007 Apr 12
0
Branch 'as' - 15 commits - 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 libswfdec/swfdec_as_interpret.c
...-387,7 +387,7 @@ start: while (TRUE) { if (pc == endpc) { - swfdec_as_context_return (context, NULL); + swfdec_as_context_return (context); goto start; } if (pc < startpc || pc >= endpc) { @@ -471,19 +471,12 @@ error: } void -swfdec_as_context_return (SwfdecAsContext *context, SwfdecAsValue *retval) +swfdec_as_context_return (SwfdecAsContext *context) { g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); g_return_if_fail (context->frame != NULL); - g_return_if_fail (retval == NULL || SWFDEC_IS_AS_VALUE (retval)); context->frame = context->f...
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
...context with the default objects available in Flash. diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index 9ed00ec..efcf513 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -36,6 +36,8 @@ /** * SwfdecAsContextState + * @SWFDEC_AS_CONTEXT_NEW: the context is not yet initialized, + * swfdec_as_context_startup() needs to be called. * @SWFDEC_AS_CONTEXT_RUNNING: the context is running normally * @SWFDEC_AS_CONTEXT_INTERRUPTED: the context has been interrupted by a *...
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
...n_variable (SwfdecTextFieldMovie * text, + const char * value); +void swfdec_text_field_movie_set_listen_variable_text (SwfdecTextFieldMovie *text, + const char * value); /* implemented in swfdec_text_field_movie_as.c */ void swfdec_text_field_movie_init_properties (SwfdecAsContext * cx); diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c index 375f780..e6c4ff5 100644 --- a/libswfdec/swfdec_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -87,7 +87,7 @@ swfdec_text_field_movie_do_se...