Displaying 20 results from an estimated 197 matches for "g_return_if_fail".
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
...(context), FALSE);
+ g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), FALSE);
g_return_val_if_fail (len > 0, FALSE);
context->memory += len;
@@ -77,7 +79,7 @@ swfdec_as_context_use_mem (SwfdecAsConte
void
swfdec_as_context_unuse_mem (SwfdecAsContext *context, gsize len)
{
- g_return_if_fail (SWFDEC_AS_IS_CONTEXT (context));
+ g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
g_return_if_fail (len > 0);
g_return_if_fail (context->memory >= len);
@@ -166,7 +168,7 @@ swfdec_as_string_mark (const char *strin
void
swfdec_as_value_mark (SwfdecAsValue *value)
{
- g_ret...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c
...name);
- g_print ("found registered class %p for %p %s\n", ret, name, name);
if (ret) {
SWFDEC_LOG ("found registered class %p for %s", ret, name);
return ret;
@@ -1937,7 +1936,6 @@ swfdec_player_set_export_class (SwfdecPlayer *player, const char *name, SwfdecAs
g_return_if_fail (name != NULL);
g_return_if_fail (object == NULL || SWFDEC_IS_AS_OBJECT (object));
- g_print ("setting class %p for %p %s\n", object, name, name);
if (object) {
SWFDEC_LOG ("setting class %p for %s", object, name);
g_hash_table_insert (player->registered_cl...
2007 Aug 01
0
9 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_frame.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_loadertarget.c libswfdec/swfdec_loadertarget.h libswfdec/swfdec_movie.c
...23b1 100644
--- a/libswfdec/swfdec_loadertarget.c
+++ b/libswfdec/swfdec_loadertarget.c
@@ -76,6 +76,21 @@ swfdec_loader_target_get_player (SwfdecL
}
void
+swfdec_loader_target_open (SwfdecLoaderTarget *target, SwfdecLoader *loader, guint status)
+{
+ SwfdecLoaderTargetInterface *iface;
+
+ g_return_if_fail (SWFDEC_IS_LOADER_TARGET (target));
+ g_return_if_fail (SWFDEC_IS_LOADER (loader));
+
+ SWFDEC_LOG ("opening %p (state %u)", loader, loader->state);
+
+ iface = SWFDEC_LOADER_TARGET_GET_INTERFACE (target);
+ if (iface->open)
+ iface->open (target, loader, status);
+}
+
+vo...
2007 Oct 26
0
8 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c test/trace
...k (&context->exception_value);
swfdec_as_object_mark (context->Function);
swfdec_as_object_mark (context->Function_prototype);
swfdec_as_object_mark (context->Object);
@@ -685,10 +685,10 @@ swfdec_as_context_throw (SwfdecAsContext *context, const SwfdecAsValue *value)
{
g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
g_return_if_fail (SWFDEC_IS_AS_VALUE (value));
- g_return_if_fail (!context->throwing);
+ g_return_if_fail (!context->exception);
- context->throwing = TRUE;
- context->throw_value = *value;
+ context->exception = TRUE;
+ context->excep...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...dec/swfdec_audio.c b/libswfdec/swfdec_audio.c
index f94ea53..e9a5e5f 100644
--- a/libswfdec/swfdec_audio.c
+++ b/libswfdec/swfdec_audio.c
@@ -92,6 +92,8 @@ swfdec_audio_init (SwfdecAudio *audio)
void
swfdec_audio_add (SwfdecAudio *audio, SwfdecPlayer *player)
{
+ SwfdecPlayerPrivate *priv;
+
g_return_if_fail (SWFDEC_IS_AUDIO (audio));
g_return_if_fail (audio->player == NULL);
if (player == NULL)
@@ -100,7 +102,8 @@ swfdec_audio_add (SwfdecAudio *audio, SwfdecPlayer *player)
g_object_ref (audio);
audio->player = player;
- player->audio = g_list_append (player->audio, audio);
+...
2007 Oct 31
0
2 commits - libswfdec/swfdec_sound.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie_html.c
...ert
diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c
index dc2cca0..1858004 100644
--- a/libswfdec/swfdec_text_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -1033,7 +1033,7 @@ swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie *text,
g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (text));
g_return_if_fail (SWFDEC_IS_TEXT_FORMAT (format));
g_return_if_fail (start_index < end_index);
- g_return_if_fail (end_index <= (guint) g_utf8_strlen (text->input->str, -1));
+ g_return_if_fail (end_index <= text->input->len);
g...
2007 Aug 22
0
8 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite_movie_as.c vivified/core
...ou have global coordinates */
-static gboolean
+gboolean
swfdec_movie_mouse_in (SwfdecMovie *movie, double x, double y)
{
SwfdecMovieClass *klass;
@@ -490,14 +490,42 @@ swfdec_movie_mouse_in (SwfdecMovie *movi
void
swfdec_movie_local_to_global (SwfdecMovie *movie, double *x, double *y)
{
+ g_return_if_fail (SWFDEC_IS_MOVIE (movie));
+ g_return_if_fail (x != NULL);
+ g_return_if_fail (y != NULL);
+
do {
cairo_matrix_transform_point (&movie->matrix, x, y);
} while ((movie = movie->parent));
}
void
+swfdec_movie_rect_local_to_global (SwfdecMovie *movie, SwfdecRect *rect)
+{
+...
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
...urn from initializers if the version isn't at least 5
diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c
index 4eb1376..e40a3b1 100644
--- a/libswfdec/swfdec_xml.c
+++ b/libswfdec/swfdec_xml.c
@@ -789,7 +789,9 @@ swfdec_xml_init_native (SwfdecPlayer *pl
SwfdecAsObject *proto;
g_return_if_fail (SWFDEC_IS_PLAYER (player));
-
+
+ if (version < 5)
+ return;
context = SWFDEC_AS_CONTEXT (player);
swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_XML, &val);
g_return_if_fail (SWFDEC_AS_VALUE_IS_OBJECT (&val));
diff --git a/libswfdec/swfdec_xml_node.c b/...
2007 Oct 26
0
3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c
...pedef struct {
+ int ref_count;
const guint8 * start;
gboolean catch;
gboolean finally;
@@ -2557,10 +2558,25 @@ typedef struct {
} TryData;
static void
-swfdec_action_try_free_data (TryData *try_data)
+swfdec_action_try_data_ref (gpointer data)
{
+ TryData *try_data = data;
+
+ g_return_if_fail (try_data != NULL);
+
+ try_data->ref_count++;
+}
+
+static void
+swfdec_action_try_data_unref (gpointer data)
+{
+ TryData *try_data = data;
+
g_return_if_fail (try_data != NULL);
+ if (--try_data->ref_count > 0)
+ return;
+
if (!try_data->use_register)
g_free (try_d...
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
...s, swfdec_player_mark_rooted_object, NULL);
SWFDEC_AS_CONTEXT_CLASS (swfdec_player_parent_class)->mark (context);
}
@@ -1870,50 +1881,56 @@ void
swfdec_player_initialize (SwfdecPlayer *player, guint version,
guint rate, guint width, guint height)
{
- SwfdecAsContext *context;
-
g_return_if_fail (SWFDEC_IS_PLAYER (player));
-
- if (swfdec_player_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 == SW...
2007 Oct 28
0
4 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_load_object.c
...int ref_count;
const guint8 * catch_start;
const guint8 * finally_start;
guint catch_size;
@@ -2556,25 +2555,12 @@ typedef struct {
} TryData;
static void
-swfdec_action_try_data_ref (gpointer data)
+swfdec_action_try_data_free (gpointer data)
{
TryData *try_data = data;
g_return_if_fail (try_data != NULL);
- try_data->ref_count++;
-}
-
-static void
-swfdec_action_try_data_unref (gpointer data)
-{
- TryData *try_data = data;
-
- g_return_if_fail (try_data != NULL);
-
- if (--try_data->ref_count > 0)
- return;
-
if (!try_data->use_register)
g_free (try_d...
2007 Jun 17
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_player.c
...n Jun 17 21:49:08 2007 +0200
remove 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 c9fbb629a9fa...
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
...8 @@ finish:
* during evaluation, the return value will be the undefined value.
**/
void
-swfdec_as_context_eval (SwfdecAsContext *cx, SwfdecAsObject *obj, const char *str,
+swfdec_as_context_eval (SwfdecAsContext *context, SwfdecAsObject *obj, const char *str,
SwfdecAsValue *val)
{
- g_return_if_fail (SWFDEC_IS_AS_CONTEXT (cx));
+ g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
g_return_if_fail (obj == NULL || SWFDEC_IS_AS_OBJECT (obj));
g_return_if_fail (str != NULL);
g_return_if_fail (val != NULL);
- swfdec_as_context_eval_internal (cx, obj, str, val, FALSE);
+ swfdec_as_cont...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
...+144,14 @@ swfdec_as_super_init (SwfdecAsSuper *super)
}
void
-swfdec_as_super_new (SwfdecAsFrame *frame, SwfdecAsObject *ref, gboolean callable)
+swfdec_as_super_new (SwfdecAsFrame *frame, SwfdecAsObject *thisp, SwfdecAsObject *ref)
{
SwfdecAsContext *context;
SwfdecAsSuper *super;
g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
- g_return_if_fail (SWFDEC_IS_AS_OBJECT (ref));
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (thisp));
+ g_return_if_fail (ref == NULL || SWFDEC_IS_AS_OBJECT (ref));
if (frame->super != NULL)
return;
@@ -165,12 +164,11 @@ swfdec_as_super_new (SwfdecAsFrame...
2007 Oct 23
0
6 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_flash_security.c
...ecScript *script)
g_object_unref (sec);
}
+void
+swfdec_as_object_call_with_security (SwfdecAsObject *object, SwfdecSecurity *sec,
+ const char *name, guint argc, SwfdecAsValue *argv, SwfdecAsValue *return_value)
+{
+ static SwfdecAsValue tmp; /* ignored */
+ SwfdecAsFunction *fun;
+
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
+ g_return_if_fail (SWFDEC_IS_SECURITY (sec));
+ g_return_if_fail (name != NULL);
+ g_return_if_fail (argc == 0 || argv != NULL);
+ g_return_if_fail (argc == 0 || argv != NULL);
+
+ if (return_value)
+ SWFDEC_AS_VALUE_SET_UNDEFINED (return_value);
+ swfdec_a...
2007 Sep 14
0
3 commits - libswfdec/swfdec_as_frame.c test/trace
...ff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index c11c03a..a0db0d3 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -212,7 +212,7 @@ swfdec_as_frame_push_block (SwfdecAsFram
SwfdecAsFrameBlock block = { start, end, func, data, destroy };
g_return_if_fail (SWFDEC_IS_AS_FRAME (frame));
- g_return_if_fail (start < end);
+ g_return_if_fail (start <= end);
g_return_if_fail (start >= frame->block_start);
g_return_if_fail (end <= frame->block_end);
g_return_if_fail (func != NULL);
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
...ant the action count to be empty.
The patch also adds some debugging.
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 2f7deef..76c93e7 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -207,6 +207,7 @@ swfdec_player_add_action (SwfdecPlayer *
g_return_if_fail (action_func != NULL);
action = swfdec_ring_buffer_push (player->actions);
+ SWFDEC_LOG ("adding action %p %p %p", object, action_func, action_data);
if (action == NULL) {
/* FIXME: limit number of actions to not get inf loops due to scripts? */
swfdec_ring_buffer_se...
2007 Mar 02
0
12 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_js_video.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h
...0);
cairo_paint (cr);
}
@@ -140,15 +142,20 @@ swfdec_video_movie_clear (SwfdecVideoMov
}
void
-swfdec_video_movie_new_image (SwfdecVideoMovie *movie, cairo_surface_t *image)
+swfdec_video_movie_new_image (SwfdecVideoMovie *movie, cairo_surface_t *image,
+ guint width, guint height)
{
g_return_if_fail (SWFDEC_IS_VIDEO_MOVIE (movie));
g_return_if_fail (image != NULL);
+ g_return_if_fail (width > 0);
+ g_return_if_fail (height > 0);
if (movie->image)
cairo_surface_destroy (movie->image);
cairo_surface_reference (image);
movie->image = image;
+ movie->image_w...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
...wfdecAsArray *array, gint32 from_index, gint32 num, gint32 to_index)
+swfdec_as_array_move_range (SwfdecAsObject *object, gint32 from_index,
+ gint32 num, gint32 to_index)
{
- SwfdecAsObject *object = SWFDEC_AS_OBJECT (array);
ForeachMoveRangeData fdata = { from_index, num, to_index };
- g_return_if_fail (SWFDEC_IS_AS_ARRAY (array));
+ g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
g_return_if_fail (from_index >= 0);
g_return_if_fail (num >= 0);
g_return_if_fail (from_index + num <= swfdec_as_array_get_length (object));
@@ -186,7 +200,8 @@ swfdec_as_array_move_range (SwfdecAsAr...
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
...index 6adbe8a..867b30d 100644
--- a/libswfdec/swfdec_text_field.c
+++ b/libswfdec/swfdec_text_field.c
@@ -254,7 +254,7 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr,
GList *layouts, *iter;
SwfdecRect limit;
SwfdecColor color;
- int y, linenum;
+ int y, x, linenum;
g_return_if_fail (SWFDEC_IS_TEXT_FIELD (text));
g_return_if_fail (cr != NULL);
@@ -285,8 +285,9 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr,
inval);
linenum = 0;
+ x = SWFDEC_GRAPHIC (text)->extents.x0;
y = SWFDEC_GRAPHIC (text)->extents.y0 + 1;
- cairo_move_to (cr, SWF...