search for: jsfun

Displaying 17 results from an estimated 17 matches for "jsfun".

Did you mean: sfun
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
autogen.sh | 2 configure.ac | 39 +++ libswfdec/js/jsfun.c | 11 - libswfdec/js/jsinterp.c | 5 libswfdec/js/jsobj.c | 2 libswfdec/swfdec_debug.h | 2 libswfdec/swfdec_js.c | 4 libswfdec/swfdec_js_color.c | 33 +-- libswfdec/swfdec_js_movie.c | 25 -- libswfdec/swfdec_movie.c |...
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
libswfdec/js/jsfun.c | 7 + libswfdec/js/jsobj.c | 12 +- libswfdec/swfdec_debugger.c | 5 libswfdec/swfdec_js.c | 10 + libswfdec/swfdec_js_global.c | 165 +++++++++++++++++++++++++++++++- libswfdec/swfdec_js_movie.c...
2007 Jun 08
0
Changes to 'refs/tags/0.4.2'
...2 configure.ac | 46 doc/swfdec-sections.txt | 1 libswfdec/Makefile.am | 8 libswfdec/js/jsapi.c | 6 libswfdec/js/jsapi.h | 6 libswfdec/js/jsfun.c | 11 libswfdec/js/jsfun.h | 3 libswfdec/js/jsgc.c | 29 libswfdec/js/jsinterp.c | 16 libswfdec/js/jsinterp.h | 4 libswfdec/js/jsnum.c...
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
libswfdec/Makefile.am | 4 libswfdec/js/jsapi.c | 6 - libswfdec/js/jsapi.h | 6 - libswfdec/js/jsfun.h | 2 libswfdec/js/jsinterp.c | 2 libswfdec/js/jsobj.c | 8 - libswfdec/js/jsobj.h | 6 - libswfdec/js/jspubtd.h | 4 libswfdec/js/jsscope.c | 2 libswfdec/js/jsscope.h | 2 libswfdec/swfde...
2007 Mar 20
0
9 commits - configure.ac libswfdec/swfdec_bits.c libswfdec/swfdec_debug.c libswfdec/swfdec_js.c libswfdec/swfdec_script.c libswfdec/swfdec_sound.c
...Mar 20 15:08:10 2007 +0100 implement warning about missing properties, but disable by default. diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 5eda3c1..4853d3c 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -41,6 +41,11 @@ #include "js/jsfun.h" #include "js/jsscope.h" +/* Define this to get SWFDEC_WARN'd about missing properties of objects. + * This can be useful to find out about unimplemented native properties, + * but usually just causes a lot of spam. */ +//#define SWFDEC_WARN_MISSING_PROPERTIES + /*** CONSTA...
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
...reet, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#ifdef HAVE_CONFIG_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...
2007 Apr 27
0
Changes to 'refs/tags/0.4.3'
...swfdec/js/jsapi.c | 11 libswfdec/js/jsapi.h | 8 libswfdec/js/jsatom.c | 2 libswfdec/js/jsatom.h | 6 libswfdec/js/jsdhash.c | 2 libswfdec/js/jsfun.c | 16 libswfdec/js/jsfun.h | 3 libswfdec/js/jsgc.c | 34 libswfdec/js/jsinterp.c | 26 libswfdec/js/jsinterp.h | 11 libswfdec/js/jsnum.c...
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
...wfdec_action_get_time, swfdec_action_get_time } }, [0x35] = { "MBStringExtract", NULL }, [0x36] = { "MBCharToAscii", NULL }, [0x37] = { "MVAsciiToChar", NULL }, @@ -2586,13 +2595,32 @@ swfdec_script_interpret (SwfdecScript *s /* FIXME: keep in sync with jsfun.c */ fp->flags |= JS_BIT (JSFRAME_OVERRIDE_SHIFT); } - if (script->flags & SWFDEC_SCRIPT_PRELOAD_SUPER || - script->flags & SWFDEC_SCRIPT_PRELOAD_ROOT || - script->flags & SWFDEC_SCRIPT_PRELOAD_PARENT) { - SWFDEC_ERROR ("The following preload flags a...
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
configure.ac | 2 libswfdec/Makefile.am | 4 libswfdec/js/jsfun.c | 11 libswfdec/js/jsfun.h | 1 libswfdec/js/jsgc.c | 29 libswfdec/js/jsinterp.c | 14 libswfdec/js/jsinterp.h | 4 libswfdec/js/jsnum.c | 10 libswfdec/js/jsobj.c | 2 libswfdec/...
2007 Apr 27
0
Changes to 'refs/tags/0.4.4'
...swfdec/js/jsapi.c | 11 libswfdec/js/jsapi.h | 8 libswfdec/js/jsatom.c | 2 libswfdec/js/jsatom.h | 6 libswfdec/js/jsdhash.c | 2 libswfdec/js/jsfun.c | 16 libswfdec/js/jsfun.h | 3 libswfdec/js/jsgc.c | 34 libswfdec/js/jsinterp.c | 26 libswfdec/js/jsinterp.h | 11 libswfdec/js/jsnum.c...
2007 Feb 22
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_js.c libswfdec/swfdec_js_mouse.c libswfdec/swfdec_listener.c libswfdec/swfdec_listener.h libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...se_listener, JSVAL_TO_OBJECT (argv[0])); + return JS_TRUE; +} + +static JSBool swfdec_js_mouse_show (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { SwfdecPlayer *player = JS_GetContextPrivate (cx); @@ -46,8 +70,10 @@ swfdec_js_mouse_hide (JSContext *cx, JSO } static JSFunctionSpec mouse_methods[] = { - {"show", swfdec_js_mouse_show, 0, 0, 0 }, - {"hide", swfdec_js_mouse_hide, 0, 0, 0 }, + {"addListener", swfdec_js_mouse_add_listener, 1, 0, 0 }, + {"hide", swfdec_js_mouse_hide, 0, 0, 0 }, + {"remove...
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
...criptable.c b/libswfdec/swfdec_scriptable.c index 6554666..951a726 100644 --- a/libswfdec/swfdec_scriptable.c +++ b/libswfdec/swfdec_scriptable.c @@ -25,6 +25,8 @@ #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) @@ -234,3 +236,69 @@ swfdec_scriptable_set_variables (SwfdecS } } +/** + * swfdec_scriptable_execute: + * @script: a #SwfdecScriptable + * @name: property name that con...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...wfdec_script.c b/libswfdec/swfdec_script.c index 8a0d3a6..b1f1a63 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -35,6 +35,7 @@ #include "swfdec_movie.h" #include "swfdec_player_internal.h" #include "swfdec_root_movie.h" +#include "js/jsfun.h" /*** CONSTANT POOLS ***/ @@ -1063,6 +1064,47 @@ swfdec_action_stop_sounds (JSContext *cx return JS_TRUE; } +static JSBool +swfdec_action_new_object (JSContext *cx, guint action, const guint8 *data, guint len) +{ + JSStackFrame *fp = cx->fp; + jsval constructor; + JSObject *...
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
...sval *rval) -{ - SwfdecVideoMovie *video; - - video = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_VIDEO_MOVIE); - if (video == NULL) - return JS_TRUE; - - swfdec_video_movie_clear (video); - return JS_TRUE; + swfdec_video_movie_set_input (video, &stream->input); } -static JSFunctionSpec video_methods[] = { - { "attachVideo", swfdec_js_video_attach_video, 1, 0, 0 }, - { "clear", swfdec_js_video_clear, 0, 0, 0 }, - {0,0,0,0,0} -}; - static void -swfdec_js_video_finalize (JSContext *cx, JSObject *obj) +swfdec_video_clear (SwfdecAsContext *cx,...
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
...esktop.org/git/swfdec into as Conflicts: libswfdec/swfdec_script.h diff --cc libswfdec/swfdec_script.h index 8a3741e,b58252b..673332a @@@ -47,12 -48,11 +47,12 @@@ /* FIXME: May want to typedef to SwfdecBuffer directly */ struct _SwfdecScript { /* must be first arg */ - JSFunction * fun; /* function script belongs to or NULL */ + gpointer fun; /* function script belongs to or NULL */ SwfdecBuffer * buffer; /* buffer holding the script */ - unsigned int refcount; /* reference count */ + guint refcount; /* reference count */ char * name; /...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...ec/swfdec_listener.c b/libswfdec/swfdec_listener.c index 85ea67d..b4495e7 100644 --- a/libswfdec/swfdec_listener.c +++ b/libswfdec/swfdec_listener.c @@ -21,31 +21,32 @@ #include "config.h" #endif #include "swfdec_listener.h" -#include "js/jsapi.h" -#include "js/jsfun.h" -#include "js/jsinterp.h" +#include "swfdec_as_context.h" +#include "swfdec_as_object.h" #include "swfdec_debug.h" -#include "swfdec_player_internal.h" typedef struct { - JSObject * object; /* the object we care about or NULL if empty...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...S_FALSE; + fp->sp -= n_items; + fp->sp[-1] = OBJECT_TO_JSVAL (array); + return JS_TRUE; +} + +static void +swfdec_action_define_function (SwfdecAsContext *cx, guint action, + const guint8 *data, guint len) +{ + const char *function_name; + guint i, n_args, size; + SwfdecBits bits; + JSFunction *fun; + SwfdecScript *script; + JSObject *scope; + gboolean has_preloads = FALSE; + guint flags = 0; + guint8 *preloads = NULL; + gboolean v2 = (action == 0x8e); + + swfdec_bits_init_data (&bits, data, len); + function_name = swfdec_bits_skip_string (&bits); + if (function_nam...