void penge_block_container_set_spacing (PengeBlockContainer *pbc, gfloat spacing) { PengeBlockContainerPrivate *priv = GET_PRIVATE (pbc); priv->spacing = spacing; g_object_notify (G_OBJECT (pbc), "spacing"); clutter_actor_queue_relayout (CLUTTER_ACTOR (pbc)); }
/** * clutter_align_constraint_set_factor: * @align: a #ClutterAlignConstraint * @factor: the alignment factor, between 0.0 and 1.0 * * Sets the alignment factor of the constraint * * The factor depends on the #ClutterAlignConstraint:align-axis property * and it is a value between 0.0 (meaning left, when * #ClutterAlignConstraint:align-axis is set to %CLUTTER_ALIGN_X_AXIS; or * meaning top, when #ClutterAlignConstraint:align-axis is set to * %CLUTTER_ALIGN_Y_AXIS) and 1.0 (meaning right, when * #ClutterAlignConstraint:align-axis is set to %CLUTTER_ALIGN_X_AXIS; or * meaning bottom, when #ClutterAlignConstraint:align-axis is set to * %CLUTTER_ALIGN_Y_AXIS). A value of 0.5 aligns in the middle in either * cases * * Since: 1.4 */ void clutter_align_constraint_set_factor (ClutterAlignConstraint *align, gfloat factor) { g_return_if_fail (CLUTTER_IS_ALIGN_CONSTRAINT (align)); align->factor = CLAMP (factor, 0.0, 1.0); if (align->actor != NULL) clutter_actor_queue_relayout (align->actor); _clutter_notify_by_pspec (G_OBJECT (align), obj_props[PROP_FACTOR]); }
/* * Track size of stage */ static void mpl_panel_background_stage_allocation_cb (ClutterActor *stage, GParamSpec *spec, ClutterActor *background) { gfloat width, height, swidth, sheight; clutter_actor_get_size (stage, &swidth, &sheight); clutter_actor_get_size (background, &width, &height); if (width != swidth || height != sheight) clutter_actor_queue_relayout (background); }
/* * ClutterContainer Implementation */ static void mx_table_actor_added (ClutterContainer *container, ClutterActor *actor) { MxTableChild *meta; meta = (MxTableChild *) clutter_container_get_child_meta (container, actor); /* default position of the actor is 0, 0 */ _mx_table_update_row_col (MX_TABLE (container), meta); clutter_actor_queue_relayout (CLUTTER_ACTOR (container)); }
static void st_widget_recompute_style (StWidget *widget, StThemeNode *old_theme_node) { StThemeNode *new_theme_node = st_widget_get_theme_node (widget); if (!old_theme_node || !st_theme_node_geometry_equal (old_theme_node, new_theme_node)) clutter_actor_queue_relayout ((ClutterActor *) widget); g_signal_emit (widget, signals[STYLE_CHANGED], 0); widget->priv->is_style_dirty = FALSE; }
/** * st_box_layout_set_align_end: * @box: A #StBoxLayout * @align_end: %TRUE if the layout should use align-end * * Set the value of the #StBoxLayout::align-end property. * */ void st_box_layout_set_align_end (StBoxLayout *box, gboolean align_end) { g_return_if_fail (ST_IS_BOX_LAYOUT (box)); if (box->priv->is_align_end != align_end) { box->priv->is_align_end = align_end; clutter_actor_queue_relayout ((ClutterActor*) box); g_object_notify (G_OBJECT (box), "align-end"); } }
/** * st_box_layout_set_vertical: * @box: A #StBoxLayout * @vertical: %TRUE if the layout should be vertical * * Set the value of the #StBoxLayout::vertical property * */ void st_box_layout_set_vertical (StBoxLayout *box, gboolean vertical) { g_return_if_fail (ST_IS_BOX_LAYOUT (box)); if (box->priv->is_vertical != vertical) { box->priv->is_vertical = vertical; clutter_actor_queue_relayout ((ClutterActor*) box); g_object_notify (G_OBJECT (box), "vertical"); } }
/** * st_box_layout_set_pack_start: * @box: A #StBoxLayout * @pack_start: %TRUE if the layout should use pack-start * * Set the value of the #StBoxLayout::pack-start property. * */ void st_box_layout_set_pack_start (StBoxLayout *box, gboolean pack_start) { g_return_if_fail (ST_IS_BOX_LAYOUT (box)); if (box->priv->is_pack_start != pack_start) { box->priv->is_pack_start = pack_start; clutter_actor_queue_relayout ((ClutterActor*) box); g_object_notify (G_OBJECT (box), "pack-start"); } }
static void shell_embedded_window_check_resize (GtkContainer *container) { ShellEmbeddedWindow *window = SHELL_EMBEDDED_WINDOW (container); /* Check resize is called when a resize is queued on something * inside the GtkWindow; we need to make sure that in response * to this gtk_widget_size_request() and then * gtk_widget_size_allocate() are called; we defer to the Clutter * logic and assume it will do the right thing. */ if (window->priv->actor) clutter_actor_queue_relayout (CLUTTER_ACTOR (window->priv->actor)); }
/** * clutter_gdk_set_stage_foreign: * @stage: a #ClutterStage * @window: an existing #GdkWindow * * Target the #ClutterStage to use an existing external #GdkWindow * * Return value: %TRUE if foreign window is valid * * Since: 1.10 */ gboolean clutter_gdk_set_stage_foreign (ClutterStage *stage, GdkWindow *window) { ForeignWindowClosure closure; ClutterStageGdk *stage_gdk; ClutterStageWindow *impl; ClutterActor *actor; g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE); g_return_val_if_fail (!CLUTTER_ACTOR_IN_DESTRUCTION (stage), FALSE); g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE); impl = _clutter_stage_get_window (stage); if (!CLUTTER_IS_STAGE_GDK (impl)) { g_critical ("The Clutter backend is not a GDK backend"); return FALSE; } stage_gdk = CLUTTER_STAGE_GDK (impl); if (g_object_get_data (G_OBJECT (window), "clutter-stage-window") != NULL) { g_critical ("The provided GdkWindow is already in use by another ClutterStage"); return FALSE; } closure.stage_gdk = stage_gdk; closure.window = g_object_ref (window); actor = CLUTTER_ACTOR (stage); _clutter_actor_rerealize (actor, set_foreign_window_callback, &closure); /* Queue a relayout - so the stage will be allocated the new * window size. * * Note also that when the stage gets allocated the new * window size that will result in the stage's * priv->viewport being changed, which will in turn result * in the Cogl viewport changing when _clutter_do_redraw * calls _clutter_stage_maybe_setup_viewport(). */ clutter_actor_queue_relayout (actor); return TRUE; }
static gboolean _down_callback (MxMenu *self) { MxMenuPrivate *priv = self->priv; gint last_id_offset = (priv->children->len - 1) - (priv->last_shown_id - priv->id_offset); if(last_id_offset > priv->id_offset) { priv->id_offset++; clutter_actor_queue_relayout (CLUTTER_ACTOR(self)); } return TRUE; }
/** * st_table_child_set_y_align: * @table: A #StTable * @child: A #ClutterActor * @align: A #StAlign value * * Set the value of the y-align property. This will only have an effect if * y-fill value is set to FALSE. * */ void st_table_child_set_y_align (StTable *table, ClutterActor *child, StAlign align) { StTableChild *meta; g_return_if_fail (ST_IS_TABLE (table)); g_return_if_fail (CLUTTER_IS_ACTOR (child)); meta = get_child_meta (table, child); meta->y_align = align; clutter_actor_queue_relayout (child); }
void penge_block_container_set_min_tile_size (PengeBlockContainer *pbc, gfloat width, gfloat height) { PengeBlockContainerPrivate *priv = GET_PRIVATE (pbc); priv->min_tile_width = width; priv->min_tile_height = height; g_object_notify (G_OBJECT (pbc), "min-tile-width"); g_object_notify (G_OBJECT (pbc), "min-tile-height"); clutter_actor_queue_relayout (CLUTTER_ACTOR (pbc)); }
static void st_box_layout_style_changed (StWidget *self) { StBoxLayoutPrivate *priv = ST_BOX_LAYOUT (self)->priv; StThemeNode *theme_node = st_widget_get_theme_node (self); int old_spacing = priv->spacing; double spacing; spacing = st_theme_node_get_length (theme_node, "spacing"); priv->spacing = (int)(spacing + 0.5); if (priv->spacing != old_spacing) clutter_actor_queue_relayout (CLUTTER_ACTOR (self)); ST_WIDGET_CLASS (st_box_layout_parent_class)->style_changed (self); }
void mnb_zones_preview_clear (MnbZonesPreview *preview) { MnbZonesPreviewPrivate *priv = preview->priv; while (priv->workspace_bins) { clutter_actor_destroy (CLUTTER_ACTOR (priv->workspace_bins->data)); priv->workspace_bins = g_list_delete_link (priv->workspace_bins, priv->workspace_bins); } clutter_actor_queue_relayout (CLUTTER_ACTOR (preview)); }
static void champlain_viewport_init (ChamplainViewport *self) { self->priv = GET_PRIVATE (self); self->priv->sync_adjustments = TRUE; self->priv->child = NULL; self->priv->content_group = clutter_group_new (); clutter_actor_set_parent (CLUTTER_ACTOR (self->priv->content_group), CLUTTER_ACTOR (self)); clutter_actor_queue_relayout (CLUTTER_ACTOR (self)); g_signal_connect (self, "notify::clip", G_CALLBACK (clip_notify_cb), self); }
/** * clutter_bind_constraint_set_offset: * @constraint: a #ClutterBindConstraint * @offset: the offset to apply, in pixels * * Sets the offset to be applied to the constraint * * Since: 1.4 */ void clutter_bind_constraint_set_offset (ClutterBindConstraint *constraint, gfloat offset) { g_return_if_fail (CLUTTER_IS_BIND_CONSTRAINT (constraint)); if (fabs (constraint->offset - offset) < 0.00001f) return; constraint->offset = offset; if (constraint->actor != NULL) clutter_actor_queue_relayout (constraint->actor); g_object_notify_by_pspec (G_OBJECT (constraint), obj_props[PROP_OFFSET]); }
/** * clutter_bind_constraint_set_coordinate: * @constraint: a #ClutterBindConstraint * @coordinate: the coordinate to bind * * Sets the coordinate to bind in the constraint * * Since: 1.4 */ void clutter_bind_constraint_set_coordinate (ClutterBindConstraint *constraint, ClutterBindCoordinate coordinate) { g_return_if_fail (CLUTTER_IS_BIND_CONSTRAINT (constraint)); if (constraint->coordinate == coordinate) return; constraint->coordinate = coordinate; if (constraint->actor != NULL) clutter_actor_queue_relayout (constraint->actor); g_object_notify_by_pspec (G_OBJECT (constraint), obj_props[PROP_COORDINATE]); }
/** * clutter_path_constraint_set_offset: * @constraint: a #ClutterPathConstraint * @offset: the offset along the path * * Sets the offset along the #ClutterPath used by @constraint. * * Since: 1.6 */ void clutter_path_constraint_set_offset (ClutterPathConstraint *constraint, gfloat offset) { g_return_if_fail (CLUTTER_IS_PATH_CONSTRAINT (constraint)); if (constraint->offset == offset) return; constraint->offset = offset; if (constraint->actor != NULL) clutter_actor_queue_relayout (constraint->actor); _clutter_notify_by_pspec (G_OBJECT (constraint), path_properties[PROP_OFFSET]); }
static void clutter_constraint_notify (GObject *gobject, GParamSpec *pspec) { if (strcmp (pspec->name, "enabled") == 0) { ClutterActorMeta *meta = CLUTTER_ACTOR_META (gobject); ClutterActor *actor = clutter_actor_meta_get_actor (meta); if (actor != NULL) clutter_actor_queue_relayout (actor); } if (G_OBJECT_CLASS (clutter_constraint_parent_class)->notify != NULL) G_OBJECT_CLASS (clutter_constraint_parent_class)->notify (gobject, pspec); }
/** * clutter_align_constraint_set_align_axis: * @align: a #ClutterAlignConstraint * @axis: the axis to which the alignment refers to * * Sets the axis to which the alignment refers to * * Since: 1.4 */ void clutter_align_constraint_set_align_axis (ClutterAlignConstraint *align, ClutterAlignAxis axis) { g_return_if_fail (CLUTTER_IS_ALIGN_CONSTRAINT (align)); if (align->align_axis == axis) return; align->align_axis = axis; if (align->actor != NULL) clutter_actor_queue_relayout (align->actor); _clutter_notify_by_pspec (G_OBJECT (align), obj_props[PROP_ALIGN_AXIS]); }
/** * st_table_child_set_y_expand: * @table: A #StTable * @child: A #ClutterActor * @expand: the new value of the y-expand child property * * Set y-expand on the child. This causes the row which the child * resides in to be allocated any extra space if the allocation of the table is * larger than the preferred size. * */ void st_table_child_set_y_expand (StTable *table, ClutterActor *child, gboolean expand) { StTableChild *meta; g_return_if_fail (ST_IS_TABLE (table)); g_return_if_fail (CLUTTER_IS_ACTOR (child)); meta = get_child_meta (table, child); meta->y_expand = expand; clutter_actor_queue_relayout (child); }
void mx_label_set_y_align (MxLabel *label, MxAlign align) { g_return_if_fail (MX_IS_LABEL (label)); if (align != label->priv->y_align) { label->priv->y_align = align; clutter_actor_queue_relayout (CLUTTER_ACTOR (label)); g_object_notify (G_OBJECT (label), "y-align"); } }
/** * st_table_child_set_row_span: * @table: A #StTable * @child: A #ClutterActor * @span: the number of rows to span * * Set the row span of the child. * */ void st_table_child_set_row_span (StTable *table, ClutterActor *child, gint span) { StTableChild *meta; g_return_if_fail (ST_IS_TABLE (table)); g_return_if_fail (CLUTTER_IS_ACTOR (child)); g_return_if_fail (span > 1); meta = get_child_meta (table, child); meta->row_span = span; clutter_actor_queue_relayout (child); }
static void clutter_box_real_remove (ClutterContainer *container, ClutterActor *actor) { ClutterBoxPrivate *priv = CLUTTER_BOX (container)->priv; g_object_ref (actor); priv->children = g_list_remove (priv->children, actor); clutter_actor_unparent (actor); clutter_actor_queue_relayout (CLUTTER_ACTOR (container)); g_signal_emit_by_name (container, "actor-removed", actor); g_object_unref (actor); }
/* FIXME this expects start and end aligned to 30mins marks do the rounding * here rather than epg-grid? -> yes */ void mex_epg_grid_set_date_time_span (MexEpgGrid *grid, GDateTime *start, GDateTime *end) { MexEpgGridPrivate *priv; g_return_if_fail (MEX_IS_EPG_GRID (grid)); g_return_if_fail (start && end); priv = grid->priv; priv->first_date = g_date_time_ref (start); priv->last_date = g_date_time_ref (end); create_header (grid); clutter_actor_queue_relayout (CLUTTER_ACTOR (grid)); }
/** * st_scroll_view_set_overlay_scrollbars: * @scroll: A #StScrollView * @enabled: Whether to enable overlay scrollbars * * Sets whether scrollbars are painted on top of the content. */ void st_scroll_view_set_overlay_scrollbars (StScrollView *scroll, gboolean enabled) { StScrollViewPrivate *priv; g_return_if_fail (ST_IS_SCROLL_VIEW (scroll)); priv = ST_SCROLL_VIEW (scroll)->priv; if (priv->overlay_scrollbars != enabled) { priv->overlay_scrollbars = enabled; g_object_notify (G_OBJECT (scroll), "overlay-scrollbars"); clutter_actor_queue_relayout (CLUTTER_ACTOR (scroll)); } }
static void _update_layout (PengeGridView *grid_view) { PengeGridViewPrivate *priv = GET_PRIVATE (grid_view); clutter_container_child_set (CLUTTER_CONTAINER (grid_view), priv->everything_pane, "row-span", 1, "column", 0, "x-expand", TRUE, "x-fill", TRUE, "y-expand", TRUE, "y-fill", TRUE, NULL); clutter_actor_queue_relayout (CLUTTER_ACTOR (grid_view)); }
static void _active_model_bulk_change_end_cb (AnerleyFeedModel *model, gpointer userdata) { MnbPeoplePanelPrivate *priv = GET_PRIVATE (userdata); gint number_active_people; gchar *tooltip; if (clutter_model_get_first_iter ((ClutterModel *)model)) { // mx_table_set_row_spacing (MX_TABLE (priv->content_table), 6); if (priv->panel_client) { mpl_panel_client_request_button_style (priv->panel_client, "people-button-active"); number_active_people = clutter_model_get_n_rows (CLUTTER_MODEL (priv->active_model)); if (number_active_people > 1) { tooltip = g_strdup_printf (_("people - you are chatting with %d people"), number_active_people); mpl_panel_client_request_tooltip (priv->panel_client, tooltip); g_free (tooltip); } else { mpl_panel_client_request_tooltip (priv->panel_client, _("people - you are chatting with someone")); } } } else { // mx_table_set_row_spacing (MX_TABLE (priv->content_table), 0); if (priv->panel_client) { mpl_panel_client_request_button_style (priv->panel_client, "people-button"); mpl_panel_client_request_tooltip (priv->panel_client, _("people")); } } /* Workaround for MB#6690 */ clutter_actor_queue_relayout (CLUTTER_ACTOR (priv->content_table)); }
void xfdashboard_viewpad_set_vertical_scrollbar_policy(XfdashboardViewpad *self, XfdashboardPolicy inPolicy) { XfdashboardViewpadPrivate *priv; g_return_if_fail(XFDASHBOARD_IS_VIEWPAD(self)); priv=self->priv; /* Only set new value if it differs from current value */ if(priv->vScrollbarPolicy==inPolicy) return; /* Set new value */ priv->vScrollbarPolicy=inPolicy; clutter_actor_queue_relayout(CLUTTER_ACTOR(self)); /* Notify about property change */ g_object_notify_by_pspec(G_OBJECT(self), XfdashboardViewpadProperties[PROP_VSCROLLBAR_POLICY]); }