search for: swfdec_as_context_new

Displaying 20 results from an estimated 26 matches for "swfdec_as_context_new".

2007 Jun 17
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_player.c
...e 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); diff-tree c9fbb629a9fafe3cb05322ef3c7653085cd1ace9 (from parents)...
2007 Sep 08
0
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_video_movie_as.c
...nit_context (context, version); /* run init script */ - swfdec_as_context_run_init_script (context, swfdec_as_initialize, sizeof (swfdec_as_initialize)); + swfdec_as_context_run_init_script (context, swfdec_as_initialize, sizeof (swfdec_as_initialize), 8); if (context->state == SWFDEC_AS_CONTEXT_NEW) context->state = SWFDEC_AS_CONTEXT_RUNNING; diff --cc libswfdec/swfdec_as_interpret.c index 2660c97,a94d3ca..71a5663 @@@ -409,25 -409,6 +409,25 @@@ } } - static SwfdecAsObject * - super_special_movie_lookup_magic (SwfdecAsObject *movie, const char *name) ++static SwfdecMovie * ++...
2007 Nov 08
0
libswfdec/swfdec_load_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c libswfdec/swfdec_resource.h
..._is_initialized (player)) - return; - - context = SWFDEC_AS_CONTEXT (player); - swfdec_as_context_startup (context, version); - /* reset state for initialization */ - /* FIXME: have a better way to do this */ - if (context->state == SWFDEC_AS_CONTEXT_RUNNING) { - context->state = SWFDEC_AS_CONTEXT_NEW; - swfdec_sprite_movie_init_context (player, version); - swfdec_video_movie_init_context (player, version); - swfdec_net_connection_init_context (player, version); - swfdec_net_stream_init_context (player, version); - - swfdec_as_context_run_init_script (context, swfdec_initialize,...
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
...fdec/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, NULL); } +/** + * swfdec_as_context_get_time: + * @context: a #SwfdecAsContext + * @tv: a #GTimeVal to be set to the context's time + * + * This function queries the time to be used inside this context. By default, + * this is the same a...
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
...rtup swfdec_as_context_abort -swfdec_as_context_abort_oom -swfdec_as_context_eval -swfdec_as_context_eval_set -swfdec_as_context_gc swfdec_as_context_get_string -swfdec_as_context_get_time swfdec_as_context_give_string +swfdec_as_context_use_mem +swfdec_as_context_gc swfdec_as_context_maybe_gc -swfdec_as_context_new -swfdec_as_context_return swfdec_as_context_run -swfdec_as_context_startup swfdec_as_context_unuse_mem -swfdec_as_context_use_mem +swfdec_as_context_eval +swfdec_as_context_eval_set +swfdec_as_context_get_time <SUBSECTION Standard> swfdec_as_context_get_type SwfdecAsContextClass diff-tre...
2007 Aug 20
2
libswfdec/swfdec_player.c
libswfdec/swfdec_player.c | 1 - 1 file changed, 1 deletion(-) New commits: diff-tree fd36de2f156ce685d5095aaf323e0766ea017bd7 (from c3b035ca1583a420402b965506129bd73ff3f5fe) Author: Benjamin Otte <otte at gnome.org> Date: Mon Aug 20 16:02:09 2007 +0200 no need for that header diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c index b303408..cd58cf5 100644 ---
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
...lates the 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 * debugger @@ -3...
2007 May 29
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_math.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c
...ec_as_interpret.h" +#include "swfdec_as_math.h" #include "swfdec_as_native_function.h" #include "swfdec_as_number.h" #include "swfdec_as_object.h" @@ -797,13 +798,17 @@ swfdec_as_context_startup (SwfdecAsConte g_return_if_fail (context->state == SWFDEC_AS_CONTEXT_NEW); context->version = version; + /* get the necessary objects up to define objects and functions sanely */ swfdec_as_function_init_context (context, version); swfdec_as_object_init_context (context, version); - + /* define the global object and other important ones */ swfdec_as_co...
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
...get_debug (SwfdecAsObject * object); diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c index 39a1cb1..942dadf 100644 --- a/libswfdec/swfdec_player.c +++ b/libswfdec/swfdec_player.c @@ -1444,7 +1444,7 @@ swfdec_player_initialize (SwfdecPlayer * } if (context->state == SWFDEC_AS_CONTEXT_NEW) { context->state = SWFDEC_AS_CONTEXT_RUNNING; - swfdec_as_object_set_constructor (player->roots->data, player->MovieClip, FALSE); + swfdec_as_object_set_constructor (player->roots->data, player->MovieClip); } } SWFDEC_INFO ("initializing player...
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
.../FILE> +<TITLE>SwfdecAsContext</TITLE> +swfdec_as_context_abort +swfdec_as_context_abort_oom +swfdec_as_context_eval +swfdec_as_context_eval_set +swfdec_as_context_gc +swfdec_as_context_get_string +swfdec_as_context_get_time +swfdec_as_context_give_string +swfdec_as_context_maybe_gc +swfdec_as_context_new +swfdec_as_context_return +swfdec_as_context_run +swfdec_as_context_startup +swfdec_as_context_trace +swfdec_as_context_unuse_mem +swfdec_as_context_use_mem +<SUBSECTION Standard> +swfdec_as_context_get_type +SwfdecAsContextClass +SWFDEC_AS_CONTEXT +SWFDEC_AS_CONTEXT_CLASS +SWFDEC_AS_CONTEXT_...
2007 Jul 31
0
10 commits - doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_buffer.c libswfdec/swfdec_debugger.c libswfdec/swfdec.h
...ec_player.c +++ b/libswfdec/swfdec_player.c @@ -1299,10 +1299,6 @@ swfdec_player_initialize (SwfdecPlayer * swfdec_net_connection_init_context (player, version); swfdec_net_stream_init_context (player, version); swfdec_xml_init_context (player, version); - if (context->state == SWFDEC_AS_CONTEXT_NEW) { - context->state = SWFDEC_AS_CONTEXT_RUNNING; - swfdec_as_object_set_constructor (player->roots->data, player->MovieClip, FALSE); - } if (version > 4) { SwfdecBits bits; SwfdecScript *script; @@ -1312,6 +1308,10 @@ swfdec_player_initialize (SwfdecPl...
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
...a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c index 74a8e7c..965f021 100644 --- a/libswfdec/swfdec_player.c +++ b/libswfdec/swfdec_player.c @@ -1056,7 +1056,7 @@ swfdec_player_initialize (SwfdecPlayer * swfdec_movie_color_init_context (player, version); if (context->state == SWFDEC_AS_CONTEXT_NEW) { context->state = SWFDEC_AS_CONTEXT_RUNNING; - swfdec_as_object_set_constructor (player->roots->data, player->MovieClip); + swfdec_as_object_set_constructor (player->roots->data, player->MovieClip, FALSE); } } SWFDEC_INFO ("initializing player...
2007 Mar 28
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
...sCo const char *ret; gsize len; - g_return_val_if_fail (SWFDEC_AS_IS_CONTEXT (context), NULL); + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (string != NULL, NULL); ret = g_hash_table_lookup (context->strings, string); @@ -277,3 +279,111 @@ swfdec_as_context_new (void) { return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); } + +/* defines minimum and maximum versions for which we have seperate scripts */ +#define MINSCRIPTVERSION 3 +#define MAXSCRIPTVERSION 7 +#define EXTRACT_VERSION(v) MIN ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION)...
2007 Jun 21
0
Branch 'as' - 5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_connection.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...@ swfdec_player_initialize (SwfdecPlayer * swfdec_sprite_movie_init_context (player, version); swfdec_movie_color_init_context (player, version); swfdec_net_connection_init_context (player, version); + swfdec_net_stream_init_context (player, version); if (context->state == SWFDEC_AS_CONTEXT_NEW) { context->state = SWFDEC_AS_CONTEXT_RUNNING; swfdec_as_object_set_constructor (player->roots->data, player->MovieClip, FALSE); diff-tree 55515a23b84c9c71944c47d6e63b1b0066e53ead (from fa2a28a1388c0f22d19d59db99d292a4e911cae5) Author: Benjamin Otte <otte at gnome.org&g...
2007 May 23
0
Branch 'as' - 7 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...52,6 +1053,7 @@ swfdec_player_initialize (SwfdecPlayer * swfdec_player_init_global (player, version); swfdec_mouse_init_context (player, version); swfdec_sprite_movie_init_context (player, version); + swfdec_movie_color_init_context (player, version); if (context->state == SWFDEC_AS_CONTEXT_NEW) { context->state = SWFDEC_AS_CONTEXT_RUNNING; swfdec_as_object_set_constructor (player->roots->data, player->MovieClip); diff-tree ebdd3d457ee189c03941ed1fab0ab14a7f1ee990 (from f847682cb4372a9e77801399bcd57b56ae8eb253) Author: Benjamin Otte <otte at gnome.org> Date...
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
.../** + * SwfdecAsContext + * + * This is the main object ued to hold the state of a script engine. All members + * are private and should not be accessed. + * + * Subclassing this structure to get scripting support in your own appliation is + * encouraged. + */ + +/** * SwfdecAsContextState * @SWFDEC_AS_CONTEXT_NEW: the context is not yet initialized, * swfdec_as_context_startup() needs to be called. diff-tree 9cb965f4bf684ba88de23914dab745bf135f30f5 (from 3cf73adcae332b29cd30bd8747cfe0a8fdcb9aae) Author: Benjamin Otte <otte at gnome.org> Date: Thu Jul 12 22:56:49 2007 +0200...
2007 Jun 06
0
Branch 'as' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...ng (SwfdecAsContext *context, char *string) +{ + const char *ret; + + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + g_return_val_if_fail (string != NULL, NULL); + + ret = swfdec_as_context_get_string (context, string); + g_free (string); + return ret; +} + SwfdecAsContext * swfdec_as_context_new (void) { diff --git a/libswfdec/swfdec_as_context.h b/libswfdec/swfdec_as_context.h index 88c6c6f..5d2d7ba 100644 --- a/libswfdec/swfdec_as_context.h +++ b/libswfdec/swfdec_as_context.h @@ -93,6 +93,8 @@ void swfdec_as_context_get_time (Swfdec GTimeVal * tv); const char * swfdec_as_cont...
2007 Jul 26
0
17 commits - doc/swfdec-sections.txt libswfdec/compiler.c libswfdec/.gitignore libswfdec/Makefile.am libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...registered_classes = g_hash_table_new (g_direct_hash, g_direct_equal); player->actions = swfdec_ring_buffer_new_for_type (SwfdecPlayerAction, 16); @@ -1303,7 +1310,6 @@ swfdec_player_initialize (SwfdecPlayer * if (context->state == SWFDEC_AS_CONTEXT_RUNNING) { context->state = SWFDEC_AS_CONTEXT_NEW; swfdec_player_init_global (player, version); - swfdec_mouse_init_context (player, version); swfdec_sprite_movie_init_context (player, version); swfdec_video_movie_init_context (player, version); swfdec_movie_color_init_context (player, version); diff --git a/libswfdec/swfdec...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...+1105,7 @@ swfdec_player_initialize (SwfdecPlayer * swfdec_movie_color_init_context (player, version); swfdec_net_connection_init_context (player, version); swfdec_net_stream_init_context (player, version); + swfdec_xml_init_context (player, version); if (context->state == SWFDEC_AS_CONTEXT_NEW) { context->state = SWFDEC_AS_CONTEXT_RUNNING; swfdec_as_object_set_constructor (player->roots->data, player->MovieClip, FALSE); diff-tree 9b643ffc75f78d2efd849c431e009255605fedca (from 22f8918b633320b23bcdca9eef19627674de174a) Author: Benjamin Otte <otte at gnome.org&g...
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
...t, version); swfdec_as_string_init_context (context, version); /* define the rest */ swfdec_as_math_init_context (context, version); + /* run init script */ + swfdec_as_context_run_init_script (context, swfdec_as_initialize, sizeof (swfdec_as_initialize)); + if (context->state == SWFDEC_AS_CONTEXT_NEW) context->state = SWFDEC_AS_CONTEXT_RUNNING; } diff --git a/libswfdec/swfdec_as_initialize.as b/libswfdec/swfdec_as_initialize.as new file mode 100644 index 0000000..4085c91 --- /dev/null +++ b/libswfdec/swfdec_as_initialize.as @@ -0,0 +1,35 @@ +/* Swfdec + * Copyright (C) 2007 Benjamin Ot...