mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter: Remove allocation flags
Since there are now no more allocation flags, we can remove ClutterAllocationFlags from Clutter. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1245
This commit is contained in:
parent
dc8e5c7f8b
commit
3c29bf7491
@ -698,7 +698,6 @@ struct _ClutterActorPrivate
|
|||||||
* allocation
|
* allocation
|
||||||
*/
|
*/
|
||||||
ClutterActorBox allocation;
|
ClutterActorBox allocation;
|
||||||
ClutterAllocationFlags allocation_flags;
|
|
||||||
|
|
||||||
/* clip, in actor coordinates */
|
/* clip, in actor coordinates */
|
||||||
graphene_rect_t clip;
|
graphene_rect_t clip;
|
||||||
@ -2580,8 +2579,7 @@ clutter_actor_notify_if_geometry_changed (ClutterActor *self,
|
|||||||
*/
|
*/
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
clutter_actor_set_allocation_internal (ClutterActor *self,
|
clutter_actor_set_allocation_internal (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActorPrivate *priv = self->priv;
|
ClutterActorPrivate *priv = self->priv;
|
||||||
GObject *obj;
|
GObject *obj;
|
||||||
@ -2601,7 +2599,6 @@ clutter_actor_set_allocation_internal (ClutterActor *self,
|
|||||||
y2_changed = priv->allocation.y2 != box->y2;
|
y2_changed = priv->allocation.y2 != box->y2;
|
||||||
|
|
||||||
priv->allocation = *box;
|
priv->allocation = *box;
|
||||||
priv->allocation_flags = flags;
|
|
||||||
|
|
||||||
/* allocation is authoritative */
|
/* allocation is authoritative */
|
||||||
priv->needs_width_request = FALSE;
|
priv->needs_width_request = FALSE;
|
||||||
@ -2641,15 +2638,14 @@ clutter_actor_set_allocation_internal (ClutterActor *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_actor_real_allocate (ClutterActor *self,
|
clutter_actor_real_allocate (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActorPrivate *priv = self->priv;
|
ClutterActorPrivate *priv = self->priv;
|
||||||
gboolean changed;
|
gboolean changed;
|
||||||
|
|
||||||
g_object_freeze_notify (G_OBJECT (self));
|
g_object_freeze_notify (G_OBJECT (self));
|
||||||
|
|
||||||
changed = clutter_actor_set_allocation_internal (self, box, flags);
|
changed = clutter_actor_set_allocation_internal (self, box);
|
||||||
|
|
||||||
/* we allocate our children before we notify changes in our geometry,
|
/* we allocate our children before we notify changes in our geometry,
|
||||||
* so that people connecting to properties will be able to get valid
|
* so that people connecting to properties will be able to get valid
|
||||||
@ -2680,18 +2676,15 @@ clutter_actor_real_allocate (ClutterActor *self,
|
|||||||
|
|
||||||
clutter_layout_manager_allocate (priv->layout_manager,
|
clutter_layout_manager_allocate (priv->layout_manager,
|
||||||
CLUTTER_CONTAINER (self),
|
CLUTTER_CONTAINER (self),
|
||||||
&children_box,
|
&children_box);
|
||||||
flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
ClutterActorBox signal_box = priv->allocation;
|
ClutterActorBox signal_box = priv->allocation;
|
||||||
ClutterAllocationFlags signal_flags = priv->allocation_flags;
|
|
||||||
|
|
||||||
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
||||||
&signal_box,
|
&signal_box);
|
||||||
signal_flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_thaw_notify (G_OBJECT (self));
|
g_object_thaw_notify (G_OBJECT (self));
|
||||||
@ -8547,7 +8540,6 @@ clutter_actor_class_init (ClutterActorClass *klass)
|
|||||||
* ClutterActor::allocation-changed:
|
* ClutterActor::allocation-changed:
|
||||||
* @actor: the #ClutterActor that emitted the signal
|
* @actor: the #ClutterActor that emitted the signal
|
||||||
* @box: a #ClutterActorBox with the new allocation
|
* @box: a #ClutterActorBox with the new allocation
|
||||||
* @flags: #ClutterAllocationFlags for the allocation
|
|
||||||
*
|
*
|
||||||
* The ::allocation-changed signal is emitted when the
|
* The ::allocation-changed signal is emitted when the
|
||||||
* #ClutterActor:allocation property changes. Usually, application
|
* #ClutterActor:allocation property changes. Usually, application
|
||||||
@ -8565,9 +8557,8 @@ clutter_actor_class_init (ClutterActorClass *klass)
|
|||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
_clutter_marshal_VOID__BOXED_FLAGS,
|
_clutter_marshal_VOID__BOXED_FLAGS,
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 1,
|
||||||
CLUTTER_TYPE_ACTOR_BOX | G_SIGNAL_TYPE_STATIC_SCOPE,
|
CLUTTER_TYPE_ACTOR_BOX | G_SIGNAL_TYPE_STATIC_SCOPE);
|
||||||
CLUTTER_TYPE_ALLOCATION_FLAGS);
|
|
||||||
g_signal_set_va_marshaller (actor_signals[ALLOCATION_CHANGED],
|
g_signal_set_va_marshaller (actor_signals[ALLOCATION_CHANGED],
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
_clutter_marshal_VOID__BOXED_FLAGSv);
|
_clutter_marshal_VOID__BOXED_FLAGSv);
|
||||||
@ -10109,8 +10100,7 @@ clutter_actor_adjust_allocation (ClutterActor *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_actor_allocate_internal (ClutterActor *self,
|
clutter_actor_allocate_internal (ClutterActor *self,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActorClass *klass;
|
ClutterActorClass *klass;
|
||||||
|
|
||||||
@ -10120,7 +10110,7 @@ clutter_actor_allocate_internal (ClutterActor *self,
|
|||||||
_clutter_actor_get_debug_name (self));
|
_clutter_actor_get_debug_name (self));
|
||||||
|
|
||||||
klass = CLUTTER_ACTOR_GET_CLASS (self);
|
klass = CLUTTER_ACTOR_GET_CLASS (self);
|
||||||
klass->allocate (self, allocation, flags);
|
klass->allocate (self, allocation);
|
||||||
|
|
||||||
CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT);
|
CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT);
|
||||||
|
|
||||||
@ -10133,7 +10123,6 @@ clutter_actor_allocate_internal (ClutterActor *self,
|
|||||||
* clutter_actor_allocate:
|
* clutter_actor_allocate:
|
||||||
* @self: A #ClutterActor
|
* @self: A #ClutterActor
|
||||||
* @box: new allocation of the actor, in parent-relative coordinates
|
* @box: new allocation of the actor, in parent-relative coordinates
|
||||||
* @flags: flags that control the allocation
|
|
||||||
*
|
*
|
||||||
* Assigns the size of a #ClutterActor from the given @box.
|
* Assigns the size of a #ClutterActor from the given @box.
|
||||||
*
|
*
|
||||||
@ -10159,9 +10148,8 @@ clutter_actor_allocate_internal (ClutterActor *self,
|
|||||||
* Since: 0.8
|
* Since: 0.8
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_allocate (ClutterActor *self,
|
clutter_actor_allocate (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActorBox old_allocation, real_allocation;
|
ClutterActorBox old_allocation, real_allocation;
|
||||||
gboolean origin_changed, size_changed;
|
gboolean origin_changed, size_changed;
|
||||||
@ -10249,15 +10237,10 @@ clutter_actor_allocate (ClutterActor *self,
|
|||||||
{
|
{
|
||||||
/* If the actor didn't move but needs_allocation is set, we just
|
/* If the actor didn't move but needs_allocation is set, we just
|
||||||
* need to allocate the children */
|
* need to allocate the children */
|
||||||
clutter_actor_allocate_internal (self, &real_allocation, flags);
|
clutter_actor_allocate_internal (self, &real_allocation);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* store the flags here, so that they can be propagated by the
|
|
||||||
* transition code
|
|
||||||
*/
|
|
||||||
self->priv->allocation_flags = flags;
|
|
||||||
|
|
||||||
_clutter_actor_create_transition (self, obj_props[PROP_ALLOCATION],
|
_clutter_actor_create_transition (self, obj_props[PROP_ALLOCATION],
|
||||||
&priv->allocation,
|
&priv->allocation,
|
||||||
&real_allocation);
|
&real_allocation);
|
||||||
@ -10267,7 +10250,6 @@ clutter_actor_allocate (ClutterActor *self,
|
|||||||
* clutter_actor_set_allocation:
|
* clutter_actor_set_allocation:
|
||||||
* @self: a #ClutterActor
|
* @self: a #ClutterActor
|
||||||
* @box: a #ClutterActorBox
|
* @box: a #ClutterActorBox
|
||||||
* @flags: allocation flags
|
|
||||||
*
|
*
|
||||||
* Stores the allocation of @self as defined by @box.
|
* Stores the allocation of @self as defined by @box.
|
||||||
*
|
*
|
||||||
@ -10287,8 +10269,7 @@ clutter_actor_allocate (ClutterActor *self,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_set_allocation (ClutterActor *self,
|
clutter_actor_set_allocation (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActorPrivate *priv;
|
ClutterActorPrivate *priv;
|
||||||
gboolean changed;
|
gboolean changed;
|
||||||
@ -10308,16 +10289,14 @@ clutter_actor_set_allocation (ClutterActor *self,
|
|||||||
|
|
||||||
g_object_freeze_notify (G_OBJECT (self));
|
g_object_freeze_notify (G_OBJECT (self));
|
||||||
|
|
||||||
changed = clutter_actor_set_allocation_internal (self, box, flags);
|
changed = clutter_actor_set_allocation_internal (self, box);
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
ClutterActorBox signal_box = priv->allocation;
|
ClutterActorBox signal_box = priv->allocation;
|
||||||
ClutterAllocationFlags signal_flags = priv->allocation_flags;
|
|
||||||
|
|
||||||
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0,
|
||||||
&signal_box,
|
&signal_box);
|
||||||
signal_flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_thaw_notify (G_OBJECT (self));
|
g_object_thaw_notify (G_OBJECT (self));
|
||||||
@ -14791,9 +14770,7 @@ clutter_actor_set_animatable_property (ClutterActor *actor,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_ALLOCATION:
|
case PROP_ALLOCATION:
|
||||||
clutter_actor_allocate_internal (actor,
|
clutter_actor_allocate_internal (actor, g_value_get_boxed (value));
|
||||||
g_value_get_boxed (value),
|
|
||||||
actor->priv->allocation_flags);
|
|
||||||
clutter_actor_queue_redraw (actor);
|
clutter_actor_queue_redraw (actor);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -15187,7 +15164,6 @@ clutter_actor_get_stage (ClutterActor *actor)
|
|||||||
* actor's natural width
|
* actor's natural width
|
||||||
* @available_height: the maximum available height, or -1 to use the
|
* @available_height: the maximum available height, or -1 to use the
|
||||||
* actor's natural height
|
* actor's natural height
|
||||||
* @flags: flags controlling the allocation
|
|
||||||
*
|
*
|
||||||
* Allocates @self taking into account the #ClutterActor's
|
* Allocates @self taking into account the #ClutterActor's
|
||||||
* preferred size, but limiting it to the maximum available width
|
* preferred size, but limiting it to the maximum available width
|
||||||
@ -15234,7 +15210,7 @@ clutter_actor_get_stage (ClutterActor *actor)
|
|||||||
* box.x1 = x; box.y1 = y;
|
* box.x1 = x; box.y1 = y;
|
||||||
* box.x2 = box.x1 + available_width;
|
* box.x2 = box.x1 + available_width;
|
||||||
* box.y2 = box.y1 + available_height;
|
* box.y2 = box.y1 + available_height;
|
||||||
* clutter_actor_allocate (self, &box, flags);
|
* clutter_actor_allocate (self, &box);
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
* This function can be used by fluid layout managers to allocate
|
* This function can be used by fluid layout managers to allocate
|
||||||
@ -15248,8 +15224,7 @@ clutter_actor_allocate_available_size (ClutterActor *self,
|
|||||||
gfloat x,
|
gfloat x,
|
||||||
gfloat y,
|
gfloat y,
|
||||||
gfloat available_width,
|
gfloat available_width,
|
||||||
gfloat available_height,
|
gfloat available_height)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActorPrivate *priv;
|
ClutterActorPrivate *priv;
|
||||||
gfloat width, height;
|
gfloat width, height;
|
||||||
@ -15305,13 +15280,12 @@ clutter_actor_allocate_available_size (ClutterActor *self,
|
|||||||
box.y1 = y;
|
box.y1 = y;
|
||||||
box.x2 = box.x1 + width;
|
box.x2 = box.x1 + width;
|
||||||
box.y2 = box.y1 + height;
|
box.y2 = box.y1 + height;
|
||||||
clutter_actor_allocate (self, &box, flags);
|
clutter_actor_allocate (self, &box);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_actor_allocate_preferred_size:
|
* clutter_actor_allocate_preferred_size:
|
||||||
* @self: a #ClutterActor
|
* @self: a #ClutterActor
|
||||||
* @flags: flags controlling the allocation
|
|
||||||
*
|
*
|
||||||
* Allocates the natural size of @self.
|
* Allocates the natural size of @self.
|
||||||
*
|
*
|
||||||
@ -15329,8 +15303,7 @@ clutter_actor_allocate_available_size (ClutterActor *self,
|
|||||||
* Since: 0.8
|
* Since: 0.8
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_allocate_preferred_size (ClutterActor *self,
|
clutter_actor_allocate_preferred_size (ClutterActor *self)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
gfloat actor_x, actor_y;
|
gfloat actor_x, actor_y;
|
||||||
gfloat natural_width, natural_height;
|
gfloat natural_width, natural_height;
|
||||||
@ -15364,7 +15337,7 @@ clutter_actor_allocate_preferred_size (ClutterActor *self,
|
|||||||
actor_box.x2 = actor_box.x1 + natural_width;
|
actor_box.x2 = actor_box.x1 + natural_width;
|
||||||
actor_box.y2 = actor_box.y1 + natural_height;
|
actor_box.y2 = actor_box.y1 + natural_height;
|
||||||
|
|
||||||
clutter_actor_allocate (self, &actor_box, flags);
|
clutter_actor_allocate (self, &actor_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15375,7 +15348,6 @@ clutter_actor_allocate_preferred_size (ClutterActor *self,
|
|||||||
* @y_align: the vertical alignment, between 0 and 1
|
* @y_align: the vertical alignment, between 0 and 1
|
||||||
* @x_fill: whether the actor should fill horizontally
|
* @x_fill: whether the actor should fill horizontally
|
||||||
* @y_fill: whether the actor should fill vertically
|
* @y_fill: whether the actor should fill vertically
|
||||||
* @flags: allocation flags to be passed to clutter_actor_allocate()
|
|
||||||
*
|
*
|
||||||
* Allocates @self by taking into consideration the available allocation
|
* Allocates @self by taking into consideration the available allocation
|
||||||
* area; an alignment factor on either axis; and whether the actor should
|
* area; an alignment factor on either axis; and whether the actor should
|
||||||
@ -15402,8 +15374,7 @@ clutter_actor_allocate_align_fill (ClutterActor *self,
|
|||||||
gdouble x_align,
|
gdouble x_align,
|
||||||
gdouble y_align,
|
gdouble y_align,
|
||||||
gboolean x_fill,
|
gboolean x_fill,
|
||||||
gboolean y_fill,
|
gboolean y_fill)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActorPrivate *priv;
|
ClutterActorPrivate *priv;
|
||||||
ClutterActorBox allocation = CLUTTER_ACTOR_BOX_INIT_ZERO;
|
ClutterActorBox allocation = CLUTTER_ACTOR_BOX_INIT_ZERO;
|
||||||
@ -15519,7 +15490,7 @@ out:
|
|||||||
allocation.x2 = ceilf (allocation.x1 + MAX (child_width, 0));
|
allocation.x2 = ceilf (allocation.x1 + MAX (child_width, 0));
|
||||||
allocation.y2 = ceilf (allocation.y1 + MAX (child_height, 0));
|
allocation.y2 = ceilf (allocation.y1 + MAX (child_height, 0));
|
||||||
|
|
||||||
clutter_actor_allocate (self, &allocation, flags);
|
clutter_actor_allocate (self, &allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -256,8 +256,7 @@ struct _ClutterActorClass
|
|||||||
gfloat *min_height_p,
|
gfloat *min_height_p,
|
||||||
gfloat *natural_height_p);
|
gfloat *natural_height_p);
|
||||||
void (* allocate) (ClutterActor *self,
|
void (* allocate) (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
|
|
||||||
/* transformations */
|
/* transformations */
|
||||||
void (* apply_transform) (ClutterActor *actor,
|
void (* apply_transform) (ClutterActor *actor,
|
||||||
@ -418,30 +417,25 @@ void clutter_actor_get_preferred_size
|
|||||||
gfloat *natural_height_p);
|
gfloat *natural_height_p);
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_allocate (ClutterActor *self,
|
void clutter_actor_allocate (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_allocate_preferred_size (ClutterActor *self,
|
void clutter_actor_allocate_preferred_size (ClutterActor *self);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_allocate_available_size (ClutterActor *self,
|
void clutter_actor_allocate_available_size (ClutterActor *self,
|
||||||
gfloat x,
|
gfloat x,
|
||||||
gfloat y,
|
gfloat y,
|
||||||
gfloat available_width,
|
gfloat available_width,
|
||||||
gfloat available_height,
|
gfloat available_height);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_allocate_align_fill (ClutterActor *self,
|
void clutter_actor_allocate_align_fill (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box,
|
||||||
gdouble x_align,
|
gdouble x_align,
|
||||||
gdouble y_align,
|
gdouble y_align,
|
||||||
gboolean x_fill,
|
gboolean x_fill,
|
||||||
gboolean y_fill,
|
gboolean y_fill);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_set_allocation (ClutterActor *self,
|
void clutter_actor_set_allocation (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_actor_get_allocation_box (ClutterActor *self,
|
void clutter_actor_get_allocation_box (ClutterActor *self,
|
||||||
ClutterActorBox *box);
|
ClutterActorBox *box);
|
||||||
|
@ -86,7 +86,6 @@ G_DEFINE_TYPE (ClutterAlignConstraint,
|
|||||||
static void
|
static void
|
||||||
source_position_changed (ClutterActor *actor,
|
source_position_changed (ClutterActor *actor,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation,
|
||||||
ClutterAllocationFlags flags,
|
|
||||||
ClutterAlignConstraint *align)
|
ClutterAlignConstraint *align)
|
||||||
{
|
{
|
||||||
if (align->actor != NULL)
|
if (align->actor != NULL)
|
||||||
|
@ -406,8 +406,7 @@ get_actor_align_factor (ClutterActorAlign alignment)
|
|||||||
static void
|
static void
|
||||||
clutter_bin_layout_allocate (ClutterLayoutManager *manager,
|
clutter_bin_layout_allocate (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
gfloat allocation_x, allocation_y;
|
gfloat allocation_x, allocation_y;
|
||||||
gfloat available_w, available_h;
|
gfloat available_w, available_h;
|
||||||
@ -515,8 +514,7 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager,
|
|||||||
|
|
||||||
clutter_actor_allocate_align_fill (child, &child_alloc,
|
clutter_actor_allocate_align_fill (child, &child_alloc,
|
||||||
x_align, y_align,
|
x_align, y_align,
|
||||||
x_fill, y_fill,
|
x_fill, y_fill);
|
||||||
flags);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -720,8 +720,7 @@ static void
|
|||||||
allocate_box_child (ClutterBoxLayout *self,
|
allocate_box_child (ClutterBoxLayout *self,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
ClutterActor *child,
|
ClutterActor *child,
|
||||||
ClutterActorBox *child_box,
|
ClutterActorBox *child_box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterBoxLayoutPrivate *priv = self->priv;
|
ClutterBoxLayoutPrivate *priv = self->priv;
|
||||||
ClutterBoxChild *box_child;
|
ClutterBoxChild *box_child;
|
||||||
@ -750,14 +749,13 @@ allocate_box_child (ClutterBoxLayout *self,
|
|||||||
*/
|
*/
|
||||||
if (clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_HORIZONTAL) ||
|
if (clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_HORIZONTAL) ||
|
||||||
clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_VERTICAL))
|
clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_VERTICAL))
|
||||||
clutter_actor_allocate (child, child_box, flags);
|
clutter_actor_allocate (child, child_box);
|
||||||
else
|
else
|
||||||
clutter_actor_allocate_align_fill (child, child_box,
|
clutter_actor_allocate_align_fill (child, child_box,
|
||||||
get_box_alignment_factor (box_child->x_align),
|
get_box_alignment_factor (box_child->x_align),
|
||||||
get_box_alignment_factor (box_child->y_align),
|
get_box_alignment_factor (box_child->y_align),
|
||||||
box_child->x_fill,
|
box_child->x_fill,
|
||||||
box_child->y_fill,
|
box_child->y_fill);
|
||||||
flags);
|
|
||||||
|
|
||||||
if (priv->use_animations)
|
if (priv->use_animations)
|
||||||
clutter_actor_restore_easing_state (child);
|
clutter_actor_restore_easing_state (child);
|
||||||
@ -956,8 +954,7 @@ distribute_natural_allocation (float extra_space,
|
|||||||
static void
|
static void
|
||||||
clutter_box_layout_allocate (ClutterLayoutManager *layout,
|
clutter_box_layout_allocate (ClutterLayoutManager *layout,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterBoxLayoutPrivate *priv = CLUTTER_BOX_LAYOUT (layout)->priv;
|
ClutterBoxLayoutPrivate *priv = CLUTTER_BOX_LAYOUT (layout)->priv;
|
||||||
ClutterActor *actor, *child;
|
ClutterActor *actor, *child;
|
||||||
@ -1224,8 +1221,7 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout,
|
|||||||
allocate_box_child (CLUTTER_BOX_LAYOUT (layout),
|
allocate_box_child (CLUTTER_BOX_LAYOUT (layout),
|
||||||
container,
|
container,
|
||||||
child,
|
child,
|
||||||
&child_allocation,
|
&child_allocation);
|
||||||
flags);
|
|
||||||
|
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
@ -240,15 +240,14 @@ clutter_clone_has_overlaps (ClutterActor *actor)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_clone_allocate (ClutterActor *self,
|
clutter_clone_allocate (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
|
ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv;
|
||||||
ClutterActorClass *parent_class;
|
ClutterActorClass *parent_class;
|
||||||
|
|
||||||
/* chain up */
|
/* chain up */
|
||||||
parent_class = CLUTTER_ACTOR_CLASS (clutter_clone_parent_class);
|
parent_class = CLUTTER_ACTOR_CLASS (clutter_clone_parent_class);
|
||||||
parent_class->allocate (self, box, flags);
|
parent_class->allocate (self, box);
|
||||||
|
|
||||||
if (priv->clone_source == NULL)
|
if (priv->clone_source == NULL)
|
||||||
return;
|
return;
|
||||||
@ -258,7 +257,7 @@ clutter_clone_allocate (ClutterActor *self,
|
|||||||
*/
|
*/
|
||||||
if (clutter_actor_get_parent (priv->clone_source) != NULL &&
|
if (clutter_actor_get_parent (priv->clone_source) != NULL &&
|
||||||
!clutter_actor_has_allocation (priv->clone_source))
|
!clutter_actor_has_allocation (priv->clone_source))
|
||||||
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
|
clutter_actor_allocate_preferred_size (priv->clone_source);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* XXX - this is wrong: ClutterClone cannot clone unparented
|
/* XXX - this is wrong: ClutterClone cannot clone unparented
|
||||||
@ -273,7 +272,7 @@ clutter_clone_allocate (ClutterActor *self,
|
|||||||
* paint cycle, we can safely give it as much size as it requires
|
* paint cycle, we can safely give it as much size as it requires
|
||||||
*/
|
*/
|
||||||
if (clutter_actor_get_parent (priv->clone_source) == NULL)
|
if (clutter_actor_get_parent (priv->clone_source) == NULL)
|
||||||
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
|
clutter_actor_allocate_preferred_size (priv->clone_source);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,6 @@ clutter_deform_effect_deform_vertex (ClutterDeformEffect *effect,
|
|||||||
static void
|
static void
|
||||||
vbo_invalidate (ClutterActor *actor,
|
vbo_invalidate (ClutterActor *actor,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation,
|
||||||
ClutterAllocationFlags flags,
|
|
||||||
ClutterDeformEffect *effect)
|
ClutterDeformEffect *effect)
|
||||||
{
|
{
|
||||||
effect->priv->is_dirty = TRUE;
|
effect->priv->is_dirty = TRUE;
|
||||||
|
@ -554,20 +554,6 @@ typedef enum /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
|
|||||||
CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE = 1 << 2
|
CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE = 1 << 2
|
||||||
} ClutterOffscreenRedirect;
|
} ClutterOffscreenRedirect;
|
||||||
|
|
||||||
/**
|
|
||||||
* ClutterAllocationFlags:
|
|
||||||
* @CLUTTER_ALLOCATION_NONE: No flag set
|
|
||||||
*
|
|
||||||
* Flags passed to the #ClutterActorClass.allocate() virtual function
|
|
||||||
* and to the clutter_actor_allocate() function.
|
|
||||||
*
|
|
||||||
* Since: 1.0
|
|
||||||
*/
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CLUTTER_ALLOCATION_NONE = 0,
|
|
||||||
} ClutterAllocationFlags;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterAlignAxis:
|
* ClutterAlignAxis:
|
||||||
* @CLUTTER_ALIGN_X_AXIS: Maintain the alignment on the X axis
|
* @CLUTTER_ALIGN_X_AXIS: Maintain the alignment on the X axis
|
||||||
|
@ -131,8 +131,7 @@ clutter_fixed_layout_get_preferred_height (ClutterLayoutManager *manager,
|
|||||||
static void
|
static void
|
||||||
clutter_fixed_layout_allocate (ClutterLayoutManager *manager,
|
clutter_fixed_layout_allocate (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterActor *child;
|
ClutterActor *child;
|
||||||
|
|
||||||
@ -140,7 +139,7 @@ clutter_fixed_layout_allocate (ClutterLayoutManager *manager,
|
|||||||
child != NULL;
|
child != NULL;
|
||||||
child = clutter_actor_get_next_sibling (child))
|
child = clutter_actor_get_next_sibling (child))
|
||||||
{
|
{
|
||||||
clutter_actor_allocate_preferred_size (child, flags);
|
clutter_actor_allocate_preferred_size (child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,8 +566,7 @@ clutter_flow_layout_get_preferred_height (ClutterLayoutManager *manager,
|
|||||||
static void
|
static void
|
||||||
clutter_flow_layout_allocate (ClutterLayoutManager *manager,
|
clutter_flow_layout_allocate (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterFlowLayoutPrivate *priv = CLUTTER_FLOW_LAYOUT (manager)->priv;
|
ClutterFlowLayoutPrivate *priv = CLUTTER_FLOW_LAYOUT (manager)->priv;
|
||||||
ClutterActor *actor, *child;
|
ClutterActor *actor, *child;
|
||||||
@ -729,7 +728,7 @@ clutter_flow_layout_allocate (ClutterLayoutManager *manager,
|
|||||||
child_alloc.y1 = ceil (item_y);
|
child_alloc.y1 = ceil (item_y);
|
||||||
child_alloc.x2 = ceil (child_alloc.x1 + item_width);
|
child_alloc.x2 = ceil (child_alloc.x1 + item_width);
|
||||||
child_alloc.y2 = ceil (child_alloc.y1 + item_height);
|
child_alloc.y2 = ceil (child_alloc.y1 + item_height);
|
||||||
clutter_actor_allocate (child, &child_alloc, flags);
|
clutter_actor_allocate (child, &child_alloc);
|
||||||
|
|
||||||
if (priv->orientation == CLUTTER_FLOW_HORIZONTAL)
|
if (priv->orientation == CLUTTER_FLOW_HORIZONTAL)
|
||||||
item_x = new_x;
|
item_x = new_x;
|
||||||
|
@ -1391,8 +1391,7 @@ allocate_child (ClutterGridRequest *request,
|
|||||||
static void
|
static void
|
||||||
clutter_grid_layout_allocate (ClutterLayoutManager *layout,
|
clutter_grid_layout_allocate (ClutterLayoutManager *layout,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterGridLayout *self = CLUTTER_GRID_LAYOUT (layout);
|
ClutterGridLayout *self = CLUTTER_GRID_LAYOUT (layout);
|
||||||
ClutterOrientation orientation;
|
ClutterOrientation orientation;
|
||||||
@ -1453,7 +1452,7 @@ clutter_grid_layout_allocate (ClutterLayoutManager *layout,
|
|||||||
child_allocation.x2 = child_allocation.x1 + width;
|
child_allocation.x2 = child_allocation.x1 + width;
|
||||||
child_allocation.y2 = child_allocation.y1 + height;
|
child_allocation.y2 = child_allocation.y1 + height;
|
||||||
|
|
||||||
clutter_actor_allocate (child, &child_allocation, flags);
|
clutter_actor_allocate (child, &child_allocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,8 +253,7 @@ layout_manager_real_get_preferred_height (ClutterLayoutManager *manager,
|
|||||||
static void
|
static void
|
||||||
layout_manager_real_allocate (ClutterLayoutManager *manager,
|
layout_manager_real_allocate (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
LAYOUT_MANAGER_WARN_NOT_IMPLEMENTED (manager, "allocate");
|
LAYOUT_MANAGER_WARN_NOT_IMPLEMENTED (manager, "allocate");
|
||||||
}
|
}
|
||||||
@ -434,7 +433,6 @@ clutter_layout_manager_get_preferred_height (ClutterLayoutManager *manager,
|
|||||||
* @container: the #ClutterContainer using @manager
|
* @container: the #ClutterContainer using @manager
|
||||||
* @allocation: the #ClutterActorBox containing the allocated area
|
* @allocation: the #ClutterActorBox containing the allocated area
|
||||||
* of @container
|
* of @container
|
||||||
* @flags: the allocation flags
|
|
||||||
*
|
*
|
||||||
* Allocates the children of @container given an area
|
* Allocates the children of @container given an area
|
||||||
*
|
*
|
||||||
@ -445,8 +443,7 @@ clutter_layout_manager_get_preferred_height (ClutterLayoutManager *manager,
|
|||||||
void
|
void
|
||||||
clutter_layout_manager_allocate (ClutterLayoutManager *manager,
|
clutter_layout_manager_allocate (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterLayoutManagerClass *klass;
|
ClutterLayoutManagerClass *klass;
|
||||||
|
|
||||||
@ -455,7 +452,7 @@ clutter_layout_manager_allocate (ClutterLayoutManager *manager,
|
|||||||
g_return_if_fail (allocation != NULL);
|
g_return_if_fail (allocation != NULL);
|
||||||
|
|
||||||
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager);
|
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager);
|
||||||
klass->allocate (manager, container, allocation, flags);
|
klass->allocate (manager, container, allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -115,8 +115,7 @@ struct _ClutterLayoutManagerClass
|
|||||||
gfloat *nat_height_p);
|
gfloat *nat_height_p);
|
||||||
void (* allocate) (ClutterLayoutManager *manager,
|
void (* allocate) (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
|
|
||||||
void (* set_container) (ClutterLayoutManager *manager,
|
void (* set_container) (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container);
|
ClutterContainer *container);
|
||||||
@ -158,8 +157,7 @@ void clutter_layout_manager_get_preferred_height (ClutterLayoutMa
|
|||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_layout_manager_allocate (ClutterLayoutManager *manager,
|
void clutter_layout_manager_allocate (ClutterLayoutManager *manager,
|
||||||
ClutterContainer *container,
|
ClutterContainer *container,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation);
|
||||||
ClutterAllocationFlags flags);
|
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
void clutter_layout_manager_set_container (ClutterLayoutManager *manager,
|
void clutter_layout_manager_set_container (ClutterLayoutManager *manager,
|
||||||
|
@ -613,8 +613,7 @@ stage_is_default (ClutterStage *stage)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_stage_allocate (ClutterActor *self,
|
clutter_stage_allocate (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv;
|
ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv;
|
||||||
ClutterActorBox alloc = CLUTTER_ACTOR_BOX_INIT_ZERO;
|
ClutterActorBox alloc = CLUTTER_ACTOR_BOX_INIT_ZERO;
|
||||||
@ -654,12 +653,11 @@ clutter_stage_allocate (ClutterActor *self,
|
|||||||
"Following allocation to %.2fx%.2f",
|
"Following allocation to %.2fx%.2f",
|
||||||
width, height);
|
width, height);
|
||||||
|
|
||||||
clutter_actor_set_allocation (self, box, flags);
|
clutter_actor_set_allocation (self, box);
|
||||||
|
|
||||||
clutter_layout_manager_allocate (layout_manager,
|
clutter_layout_manager_allocate (layout_manager,
|
||||||
CLUTTER_CONTAINER (self),
|
CLUTTER_CONTAINER (self),
|
||||||
&children_box,
|
&children_box);
|
||||||
flags);
|
|
||||||
|
|
||||||
/* Ensure the window is sized correctly */
|
/* Ensure the window is sized correctly */
|
||||||
if (priv->min_size_changed)
|
if (priv->min_size_changed)
|
||||||
@ -712,12 +710,11 @@ clutter_stage_allocate (ClutterActor *self,
|
|||||||
override.x2, override.y2);
|
override.x2, override.y2);
|
||||||
|
|
||||||
/* and store the overridden allocation */
|
/* and store the overridden allocation */
|
||||||
clutter_actor_set_allocation (self, &override, flags);
|
clutter_actor_set_allocation (self, &override);
|
||||||
|
|
||||||
clutter_layout_manager_allocate (layout_manager,
|
clutter_layout_manager_allocate (layout_manager,
|
||||||
CLUTTER_CONTAINER (self),
|
CLUTTER_CONTAINER (self),
|
||||||
&override,
|
&override);
|
||||||
flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reset the viewport if the allocation effectively changed */
|
/* reset the viewport if the allocation effectively changed */
|
||||||
@ -1368,8 +1365,7 @@ _clutter_stage_maybe_relayout (ClutterActor *actor)
|
|||||||
CLUTTER_SET_PRIVATE_FLAGS (queued_actor, CLUTTER_IN_RELAYOUT);
|
CLUTTER_SET_PRIVATE_FLAGS (queued_actor, CLUTTER_IN_RELAYOUT);
|
||||||
|
|
||||||
old_version = priv->pending_relayouts_version;
|
old_version = priv->pending_relayouts_version;
|
||||||
clutter_actor_allocate_preferred_size (queued_actor,
|
clutter_actor_allocate_preferred_size (queued_actor);
|
||||||
CLUTTER_ALLOCATION_NONE);
|
|
||||||
|
|
||||||
CLUTTER_UNSET_PRIVATE_FLAGS (queued_actor, CLUTTER_IN_RELAYOUT);
|
CLUTTER_UNSET_PRIVATE_FLAGS (queued_actor, CLUTTER_IN_RELAYOUT);
|
||||||
|
|
||||||
|
@ -3037,8 +3037,7 @@ clutter_text_get_preferred_height (ClutterActor *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_text_allocate (ClutterActor *self,
|
clutter_text_allocate (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterText *text = CLUTTER_TEXT (self);
|
ClutterText *text = CLUTTER_TEXT (self);
|
||||||
ClutterActorClass *parent_class;
|
ClutterActorClass *parent_class;
|
||||||
@ -3058,7 +3057,7 @@ clutter_text_allocate (ClutterActor *self,
|
|||||||
box->y2 - box->y1);
|
box->y2 - box->y1);
|
||||||
|
|
||||||
parent_class = CLUTTER_ACTOR_CLASS (clutter_text_parent_class);
|
parent_class = CLUTTER_ACTOR_CLASS (clutter_text_parent_class);
|
||||||
parent_class->allocate (self, box, flags);
|
parent_class->allocate (self, box);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -333,21 +333,20 @@ clutter_group_real_get_preferred_height (ClutterActor *actor,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_group_real_allocate (ClutterActor *actor,
|
clutter_group_real_allocate (ClutterActor *actor,
|
||||||
const ClutterActorBox *allocation,
|
const ClutterActorBox *allocation)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv;
|
ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv;
|
||||||
ClutterActorClass *klass;
|
ClutterActorClass *klass;
|
||||||
|
|
||||||
klass = CLUTTER_ACTOR_CLASS (clutter_group_parent_class);
|
klass = CLUTTER_ACTOR_CLASS (clutter_group_parent_class);
|
||||||
klass->allocate (actor, allocation, flags);
|
klass->allocate (actor, allocation);
|
||||||
|
|
||||||
if (priv->children == NULL)
|
if (priv->children == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clutter_layout_manager_allocate (priv->layout,
|
clutter_layout_manager_allocate (priv->layout,
|
||||||
CLUTTER_CONTAINER (actor),
|
CLUTTER_CONTAINER (actor),
|
||||||
allocation, flags);
|
allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -716,8 +716,8 @@ actor_pivot (void)
|
|||||||
clutter_actor_add_child (stage, actor_explicit);
|
clutter_actor_add_child (stage, actor_explicit);
|
||||||
|
|
||||||
/* Fake allocation or pivot-point will not have any effect */
|
/* Fake allocation or pivot-point will not have any effect */
|
||||||
clutter_actor_allocate (actor_implicit, &allocation, CLUTTER_ALLOCATION_NONE);
|
clutter_actor_allocate (actor_implicit, &allocation);
|
||||||
clutter_actor_allocate (actor_explicit, &allocation, CLUTTER_ALLOCATION_NONE);
|
clutter_actor_allocate (actor_explicit, &allocation);
|
||||||
|
|
||||||
clutter_actor_set_pivot_point (actor_implicit, 0.5, 0.5);
|
clutter_actor_set_pivot_point (actor_implicit, 0.5, 0.5);
|
||||||
clutter_actor_set_pivot_point (actor_explicit, 0.5, 0.5);
|
clutter_actor_set_pivot_point (actor_explicit, 0.5, 0.5);
|
||||||
|
@ -82,7 +82,7 @@ on_timeout (gpointer data)
|
|||||||
/* Only allocated actors can be picked, so force an allocation
|
/* Only allocated actors can be picked, so force an allocation
|
||||||
* of the overlay actor here.
|
* of the overlay actor here.
|
||||||
*/
|
*/
|
||||||
clutter_actor_allocate (over_actor, &over_actor_box, 0);
|
clutter_actor_allocate (over_actor, &over_actor_box);
|
||||||
|
|
||||||
if (g_test_verbose ())
|
if (g_test_verbose ())
|
||||||
g_print ("Clipped covering actor:\n");
|
g_print ("Clipped covering actor:\n");
|
||||||
|
@ -276,15 +276,14 @@ my_thing_get_preferred_height (ClutterActor *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
my_thing_allocate (ClutterActor *self,
|
my_thing_allocate (ClutterActor *self,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box)
|
||||||
ClutterAllocationFlags flags)
|
|
||||||
{
|
{
|
||||||
MyThingPrivate *priv;
|
MyThingPrivate *priv;
|
||||||
gfloat current_x, current_y, max_row_height;
|
gfloat current_x, current_y, max_row_height;
|
||||||
ClutterActorIter iter;
|
ClutterActorIter iter;
|
||||||
ClutterActor *child;
|
ClutterActor *child;
|
||||||
|
|
||||||
clutter_actor_set_allocation (self, box, flags);
|
clutter_actor_set_allocation (self, box);
|
||||||
|
|
||||||
priv = MY_THING (self)->priv;
|
priv = MY_THING (self)->priv;
|
||||||
|
|
||||||
@ -322,7 +321,7 @@ my_thing_allocate (ClutterActor *self,
|
|||||||
child_box.x2 = child_box.x1 + natural_width;
|
child_box.x2 = child_box.x1 + natural_width;
|
||||||
child_box.y2 = child_box.y1 + natural_height;
|
child_box.y2 = child_box.y1 + natural_height;
|
||||||
|
|
||||||
clutter_actor_allocate (child, &child_box, flags);
|
clutter_actor_allocate (child, &child_box);
|
||||||
|
|
||||||
/* if we take into account the transformation of the children
|
/* if we take into account the transformation of the children
|
||||||
* then we first check if it's transformed; then we get the
|
* then we first check if it's transformed; then we get the
|
||||||
|
Loading…
Reference in New Issue
Block a user