actor: Deprecate [sg]et_geometry()

These methods are short-hands for accessing the position and size,
which are already shorthands for accessing the various dimensional
and positional attributes. Plus, they use ClutterGeometry, which is a
fairly bad data type for a rectangle.
This commit is contained in:
Emmanuele Bassi 2011-11-08 14:46:55 +00:00
parent 101f39ea92
commit ba8d682c09
3 changed files with 17 additions and 7 deletions

View File

@ -6289,6 +6289,9 @@ clutter_actor_allocate (ClutterActor *self,
* size, in pixels. This means the untransformed actor will have the
* given geometry. This is the same as calling clutter_actor_set_position()
* and clutter_actor_set_size().
*
* Deprecated: 1.10: Use clutter_actor_set_position() and
* clutter_actor_set_size() instead.
*/
void
clutter_actor_set_geometry (ClutterActor *self,
@ -6305,12 +6308,16 @@ clutter_actor_set_geometry (ClutterActor *self,
/**
* clutter_actor_get_geometry:
* @self: A #ClutterActor
* @geometry: (out): A location to store actors #ClutterGeometry
* @geometry: (out caller-allocates): A location to store actors #ClutterGeometry
*
* Gets the size and position of an actor relative to its parent
* actor. This is the same as calling clutter_actor_get_position() and
* clutter_actor_get_size(). It tries to "do what you mean" and get the
* requested size and position if the actor's allocation is invalid.
*
* Deprecated: 1.10: Use clutter_actor_get_position() and
* clutter_actor_get_size(), or clutter_actor_get_allocation_geometry()
* instead.
*/
void
clutter_actor_get_geometry (ClutterActor *self,

View File

@ -326,10 +326,6 @@ void clutter_actor_get_allocation_geometry (ClutterActor
void clutter_actor_get_allocation_vertices (ClutterActor *self,
ClutterActor *ancestor,
ClutterVertex verts[]);
void clutter_actor_set_geometry (ClutterActor *self,
const ClutterGeometry *geometry);
void clutter_actor_get_geometry (ClutterActor *self,
ClutterGeometry *geometry);
void clutter_actor_set_size (ClutterActor *self,
gfloat width,
gfloat height);

View File

@ -6,10 +6,17 @@
G_BEGIN_DECLS
CLUTTER_DEPRECATED
guint32 clutter_actor_get_gid (ClutterActor *self);
void clutter_actor_set_geometry (ClutterActor *self,
const ClutterGeometry *geometry);
CLUTTER_DEPRECATED_FOR(clutter_actor_get_allocation_geometry)
void clutter_actor_get_geometry (ClutterActor *self,
ClutterGeometry *geometry);
CLUTTER_DEPRECATED
guint32 clutter_actor_get_gid (ClutterActor *self);
CLUTTER_DEPRECATED
ClutterActor * clutter_get_actor_by_gid (guint32 id_);
ClutterActor * clutter_get_actor_by_gid (guint32 id_);
G_END_DECLS