diff --git a/ChangeLog b/ChangeLog index 97df29930..55aca0fe6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2007-12-21 Emmanuele Bassi + + * Makefile.am: Move tests build before docs, to cut down the + distcheck failure discovery + + * clutter.symbols: Add clutter_texture_set_area_from_rgb_data() + + * clutter/clutter-actor.c: + * clutter/clutter-script.c: + * clutter/clutter-texture.c: + * clutter/json/json-generator.c: + * clutter/json/json-parser.c: Compilation fixes for passing distcheck + + * tests/test-grab.c: + * tests/test-score.c: + * tests/test-script.c: + * tests/test-shader.c: + * tests/test-unproject.c: Ditto as above + 2007-12-21 Emmanuele Bassi * clutter/clutter-label.c: diff --git a/Makefile.am b/Makefile.am index 719561c83..20e51c74c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = clutter doc tests +SUBDIRS = clutter tests doc pcfiles = clutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc diff --git a/clutter.symbols b/clutter.symbols index 88008a39d..8c7236e07 100644 --- a/clutter.symbols +++ b/clutter.symbols @@ -515,6 +515,7 @@ clutter_texture_has_generated_tiles clutter_texture_is_tiled clutter_texture_new clutter_texture_new_from_pixbuf +clutter_texture_set_area_from_rgb_data clutter_texture_set_from_rgb_data clutter_texture_set_from_yuv_data clutter_texture_set_pixbuf diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 0a5d82e49..803711b7f 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -4216,32 +4216,32 @@ parse_rotation_array (ClutterActor *actor, element = json_array_get_element (array, 1); if (JSON_NODE_TYPE (element) == JSON_NODE_ARRAY) { - JsonArray *array = json_node_get_array (element); + JsonArray *center = json_node_get_array (element); - if (json_array_get_length (array) != 2) + if (json_array_get_length (center) != 2) return FALSE; switch (info->axis) { case CLUTTER_X_AXIS: info->center_y = parse_units (actor, PARSE_Y, - json_array_get_element (array, 0)); + json_array_get_element (center, 0)); info->center_z = parse_units (actor, PARSE_Y, - json_array_get_element (array, 1)); + json_array_get_element (center, 1)); return TRUE; case CLUTTER_Y_AXIS: info->center_x = parse_units (actor, PARSE_X, - json_array_get_element (array, 0)); + json_array_get_element (center, 0)); info->center_z = parse_units (actor, PARSE_X, - json_array_get_element (array, 1)); + json_array_get_element (center, 1)); return TRUE; case CLUTTER_Z_AXIS: info->center_x = parse_units (actor, PARSE_X, - json_array_get_element (array, 0)); + json_array_get_element (center, 0)); info->center_y = parse_units (actor, PARSE_Y, - json_array_get_element (array, 1)); + json_array_get_element (center, 1)); return TRUE; } } diff --git a/clutter/clutter-script.c b/clutter/clutter-script.c index 259811234..2a1e05807 100644 --- a/clutter/clutter-script.c +++ b/clutter/clutter-script.c @@ -1094,11 +1094,11 @@ apply_behaviours (ClutterScript *script, object = clutter_script_get_object (script, name); if (!object) { - ObjectInfo *oinfo; + ObjectInfo *behaviour_info; - oinfo = g_hash_table_lookup (script->priv->objects, name); - if (oinfo) - object = clutter_script_construct_object (script, oinfo); + behaviour_info = g_hash_table_lookup (script->priv->objects, name); + if (behaviour_info) + object = clutter_script_construct_object (script, behaviour_info); } if (!object) @@ -1136,11 +1136,11 @@ add_children (ClutterScript *script, object = clutter_script_get_object (script, name); if (!object) { - ObjectInfo *oinfo; + ObjectInfo *child_info; - oinfo = g_hash_table_lookup (script->priv->objects, name); - if (oinfo) - object = clutter_script_construct_object (script, oinfo); + child_info = g_hash_table_lookup (script->priv->objects, name); + if (child_info) + object = clutter_script_construct_object (script, child_info); } if (!object) diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index 09e9087fc..31aea7c1b 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -1829,8 +1829,8 @@ static void inline texture_update_data (ClutterTexture *texture, const guchar *data, gboolean has_alpha, - gint x0, - gint y0, + gint x_0, + gint y_0, gint width, gint height, gint rowstride, @@ -1868,8 +1868,8 @@ texture_update_data (ClutterTexture *texture, priv->filter_quality = 1; cogl_texture_sub_image_2d (priv->target_type, - x0, - y0, + x_0, + y_0, width, height, priv->pixel_format, @@ -1911,9 +1911,9 @@ texture_update_data (ClutterTexture *texture, |--------------------- priv->width ------------------------------| | <- priv->x_tiles[x].pos |-----------| <- priv->x_tiles[x].size -|-------| <- x0 +|-------| <- x_0 |------------| <- width -|--------------------| <- x0 + width +|--------------------| <- x_0 + width |-------| <- master_offset = -8 |-------| <- effective_x = 8 |---| <- effective_width @@ -1923,9 +1923,9 @@ texture_update_data (ClutterTexture *texture, |--------------------- priv->width ------------------------------| |-----------| <- priv->x_tiles[x].pos |-----------| <- priv->x_tiles[x].size (src_w) -|-------| <- x0 +|-------| <- x_0 |------------| <- width -|--------------------| <- x0 + width +|--------------------| <- x_0 + width |---| <- master_offset = 4 | <- effective_x (0 in between) |--------| <- effective_width @@ -1941,35 +1941,35 @@ texture_update_data (ClutterTexture *texture, src_h = priv->y_tiles[y].size; /* skip tiles that do not intersect the updated region */ - if ((priv->x_tiles[x].pos + src_w < x0 || - priv->y_tiles[y].pos + src_h < y0 || - priv->x_tiles[x].pos >= x0 + width || - priv->y_tiles[y].pos >= y0 + height)) + if ((priv->x_tiles[x].pos + src_w < x_0 || + priv->y_tiles[y].pos + src_h < y_0 || + priv->x_tiles[x].pos >= x_0 + width || + priv->y_tiles[y].pos >= y_0 + height)) { i++; continue; } - master_offset_x = priv->x_tiles[x].pos - x0; + master_offset_x = priv->x_tiles[x].pos - x_0; - if (priv->x_tiles[x].pos > x0) + if (priv->x_tiles[x].pos > x_0) effective_x = 0; else - effective_x = x0 - priv->x_tiles[x].pos; + effective_x = x_0 - priv->x_tiles[x].pos; - effective_width = (x0 + width) - priv->x_tiles[x].pos; + effective_width = (x_0 + width) - priv->x_tiles[x].pos; if (effective_width > src_w - effective_x) effective_width = src_w - effective_x; - master_offset_y = priv->y_tiles[y].pos - y0; + master_offset_y = priv->y_tiles[y].pos - y_0; - if (priv->y_tiles[y].pos > y0) + if (priv->y_tiles[y].pos > y_0) effective_y = 0; else - effective_y = y0 - priv->y_tiles[y].pos; + effective_y = y_0 - priv->y_tiles[y].pos; - effective_height = (y0 + height) - priv->y_tiles[y].pos; + effective_height = (y_0 + height) - priv->y_tiles[y].pos; if (effective_height > src_h - effective_y) effective_height = src_h - effective_y; diff --git a/clutter/json/json-generator.c b/clutter/json/json-generator.c index a4768d1d3..78c251b02 100644 --- a/clutter/json/json-generator.c +++ b/clutter/json/json-generator.c @@ -354,8 +354,8 @@ dump_object (JsonGenerator *generator, for (l = members; l != NULL; l = l->next) { - const gchar *name = l->data; - JsonNode *cur = json_object_get_member (object, name); + const gchar *member_name = l->data; + JsonNode *cur = json_object_get_member (object, member_name); guint sub_level = level + 1; gint j; gchar *value; @@ -368,21 +368,21 @@ dump_object (JsonGenerator *generator, for (j = 0; j < (sub_level * indent); j++) g_string_append_c (buffer, ' '); } - g_string_append_printf (buffer, "\"%s\" : null", name); + g_string_append_printf (buffer, "\"%s\" : null", member_name); break; case JSON_NODE_VALUE: - value = dump_value (generator, sub_level, name, cur); + value = dump_value (generator, sub_level, member_name, cur); g_string_append (buffer, value); break; case JSON_NODE_ARRAY: - value = dump_array (generator, sub_level, name, json_node_get_array (cur), NULL); + value = dump_array (generator, sub_level, member_name, json_node_get_array (cur), NULL); g_string_append (buffer, value); break; case JSON_NODE_OBJECT: - value = dump_object (generator, sub_level, name, json_node_get_object (cur), NULL); + value = dump_object (generator, sub_level, member_name, json_node_get_object (cur), NULL); g_string_append (buffer, value); break; } diff --git a/clutter/json/json-parser.c b/clutter/json/json-parser.c index 8a5f26900..9cec9d93a 100644 --- a/clutter/json/json-parser.c +++ b/clutter/json/json-parser.c @@ -779,11 +779,11 @@ json_parse_statement (JsonParser *parser, static void json_scanner_msg_handler (GScanner *scanner, gchar *message, - gboolean error) + gboolean is_error) { JsonParser *parser = scanner->user_data; - if (error) + if (is_error) { GError *error = NULL; diff --git a/tests/test-grab.c b/tests/test-grab.c index d0af938f9..a245ce62e 100644 --- a/tests/test-grab.c +++ b/tests/test-grab.c @@ -14,7 +14,6 @@ debug_event_cb (ClutterActor *actor, ClutterEvent *event, gpointer data) { - ClutterStage *stage = CLUTTER_STAGE (clutter_stage_get_default ()); gchar keybuf[9], *source = (gchar*)data; int len = 0; @@ -64,7 +63,7 @@ debug_event_cb (ClutterActor *actor, printf("[%s] DELETE", source); break; case CLUTTER_NOTHING: - return; + return FALSE; } if (clutter_event_get_source (event) == actor) @@ -153,8 +152,7 @@ main (int argc, char *argv[]) bcol = { 0, 0, 0xff, 0xff }, gcol = { 0, 0xff, 0, 0xff }, ccol = { 0, 0xff, 0xff, 0xff }, - ycol = { 0xff, 0xff, 0, 0xff }, - ncol = { 0, 0, 0, 0xff }; + ycol = { 0xff, 0xff, 0, 0xff }; clutter_init (&argc, &argv); diff --git a/tests/test-score.c b/tests/test-score.c index 4a4f357f3..a16293dcc 100644 --- a/tests/test-score.c +++ b/tests/test-score.c @@ -14,7 +14,7 @@ on_timeline_started (ClutterScore *score, g_print (" "); g_print ("Started timeline: `%s'\n", - g_object_get_data (G_OBJECT (timeline), "timeline-name")); + (gchar *) g_object_get_data (G_OBJECT (timeline), "timeline-name")); level += 1; } @@ -31,7 +31,7 @@ on_timeline_completed (ClutterScore *score, g_print (" "); g_print ("Completed timeline: `%s'\n", - g_object_get_data (G_OBJECT (timeline), "timeline-name")); + (gchar *) g_object_get_data (G_OBJECT (timeline), "timeline-name")); } int diff --git a/tests/test-script.c b/tests/test-script.c index 4ffc85382..4e3ad9452 100644 --- a/tests/test-script.c +++ b/tests/test-script.c @@ -97,7 +97,7 @@ red_button_press (ClutterActor *actor, int main (int argc, char *argv[]) { - GObject *stage, *timeline, *blue_button, *red_button; + GObject *stage, *blue_button, *red_button; GError *error = NULL; gint res; diff --git a/tests/test-shader.c b/tests/test-shader.c index 45259a948..89b0af7e3 100644 --- a/tests/test-shader.c +++ b/tests/test-shader.c @@ -128,7 +128,6 @@ static ShaderSource shaders[]= }; static gint shader_no = 0; - ClutterShader *shader; static gboolean button_release_cb (ClutterActor *actor, @@ -191,10 +190,10 @@ main (gint argc, gchar *argv[]) { ClutterTimeline *timeline; - ClutterAlpha *alpha; ClutterActor *actor; ClutterActor *stage; ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff }; + ClutterShader *shader; GdkPixbuf *pixbuf; GError *error; diff --git a/tests/test-unproject.c b/tests/test-unproject.c index cb819d727..5128e11dd 100644 --- a/tests/test-unproject.c +++ b/tests/test-unproject.c @@ -1,6 +1,8 @@ #include + #include #include +#include ClutterActor *label; @@ -14,8 +16,6 @@ on_event (ClutterStage *stage, ClutterEvent *event, gpointer user_data) { - static ClutterActor * dragging = NULL; - switch (event->type) { case CLUTTER_BUTTON_PRESS: