From 3c29bf749121e49072cb857dcfda5afa44a56088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sat, 9 May 2020 21:09:43 +0200 Subject: [PATCH] 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 --- clutter/clutter/clutter-actor.c | 75 +++++++-------------- clutter/clutter/clutter-actor.h | 18 ++--- clutter/clutter/clutter-align-constraint.c | 1 - clutter/clutter/clutter-bin-layout.c | 6 +- clutter/clutter/clutter-box-layout.c | 14 ++-- clutter/clutter/clutter-clone.c | 9 ++- clutter/clutter/clutter-deform-effect.c | 1 - clutter/clutter/clutter-enums.h | 14 ---- clutter/clutter/clutter-fixed-layout.c | 5 +- clutter/clutter/clutter-flow-layout.c | 5 +- clutter/clutter/clutter-grid-layout.c | 5 +- clutter/clutter/clutter-layout-manager.c | 9 +-- clutter/clutter/clutter-layout-manager.h | 6 +- clutter/clutter/clutter-stage.c | 16 ++--- clutter/clutter/clutter-text.c | 5 +- clutter/clutter/deprecated/clutter-group.c | 7 +- src/tests/clutter/conform/actor-anchors.c | 4 +- src/tests/clutter/conform/actor-pick.c | 2 +- src/tests/clutter/interactive/test-layout.c | 7 +- 19 files changed, 68 insertions(+), 141 deletions(-) diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 571ee6a81..f18df7ce1 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -698,7 +698,6 @@ struct _ClutterActorPrivate * allocation */ ClutterActorBox allocation; - ClutterAllocationFlags allocation_flags; /* clip, in actor coordinates */ graphene_rect_t clip; @@ -2580,8 +2579,7 @@ clutter_actor_notify_if_geometry_changed (ClutterActor *self, */ static inline gboolean clutter_actor_set_allocation_internal (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { ClutterActorPrivate *priv = self->priv; GObject *obj; @@ -2601,7 +2599,6 @@ clutter_actor_set_allocation_internal (ClutterActor *self, y2_changed = priv->allocation.y2 != box->y2; priv->allocation = *box; - priv->allocation_flags = flags; /* allocation is authoritative */ priv->needs_width_request = FALSE; @@ -2641,15 +2638,14 @@ clutter_actor_set_allocation_internal (ClutterActor *self, static void clutter_actor_real_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { ClutterActorPrivate *priv = self->priv; gboolean changed; 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, * 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_CONTAINER (self), - &children_box, - flags); + &children_box); } if (changed) { ClutterActorBox signal_box = priv->allocation; - ClutterAllocationFlags signal_flags = priv->allocation_flags; g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0, - &signal_box, - signal_flags); + &signal_box); } g_object_thaw_notify (G_OBJECT (self)); @@ -8547,7 +8540,6 @@ clutter_actor_class_init (ClutterActorClass *klass) * ClutterActor::allocation-changed: * @actor: the #ClutterActor that emitted the signal * @box: a #ClutterActorBox with the new allocation - * @flags: #ClutterAllocationFlags for the allocation * * The ::allocation-changed signal is emitted when the * #ClutterActor:allocation property changes. Usually, application @@ -8565,9 +8557,8 @@ clutter_actor_class_init (ClutterActorClass *klass) 0, NULL, NULL, _clutter_marshal_VOID__BOXED_FLAGS, - G_TYPE_NONE, 2, - CLUTTER_TYPE_ACTOR_BOX | G_SIGNAL_TYPE_STATIC_SCOPE, - CLUTTER_TYPE_ALLOCATION_FLAGS); + G_TYPE_NONE, 1, + CLUTTER_TYPE_ACTOR_BOX | G_SIGNAL_TYPE_STATIC_SCOPE); g_signal_set_va_marshaller (actor_signals[ALLOCATION_CHANGED], G_TYPE_FROM_CLASS (object_class), _clutter_marshal_VOID__BOXED_FLAGSv); @@ -10109,8 +10100,7 @@ clutter_actor_adjust_allocation (ClutterActor *self, static void clutter_actor_allocate_internal (ClutterActor *self, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { ClutterActorClass *klass; @@ -10120,7 +10110,7 @@ clutter_actor_allocate_internal (ClutterActor *self, _clutter_actor_get_debug_name (self)); klass = CLUTTER_ACTOR_GET_CLASS (self); - klass->allocate (self, allocation, flags); + klass->allocate (self, allocation); CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT); @@ -10133,7 +10123,6 @@ clutter_actor_allocate_internal (ClutterActor *self, * clutter_actor_allocate: * @self: A #ClutterActor * @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. * @@ -10159,9 +10148,8 @@ clutter_actor_allocate_internal (ClutterActor *self, * Since: 0.8 */ void -clutter_actor_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) +clutter_actor_allocate (ClutterActor *self, + const ClutterActorBox *box) { ClutterActorBox old_allocation, real_allocation; 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 * need to allocate the children */ - clutter_actor_allocate_internal (self, &real_allocation, flags); + clutter_actor_allocate_internal (self, &real_allocation); 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], &priv->allocation, &real_allocation); @@ -10267,7 +10250,6 @@ clutter_actor_allocate (ClutterActor *self, * clutter_actor_set_allocation: * @self: a #ClutterActor * @box: a #ClutterActorBox - * @flags: allocation flags * * Stores the allocation of @self as defined by @box. * @@ -10287,8 +10269,7 @@ clutter_actor_allocate (ClutterActor *self, */ void clutter_actor_set_allocation (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { ClutterActorPrivate *priv; gboolean changed; @@ -10308,16 +10289,14 @@ clutter_actor_set_allocation (ClutterActor *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) { ClutterActorBox signal_box = priv->allocation; - ClutterAllocationFlags signal_flags = priv->allocation_flags; g_signal_emit (self, actor_signals[ALLOCATION_CHANGED], 0, - &signal_box, - signal_flags); + &signal_box); } g_object_thaw_notify (G_OBJECT (self)); @@ -14791,9 +14770,7 @@ clutter_actor_set_animatable_property (ClutterActor *actor, break; case PROP_ALLOCATION: - clutter_actor_allocate_internal (actor, - g_value_get_boxed (value), - actor->priv->allocation_flags); + clutter_actor_allocate_internal (actor, g_value_get_boxed (value)); clutter_actor_queue_redraw (actor); break; @@ -15187,7 +15164,6 @@ clutter_actor_get_stage (ClutterActor *actor) * actor's natural width * @available_height: the maximum available height, or -1 to use the * actor's natural height - * @flags: flags controlling the allocation * * Allocates @self taking into account the #ClutterActor's * 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.x2 = box.x1 + available_width; * 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 @@ -15248,8 +15224,7 @@ clutter_actor_allocate_available_size (ClutterActor *self, gfloat x, gfloat y, gfloat available_width, - gfloat available_height, - ClutterAllocationFlags flags) + gfloat available_height) { ClutterActorPrivate *priv; gfloat width, height; @@ -15305,13 +15280,12 @@ clutter_actor_allocate_available_size (ClutterActor *self, box.y1 = y; box.x2 = box.x1 + width; box.y2 = box.y1 + height; - clutter_actor_allocate (self, &box, flags); + clutter_actor_allocate (self, &box); } /** * clutter_actor_allocate_preferred_size: * @self: a #ClutterActor - * @flags: flags controlling the allocation * * Allocates the natural size of @self. * @@ -15329,8 +15303,7 @@ clutter_actor_allocate_available_size (ClutterActor *self, * Since: 0.8 */ void -clutter_actor_allocate_preferred_size (ClutterActor *self, - ClutterAllocationFlags flags) +clutter_actor_allocate_preferred_size (ClutterActor *self) { gfloat actor_x, actor_y; 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.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 * @x_fill: whether the actor should fill horizontally * @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 * 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 y_align, gboolean x_fill, - gboolean y_fill, - ClutterAllocationFlags flags) + gboolean y_fill) { ClutterActorPrivate *priv; ClutterActorBox allocation = CLUTTER_ACTOR_BOX_INIT_ZERO; @@ -15519,7 +15490,7 @@ out: allocation.x2 = ceilf (allocation.x1 + MAX (child_width, 0)); allocation.y2 = ceilf (allocation.y1 + MAX (child_height, 0)); - clutter_actor_allocate (self, &allocation, flags); + clutter_actor_allocate (self, &allocation); } /** diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h index f473f4f8b..b5d4b7845 100644 --- a/clutter/clutter/clutter-actor.h +++ b/clutter/clutter/clutter-actor.h @@ -256,8 +256,7 @@ struct _ClutterActorClass gfloat *min_height_p, gfloat *natural_height_p); void (* allocate) (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags); + const ClutterActorBox *box); /* transformations */ void (* apply_transform) (ClutterActor *actor, @@ -418,30 +417,25 @@ void clutter_actor_get_preferred_size gfloat *natural_height_p); CLUTTER_EXPORT void clutter_actor_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags); + const ClutterActorBox *box); CLUTTER_EXPORT -void clutter_actor_allocate_preferred_size (ClutterActor *self, - ClutterAllocationFlags flags); +void clutter_actor_allocate_preferred_size (ClutterActor *self); CLUTTER_EXPORT void clutter_actor_allocate_available_size (ClutterActor *self, gfloat x, gfloat y, gfloat available_width, - gfloat available_height, - ClutterAllocationFlags flags); + gfloat available_height); CLUTTER_EXPORT void clutter_actor_allocate_align_fill (ClutterActor *self, const ClutterActorBox *box, gdouble x_align, gdouble y_align, gboolean x_fill, - gboolean y_fill, - ClutterAllocationFlags flags); + gboolean y_fill); CLUTTER_EXPORT void clutter_actor_set_allocation (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags); + const ClutterActorBox *box); CLUTTER_EXPORT void clutter_actor_get_allocation_box (ClutterActor *self, ClutterActorBox *box); diff --git a/clutter/clutter/clutter-align-constraint.c b/clutter/clutter/clutter-align-constraint.c index a2694aa63..c7ff711b7 100644 --- a/clutter/clutter/clutter-align-constraint.c +++ b/clutter/clutter/clutter-align-constraint.c @@ -86,7 +86,6 @@ G_DEFINE_TYPE (ClutterAlignConstraint, static void source_position_changed (ClutterActor *actor, const ClutterActorBox *allocation, - ClutterAllocationFlags flags, ClutterAlignConstraint *align) { if (align->actor != NULL) diff --git a/clutter/clutter/clutter-bin-layout.c b/clutter/clutter/clutter-bin-layout.c index 8c63b802c..a17393c48 100644 --- a/clutter/clutter/clutter-bin-layout.c +++ b/clutter/clutter/clutter-bin-layout.c @@ -406,8 +406,7 @@ get_actor_align_factor (ClutterActorAlign alignment) static void clutter_bin_layout_allocate (ClutterLayoutManager *manager, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { gfloat allocation_x, allocation_y; gfloat available_w, available_h; @@ -515,8 +514,7 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager, clutter_actor_allocate_align_fill (child, &child_alloc, x_align, y_align, - x_fill, y_fill, - flags); + x_fill, y_fill); } } diff --git a/clutter/clutter/clutter-box-layout.c b/clutter/clutter/clutter-box-layout.c index 112200258..74d5d1612 100644 --- a/clutter/clutter/clutter-box-layout.c +++ b/clutter/clutter/clutter-box-layout.c @@ -720,8 +720,7 @@ static void allocate_box_child (ClutterBoxLayout *self, ClutterContainer *container, ClutterActor *child, - ClutterActorBox *child_box, - ClutterAllocationFlags flags) + ClutterActorBox *child_box) { ClutterBoxLayoutPrivate *priv = self->priv; ClutterBoxChild *box_child; @@ -750,14 +749,13 @@ allocate_box_child (ClutterBoxLayout *self, */ if (clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_HORIZONTAL) || clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_VERTICAL)) - clutter_actor_allocate (child, child_box, flags); + clutter_actor_allocate (child, child_box); else clutter_actor_allocate_align_fill (child, child_box, get_box_alignment_factor (box_child->x_align), get_box_alignment_factor (box_child->y_align), box_child->x_fill, - box_child->y_fill, - flags); + box_child->y_fill); if (priv->use_animations) clutter_actor_restore_easing_state (child); @@ -956,8 +954,7 @@ distribute_natural_allocation (float extra_space, static void clutter_box_layout_allocate (ClutterLayoutManager *layout, ClutterContainer *container, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { ClutterBoxLayoutPrivate *priv = CLUTTER_BOX_LAYOUT (layout)->priv; ClutterActor *actor, *child; @@ -1224,8 +1221,7 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout, allocate_box_child (CLUTTER_BOX_LAYOUT (layout), container, child, - &child_allocation, - flags); + &child_allocation); i += 1; } diff --git a/clutter/clutter/clutter-clone.c b/clutter/clutter/clutter-clone.c index 8c805725a..fb69f6c60 100644 --- a/clutter/clutter/clutter-clone.c +++ b/clutter/clutter/clutter-clone.c @@ -240,15 +240,14 @@ clutter_clone_has_overlaps (ClutterActor *actor) static void clutter_clone_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { ClutterClonePrivate *priv = CLUTTER_CLONE (self)->priv; ClutterActorClass *parent_class; /* chain up */ 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) return; @@ -258,7 +257,7 @@ clutter_clone_allocate (ClutterActor *self, */ if (clutter_actor_get_parent (priv->clone_source) != NULL && !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 /* 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 */ 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 } diff --git a/clutter/clutter/clutter-deform-effect.c b/clutter/clutter/clutter-deform-effect.c index 59ef1ff75..5f4de5ac7 100644 --- a/clutter/clutter/clutter-deform-effect.c +++ b/clutter/clutter/clutter-deform-effect.c @@ -130,7 +130,6 @@ clutter_deform_effect_deform_vertex (ClutterDeformEffect *effect, static void vbo_invalidate (ClutterActor *actor, const ClutterActorBox *allocation, - ClutterAllocationFlags flags, ClutterDeformEffect *effect) { effect->priv->is_dirty = TRUE; diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h index aed8e9048..4b9b62bcf 100644 --- a/clutter/clutter/clutter-enums.h +++ b/clutter/clutter/clutter-enums.h @@ -554,20 +554,6 @@ typedef enum /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/ CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE = 1 << 2 } 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: * @CLUTTER_ALIGN_X_AXIS: Maintain the alignment on the X axis diff --git a/clutter/clutter/clutter-fixed-layout.c b/clutter/clutter/clutter-fixed-layout.c index 959f7652e..324084809 100644 --- a/clutter/clutter/clutter-fixed-layout.c +++ b/clutter/clutter/clutter-fixed-layout.c @@ -131,8 +131,7 @@ clutter_fixed_layout_get_preferred_height (ClutterLayoutManager *manager, static void clutter_fixed_layout_allocate (ClutterLayoutManager *manager, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { ClutterActor *child; @@ -140,7 +139,7 @@ clutter_fixed_layout_allocate (ClutterLayoutManager *manager, child != NULL; child = clutter_actor_get_next_sibling (child)) { - clutter_actor_allocate_preferred_size (child, flags); + clutter_actor_allocate_preferred_size (child); } } diff --git a/clutter/clutter/clutter-flow-layout.c b/clutter/clutter/clutter-flow-layout.c index 365c5d9d8..f7ced9837 100644 --- a/clutter/clutter/clutter-flow-layout.c +++ b/clutter/clutter/clutter-flow-layout.c @@ -566,8 +566,7 @@ clutter_flow_layout_get_preferred_height (ClutterLayoutManager *manager, static void clutter_flow_layout_allocate (ClutterLayoutManager *manager, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { ClutterFlowLayoutPrivate *priv = CLUTTER_FLOW_LAYOUT (manager)->priv; ClutterActor *actor, *child; @@ -729,7 +728,7 @@ clutter_flow_layout_allocate (ClutterLayoutManager *manager, child_alloc.y1 = ceil (item_y); child_alloc.x2 = ceil (child_alloc.x1 + item_width); 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) item_x = new_x; diff --git a/clutter/clutter/clutter-grid-layout.c b/clutter/clutter/clutter-grid-layout.c index 29ec54759..ebc022eb7 100644 --- a/clutter/clutter/clutter-grid-layout.c +++ b/clutter/clutter/clutter-grid-layout.c @@ -1391,8 +1391,7 @@ allocate_child (ClutterGridRequest *request, static void clutter_grid_layout_allocate (ClutterLayoutManager *layout, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { ClutterGridLayout *self = CLUTTER_GRID_LAYOUT (layout); ClutterOrientation orientation; @@ -1453,7 +1452,7 @@ clutter_grid_layout_allocate (ClutterLayoutManager *layout, child_allocation.x2 = child_allocation.x1 + width; child_allocation.y2 = child_allocation.y1 + height; - clutter_actor_allocate (child, &child_allocation, flags); + clutter_actor_allocate (child, &child_allocation); } } diff --git a/clutter/clutter/clutter-layout-manager.c b/clutter/clutter/clutter-layout-manager.c index 6fb49b7a5..ad642d8b6 100644 --- a/clutter/clutter/clutter-layout-manager.c +++ b/clutter/clutter/clutter-layout-manager.c @@ -253,8 +253,7 @@ layout_manager_real_get_preferred_height (ClutterLayoutManager *manager, static void layout_manager_real_allocate (ClutterLayoutManager *manager, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { LAYOUT_MANAGER_WARN_NOT_IMPLEMENTED (manager, "allocate"); } @@ -434,7 +433,6 @@ clutter_layout_manager_get_preferred_height (ClutterLayoutManager *manager, * @container: the #ClutterContainer using @manager * @allocation: the #ClutterActorBox containing the allocated area * of @container - * @flags: the allocation flags * * Allocates the children of @container given an area * @@ -445,8 +443,7 @@ clutter_layout_manager_get_preferred_height (ClutterLayoutManager *manager, void clutter_layout_manager_allocate (ClutterLayoutManager *manager, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { ClutterLayoutManagerClass *klass; @@ -455,7 +452,7 @@ clutter_layout_manager_allocate (ClutterLayoutManager *manager, g_return_if_fail (allocation != NULL); klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager); - klass->allocate (manager, container, allocation, flags); + klass->allocate (manager, container, allocation); } /** diff --git a/clutter/clutter/clutter-layout-manager.h b/clutter/clutter/clutter-layout-manager.h index ec87e0ed7..6df0cecdf 100644 --- a/clutter/clutter/clutter-layout-manager.h +++ b/clutter/clutter/clutter-layout-manager.h @@ -115,8 +115,7 @@ struct _ClutterLayoutManagerClass gfloat *nat_height_p); void (* allocate) (ClutterLayoutManager *manager, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags); + const ClutterActorBox *allocation); void (* set_container) (ClutterLayoutManager *manager, ClutterContainer *container); @@ -158,8 +157,7 @@ void clutter_layout_manager_get_preferred_height (ClutterLayoutMa CLUTTER_EXPORT void clutter_layout_manager_allocate (ClutterLayoutManager *manager, ClutterContainer *container, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags); + const ClutterActorBox *allocation); CLUTTER_EXPORT void clutter_layout_manager_set_container (ClutterLayoutManager *manager, diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index 3d76ede0c..9657dc8b5 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -613,8 +613,7 @@ stage_is_default (ClutterStage *stage) static void clutter_stage_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv; ClutterActorBox alloc = CLUTTER_ACTOR_BOX_INIT_ZERO; @@ -654,12 +653,11 @@ clutter_stage_allocate (ClutterActor *self, "Following allocation to %.2fx%.2f", width, height); - clutter_actor_set_allocation (self, box, flags); + clutter_actor_set_allocation (self, box); clutter_layout_manager_allocate (layout_manager, CLUTTER_CONTAINER (self), - &children_box, - flags); + &children_box); /* Ensure the window is sized correctly */ if (priv->min_size_changed) @@ -712,12 +710,11 @@ clutter_stage_allocate (ClutterActor *self, override.x2, override.y2); /* 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_CONTAINER (self), - &override, - flags); + &override); } /* 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); old_version = priv->pending_relayouts_version; - clutter_actor_allocate_preferred_size (queued_actor, - CLUTTER_ALLOCATION_NONE); + clutter_actor_allocate_preferred_size (queued_actor); CLUTTER_UNSET_PRIVATE_FLAGS (queued_actor, CLUTTER_IN_RELAYOUT); diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c index a97e94b92..2886016fb 100644 --- a/clutter/clutter/clutter-text.c +++ b/clutter/clutter/clutter-text.c @@ -3037,8 +3037,7 @@ clutter_text_get_preferred_height (ClutterActor *self, static void clutter_text_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { ClutterText *text = CLUTTER_TEXT (self); ClutterActorClass *parent_class; @@ -3058,7 +3057,7 @@ clutter_text_allocate (ClutterActor *self, box->y2 - box->y1); parent_class = CLUTTER_ACTOR_CLASS (clutter_text_parent_class); - parent_class->allocate (self, box, flags); + parent_class->allocate (self, box); } static gboolean diff --git a/clutter/clutter/deprecated/clutter-group.c b/clutter/clutter/deprecated/clutter-group.c index af602fd51..dce35cff8 100644 --- a/clutter/clutter/deprecated/clutter-group.c +++ b/clutter/clutter/deprecated/clutter-group.c @@ -333,21 +333,20 @@ clutter_group_real_get_preferred_height (ClutterActor *actor, static void clutter_group_real_allocate (ClutterActor *actor, - const ClutterActorBox *allocation, - ClutterAllocationFlags flags) + const ClutterActorBox *allocation) { ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv; ClutterActorClass *klass; klass = CLUTTER_ACTOR_CLASS (clutter_group_parent_class); - klass->allocate (actor, allocation, flags); + klass->allocate (actor, allocation); if (priv->children == NULL) return; clutter_layout_manager_allocate (priv->layout, CLUTTER_CONTAINER (actor), - allocation, flags); + allocation); } static void diff --git a/src/tests/clutter/conform/actor-anchors.c b/src/tests/clutter/conform/actor-anchors.c index 3cf3191f3..bd934ff14 100644 --- a/src/tests/clutter/conform/actor-anchors.c +++ b/src/tests/clutter/conform/actor-anchors.c @@ -716,8 +716,8 @@ actor_pivot (void) clutter_actor_add_child (stage, actor_explicit); /* Fake allocation or pivot-point will not have any effect */ - clutter_actor_allocate (actor_implicit, &allocation, CLUTTER_ALLOCATION_NONE); - clutter_actor_allocate (actor_explicit, &allocation, CLUTTER_ALLOCATION_NONE); + clutter_actor_allocate (actor_implicit, &allocation); + clutter_actor_allocate (actor_explicit, &allocation); clutter_actor_set_pivot_point (actor_implicit, 0.5, 0.5); clutter_actor_set_pivot_point (actor_explicit, 0.5, 0.5); diff --git a/src/tests/clutter/conform/actor-pick.c b/src/tests/clutter/conform/actor-pick.c index dcee96424..3511be7d2 100644 --- a/src/tests/clutter/conform/actor-pick.c +++ b/src/tests/clutter/conform/actor-pick.c @@ -82,7 +82,7 @@ on_timeout (gpointer data) /* Only allocated actors can be picked, so force an allocation * 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 ()) g_print ("Clipped covering actor:\n"); diff --git a/src/tests/clutter/interactive/test-layout.c b/src/tests/clutter/interactive/test-layout.c index ad9b4e209..5f697c907 100644 --- a/src/tests/clutter/interactive/test-layout.c +++ b/src/tests/clutter/interactive/test-layout.c @@ -276,15 +276,14 @@ my_thing_get_preferred_height (ClutterActor *self, static void my_thing_allocate (ClutterActor *self, - const ClutterActorBox *box, - ClutterAllocationFlags flags) + const ClutterActorBox *box) { MyThingPrivate *priv; gfloat current_x, current_y, max_row_height; ClutterActorIter iter; ClutterActor *child; - clutter_actor_set_allocation (self, box, flags); + clutter_actor_set_allocation (self, box); priv = MY_THING (self)->priv; @@ -322,7 +321,7 @@ my_thing_allocate (ClutterActor *self, child_box.x2 = child_box.x1 + natural_width; 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 * then we first check if it's transformed; then we get the