2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>

* 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
This commit is contained in:
Emmanuele Bassi 2007-12-21 15:25:00 +00:00
parent f7b3b47c29
commit ee4bcf6465
13 changed files with 73 additions and 56 deletions

View File

@ -1,3 +1,22 @@
2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* 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 <ebassi@openedhand.com>
* clutter/clutter-label.c:

View File

@ -1,4 +1,4 @@
SUBDIRS = clutter doc tests
SUBDIRS = clutter tests doc
pcfiles = clutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc

View File

@ -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

View File

@ -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;
}
}

View File

@ -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)

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -1,6 +1,8 @@
#include <clutter/clutter.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
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: