[actor] Remove the unused get_allocation_coords()
The clutter_actor_get_allocation_coords() is not used, and since the switch to floats in the Actor's API, it returns exactly what the get_allocation_box() returns.
This commit is contained in:
parent
37bd35f592
commit
45c85c4213
@ -4604,51 +4604,6 @@ clutter_actor_get_preferred_height (ClutterActor *self,
|
|||||||
*natural_height_p = priv->request_natural_height;
|
*natural_height_p = priv->request_natural_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* clutter_actor_get_allocation_coords:
|
|
||||||
* @self: A #ClutterActor
|
|
||||||
* @x_1: (out): x1 coordinate
|
|
||||||
* @y_1: (out): y1 coordinate
|
|
||||||
* @x_2: (out): x2 coordinate
|
|
||||||
* @y_2: (out): y2 coordinate
|
|
||||||
*
|
|
||||||
* Gets the layout box an actor has been assigned. The allocation can
|
|
||||||
* only be assumed valid inside a paint() method; anywhere else, it
|
|
||||||
* may be out-of-date.
|
|
||||||
*
|
|
||||||
* An allocation does not incorporate the actor's scale or anchor point;
|
|
||||||
* those transformations do not affect layout, only rendering.
|
|
||||||
*
|
|
||||||
* The returned coordinates are in pixels.
|
|
||||||
*
|
|
||||||
* Since: 0.8
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
clutter_actor_get_allocation_coords (ClutterActor *self,
|
|
||||||
gint *x_1,
|
|
||||||
gint *y_1,
|
|
||||||
gint *x_2,
|
|
||||||
gint *y_2)
|
|
||||||
{
|
|
||||||
ClutterActorBox allocation = { 0, };
|
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
|
||||||
|
|
||||||
clutter_actor_get_allocation_box (self, &allocation);
|
|
||||||
|
|
||||||
if (x_1)
|
|
||||||
*x_1 = allocation.x1;
|
|
||||||
|
|
||||||
if (y_1)
|
|
||||||
*y_1 = allocation.y1;
|
|
||||||
|
|
||||||
if (x_2)
|
|
||||||
*x_2 = allocation.x2;
|
|
||||||
|
|
||||||
if (y_2)
|
|
||||||
*y_2 = allocation.y2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_actor_get_allocation_box:
|
* clutter_actor_get_allocation_box:
|
||||||
* @self: A #ClutterActor
|
* @self: A #ClutterActor
|
||||||
@ -4721,14 +4676,17 @@ void
|
|||||||
clutter_actor_get_allocation_geometry (ClutterActor *self,
|
clutter_actor_get_allocation_geometry (ClutterActor *self,
|
||||||
ClutterGeometry *geom)
|
ClutterGeometry *geom)
|
||||||
{
|
{
|
||||||
gint x2, y2;
|
ClutterActorBox box;
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||||
|
g_return_if_fail (geom != NULL);
|
||||||
|
|
||||||
clutter_actor_get_allocation_coords (self, &geom->x, &geom->y, &x2, &y2);
|
clutter_actor_get_allocation_box (self, &box);
|
||||||
|
|
||||||
geom->width = x2 - geom->x;
|
geom->x = clutter_actor_box_get_x (&box);
|
||||||
geom->height = y2 - geom->y;
|
geom->y = clutter_actor_box_get_y (&box);
|
||||||
|
geom->width = clutter_actor_box_get_width (&box);
|
||||||
|
geom->height = clutter_actor_box_get_height (&box);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -5257,7 +5215,7 @@ clutter_actor_set_size (ClutterActor *self,
|
|||||||
*
|
*
|
||||||
* If you care whether you get the request vs. the allocation, you
|
* If you care whether you get the request vs. the allocation, you
|
||||||
* should probably call a different function like
|
* should probably call a different function like
|
||||||
* clutter_actor_get_allocation_coords() or
|
* clutter_actor_get_allocation_box() or
|
||||||
* clutter_actor_get_preferred_width().
|
* clutter_actor_get_preferred_width().
|
||||||
*
|
*
|
||||||
* Since: 0.2
|
* Since: 0.2
|
||||||
@ -5440,7 +5398,7 @@ clutter_actor_get_transformed_size (ClutterActor *self,
|
|||||||
*
|
*
|
||||||
* If you care whether you get the preferred width or the width that
|
* If you care whether you get the preferred width or the width that
|
||||||
* has been assigned to the actor, you should probably call a different
|
* has been assigned to the actor, you should probably call a different
|
||||||
* function like clutter_actor_get_allocation_coords() to retrieve the
|
* function like clutter_actor_get_allocation_box() to retrieve the
|
||||||
* allocated size or clutter_actor_get_preferred_width() to retrieve the
|
* allocated size or clutter_actor_get_preferred_width() to retrieve the
|
||||||
* preferred width.
|
* preferred width.
|
||||||
*
|
*
|
||||||
@ -5496,7 +5454,7 @@ clutter_actor_get_width (ClutterActor *self)
|
|||||||
*
|
*
|
||||||
* If you care whether you get the preferred height or the height that
|
* If you care whether you get the preferred height or the height that
|
||||||
* has been assigned to the actor, you should probably call a different
|
* has been assigned to the actor, you should probably call a different
|
||||||
* function like clutter_actor_get_allocation_coords() to retrieve the
|
* function like clutter_actor_get_allocation_box() to retrieve the
|
||||||
* allocated size or clutter_actor_get_preferred_height() to retrieve the
|
* allocated size or clutter_actor_get_preferred_height() to retrieve the
|
||||||
* preferred height.
|
* preferred height.
|
||||||
*
|
*
|
||||||
|
@ -322,11 +322,6 @@ void clutter_actor_allocate_available_size (ClutterActor
|
|||||||
gfloat available_width,
|
gfloat available_width,
|
||||||
gfloat available_height,
|
gfloat available_height,
|
||||||
ClutterAllocationFlags flags);
|
ClutterAllocationFlags flags);
|
||||||
void clutter_actor_get_allocation_coords (ClutterActor *self,
|
|
||||||
gint *x_1,
|
|
||||||
gint *y_1,
|
|
||||||
gint *x_2,
|
|
||||||
gint *y_2);
|
|
||||||
void clutter_actor_get_allocation_box (ClutterActor *self,
|
void clutter_actor_get_allocation_box (ClutterActor *self,
|
||||||
ClutterActorBox *box);
|
ClutterActorBox *box);
|
||||||
void clutter_actor_get_allocation_geometry (ClutterActor *self,
|
void clutter_actor_get_allocation_geometry (ClutterActor *self,
|
||||||
|
@ -200,4 +200,6 @@
|
|||||||
|
|
||||||
#define clutter_actor_pick clutter_actor_pick_DEPRECATED_BY_clutter_actor_paint
|
#define clutter_actor_pick clutter_actor_pick_DEPRECATED_BY_clutter_actor_paint
|
||||||
|
|
||||||
|
#define clutter_actor_get_allocation_coords clutter_actor_get_allocation_coords_DEPRECATED_BY_clutter_actor_get_allocation_box
|
||||||
|
|
||||||
#endif /* CLUTTER_DEPRECATED_H */
|
#endif /* CLUTTER_DEPRECATED_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user