Stop using macros for accessing actor state

Use the newly added functions instead.
This commit is contained in:
Emmanuele Bassi 2015-04-23 17:39:30 +01:00
parent 4c6a550d13
commit dac33c5fea
8 changed files with 30 additions and 30 deletions

View File

@ -306,7 +306,7 @@ clutter_bin_layout_get_preferred_width (ClutterLayoutManager *manager,
{ {
gfloat minimum, natural; gfloat minimum, natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
clutter_actor_get_preferred_width (child, for_height, clutter_actor_get_preferred_width (child, for_height,
@ -343,7 +343,7 @@ clutter_bin_layout_get_preferred_height (ClutterLayoutManager *manager,
{ {
gfloat minimum, natural; gfloat minimum, natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
clutter_actor_get_preferred_height (child, for_width, clutter_actor_get_preferred_height (child, for_width,
@ -431,7 +431,7 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager,
gboolean x_fill, y_fill, is_fixed_position_set; gboolean x_fill, y_fill, is_fixed_position_set;
float fixed_x, fixed_y; float fixed_x, fixed_y;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = clutter_layout_manager_get_child_meta (manager, meta = clutter_layout_manager_get_child_meta (manager,

View File

@ -485,7 +485,7 @@ get_preferred_size_for_orientation (ClutterBoxLayout *self,
{ {
gfloat child_min = 0, child_nat = 0; gfloat child_min = 0, child_nat = 0;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
n_children++; n_children++;
@ -533,7 +533,7 @@ get_base_size_for_opposite_orientation (ClutterBoxLayout *self,
{ {
gfloat child_min = 0, child_nat = 0; gfloat child_min = 0, child_nat = 0;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
n_children++; n_children++;
@ -606,7 +606,7 @@ get_preferred_size_for_opposite_orientation (ClutterBoxLayout *self,
clutter_actor_iter_init (&iter, container); clutter_actor_iter_init (&iter, container);
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
get_child_size (child, priv->orientation, -1, get_child_size (child, priv->orientation, -1,
@ -647,7 +647,7 @@ get_preferred_size_for_opposite_orientation (ClutterBoxLayout *self,
ClutterBoxChild *box_child; ClutterBoxChild *box_child;
/* If widget is not visible, skip it. */ /* If widget is not visible, skip it. */
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = clutter_layout_manager_get_child_meta (layout, real_container, child); meta = clutter_layout_manager_get_child_meta (layout, real_container, child);
@ -686,7 +686,7 @@ get_preferred_size_for_opposite_orientation (ClutterBoxLayout *self,
{ {
gfloat child_min = 0, child_nat = 0; gfloat child_min = 0, child_nat = 0;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
get_child_size (child, opposite_orientation, get_child_size (child, opposite_orientation,
@ -819,7 +819,7 @@ count_expand_children (ClutterLayoutManager *layout,
clutter_actor_iter_init (&iter, actor); clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (CLUTTER_ACTOR_IS_VISIBLE (child)) if (clutter_actor_is_visible (child))
{ {
ClutterLayoutMeta *meta; ClutterLayoutMeta *meta;
@ -990,7 +990,7 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout,
clutter_actor_iter_init (&iter, actor); clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
if (priv->orientation == CLUTTER_ORIENTATION_VERTICAL) if (priv->orientation == CLUTTER_ORIENTATION_VERTICAL)
@ -1110,7 +1110,7 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout,
ClutterBoxChild *box_child; ClutterBoxChild *box_child;
/* If widget is not visible, skip it. */ /* If widget is not visible, skip it. */
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = clutter_layout_manager_get_child_meta (layout, meta = clutter_layout_manager_get_child_meta (layout,

View File

@ -178,7 +178,7 @@ clutter_clone_paint (ClutterActor *actor)
clutter_actor_get_paint_opacity (actor)); clutter_actor_get_paint_opacity (actor));
_clutter_actor_set_enable_model_view_transform (priv->clone_source, FALSE); _clutter_actor_set_enable_model_view_transform (priv->clone_source, FALSE);
if (!CLUTTER_ACTOR_IS_MAPPED (priv->clone_source)) if (!clutter_actor_is_mapped (priv->clone_source))
{ {
_clutter_actor_set_enable_paint_unmapped (priv->clone_source, TRUE); _clutter_actor_set_enable_paint_unmapped (priv->clone_source, TRUE);
was_unmapped = TRUE; was_unmapped = TRUE;

View File

@ -307,7 +307,7 @@ on_actor_mapped (ClutterActor *actor,
GParamSpec *pspec, GParamSpec *pspec,
ClutterDropAction *self) ClutterDropAction *self)
{ {
if (CLUTTER_ACTOR_IS_MAPPED (actor)) if (clutter_actor_is_mapped (actor))
{ {
if (self->priv->stage == NULL) if (self->priv->stage == NULL)
self->priv->stage = clutter_actor_get_stage (actor); self->priv->stage = clutter_actor_get_stage (actor);

View File

@ -239,7 +239,7 @@ clutter_flow_layout_get_preferred_width (ClutterLayoutManager *manager,
gfloat child_min, child_natural; gfloat child_min, child_natural;
gfloat new_y, item_height; gfloat new_y, item_height;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
if (priv->orientation == CLUTTER_FLOW_VERTICAL && for_height > 0) if (priv->orientation == CLUTTER_FLOW_VERTICAL && for_height > 0)
@ -430,7 +430,7 @@ clutter_flow_layout_get_preferred_height (ClutterLayoutManager *manager,
gfloat child_min, child_natural; gfloat child_min, child_natural;
gfloat new_x, item_width; gfloat new_x, item_width;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
if (priv->orientation == CLUTTER_FLOW_HORIZONTAL && for_width > 0) if (priv->orientation == CLUTTER_FLOW_HORIZONTAL && for_width > 0)
@ -620,7 +620,7 @@ clutter_flow_layout_allocate (ClutterLayoutManager *manager,
gfloat new_x, new_y; gfloat new_x, new_y;
gfloat child_min, child_natural; gfloat child_min, child_natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
new_x = new_y = 0; new_x = new_y = 0;

View File

@ -541,7 +541,7 @@ clutter_grid_request_non_spanning (ClutterGridRequest *request,
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container)); clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container));
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
grid_child = GET_GRID_CHILD (request->grid, child); grid_child = GET_GRID_CHILD (request->grid, child);
@ -626,7 +626,7 @@ clutter_grid_request_spanning (ClutterGridRequest *request,
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container)); clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container));
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
grid_child = GET_GRID_CHILD (request->grid, child); grid_child = GET_GRID_CHILD (request->grid, child);
@ -763,7 +763,7 @@ clutter_grid_request_compute_expand (ClutterGridRequest *request,
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container)); clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container));
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
grid_child = GET_GRID_CHILD (request->grid, child); grid_child = GET_GRID_CHILD (request->grid, child);
@ -782,7 +782,7 @@ clutter_grid_request_compute_expand (ClutterGridRequest *request,
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container)); clutter_actor_iter_init (&iter, CLUTTER_ACTOR (priv->container));
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
grid_child = GET_GRID_CHILD (request->grid, child); grid_child = GET_GRID_CHILD (request->grid, child);
@ -1416,7 +1416,7 @@ clutter_grid_layout_allocate (ClutterLayoutManager *layout,
gfloat x, y, width, height; gfloat x, y, width, height;
ClutterGridChild *grid_child; ClutterGridChild *grid_child;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
grid_child = GET_GRID_CHILD (self, child); grid_child = GET_GRID_CHILD (self, child);

View File

@ -724,7 +724,7 @@ calculate_col_widths (ClutterTableLayout *self,
DimensionData *col; DimensionData *col;
gfloat c_min, c_pref; gfloat c_min, c_pref;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = meta =
@ -766,7 +766,7 @@ calculate_col_widths (ClutterTableLayout *self,
gint start_col, end_col; gint start_col, end_col;
gint n_expand; gint n_expand;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = meta =
@ -1001,7 +1001,7 @@ calculate_row_heights (ClutterTableLayout *self,
DimensionData *row; DimensionData *row;
gfloat c_min, c_pref; gfloat c_min, c_pref;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = meta =
@ -1044,7 +1044,7 @@ calculate_row_heights (ClutterTableLayout *self,
gint start_row, end_row; gint start_row, end_row;
gint n_expand; gint n_expand;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = meta =
@ -1405,7 +1405,7 @@ clutter_table_layout_allocate (ClutterLayoutManager *layout,
gdouble x_align, y_align; gdouble x_align, y_align;
gboolean x_fill, y_fill; gboolean x_fill, y_fill;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
meta = meta =

View File

@ -64,7 +64,7 @@ multi_layout_get_preferred_width (ClutterLayoutManager *manager,
{ {
float child_minimum, child_natural; float child_minimum, child_natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
clutter_actor_get_preferred_width (child, -1.f, clutter_actor_get_preferred_width (child, -1.f,
@ -120,7 +120,7 @@ multi_layout_get_preferred_height (ClutterLayoutManager *manager,
{ {
float child_minimum, child_natural; float child_minimum, child_natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
clutter_actor_get_preferred_height (child, -1.f, clutter_actor_get_preferred_height (child, -1.f,
@ -172,7 +172,7 @@ get_visible_children (ClutterActor *actor)
clutter_actor_iter_init (&iter, actor); clutter_actor_iter_init (&iter, actor);
while (clutter_actor_iter_next (&iter, &child)) while (clutter_actor_iter_next (&iter, &child))
{ {
if (CLUTTER_ACTOR_IS_VISIBLE (child)) if (clutter_actor_is_visible (child))
n_visible_children += 1; n_visible_children += 1;
} }
@ -227,7 +227,7 @@ multi_layout_allocate (ClutterLayoutManager *manager,
{ {
ClutterActorBox child_allocation = CLUTTER_ACTOR_BOX_INIT_ZERO; ClutterActorBox child_allocation = CLUTTER_ACTOR_BOX_INIT_ZERO;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!clutter_actor_is_visible (child))
continue; continue;
if (self->state == MULTI_LAYOUT_GRID) if (self->state == MULTI_LAYOUT_GRID)