Displaying 20 results from an estimated 47 matches for "swfdec_as_check".
2007 Oct 14
0
3 commits - doc/Makefile.am libswfdec/swfdec_text_field_movie_as.c
...t->embed_fonts)
+ if (!text->text->embed_fonts && value)
SWFDEC_FIXME ("Using embed fonts in TextField not supported");
+
+ text->text->embed_fonts = value;
}
static void
@@ -619,8 +619,7 @@ swfdec_text_field_movie_get_textColor (SwfdecAsContext *cx,
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
- swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (text->format_new),
- SWFDEC_AS_STR_color, ret);
+ SWFDEC_AS_VALUE_SET_NUMBER (ret, text->format_new->color);
}
// This doesn't work the same way as TextFormat's...
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
...dec/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_length (SwfdecAsContext *cx, SwfdecAsObject *object,
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
- SWFDEC_AS_VALUE_SET_INT (ret, strlen (text->text_display));
+ SWFDEC_AS_VALUE_SET_INT (ret, g_utf8_strlen (text->text_display, -1));
}
/*
@@ -453,6 +453,69 @@ swfdec_text_field_movie_set_condenseWhite (SwfdecAsContext *cx,...
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
...2007 +0200
Merge branch 'master' of ssh://company at git.freedesktop.org/git/swfdec/swfdec
diff-tree 4fd150cacc14d6332233e8b2a0ce90fdbf39a0d2 (from 7ec278506b08c9941e244eb4a31bae29ada08673)
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Sep 4 10:33:49 2007 +0200
add SWFDEC_AS_CHECK macro for doing checks/conversions for native functions
see the inline API docs for what it does
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 6ad2114..d8ef4fa 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -353,6 +353,9 @@ swfdec_as_function_...
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
...--git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index 70ce222..0b73b2b 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -486,7 +486,10 @@ swfdec_text_field_movie_get_backgroundColor (SwfdecAsContext *cx,
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
- SWFDEC_AS_VALUE_SET_NUMBER (ret, text->background_color);
+ SWFDEC_AS_VALUE_SET_NUMBER (ret,
+ SWFDEC_COLOR_R (text->background_color) << 16 |
+ SWFDEC_COLOR_G (text->background_color) << 8 |
+ SWFDEC...
2007 Oct 23
0
9 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h
..._movie_as.c
@@ -868,6 +868,45 @@ swfdec_text_field_movie_set_embedFonts (SwfdecAsContext *cx,
}
static void
+swfdec_text_field_movie_get_styleSheet (SwfdecAsContext *cx,
+ SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
+ SwfdecAsValue *ret)
+{
+ SwfdecTextFieldMovie *text;
+
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
+
+ if (text->style_sheet != NULL) {
+ SWFDEC_AS_VALUE_SET_OBJECT (ret, SWFDEC_AS_OBJECT (text->style_sheet));
+ } else {
+ SWFDEC_AS_VALUE_SET_NULL (ret);
+ }
+}
+
+static void
+swfdec_text_field_movie_set_styleSheet (SwfdecAs...
2007 Oct 11
0
libswfdec/swfdec_as_native_function.h
...on.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
diff-tree 1842d3858b37ce64020a91b2056415177594c266 (from d5d06f45e7c5a64725dd1c6fe061ff1e0fd15110)
Author: Pavel Roskin <proski at gnu.org>
Date: Thu Oct 11 11:05:56 2007 +0300
Fix a compiler warning when using SWFDEC_AS_CHECK
Avoid casting to (gpointer *) in SWFDEC_AS_CHECK definition. Casting to
(gpointer) is sufficient and avoids warnings about strict aliasing.
diff --git a/libswfdec/swfdec_as_native_function.h b/libswfdec/swfdec_as_native_function.h
index bbdce1d..88c172d 100644
--- a/libswfdec/swfdec_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
...s.c */
diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index f579d21..375f780 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -85,6 +85,11 @@ swfdec_text_field_movie_do_set_text (SwfdecAsContext *cx,
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value);
swfdec_text_field_movie_set_text (text, value, FALSE);
+
+ if (text->variable != NULL) {
+ swfdec_text_field_movie_set_variable_text (text,
+ swfdec_text_field_movie_get_html_text (text));
+ }
}
static void
@@ -1...
2007 Oct 11
1
[PATCH] Fix compiler warnings that prevent compilation
...fmpeg-devel-0.4.9-0.8.20070530.fc7.x86_64). Define
attribute_deprecated to an empty string until broken version of ffmpeg
are too obsolete to support.
Use appropriate modifiers for size_t sized arguments in printf-style
format to avoid warnings on 64-bit systems.
Avoid casting to (gpointer *) in SWFDEC_AS_CHECK definition. Casting to
(gpointer) is sufficient and avoids warnings about strict aliasing.
Signed-off-by: Pavel Roskin <proski at gnu.org>
---
configure.ac | 2 +-
libswfdec/swfdec_as_context.c | 4 ++--
libswfdec/swfdec_as_native_function.h | 2 +...
2008 Jan 08
0
4 commits - configure.ac test/compiler.c test/.gitignore test/Makefile.am test/swfdec_test.c test/swfdec_test_function.c test/swfdec_test_function.h test/swfdec_test_global.c test/swfdec_test_initialize.as test/swfdec_test_initialize.h
...t;fscommand", G_CALLBACK (swfdec_test_test_fscommand), test);
+ g_signal_connect (test->player, "trace", G_CALLBACK (swfdec_test_test_trace_cb), test);
return TRUE;
}
@@ -209,16 +258,21 @@ swfdec_test_test_advance (SwfdecAsContext *cx, SwfdecAsObject *object, guint arg
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_TEST, &test, "i", &msecs);
- if (msecs <= 0 || test->player_quit)
+ if (msecs < 0 || test->player_quit)
return;
swfdec_test_test_ensure_player (test);
- while (msecs > 0 && !test->player_quit) {
- int next_event = swfdec_...
2007 Oct 29
0
libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...p;
diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index dd5203f..248d878 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -424,7 +424,7 @@ swfdec_text_field_movie_get_textHeight (SwfdecAsContext *cx,
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
swfdec_text_field_movie_get_text_size (text, NULL, &height);
- SWFDEC_AS_VALUE_SET_NUMBER (ret, height);
+ SWFDEC_AS_VALUE_SET_NUMBER (ret, SWFDEC_TWIPS_TO_DOUBLE (height));
}
static void
@@ -438,7 +438,7 @@ swfdec_text_field_m...
2007 Oct 18
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...f (!g_strcasecmp (value, SWFDEC_AS_STR_dynamic)) {
text->text->input = FALSE;
}
+
+ // FIXME: invalidate
}
static void
@@ -520,12 +524,10 @@ swfdec_text_field_movie_get_bottomScroll (SwfdecAsContext *cx,
SwfdecAsValue *ret)
{
SwfdecTextFieldMovie *text;
- int last;
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
- swfdec_text_field_movie_get_scroll_info (text, &last, NULL, NULL, NULL);
- SWFDEC_AS_VALUE_SET_NUMBER (ret, last);
+ SWFDEC_AS_VALUE_SET_NUMBER (ret, text->scroll_bottom);
}
static void
@@ -550,7 +552,11 @@ swfdec_text_field...
2007 Oct 19
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_text_field_movie.c
...diff --git a/libswfdec/swfdec_sprite_movie_as.c b/libswfdec/swfdec_sprite_movie_as.c
index 00e9be2..301f2c0 100644
--- a/libswfdec/swfdec_sprite_movie_as.c
+++ b/libswfdec/swfdec_sprite_movie_as.c
@@ -72,7 +72,7 @@ swfdec_sprite_movie_getBytesLoaded (SwfdecAsContext *cx, SwfdecAsObject *object,
SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, "");
resource = swfdec_movie_get_own_resource (movie);
- if (resource) {
+ if (resource && resource->decoder) {
SWFDEC_AS_VALUE_SET_INT (rval, resource->decoder->bytes_loaded);
} else {
SWFDEC_AS_VALUE_SET_INT...
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
...d_movie_as.c
@@ -598,6 +598,36 @@ swfdec_text_field_movie_set_wordWrap (SwfdecAsContext *cx,
}
}
+static void
+swfdec_text_field_movie_get_border (SwfdecAsContext *cx,
+ SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
+ SwfdecAsValue *ret)
+{
+ SwfdecTextFieldMovie *text;
+
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
+
+ SWFDEC_AS_VALUE_SET_BOOLEAN (ret, text->text->border);
+}
+
+static void
+swfdec_text_field_movie_set_border (SwfdecAsContext *cx,
+ SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
+ SwfdecAsValue *ret)
+{
+ SwfdecT...
2008 Jan 08
0
4 commits - test/.gitignore test/image test/Makefile.am test/swfdec_test_function.c test/swfdec_test_image.c test/swfdec_test_image.h test/swfdec_test_initialize.as test/swfdec_test_initialize.h test/swfdec_test_test.c test/trace
...C_TEST_FUNCTION ("Image_compare", swfdec_test_image_compare, 0)
+void
+swfdec_test_image_compare (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
+ SwfdecAsValue *argv, SwfdecAsValue *retval)
+{
+ SwfdecTestImage *image, *compare;
+ int w, h;
+ cairo_surface_t *diff;
+
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_TEST_IMAGE, &image, "O", &compare);
+
+ if (!SWFDEC_IS_TEST_IMAGE (compare))
+ return;
+
+ SWFDEC_AS_VALUE_SET_BOOLEAN (retval, FALSE);
+ if (!SWFDEC_TEST_IMAGE_IS_VALID (image) ||
+ !SWFDEC_TEST_IMAGE_IS_VALID (compare))
+ return;
+
+ g_assert (cairo_s...
2007 Nov 12
0
20 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_string.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player_as.c
...diff --git a/libswfdec/swfdec_movie_as_drawing.c b/libswfdec/swfdec_movie_as_drawing.c
index 6817459..5309ec8 100644
--- a/libswfdec/swfdec_movie_as_drawing.c
+++ b/libswfdec/swfdec_movie_as_drawing.c
@@ -203,7 +203,7 @@ swfdec_sprite_movie_lineStyle (SwfdecAsContext *cx, SwfdecAsObject *object,
SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|iii", &width, &color, &alpha);
movie->draw_line = NULL;
- if (argc < 1 && SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]))
+ if (argc < 1 || SWFDEC_AS_VALUE_IS_UNDEFINED (&argv[0]))
return;
if (argc < 3)...
2007 Oct 22
0
12 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...AsContext *cx, SwfdecAsObject *object,
- guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
+swfdec_text_field_movie_do_get_text (SwfdecAsContext *cx,
+ SwfdecAsObject *object, guint argc, SwfdecAsValue *argv,
+ SwfdecAsValue *ret)
{
SwfdecTextFieldMovie *text;
- char *str, *p;
SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
- if (text->input == NULL) {
- SWFDEC_AS_VALUE_SET_STRING (ret, SWFDEC_AS_STR_EMPTY);
- return;
- }
-
- str = g_strdup (text->input->str);
-
- // if input was orginally html, remove all \r
- if (text->input_html) {
-...
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
...->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, &movie, "|ii", &color, &alpha);
@@ -53,9 +91,9 @@ swfdec_sprite_movie_beginFill (SwfdecAsC
alpha = SWFDEC_COLOR_COMBINE (0, 0, 0, 255);
}
color = color | alpha;
- movie->draw_fill = SWFDEC_DRAW (swfdec_pattern_new_color (color));
- swfdec_pa...
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
...644
--- a/libswfdec/swfdec_movie_as_drawing.c
+++ b/libswfdec/swfdec_movie_as_drawing.c
@@ -266,9 +266,9 @@ swfdec_sprite_movie_moveTo (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
SwfdecMovie *movie;
- int x, y;
+ double x, y;
- SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|ii", &x, &y);
+ SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|nn", &x, &y);
x = SWFDEC_DOUBLE_TO_TWIPS (x);
y = SWFDEC_DOUBLE_TO_TWIPS (y);
@@ -302,9 +302,9 @@ swfdec_sprite_movie_lineTo (SwfdecAsContext *cx, SwfdecA...
2007 Oct 12
0
Changes to 'refs/tags/0.5.3'
...ssh://company at git.freedesktop.org/git/swfdec/swfdec
fix memleak
make enumerate actions include prototype stuff
check that prototype properties get included in foreach
init Boolean class via script
This function is gone already
ignore swfdec_filter.h
add SWFDEC_AS_CHECK macro for doing checks/conversions for native functions
Merge branch 'master' of ssh://company at git.freedesktop.org/git/swfdec/swfdec
move SWFDEC_AS_NATIVE and SWFDEC_AS_CNSTRUCTOR macros to swfdec_as_internal.h
only provide a new image if decoding succeeded
only i...
2007 Nov 10
0
7 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_resource.c libswfdec/swfdec_resource.h libswfdec/swfdec_sprite_movie_as.c test/trace
...diff --git a/libswfdec/swfdec_sprite_movie_as.c b/libswfdec/swfdec_sprite_movie_as.c
index b751327..ec6fce9 100644
--- a/libswfdec/swfdec_sprite_movie_as.c
+++ b/libswfdec/swfdec_sprite_movie_as.c
@@ -90,8 +90,12 @@ swfdec_sprite_movie_getBytesTotal (SwfdecAsContext *cx, SwfdecAsObject *object,
SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, (gpointer)&movie, "");
resource = swfdec_movie_get_own_resource (movie);
- if (resource && resource->decoder) {
- SWFDEC_AS_VALUE_SET_INT (rval, resource->decoder->bytes_total);
+ if (resource) {
+ if (resource->decoder) {
+ SW...