static void kill_window_effects (MetaPlugin *plugin, MetaWindowActor *window_actor) { ActorPrivate *apriv; apriv = get_actor_private (window_actor); if (apriv->tml_minimize) { clutter_timeline_stop (apriv->tml_minimize); g_signal_emit_by_name (apriv->tml_minimize, "completed", NULL); } if (apriv->tml_maximize) { clutter_timeline_stop (apriv->tml_maximize); g_signal_emit_by_name (apriv->tml_maximize, "completed", NULL); } if (apriv->tml_map) { clutter_timeline_stop (apriv->tml_map); g_signal_emit_by_name (apriv->tml_map, "completed", NULL); } if (apriv->tml_destroy) { clutter_timeline_stop (apriv->tml_destroy); g_signal_emit_by_name (apriv->tml_destroy, "completed", NULL); } }
void kill_switch_workspace (MetaPlugin *plugin) { BudgieWMPrivate *priv = BUDGIE_WM (plugin)->priv; if (priv->tml_switch_workspace1) { clutter_timeline_stop (priv->tml_switch_workspace1); clutter_timeline_stop (priv->tml_switch_workspace2); g_signal_emit_by_name (priv->tml_switch_workspace1, "completed", NULL); } }
static void kill_switch_workspace (MetaPlugin *plugin) { MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv; if (priv->tml_switch_workspace1) { clutter_timeline_stop (priv->tml_switch_workspace1); clutter_timeline_stop (priv->tml_switch_workspace2); g_signal_emit_by_name (priv->tml_switch_workspace1, "completed", NULL); } }
void astro_appview_advance (AstroAppview *view, gint n) { AstroAppviewPrivate *priv; static ClutterTimeline *move_time = NULL; gint new_active; g_return_if_fail (ASTRO_IS_APPVIEW (view)); priv = view->priv; new_active = priv->active + n; if (new_active < 0 || new_active >= g_list_length (priv->apps)) return; priv->active = new_active; if (CLUTTER_IS_TIMELINE (move_time) &&clutter_timeline_is_playing (move_time)) { clutter_timeline_stop (move_time); g_object_unref (move_time); } move_time = clutter_effect_move (priv->move_temp, CLUTTER_ACTOR (view), (CSW()/2)- (priv->active * ASTRO_APPICON_SPACING ()), clutter_actor_get_y (CLUTTER_ACTOR (view)), NULL, NULL); g_signal_connect (move_time, "new-frame", G_CALLBACK (on_move_timeline_new_frame), view); }
static void astro_appview_hide (ClutterActor *view) { AstroAppviewPrivate *priv; static ClutterTimeline *hide_time = NULL; g_return_if_fail (ASTRO_IS_APPVIEW (view)); priv = ASTRO_APPVIEW (view)->priv; if (CLUTTER_IS_TIMELINE (hide_time) &&clutter_timeline_is_playing (hide_time)) { clutter_timeline_stop (hide_time); g_object_unref (hide_time); } hide_time = clutter_effect_move (priv->hide_temp, CLUTTER_ACTOR (view), -1 * clutter_actor_get_width (view), clutter_actor_get_y (CLUTTER_ACTOR (view)), NULL, NULL); g_signal_connect (hide_time, "new-frame", G_CALLBACK (on_move_timeline_new_frame), view); g_signal_connect (hide_time, "completed", G_CALLBACK (on_hide_timeline_completed), view); }
static void astro_appview_show (ClutterActor *view) { AstroAppviewPrivate *priv; static ClutterTimeline *show_time = NULL; g_return_if_fail (ASTRO_IS_APPVIEW (view)); priv = ASTRO_APPVIEW (view)->priv; if (CLUTTER_IS_TIMELINE (show_time) &&clutter_timeline_is_playing (show_time)) { clutter_timeline_stop (show_time); g_object_unref (show_time); } clutter_actor_set_x (view, -1* clutter_actor_get_width (view)); CLUTTER_ACTOR_CLASS (astro_appview_parent_class)->show (view); show_time = clutter_effect_move (priv->show_temp, CLUTTER_ACTOR (view), (CSW()/2)- (priv->active * ASTRO_APPICON_SPACING()), clutter_actor_get_y (CLUTTER_ACTOR (view)), NULL, NULL); g_signal_connect (show_time, "new-frame", G_CALLBACK (on_move_timeline_new_frame), view); }
static void mx_label_dispose (GObject *actor) { MxLabelPrivate *priv = MX_LABEL (actor)->priv; if (priv->fade_timeline) { clutter_timeline_stop (priv->fade_timeline); g_object_unref (priv->fade_timeline); priv->fade_timeline = NULL; } if (priv->fade_alpha) { g_object_unref (priv->fade_alpha); priv->fade_alpha = NULL; } if (priv->label) { clutter_actor_destroy (priv->label); priv->label = NULL; } G_OBJECT_CLASS (mx_label_parent_class)->dispose (actor); }
static void layout_manager_real_end_animation (ClutterLayoutManager *manager) { ClutterTimeline *timeline; ClutterAlpha *alpha; alpha = g_object_get_qdata (G_OBJECT (manager), quark_layout_alpha); if (alpha == NULL) return; timeline = clutter_alpha_get_timeline (alpha); g_assert (timeline != NULL); if (clutter_timeline_is_playing (timeline)) clutter_timeline_stop (timeline); g_signal_handlers_disconnect_by_func (timeline, G_CALLBACK (clutter_layout_manager_end_animation), manager); g_signal_handlers_disconnect_by_func (timeline, G_CALLBACK (clutter_layout_manager_layout_changed), manager); g_object_set_qdata (G_OBJECT (manager), quark_layout_alpha, NULL); clutter_layout_manager_layout_changed (manager); }
static void foreach_running_timeline (gpointer key, gpointer value, gpointer user_data) { ClutterScoreEntry *entry = value; gint action = GPOINTER_TO_INT (user_data); switch (action) { case ACTION_START: clutter_timeline_start (entry->timeline); break; case ACTION_PAUSE: clutter_timeline_pause (entry->timeline); break; case ACTION_STOP: if (entry->complete_id) { g_signal_handler_disconnect (entry->timeline, entry->complete_id); entry->complete_id = 0; } clutter_timeline_stop (entry->timeline); break; } }
static void stop_and_quit (ClutterActor *actor, TestState *state) { clutter_timeline_stop (state->timeline); clutter_main_quit (); }
static void stop_and_quit (ClutterActor *actor, ClutterTimeline *timeline) { clutter_timeline_stop (timeline); clutter_main_quit (); }
void mnb_spinner_stop (MnbSpinner *spinner) { MnbSpinnerPrivate *priv = MNB_SPINNER (spinner)->priv; if (priv->timeline) clutter_timeline_stop (priv->timeline); }
static void stop_and_quit (ClutterActor *actor, SuperOH *oh) { g_signal_handler_disconnect (oh->timeline, oh->frame_id); clutter_timeline_stop (oh->timeline); clutter_main_quit (); }
static gboolean on_delete_event (GtkWidget *widget, GdkEvent *event, CalibArea *area) { clutter_timeline_stop (CLUTTER_TIMELINE (area->clock_timeline)); if (area->error_msg_timeline) clutter_timeline_stop (CLUTTER_TIMELINE (area->error_msg_timeline)); if (area->helper_msg_timeline) clutter_timeline_stop (CLUTTER_TIMELINE (area->helper_msg_timeline)); gtk_widget_hide (area->window); (*area->callback) (area, area->user_data); return TRUE; }
static void ease_close_confirm_dialog_real_destroy (GtkObject* base) { #line 203 "ease-close-confirm-dialog.c" EaseCloseConfirmDialog * self; self = (EaseCloseConfirmDialog*) base; #line 114 "ease-close-confirm-dialog.vala" clutter_timeline_stop (self->priv->counter); #line 115 "ease-close-confirm-dialog.vala" GTK_OBJECT_CLASS (ease_close_confirm_dialog_parent_class)->destroy ((GtkObject*) GTK_DIALOG (self)); #line 210 "ease-close-confirm-dialog.c" }
static void deceleration_new_frame_cb (ClutterTimeline *timeline, gint frame_num, ChamplainKineticScrollView *scroll) { ChamplainKineticScrollViewPrivate *priv = scroll->priv; if (priv->viewport) { gdouble value, lower, upper; ChamplainAdjustment *hadjust, *vadjust; gint i; gboolean stop = TRUE; champlain_viewport_get_adjustments (CHAMPLAIN_VIEWPORT (priv->viewport), &hadjust, &vadjust); for (i = 0; i < clutter_timeline_get_delta (timeline) / 15; i++) { champlain_adjustment_set_value (hadjust, priv->dx + champlain_adjustment_get_value (hadjust)); champlain_adjustment_set_value (vadjust, priv->dy + champlain_adjustment_get_value (vadjust)); priv->dx = (priv->dx / priv->decel_rate); priv->dy = (priv->dy / priv->decel_rate); } /* Check if we've hit the upper or lower bounds and stop the timeline */ champlain_adjustment_get_values (hadjust, &value, &lower, &upper, NULL); if (((priv->dx > 0) && (value < upper)) || ((priv->dx < 0) && (value > lower))) stop = FALSE; if (stop) { champlain_adjustment_get_values (vadjust, &value, &lower, &upper, NULL); if (((priv->dy > 0) && (value < upper)) || ((priv->dy < 0) && (value > lower))) stop = FALSE; } if (stop) { clutter_timeline_stop (timeline); deceleration_completed_cb (timeline, scroll); } } }
static gboolean gesture_prepare (ClutterGestureAction *gesture, ClutterActor *actor) { ClutterPanAction *self = CLUTTER_PAN_ACTION (gesture); ClutterPanActionPrivate *priv = self->priv; if (priv->state == PAN_STATE_INTERPOLATING && priv->deceleration_timeline) clutter_timeline_stop (priv->deceleration_timeline); return TRUE; }
static void stop_interpolation (MxAdjustment *adjustment) { MxAdjustmentPrivate *priv = adjustment->priv; if (priv->interpolation) { clutter_timeline_stop (priv->interpolation); g_object_unref (priv->interpolation); priv->interpolation = NULL; } }
static gboolean test_thread_done_idle (gpointer user_data) { TestThreadData *data = user_data; g_print ("Thread completed\n"); clutter_label_set_text (CLUTTER_LABEL (data->label), "Completed"); clutter_timeline_stop (data->timeline); test_thread_data_free (data); return FALSE; }
void champlain_kinetic_scroll_view_stop (ChamplainKineticScrollView *scroll) { ChamplainKineticScrollViewPrivate *priv; g_return_if_fail (CHAMPLAIN_IS_KINETIC_SCROLL_VIEW (scroll)); priv = scroll->priv; if (priv->deceleration_timeline) { clutter_timeline_stop (priv->deceleration_timeline); g_object_unref (priv->deceleration_timeline); priv->deceleration_timeline = NULL; } }
static void mex_tile_dispose (GObject *object) { MexTile *self = MEX_TILE (object); MexTilePrivate *priv = self->priv; /* Use icon setting functions to remove icons */ mex_tile_set_primary_icon (self, NULL); mex_tile_set_secondary_icon (self, NULL); if (priv->box_layout) { clutter_actor_destroy (priv->box_layout); priv->box_layout = NULL; /* box_layout contains label and secondary_label */ priv->label = NULL; priv->secondary_label = NULL; } if (priv->header_padding) { g_boxed_free (MX_TYPE_PADDING, priv->header_padding); priv->header_padding = NULL; } if (priv->important_alpha) { g_object_unref (priv->important_alpha); priv->important_alpha = NULL; } if (priv->timeline) { clutter_timeline_stop (priv->timeline); g_object_unref (priv->timeline); priv->timeline = NULL; } if (priv->material) { cogl_object_unref (priv->material); priv->material = NULL; } G_OBJECT_CLASS (mex_tile_parent_class)->dispose (object); }
static void mex_column_shrink_children (MexColumn *column) { MexColumnPrivate *priv = column->priv; GList *l; if (priv->n_items < 1) return; clutter_timeline_stop (priv->expand_timeline); for (l = priv->children; l; l = g_list_next (l)) { mex_column_shrink_child (l->data); mex_content_box_set_important (MEX_CONTENT_BOX (l->data), FALSE); } }
gboolean on_rking_button_press(ClutterActor* actor,ClutterEvent* event, gpointer data) { gfloat x=0; gfloat y=0; clutter_event_get_coords(event,&x ,&y); if(_select){ clutter_timeline_start(timeline); _select=1-_select; } else { clutter_timeline_stop(timeline); _select=1-_select; } }
static gboolean button_press_event_cb (ClutterActor *actor, ClutterEvent *event, ChamplainKineticScrollView *scroll) { ChamplainKineticScrollViewPrivate *priv = scroll->priv; ClutterButtonEvent *bevent = (ClutterButtonEvent *) event; ClutterActor *stage = clutter_actor_get_stage (actor); if ((event->type == CLUTTER_BUTTON_PRESS) && (bevent->button == 1) && stage) { ChamplainKineticScrollViewMotion *motion; /* Reset motion buffer */ priv->last_motion = 0; motion = &g_array_index (priv->motion_buffer, ChamplainKineticScrollViewMotion, 0); if (clutter_actor_transform_stage_point (actor, bevent->x, bevent->y, &motion->x, &motion->y)) { g_get_current_time (&motion->time); if (priv->deceleration_timeline) { clutter_timeline_stop (priv->deceleration_timeline); g_object_unref (priv->deceleration_timeline); priv->deceleration_timeline = NULL; } g_signal_connect (stage, "captured-event", G_CALLBACK (motion_event_cb), scroll); g_signal_connect (stage, "captured-event", G_CALLBACK (button_release_event_cb), scroll); } } return FALSE; }
void call_deactivate (App *app) { int i; ClutterAnimation *anim; ClutterAlpha *alpha; /* stop the flashing text */ clutter_timeline_stop (app->dialing_timeline); /* clear dialpad entry ready */ clutter_text_set_text (CLUTTER_TEXT(app->dpy_entry), ""); /* rotate screen_dial, and hide it at mid-animation */ clutter_actor_set_rotation (app->screen_dial, CLUTTER_Y_AXIS, 0.0, 0.0, 0.0, 0.0); anim = clutter_actor_animate (app->screen_dial, CLUTTER_LINEAR, 150, "rotation-angle-y", -180.0, "visible", FALSE, NULL); alpha = clutter_animation_get_alpha (anim); /* reset positions of dialer actors, needed back for flip */ for (i=0; i<12; i++) { clutter_actor_set_position (app->buttons[i]->actor, app->buttons[i]->sx, app->buttons[i]->sy); clutter_actor_set_opacity (app->buttons[i]->actor, 0xff); } clutter_actor_set_position (app->dpy, app->dpyx, app->dpyy); /* rotate hidden screen_dialpad, and show it at mid-animation */ clutter_actor_set_rotation (app->screen_dialpad, CLUTTER_Y_AXIS, 180.0, 0.0, 0.0, 0.0); clutter_actor_animate_with_alpha (app->screen_dialpad, alpha, "rotation-angle-y", 0.0, "visible", TRUE, "signal-after::completed", G_CALLBACK(on_call_deactivate_complete), app, NULL); app->dialing_state = FALSE; }
static void champlain_kinetic_scroll_view_dispose (GObject *object) { ChamplainKineticScrollViewPrivate *priv = CHAMPLAIN_KINETIC_SCROLL_VIEW (object)->priv; if (priv->viewport) { clutter_actor_remove_all_children (CLUTTER_ACTOR (object)); priv->viewport = NULL; } if (priv->deceleration_timeline) { clutter_timeline_stop (priv->deceleration_timeline); g_object_unref (priv->deceleration_timeline); priv->deceleration_timeline = NULL; } G_OBJECT_CLASS (champlain_kinetic_scroll_view_parent_class)->dispose (object); }
static gboolean on_image_button_press(ClutterActor* actor, ClutterEvent* event, gpointer data) { gfloat x=0; gfloat y=0; clutter_event_get_coords(event,&x ,&y); g_print("actor click at %f:%f\n",x,y); if(clicked){ clutter_timeline_start(timeline); } else{ clutter_timeline_stop(timeline); } clicked=1-clicked; }
void astro_contact_row_set_active (AstroContactRow *row, gboolean active) { AstroContactRowPrivate *priv; static ClutterTimeline *active_time = NULL; g_return_if_fail (ASTRO_IS_CONTACT_ROW (row)); priv = row->priv; if (priv->active == active) return; priv->active = active; if (active) { active_time = clutter_effect_fade (priv->active_temp, priv->bg, 255, on_active_completed, row); clutter_timeline_start (priv->active_time); } else { active_time = clutter_effect_fade (priv->active_temp, priv->bg, 0, on_inactive_completed, row); if (clutter_timeline_is_playing (priv->bar_time)) clutter_timeline_stop (priv->bar_time); priv->bar_time = clutter_effect_fade (priv->active_temp, priv->bar, 0, NULL, NULL); } }
static void mnb_spinner_constructed (GObject *self) { MnbSpinnerPrivate *priv = MNB_SPINNER (self)->priv; MxWidget *widget = MX_WIDGET (self); ClutterTexture *background; ClutterTimeline *timeline; /* * Mx does not seem to load the style info until the first show, but we want * to get hold of the background asset here to work out the frame count, so * we need to force the style loading. * * NB: mx_widget_ensure_style() does not work here, because the MxWidget * is_style_dirty flag is cleared at this point. */ mx_stylable_style_changed (MX_STYLABLE (widget), MX_STYLE_CHANGED_FORCE); if ((background = (ClutterTexture *) mx_widget_get_background_image (widget))) { gint tx_w, tx_h; guint duration; if (!CLUTTER_IS_TEXTURE (background)) { g_critical ("Expected ClutterTexture, but got %s", G_OBJECT_TYPE_NAME (background)); return; } /* * The background texture is a strip of squares making up the individual * frames in the animation, so the width matches the height of the * texture. */ clutter_texture_get_base_size (background, &tx_w, &tx_h); priv->n_frames = tx_w / tx_h; if (tx_w % tx_h) g_warning (G_STRLOC ": Expected texture size %d x %d, got %d x %d", tx_h * priv->n_frames, tx_h, tx_w, tx_h); /* * Setup a looped timeline with a marker that fires everytime we should * advance to a new frame. * * Assume the whole animation is to last 1s. */ duration = 1000/ priv->n_frames; timeline = priv->timeline = clutter_timeline_new (duration); clutter_timeline_set_loop (timeline, TRUE); clutter_timeline_add_marker_at_time (timeline, "next", duration); clutter_timeline_stop (timeline); g_signal_connect (timeline, "marker-reached", G_CALLBACK (mnb_spinner_marker_reached_cb), self); } else g_warning ("%s did not have background-image set in style !!!", G_OBJECT_TYPE_NAME (self)); }
void st_theme_node_transition_update (StThemeNodeTransition *transition, StThemeNode *new_node) { StThemeNodeTransitionPrivate *priv = transition->priv; StThemeNode *old_node; ClutterTimelineDirection direction; g_return_if_fail (ST_IS_THEME_NODE_TRANSITION (transition)); g_return_if_fail (ST_IS_THEME_NODE (new_node)); direction = clutter_timeline_get_direction (priv->timeline); old_node = (direction == CLUTTER_TIMELINE_FORWARD) ? priv->old_theme_node : priv->new_theme_node; /* If the update is the reversal of the current transition, * we reverse the timeline. * Otherwise, we should initiate a new transition from the * current state to the new one; this is hard to do if the * transition is in an intermediate state, so we just cancel * the ongoing transition in that case. * Note that reversing a timeline before any time elapsed * results in the timeline's time position being set to the * full duration - this is not what we want, so we cancel the * transition as well in that case. */ if (st_theme_node_equal (new_node, old_node)) { if (clutter_timeline_get_elapsed_time (priv->timeline) > 0) { if (direction == CLUTTER_TIMELINE_FORWARD) clutter_timeline_set_direction (priv->timeline, CLUTTER_TIMELINE_BACKWARD); else clutter_timeline_set_direction (priv->timeline, CLUTTER_TIMELINE_FORWARD); } else { clutter_timeline_stop (priv->timeline); g_signal_emit (transition, signals[COMPLETED], 0); } } else { if (clutter_timeline_get_elapsed_time (priv->timeline) > 0) { clutter_timeline_stop (priv->timeline); g_signal_emit (transition, signals[COMPLETED], 0); } else { guint new_duration = st_theme_node_get_transition_duration (new_node); clutter_timeline_set_duration (priv->timeline, new_duration); /* If the change doesn't affect painting, we don't need to redraw, * but we still need to replace the node so that we properly share * caching with the painting that happens after the transition finishes. */ if (!st_theme_node_paint_equal (priv->new_theme_node, new_node)) priv->needs_setup = TRUE; g_object_unref (priv->new_theme_node); priv->new_theme_node = g_object_ref (new_node); } } }