mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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:
parent
f7b3b47c29
commit
ee4bcf6465
19
ChangeLog
19
ChangeLog
@ -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>
|
2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-label.c:
|
* clutter/clutter-label.c:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SUBDIRS = clutter doc tests
|
SUBDIRS = clutter tests doc
|
||||||
|
|
||||||
pcfiles = clutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc
|
pcfiles = clutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc
|
||||||
|
|
||||||
|
@ -515,6 +515,7 @@ clutter_texture_has_generated_tiles
|
|||||||
clutter_texture_is_tiled
|
clutter_texture_is_tiled
|
||||||
clutter_texture_new
|
clutter_texture_new
|
||||||
clutter_texture_new_from_pixbuf
|
clutter_texture_new_from_pixbuf
|
||||||
|
clutter_texture_set_area_from_rgb_data
|
||||||
clutter_texture_set_from_rgb_data
|
clutter_texture_set_from_rgb_data
|
||||||
clutter_texture_set_from_yuv_data
|
clutter_texture_set_from_yuv_data
|
||||||
clutter_texture_set_pixbuf
|
clutter_texture_set_pixbuf
|
||||||
|
@ -4216,32 +4216,32 @@ parse_rotation_array (ClutterActor *actor,
|
|||||||
element = json_array_get_element (array, 1);
|
element = json_array_get_element (array, 1);
|
||||||
if (JSON_NODE_TYPE (element) == JSON_NODE_ARRAY)
|
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;
|
return FALSE;
|
||||||
|
|
||||||
switch (info->axis)
|
switch (info->axis)
|
||||||
{
|
{
|
||||||
case CLUTTER_X_AXIS:
|
case CLUTTER_X_AXIS:
|
||||||
info->center_y = parse_units (actor, PARSE_Y,
|
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,
|
info->center_z = parse_units (actor, PARSE_Y,
|
||||||
json_array_get_element (array, 1));
|
json_array_get_element (center, 1));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case CLUTTER_Y_AXIS:
|
case CLUTTER_Y_AXIS:
|
||||||
info->center_x = parse_units (actor, PARSE_X,
|
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,
|
info->center_z = parse_units (actor, PARSE_X,
|
||||||
json_array_get_element (array, 1));
|
json_array_get_element (center, 1));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case CLUTTER_Z_AXIS:
|
case CLUTTER_Z_AXIS:
|
||||||
info->center_x = parse_units (actor, PARSE_X,
|
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,
|
info->center_y = parse_units (actor, PARSE_Y,
|
||||||
json_array_get_element (array, 1));
|
json_array_get_element (center, 1));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1094,11 +1094,11 @@ apply_behaviours (ClutterScript *script,
|
|||||||
object = clutter_script_get_object (script, name);
|
object = clutter_script_get_object (script, name);
|
||||||
if (!object)
|
if (!object)
|
||||||
{
|
{
|
||||||
ObjectInfo *oinfo;
|
ObjectInfo *behaviour_info;
|
||||||
|
|
||||||
oinfo = g_hash_table_lookup (script->priv->objects, name);
|
behaviour_info = g_hash_table_lookup (script->priv->objects, name);
|
||||||
if (oinfo)
|
if (behaviour_info)
|
||||||
object = clutter_script_construct_object (script, oinfo);
|
object = clutter_script_construct_object (script, behaviour_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!object)
|
if (!object)
|
||||||
@ -1136,11 +1136,11 @@ add_children (ClutterScript *script,
|
|||||||
object = clutter_script_get_object (script, name);
|
object = clutter_script_get_object (script, name);
|
||||||
if (!object)
|
if (!object)
|
||||||
{
|
{
|
||||||
ObjectInfo *oinfo;
|
ObjectInfo *child_info;
|
||||||
|
|
||||||
oinfo = g_hash_table_lookup (script->priv->objects, name);
|
child_info = g_hash_table_lookup (script->priv->objects, name);
|
||||||
if (oinfo)
|
if (child_info)
|
||||||
object = clutter_script_construct_object (script, oinfo);
|
object = clutter_script_construct_object (script, child_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!object)
|
if (!object)
|
||||||
|
@ -1829,8 +1829,8 @@ static void inline
|
|||||||
texture_update_data (ClutterTexture *texture,
|
texture_update_data (ClutterTexture *texture,
|
||||||
const guchar *data,
|
const guchar *data,
|
||||||
gboolean has_alpha,
|
gboolean has_alpha,
|
||||||
gint x0,
|
gint x_0,
|
||||||
gint y0,
|
gint y_0,
|
||||||
gint width,
|
gint width,
|
||||||
gint height,
|
gint height,
|
||||||
gint rowstride,
|
gint rowstride,
|
||||||
@ -1868,8 +1868,8 @@ texture_update_data (ClutterTexture *texture,
|
|||||||
priv->filter_quality = 1;
|
priv->filter_quality = 1;
|
||||||
|
|
||||||
cogl_texture_sub_image_2d (priv->target_type,
|
cogl_texture_sub_image_2d (priv->target_type,
|
||||||
x0,
|
x_0,
|
||||||
y0,
|
y_0,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
priv->pixel_format,
|
priv->pixel_format,
|
||||||
@ -1911,9 +1911,9 @@ texture_update_data (ClutterTexture *texture,
|
|||||||
|--------------------- priv->width ------------------------------|
|
|--------------------- priv->width ------------------------------|
|
||||||
| <- priv->x_tiles[x].pos
|
| <- priv->x_tiles[x].pos
|
||||||
|-----------| <- priv->x_tiles[x].size
|
|-----------| <- priv->x_tiles[x].size
|
||||||
|-------| <- x0
|
|-------| <- x_0
|
||||||
|------------| <- width
|
|------------| <- width
|
||||||
|--------------------| <- x0 + width
|
|--------------------| <- x_0 + width
|
||||||
|-------| <- master_offset = -8
|
|-------| <- master_offset = -8
|
||||||
|-------| <- effective_x = 8
|
|-------| <- effective_x = 8
|
||||||
|---| <- effective_width
|
|---| <- effective_width
|
||||||
@ -1923,9 +1923,9 @@ texture_update_data (ClutterTexture *texture,
|
|||||||
|--------------------- priv->width ------------------------------|
|
|--------------------- priv->width ------------------------------|
|
||||||
|-----------| <- priv->x_tiles[x].pos
|
|-----------| <- priv->x_tiles[x].pos
|
||||||
|-----------| <- priv->x_tiles[x].size (src_w)
|
|-----------| <- priv->x_tiles[x].size (src_w)
|
||||||
|-------| <- x0
|
|-------| <- x_0
|
||||||
|------------| <- width
|
|------------| <- width
|
||||||
|--------------------| <- x0 + width
|
|--------------------| <- x_0 + width
|
||||||
|---| <- master_offset = 4
|
|---| <- master_offset = 4
|
||||||
| <- effective_x (0 in between)
|
| <- effective_x (0 in between)
|
||||||
|--------| <- effective_width
|
|--------| <- effective_width
|
||||||
@ -1941,35 +1941,35 @@ texture_update_data (ClutterTexture *texture,
|
|||||||
src_h = priv->y_tiles[y].size;
|
src_h = priv->y_tiles[y].size;
|
||||||
|
|
||||||
/* skip tiles that do not intersect the updated region */
|
/* skip tiles that do not intersect the updated region */
|
||||||
if ((priv->x_tiles[x].pos + src_w < x0 ||
|
if ((priv->x_tiles[x].pos + src_w < x_0 ||
|
||||||
priv->y_tiles[y].pos + src_h < y0 ||
|
priv->y_tiles[y].pos + src_h < y_0 ||
|
||||||
priv->x_tiles[x].pos >= x0 + width ||
|
priv->x_tiles[x].pos >= x_0 + width ||
|
||||||
priv->y_tiles[y].pos >= y0 + height))
|
priv->y_tiles[y].pos >= y_0 + height))
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
continue;
|
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;
|
effective_x = 0;
|
||||||
else
|
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)
|
if (effective_width > src_w - effective_x)
|
||||||
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;
|
effective_y = 0;
|
||||||
else
|
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)
|
if (effective_height > src_h - effective_y)
|
||||||
effective_height = src_h - effective_y;
|
effective_height = src_h - effective_y;
|
||||||
|
|
||||||
|
@ -354,8 +354,8 @@ dump_object (JsonGenerator *generator,
|
|||||||
|
|
||||||
for (l = members; l != NULL; l = l->next)
|
for (l = members; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
const gchar *name = l->data;
|
const gchar *member_name = l->data;
|
||||||
JsonNode *cur = json_object_get_member (object, name);
|
JsonNode *cur = json_object_get_member (object, member_name);
|
||||||
guint sub_level = level + 1;
|
guint sub_level = level + 1;
|
||||||
gint j;
|
gint j;
|
||||||
gchar *value;
|
gchar *value;
|
||||||
@ -368,21 +368,21 @@ dump_object (JsonGenerator *generator,
|
|||||||
for (j = 0; j < (sub_level * indent); j++)
|
for (j = 0; j < (sub_level * indent); j++)
|
||||||
g_string_append_c (buffer, ' ');
|
g_string_append_c (buffer, ' ');
|
||||||
}
|
}
|
||||||
g_string_append_printf (buffer, "\"%s\" : null", name);
|
g_string_append_printf (buffer, "\"%s\" : null", member_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JSON_NODE_VALUE:
|
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);
|
g_string_append (buffer, value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JSON_NODE_ARRAY:
|
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);
|
g_string_append (buffer, value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JSON_NODE_OBJECT:
|
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);
|
g_string_append (buffer, value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -779,11 +779,11 @@ json_parse_statement (JsonParser *parser,
|
|||||||
static void
|
static void
|
||||||
json_scanner_msg_handler (GScanner *scanner,
|
json_scanner_msg_handler (GScanner *scanner,
|
||||||
gchar *message,
|
gchar *message,
|
||||||
gboolean error)
|
gboolean is_error)
|
||||||
{
|
{
|
||||||
JsonParser *parser = scanner->user_data;
|
JsonParser *parser = scanner->user_data;
|
||||||
|
|
||||||
if (error)
|
if (is_error)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ debug_event_cb (ClutterActor *actor,
|
|||||||
ClutterEvent *event,
|
ClutterEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
ClutterStage *stage = CLUTTER_STAGE (clutter_stage_get_default ());
|
|
||||||
gchar keybuf[9], *source = (gchar*)data;
|
gchar keybuf[9], *source = (gchar*)data;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
@ -64,7 +63,7 @@ debug_event_cb (ClutterActor *actor,
|
|||||||
printf("[%s] DELETE", source);
|
printf("[%s] DELETE", source);
|
||||||
break;
|
break;
|
||||||
case CLUTTER_NOTHING:
|
case CLUTTER_NOTHING:
|
||||||
return;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clutter_event_get_source (event) == actor)
|
if (clutter_event_get_source (event) == actor)
|
||||||
@ -153,8 +152,7 @@ main (int argc, char *argv[])
|
|||||||
bcol = { 0, 0, 0xff, 0xff },
|
bcol = { 0, 0, 0xff, 0xff },
|
||||||
gcol = { 0, 0xff, 0, 0xff },
|
gcol = { 0, 0xff, 0, 0xff },
|
||||||
ccol = { 0, 0xff, 0xff, 0xff },
|
ccol = { 0, 0xff, 0xff, 0xff },
|
||||||
ycol = { 0xff, 0xff, 0, 0xff },
|
ycol = { 0xff, 0xff, 0, 0xff };
|
||||||
ncol = { 0, 0, 0, 0xff };
|
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
clutter_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ on_timeline_started (ClutterScore *score,
|
|||||||
g_print (" ");
|
g_print (" ");
|
||||||
|
|
||||||
g_print ("Started timeline: `%s'\n",
|
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;
|
level += 1;
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ on_timeline_completed (ClutterScore *score,
|
|||||||
g_print (" ");
|
g_print (" ");
|
||||||
|
|
||||||
g_print ("Completed timeline: `%s'\n",
|
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
|
int
|
||||||
|
@ -97,7 +97,7 @@ red_button_press (ClutterActor *actor,
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GObject *stage, *timeline, *blue_button, *red_button;
|
GObject *stage, *blue_button, *red_button;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gint res;
|
gint res;
|
||||||
|
|
||||||
|
@ -128,7 +128,6 @@ static ShaderSource shaders[]=
|
|||||||
};
|
};
|
||||||
|
|
||||||
static gint shader_no = 0;
|
static gint shader_no = 0;
|
||||||
ClutterShader *shader;
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
button_release_cb (ClutterActor *actor,
|
button_release_cb (ClutterActor *actor,
|
||||||
@ -191,10 +190,10 @@ main (gint argc,
|
|||||||
gchar *argv[])
|
gchar *argv[])
|
||||||
{
|
{
|
||||||
ClutterTimeline *timeline;
|
ClutterTimeline *timeline;
|
||||||
ClutterAlpha *alpha;
|
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||||
|
ClutterShader *shader;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
GError *error;
|
GError *error;
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
ClutterActor *label;
|
ClutterActor *label;
|
||||||
|
|
||||||
@ -14,8 +16,6 @@ on_event (ClutterStage *stage,
|
|||||||
ClutterEvent *event,
|
ClutterEvent *event,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
static ClutterActor * dragging = NULL;
|
|
||||||
|
|
||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
case CLUTTER_BUTTON_PRESS:
|
case CLUTTER_BUTTON_PRESS:
|
||||||
|
Loading…
Reference in New Issue
Block a user