2008-04-28 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-actor.c:
	(parse_rotation_array),
	(clutter_actor_set_custom_property): Use the internal, unit based
	rotation setter when parsing the rotation from a ClutterScript
	file.
	
	(clutter_geometry_copy),
	(clutter_vertex_copy),
	(clutter_actor_box_copy): Use the more efficient g_slice_dup().

	(clutter_actor_get_stage): Add documentation.

	* clutter/clutter-group.c: Documentation fix.
This commit is contained in:
Emmanuele Bassi 2008-04-28 15:32:42 +00:00
parent 12bb974949
commit 90c815efb8
3 changed files with 40 additions and 26 deletions

View File

@ -1,3 +1,19 @@
2008-04-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c:
(parse_rotation_array),
(clutter_actor_set_custom_property): Use the internal, unit based
rotation setter when parsing the rotation from a ClutterScript
file.
(clutter_geometry_copy),
(clutter_vertex_copy),
(clutter_actor_box_copy): Use the more efficient g_slice_dup().
(clutter_actor_get_stage): Add documentation.
* clutter/clutter-group.c: Documentation fix.
2008-04-28 Øyvind Kolås <pippin@o-hand.com> 2008-04-28 Øyvind Kolås <pippin@o-hand.com>
* clutter/cogl/cogl.h.in: moved the documentation of the cogl * clutter/cogl/cogl.h.in: moved the documentation of the cogl

View File

@ -5032,7 +5032,7 @@ out:
typedef struct { typedef struct {
ClutterRotateAxis axis; ClutterRotateAxis axis;
gdouble angle; ClutterFixed angle;
ClutterUnit center_x; ClutterUnit center_x;
ClutterUnit center_y; ClutterUnit center_y;
@ -5052,7 +5052,7 @@ parse_rotation_array (ClutterActor *actor,
/* angle */ /* angle */
element = json_array_get_element (array, 0); element = json_array_get_element (array, 0);
if (JSON_NODE_TYPE (element) == JSON_NODE_VALUE) if (JSON_NODE_TYPE (element) == JSON_NODE_VALUE)
info->angle = json_node_get_double (element); info->angle = CLUTTER_FLOAT_TO_FIXED (json_node_get_double (element));
else else
return FALSE; return FALSE;
@ -5265,11 +5265,11 @@ clutter_actor_set_custom_property (ClutterScriptable *scriptable,
info = g_value_get_pointer (value); info = g_value_get_pointer (value);
clutter_actor_set_rotation (CLUTTER_ACTOR (scriptable), clutter_actor_set_rotation_internal (CLUTTER_ACTOR (scriptable),
info->axis, info->angle, info->axis, info->angle,
CLUTTER_UNITS_TO_DEVICE (info->center_x), info->center_x,
CLUTTER_UNITS_TO_DEVICE (info->center_y), info->center_y,
CLUTTER_UNITS_TO_DEVICE (info->center_z)); info->center_z);
g_slice_free (RotationInfo, info); g_slice_free (RotationInfo, info);
} }
@ -5487,11 +5487,7 @@ clutter_actor_transform_stage_point (ClutterActor *self,
static ClutterGeometry* static ClutterGeometry*
clutter_geometry_copy (const ClutterGeometry *geometry) clutter_geometry_copy (const ClutterGeometry *geometry)
{ {
ClutterGeometry *result = g_slice_new (ClutterGeometry); return g_slice_dup (ClutterGeometry, geometry);
*result = *geometry;
return result;
} }
static void static void
@ -5522,11 +5518,7 @@ clutter_geometry_get_type (void)
static ClutterVertex * static ClutterVertex *
clutter_vertex_copy (const ClutterVertex *vertex) clutter_vertex_copy (const ClutterVertex *vertex)
{ {
ClutterVertex *result = g_slice_new (ClutterVertex); return g_slice_dup (ClutterVertex, vertex);
*result = *vertex;
return result;
} }
static void static void
@ -5556,11 +5548,7 @@ clutter_vertex_get_type (void)
static ClutterActorBox * static ClutterActorBox *
clutter_actor_box_copy (const ClutterActorBox *box) clutter_actor_box_copy (const ClutterActorBox *box)
{ {
ClutterActorBox *result = g_slice_new (ClutterActorBox); return g_slice_dup (ClutterActorBox, box);
*result = *box;
return result;
} }
static void static void
@ -5932,6 +5920,16 @@ clutter_actor_get_box_from_vertices (ClutterVertex vtx[4],
box->y2 = y_2; box->y2 = y_2;
} }
/**
* clutter_actor_get_stage:
* @actor: a #ClutterActor
*
* Retrieves the #ClutterStage where @actor is contained.
*
* Return value: the stage containing the actor, or %NULL
*
* Since: 0.8
*/
ClutterActor * ClutterActor *
clutter_actor_get_stage (ClutterActor *actor) clutter_actor_get_stage (ClutterActor *actor)
{ {

View File

@ -508,10 +508,10 @@ clutter_group_init (ClutterGroup *self)
/** /**
* clutter_group_new: * clutter_group_new:
* *
* Create a new #ClutterGroup instance. * Create a new #ClutterGroup.
* *
* returns a new #ClutterGroup * Return value: the newly created #ClutterGroup actor
**/ */
ClutterActor * ClutterActor *
clutter_group_new (void) clutter_group_new (void)
{ {