Displaying 20 results from an estimated 102 matches for "swfdecscriptable".
Did you mean:
swfdec_scriptable
2007 Jul 13
0
4 commits - configure.ac libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_object.h libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h NEWS
...G_H
-#include "config.h"
-#endif
-
-#include "swfdec_scriptable.h"
-#include "swfdec_debug.h"
-#include "swfdec_loader_internal.h"
-#include "js/jsapi.h"
-#include "js/jsfun.h"
-#include "js/jsinterp.h"
-
-G_DEFINE_ABSTRACT_TYPE (SwfdecScriptable, swfdec_scriptable, G_TYPE_OBJECT)
-
-static void
-swfdec_scriptable_dispose (GObject *object)
-{
- SwfdecScriptable *script = SWFDEC_SCRIPTABLE (object);
-
- g_assert (script->jsobj == NULL);
-
- G_OBJECT_CLASS (swfdec_scriptable_parent_class)->dispose (object);
-}
-
-static JSObject *
-s...
2007 Aug 09
0
Branch 'vivi' - 12 commits - libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec/Makefile.am libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_debugger.c
..._types.h
+++ b/libswfdec/swfdec_types.h
@@ -49,7 +49,6 @@ typedef struct _SwfdecShape SwfdecShape;
typedef struct _SwfdecShapeVec SwfdecShapeVec;
typedef struct _SwfdecRect SwfdecRect;
typedef struct _SwfdecRootSprite SwfdecRootSprite;
-typedef struct _SwfdecScript SwfdecScript;
typedef struct _SwfdecScriptable SwfdecScriptable;
typedef struct _SwfdecSound SwfdecSound;
typedef struct _SwfdecSoundChunk SwfdecSoundChunk;
diff --git a/player/swfdec_debug_scripts.c b/player/swfdec_debug_scripts.c
index 3877da8..14471c3 100644
--- a/player/swfdec_debug_scripts.c
+++ b/player/swfdec_debug_scripts.c
@@ -22,6 +...
2007 Jan 26
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c
...,
+ const char * name,
+ unsigned int version);
void swfdec_script_ref (SwfdecScript * script);
void swfdec_script_unref (SwfdecScript * script);
@@ -49,9 +57,13 @@ JSBool swfdec_script_interpret (Swfdec
jsval swfdec_script_execute (SwfdecScript * script,
SwfdecScriptable * scriptable);
+gboolean swfdec_script_foreach (SwfdecScript * script,
+ SwfdecScriptForeachFunc func,
+ gpointer user_data);
char * swfdec_script_print_action (guint action,
const guint8 * data,
guint len);
+
G_END_DECLS
#endif
diff --git a/libswfdec/swf...
2007 Apr 04
0
Branch 'as' - 9 commits - 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_stack.c libswfdec/swfdec_as_stack.h
...fdecScript * swfdec_script_ref (SwfdecScript * script);
-void swfdec_script_unref (SwfdecScript * script);
-
-#if 0
-JSBool swfdec_script_interpret (SwfdecScript * script,
- JSContext * cx,
- jsval * rval);
-#endif
-void swfdec_script_execute (SwfdecScript * script,
- SwfdecScriptable * scriptable);
-
-gboolean swfdec_script_foreach (SwfdecScript * script,
- SwfdecScriptForeachFunc func,
- gpointer user_data);
-char * swfdec_script_print_action (guint action,
- const guint8 * data,
- guint len);
+ swfdec_constant_pool_new_from_action (const guin...
2007 Apr 17
0
Branch 'as' - 2 commits -
0 files changed
New commits:
diff-tree 70333bfda5e3080fcffc16a7b2f5abd85c8906b0 (from parents)
Merge: f18a5553388e383638ae064642ea3bab0b021728 b78d0a0bd570f5151cdc08c30ace2d64ce4a3b57
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Apr 17 19:51:21 2007 +0200
Merge branch 'as' of ssh://company@git.freedesktop.org/git/swfdec into as
Conflicts:
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js 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_function.c
...fdec/swfdec_script.c b/libswfdec/swfdec_script.c
index b9f605b..e6c25a5 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -3008,9 +3008,12 @@ internal_error:
*
* Returns: the return value of @script
**/
-jsval
+#endif
+void
swfdec_script_execute (SwfdecScript *script, SwfdecScriptable *scriptable)
{
+}
+#if 0
JSContext *cx;
JSStackFrame *oldfp, frame;
JSObject *obj;
diff-tree 7fbbe64db09817aaed4d28fa5bb1ac4869c835f5 (from parents)
Merge: 97a34e2bdc46d12e66fa103489e8f630fbf0d495 f516f0186bef8f00810f200034d63776bfab9271
Author: Benjamin Otte <otte@gnome.org>
Date:...
2007 Jan 18
0
Branch 'interpreter' - 2 commits - libswfdec/js libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
libswfdec/js/jsinterp.c | 1
libswfdec/js/jsinterp.h | 3 -
libswfdec/swfdec_js_movie.c | 3 -
libswfdec/swfdec_script.c | 100 ++++++++++++++++++++++++++++++++++++++++++--
4 files changed, 100 insertions(+), 7 deletions(-)
New commits:
diff-tree c3f0eaf5706a0d972132a0ea4fcaff5aa79ec122 (from 3e6fcd37cb3157514beaf45cb90e2c68d2138b86)
Author: Benjamin Otte
2007 Mar 13
0
2 commits - libswfdec/swfdec_debugger.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h
libswfdec/swfdec_debugger.c | 122 +++++++++++++++++++++++++++++++++++++++++---
libswfdec/swfdec_script.c | 38 +++++++------
libswfdec/swfdec_script.h | 9 +++
3 files changed, 145 insertions(+), 24 deletions(-)
New commits:
diff-tree f3ceb92e7405d2cef3398baa79712eaee6eeabd1 (from b1cd2edf289dde1bd89d3c513da13b4cf27bdf13)
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Mar 13
2007 Feb 01
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/swfdec_script.c libswfdec/swfdec_script.h player/swfdec_debug_stack.c test/trace
libswfdec/js/jsnum.c | 10 ++++
libswfdec/swfdec_script.c | 86 ++++++++++++++++++++++++++++---------
libswfdec/swfdec_script.h | 2
player/swfdec_debug_stack.c | 33 +++++++++++++-
test/trace/Makefile.am | 8 +++
test/trace/number.swf |binary
test/trace/number.swf.trace | 9 +++
test/trace/object-math-5.swf
2007 Feb 22
0
3 commits - libswfdec/swfdec_js.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
libswfdec/swfdec_js.c | 11 +++
libswfdec/swfdec_js_movie.c | 20 ++++++-
libswfdec/swfdec_script.c | 123 +++++++++++++++++++++++++++-----------------
3 files changed, 105 insertions(+), 49 deletions(-)
New commits:
diff-tree 66851d9bc67c5663464a4c9488235e3c233579a7 (from 3c4a91276dbf607849f02fc9f637f8caf1c339c6)
Author: Benjamin Otte <otte@gnome.org>
Date: Thu Feb 22
2007 Feb 19
0
22 commits - libswfdec/js libswfdec/swfdec_debugger.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_script.c
...n JS_FALSE;
- }
+ g_assert (cx->fp->callobj != NULL);
name = swfdec_js_to_string (cx, cx->fp->sp[-1]);
if (name == NULL)
return JS_FALSE;
@@ -2549,6 +2542,22 @@ internal_error:
goto no_catch;
}
+static JSFunction *
+swfdec_script_ensure_function (SwfdecScript *script, SwfdecScriptable *scriptable)
+{
+ JSContext *cx = scriptable->jscx;
+ JSObject *parent;
+
+ if (script->fun)
+ return script->fun;
+ parent = swfdec_scriptable_get_object (scriptable);
+ script->fun = JS_NewFunction (cx, NULL, 0, JSFUN_LAMBDA, parent, NULL);
+ script->fun->swf = script;...
2007 Mar 07
0
11 commits - libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h
...RUCT:
+ return event_names[18];
+ default:
+ g_assert_not_reached ();
+ return NULL;
+ }
+}
SwfdecEventList *
swfdec_event_list_new (SwfdecPlayer *player)
@@ -154,36 +223,45 @@ swfdec_event_list_parse (SwfdecEventList
void
swfdec_event_list_execute (SwfdecEventList *list, SwfdecScriptable *scriptable,
- unsigned int conditions, guint8 key)
+ unsigned int condition, guint8 key)
{
unsigned int i;
+ const char *name;
g_return_if_fail (list != NULL);
for (i = 0; i < list->events->len; i++) {
SwfdecEvent *event = &g_array_index (list->events, Sw...
2007 Jan 16
0
9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_cache.c libswfdec/swfdec_cached.c libswfdec/swfdec_cached.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_image.c
...u)", cache, handle,
+ cache->usage + handle->size, cache->usage);
}
}
diff-tree 56c277e18cee8bf64152e1ad3e5f7e2af5b1ec5f (from 097b676f528d2d0e5c0a972823cdffdf4e9b0134)
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Jan 16 11:57:12 2007 +0100
make SwfdecNetStream a SwfdecScriptable (nothing else changed)
diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c
index 21458d5..eee3f72 100644
--- a/libswfdec/swfdec_net_stream.c
+++ b/libswfdec/swfdec_net_stream.c
@@ -200,7 +200,7 @@ swfdec_net_stream_input_finalize (Swfdec
/*** SWFDEC_NET_STREAM ***/
-G_D...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
libswfdec/swfdec_font.c | 4
libswfdec/swfdec_font.h | 2
libswfdec/swfdec_js_movie.c | 8 -
libswfdec/swfdec_script.c | 225 +++++++++++++++++++++++++++++++++++++++----
libswfdec/swfdec_script.h | 14 ++
test/.gitignore | 1
test/trace/Makefile.am | 6 +
test/trace/height4.swf |binary
test/trace/height4.swf.trace | 5
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
libswfdec/js/jsinterp.h | 1
libswfdec/swfdec_bits.c | 28 +++
libswfdec/swfdec_bits.h | 9 -
libswfdec/swfdec_codec_screen.c | 2
libswfdec/swfdec_image.c | 98 ++++--------
libswfdec/swfdec_script.c | 315 ++++++++++++++++++++++++++++++++++++++--
libswfdec/swfdec_swf_decoder.c | 2
libswfdec/swfdec_tag.c | 23 --
8 files
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...DEC_MOVIE (movie)->root);
+ name = swfdec_root_movie_get_export_name (root, SWFDEC_CHARACTER (movie->sprite));
+ if (name == NULL)
+ return JSVAL_NULL;
+ return swfdec_player_get_export_class (root->player, name);
}
void
swfdec_js_movie_create_jsobject (SwfdecMovie *movie)
{
SwfdecScriptable *script;
- jsval fun;
+ jsval fun = JSVAL_NULL;
g_return_if_fail (SWFDEC_IS_MOVIE (movie));
@@ -1252,12 +1266,12 @@ swfdec_js_movie_create_jsobject (SwfdecM
g_return_if_fail (script->jscx != NULL);
g_return_if_fail (script->jsobj == NULL);
- fun = swfdec_js_movie_lookup_clas...
2007 Mar 29
0
Branch 'as' - 9 commits - configure.ac doc/swfdec-sections.txt 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_stack.c
configure.ac | 7 +-
doc/swfdec-sections.txt | 10 +++-
libswfdec/Makefile.am | 2
libswfdec/swfdec_as_context.c | 82 ++++++++++++++++++++++-----------
libswfdec/swfdec_as_context.h | 2
libswfdec/swfdec_as_frame.c | 10 ++++
libswfdec/swfdec_as_frame.h | 3 -
libswfdec/swfdec_as_stack.c | 98
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...,
+ const char * name,
+ unsigned int version);
void swfdec_script_ref (SwfdecScript * script);
void swfdec_script_unref (SwfdecScript * script);
@@ -49,9 +57,13 @@ JSBool swfdec_script_interpret (Swfdec
jsval swfdec_script_execute (SwfdecScript * script,
SwfdecScriptable * scriptable);
+gboolean swfdec_script_foreach (SwfdecScript * script,
+ SwfdecScriptForeachFunc func,
+ gpointer user_data);
char * swfdec_script_print_action (guint action,
const guint8 * data,
guint len);
+
G_END_DECLS
#endif
diff --git a/libswfdec/swf...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
...int version,
- unsigned int conditions, guint8 key, const char *description)
+ guint conditions, guint8 key, const char *description)
{
SwfdecEvent event;
char *name;
@@ -223,9 +223,9 @@ swfdec_event_list_parse (SwfdecEventList
void
swfdec_event_list_execute (SwfdecEventList *list, SwfdecScriptable *scriptable,
- unsigned int condition, guint8 key)
+ guint condition, guint8 key)
{
- unsigned int i;
+ guint i;
g_return_if_fail (list != NULL);
@@ -241,9 +241,9 @@ swfdec_event_list_execute (SwfdecEventLi
gboolean
swfdec_event_list_has_conditions (SwfdecEventList *list, Swfde...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...duplicate, swfdec_action_push_duplicate, swfdec_action_push_duplicate } },
[0x4d] = { "Swap", NULL },
@@ -2643,6 +2652,17 @@ swfdec_script_ensure_function (SwfdecScr
return script->fun;
}
+/**
+ * swfdec_script_execute:
+ * @script: a #SwfdecScript to execute
+ * @scriptable: #SwfdecScriptable to use as this in script scope
+ *
+ * Executes @script in the context of @scriptable. No local scope will be
+ * added, so no local variables can exist. As per Actionscript, 4 registers
+ * will be created.
+ *
+ * Returns: the return value of @script
+ **/
jsval
swfdec_script_execute (SwfdecSc...