Displaying 20 results from an estimated 53 matches for "swfdec_as_native".
2007 Dec 03
0
libswfdec/Makefile.am
...1 @@ BUILT_SOURCES = \
CLEANFILES = \
$(BUILT_SOURCES)
-swfdec_asnative.h: $(libswfdec_ at SWFDEC_MAJORMINOR@_la_SOURCES)
+swfdec_asnative.h: $(libswfdec_source_files)
(cd $(srcdir) \
&& echo "#include \"swfdec_as_types.h\"" \
&& echo "#define SWFDEC_AS_NATIVE(x,y,func) void func (SwfdecAsContext *cx, \\" \
&& echo " SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret);" \
&& echo "#define SWFDEC_AS_CONSTRUCTOR(x,y,func,type) SWFDEC_AS_NATIVE(x,y,func) GType type (void);" \
- &...
2007 Jul 26
0
5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player_as.c
...ent ASSetNativeAccessor
diff --git a/libswfdec/swfdec_player_as.c b/libswfdec/swfdec_player_as.c
index 3da2083..f480226 100644
--- a/libswfdec/swfdec_player_as.c
+++ b/libswfdec/swfdec_player_as.c
@@ -21,15 +21,20 @@
#include "config.h"
#endif
+/* NB: include this first, it redefines SWFDEC_AS_NATIVE */
+#include "swfdec_asnative.h"
+
#include "swfdec_player_internal.h"
#include "swfdec_as_function.h"
#include "swfdec_as_native_function.h"
#include "swfdec_as_object.h"
#include "swfdec_as_strings.h"
-#include "swfdec_asnative...
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
...tring (SwfdecAsContext * context,
+ SwfdecAsObject * object);
+
G_END_DECLS
#endif
diff --git a/libswfdec/swfdec_as_string.c b/libswfdec/swfdec_as_string.c
index 5cb4d18..c9739c9 100644
--- a/libswfdec/swfdec_as_string.c
+++ b/libswfdec/swfdec_as_string.c
@@ -30,6 +30,7 @@
#include "swfdec_as_native_function.h"
#include "swfdec_as_strings.h"
#include "swfdec_debug.h"
+#include "swfdec_player_internal.h"
G_DEFINE_TYPE (SwfdecAsString, swfdec_as_string, SWFDEC_TYPE_AS_OBJECT)
@@ -76,11 +77,12 @@ swfdec_as_str_nth_char (const char *s, g
return s;
}...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
...Fix push and pop methods to handle negative length values.
Add test cases for both things.
diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c
index f6314a7..9d245c3 100644
--- a/libswfdec/swfdec_as_array.c
+++ b/libswfdec/swfdec_as_array.c
@@ -33,6 +33,7 @@
#include "swfdec_as_native_function.h"
#include "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
-s...
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
libswfdec/swfdec_as_array.c | 407 ++++++++++++++++++++--------------
libswfdec/swfdec_as_function.c | 37 +--
libswfdec/swfdec_as_function.h | 4
libswfdec/swfdec_as_internal.h | 4
libswfdec/swfdec_as_interpret.c | 25 +-
libswfdec/swfdec_as_native_function.c | 20 -
libswfdec/swfdec_as_script_function.c | 23 +
libswfdec/swfdec_as_script_function.h | 3
test/trace/array2-5.swf |binary
test/trace/array2-5.swf.trace | 38 +++
test/trace/array2-6.swf |binary
test/trace/array2-6.swf.trace |...
2007 Oct 11
0
10 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_buffer.c libswfdec/swfdec_movie_as_drawing.c test/image test/sound
...list_append (movie->draws, new);
+
+ /* need to begin a new line segment to ensure proper stacking order */
+ if (movie->draw_line) {
+ movie->draw_line = swfdec_stroke_copy (movie->draw_line);
+ movie->draws = g_slist_append (movie->draws, movie->draw_line);
+ }
+}
+
SWFDEC_AS_NATIVE (901, 1, swfdec_sprite_movie_beginFill)
void
swfdec_sprite_movie_beginFill (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
SwfdecMovie *movie;
+ SwfdecDraw *draw;
int color, alpha;
SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &mov...
2007 Sep 02
0
3 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_internal.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c test/trace
...rong ASnative number
diff --git a/libswfdec/swfdec_as_number.c b/libswfdec/swfdec_as_number.c
index 9328b26..8a44733 100644
--- a/libswfdec/swfdec_as_number.c
+++ b/libswfdec/swfdec_as_number.c
@@ -84,7 +84,7 @@ swfdec_as_number_toString (SwfdecAsConte
SWFDEC_AS_VALUE_SET_STRING (ret, s);
}
-SWFDEC_AS_NATIVE (106, 1, swfdec_as_number_valueOf)
+SWFDEC_AS_NATIVE (106, 0, swfdec_as_number_valueOf)
void
swfdec_as_number_valueOf (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
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
doc/Makefile.am | 1
doc/swfdec-sections.txt | 3
libswfdec/swfdec_as_array.c | 1
libswfdec/swfdec_as_boolean.c | 2
libswfdec/swfdec_as_internal.h | 4
libswfdec/swfdec_as_native_function.c | 156 ++++++++++++++++++++++++++++++++++
libswfdec/swfdec_as_native_function.h | 21 ++++
libswfdec/swfdec_as_number.c | 2
libswfdec/swfdec_as_object.h | 3
libswfdec/swfdec_as_string.c | 2
libswfdec/swfdec_asbroadcaster.c | 2
libswf...
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
...bject *object,
- guint argc, SwfdecAsValue *argv, SwfdecAsValue *return_value)
-{
- SwfdecPlayer *player = SWFDEC_PLAYER (cx);
-
- if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]))
- return;
- swfdec_listener_remove (player->mouse_listener, SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]));
-}
-
SWFDEC_AS_NATIVE (5, 0, swfdec_mouse_show)
void
swfdec_mouse_show (SwfdecAsContext *cx, SwfdecAsObject *object,
@@ -72,23 +48,3 @@ swfdec_mouse_hide (SwfdecAsContext *cx,
player->mouse_visible = FALSE;
}
-void
-swfdec_mouse_init_context (SwfdecPlayer *player, guint version)
-{
- SwfdecAsValue val;
- S...
2007 Jul 26
0
6 commits - libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_stage_as.c test/trace
...git a/libswfdec/swfdec_stage_as.c b/libswfdec/swfdec_stage_as.c
index eee9a6b..85fc9ea 100644
--- a/libswfdec/swfdec_stage_as.c
+++ b/libswfdec/swfdec_stage_as.c
@@ -126,3 +126,47 @@ set_align (SwfdecAsContext *cx, SwfdecAs
g_object_notify (G_OBJECT (player), "alignment");
}
}
+
+SWFDEC_AS_NATIVE (666, 5, get_width)
+void
+get_width (SwfdecAsContext *cx, SwfdecAsObject *object,
+ guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
+{
+ SwfdecPlayer *player = SWFDEC_PLAYER (cx);
+
+ if (player->stage_width > -1) {
+ SWFDEC_AS_VALUE_SET_INT (ret, player->stage_width);
+ } e...
2007 Dec 23
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_character.c libswfdec/swfdec_external_interface.c libswfdec/swfdec.h libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...if
+#include <string.h>
+
#include "swfdec_as_internal.h"
+#include "swfdec_as_strings.h"
#include "swfdec_debug.h"
+#include "swfdec_player_internal.h"
+#include "swfdec_player_scripting.h"
+#include "swfdec_xml.h"
-// static
SWFDEC_AS_NATIVE (14, 0, swfdec_external_interface__initJS)
void
swfdec_external_interface__initJS (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
- SWFDEC_STUB ("ExternalInterface._initJS (static)");
+ /* FIXME: call an init vfunc here? */
}...
2008 Jun 15
1
14 commits - configure.ac swfdec/.gitignore swfdec-gtk/swfdec_gtk_loader.c swfdec-gtk/swfdec_playback_alsa.c swfdec/Makefile.am swfdec/swfdec_asnative.h swfdec/swfdec_as_string.c swfdec/swfdec_audio.c swfdec/swfdec_audio_load.c swfdec/swfdec_audio_load.h
...FDEC_TYPE_SOUND_OBJECT, &sound, "sb", &url, &stream);
+
+ if (sound->load)
+ g_object_unref (sound->load);
+ sound->load = swfdec_load_sound_new (object, url);
+ if (stream)
+ sound->audio = swfdec_audio_load_new (SWFDEC_PLAYER (cx), sound->load);
}
SWFDEC_AS_NATIVE (500, 14, swfdec_sound_object_getBytesLoaded)
diff --git a/swfdec/swfdec_sound_object.h b/swfdec/swfdec_sound_object.h
index ec057b6..c053057 100644
--- a/swfdec/swfdec_sound_object.h
+++ b/swfdec/swfdec_sound_object.h
@@ -20,6 +20,8 @@
#ifndef _SWFDEC_SOUND_OBJECT_H_
#define _SWFDEC_SOUND_OBJECT...
2007 Oct 14
0
10 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...an value;
+
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
+
+ swfdec_as_value_to_number (cx, &argv[0]);
+
+ if (text->text->border != value) {
+ text->text->border = value;
+ swfdec_movie_invalidate (SWFDEC_MOVIE (text));
+ }
+}
+
SWFDEC_AS_NATIVE (104, 104, swfdec_text_field_movie_getNewTextFormat)
void
swfdec_text_field_movie_getNewTextFormat (SwfdecAsContext *cx,
@@ -818,6 +848,8 @@ swfdec_text_field_movie_init_properties (SwfdecAsContext *cx)
swfdec_text_field_movie_add_variable (proto, SWFDEC_AS_STR_wordWrap,
swfdec_text_fie...
2007 Oct 14
0
3 commits - doc/Makefile.am libswfdec/swfdec_text_field_movie_as.c
...t; 0) {
+ SWFDEC_AS_VALUE_SET_NUMBER (&val, 16777216 + value % 16777216);
+ } else {
+ SWFDEC_AS_VALUE_SET_NUMBER (&val, value);
}
+
+ swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (text->format_new),
+ SWFDEC_AS_STR_color, &val);
}
+/*
+ * Native functions
+ */
SWFDEC_AS_NATIVE (104, 104, swfdec_text_field_movie_getNewTextFormat)
void
swfdec_text_field_movie_getNewTextFormat (SwfdecAsContext *cx,
@@ -701,6 +721,9 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx,
swfdec_text_field_movie_set_text_format (text, format, start_index, end_index);
}
+/*
+ *...
2007 Aug 31
0
4 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...for Number valueOf and toString functions
diff --git a/libswfdec/swfdec_as_number.c b/libswfdec/swfdec_as_number.c
index d53e725..9328b26 100644
--- a/libswfdec/swfdec_as_number.c
+++ b/libswfdec/swfdec_as_number.c
@@ -67,7 +67,8 @@ swfdec_as_number_construct (SwfdecAsCont
}
}
-static void
+SWFDEC_AS_NATIVE (106, 1, swfdec_as_number_toString)
+void
swfdec_as_number_toString (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
@@ -83,7 +84,8 @@ swfdec_as_number_toString (SwfdecAsConte
SWFDEC_AS_VALUE_SET_STRING (ret, s);
}
-static void
+SWFDE...
2007 Sep 12
0
9 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...ec_as_initialize.as
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index c8f4fbe..2bf731e 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -147,7 +147,8 @@ swfdec_as_function_call (SwfdecAsFunctio
/*** AS CODE ***/
-static void
+SWFDEC_AS_NATIVE (101, 10, swfdec_as_function_do_call)
+void
swfdec_as_function_do_call (SwfdecAsContext *context, SwfdecAsObject *fun,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
@@ -166,7 +167,8 @@ swfdec_as_function_do_call (SwfdecAsCont
swfdec_as_context_run (context);
}
-static void
+SW...
2007 Oct 10
0
libswfdec/swfdec_as_context.c
...dec_as_context.c
@@ -1227,7 +1227,11 @@ swfdec_as_context_parseInt (SwfdecAsCont
return;
}
- SWFDEC_AS_VALUE_SET_INT (retval, i);
+ if (i > G_MAXINT32 || i < G_MININT32) {
+ SWFDEC_AS_VALUE_SET_NUMBER (retval, i);
+ } else {
+ SWFDEC_AS_VALUE_SET_INT (retval, i);
+ }
}
SWFDEC_AS_NATIVE (100, 3, swfdec_as_context_parseFloat)
2007 Sep 02
0
libswfdec/swfdec_as_array.c libswfdec/swfdec_as_string.c
...uint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
- SwfdecAsString *string = SWFDEC_AS_STRING (object);
+ if (!SWFDEC_IS_AS_STRING (object))
+ return;
- SWFDEC_AS_VALUE_SET_STRING (ret, string->string);
+ SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STRING (object)->string);
}
SWFDEC_AS_NATIVE (251, 1, swfdec_as_string_valueOf)
@@ -299,9 +312,10 @@ void
swfdec_as_string_valueOf (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
- SwfdecAsString *string = SWFDEC_AS_STRING (object);
+ if (!SWFDEC_IS_AS_STRING (object))
+ return;...
2007 Aug 07
0
13 commits - libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_gtk_keys.c libswfdec-gtk/swfdec_gtk_keys.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec/Makefile.am libswfdec/swfdec_as_types.c libswfdec/swfdec.h libswfdec/swfdec_initialize.as
...ment
diff --git a/libswfdec/swfdec_key_as.c b/libswfdec/swfdec_key_as.c
index 36cddb5..a5523f7 100644
--- a/libswfdec/swfdec_key_as.c
+++ b/libswfdec/swfdec_key_as.c
@@ -26,7 +26,6 @@
#include "swfdec_debug.h"
#include "swfdec_player_internal.h"
-//getCode,isDown,isToggled
SWFDEC_AS_NATIVE (800, 0, swfdec_key_getAscii)
void
swfdec_key_getAscii (SwfdecAsContext *cx, SwfdecAsObject *object,
diff-tree 76286beb6f0bed9dee24fb9517ea5be62bc48ba4 (from 035ecbe5dd6be8dbb7c47577e84de30fa11444a4)
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Aug 6 21:17:39 2007 +0200
code s...
2007 Sep 03
0
4 commits - libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_interpret.c test/trace
...gnome.org>
Date: Mon Sep 3 17:37:55 2007 +0200
init Boolean class via script
diff --git a/libswfdec/swfdec_as_boolean.c b/libswfdec/swfdec_as_boolean.c
index 5d3a90b..6764cbe 100644
--- a/libswfdec/swfdec_as_boolean.c
+++ b/libswfdec/swfdec_as_boolean.c
@@ -28,6 +28,7 @@
#include "swfdec_as_native_function.h"
#include "swfdec_as_strings.h"
#include "swfdec_debug.h"
+#include "swfdec_player_internal.h"
G_DEFINE_TYPE (SwfdecAsBoolean, swfdec_as_boolean, SWFDEC_TYPE_AS_OBJECT)
@@ -43,7 +44,8 @@ swfdec_as_boolean_init (SwfdecAsBoolean
/*** AS CODE **...