• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ clutter_actor_animate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中clutter_actor_animate函数的典型用法代码示例。如果您正苦于以下问题:C++ clutter_actor_animate函数的具体用法?C++ clutter_actor_animate怎么用?C++ clutter_actor_animate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了clutter_actor_animate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: champlain_tile_display_content

/**
 * champlain_tile_display_content:
 * @self: the #ChamplainTile
 *
 * Displays the tile's content.
 *
 * Since: 0.8
 */
void
champlain_tile_display_content (ChamplainTile *self)
{
  g_return_if_fail (CHAMPLAIN_TILE (self));

  ChamplainTilePrivate *priv = self->priv;
  ClutterAnimation *animation;

  if (!priv->content_actor || priv->content_displayed || !priv->content_group)
    return;

  clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), priv->content_actor);
  g_object_unref (priv->content_actor);
  priv->content_displayed = TRUE;

  clutter_actor_set_opacity (CLUTTER_ACTOR (priv->content_actor), 0);
  if (priv->fade_in)
    {
      animation = clutter_actor_animate (CLUTTER_ACTOR (priv->content_actor),
            CLUTTER_EASE_IN_CUBIC,
            500,
            "opacity", 255,
            NULL);
    }
  else
    {
      animation = clutter_actor_animate (CLUTTER_ACTOR (priv->content_actor),
            CLUTTER_LINEAR,
            150,
            "opacity", 255,
            NULL);
    }

  g_signal_connect (animation, "completed", G_CALLBACK (fade_in_completed), self);
}
开发者ID:PabloCastellano,项目名称:libchamplain,代码行数:43,代码来源:champlain-tile.c


示例2: animate_end_game

static void
animate_end_game (void)
{
  int i;
  for (i = 0; i < properties->numworms; i++) {
    clutter_actor_animate (worms[i]->actors, CLUTTER_EASE_IN_QUAD, 500,
                           "opacity", 0,
                           "scale-x", 0.4, "scale-y", 0.4,
                           "fixed::scale-center-x",
                           (gfloat) worms[i]->xhead * properties->tilesize,
                           "fixed::scale-center-y",
                           (gfloat) worms[i]->yhead * properties->tilesize,
                           NULL);
  }

  for ( i = 0; i < boni->numbonuses; i++) {
    clutter_actor_animate (boni->bonuses[i]->actor, CLUTTER_EASE_IN_QUAD, 500,
                           "opacity", 0,
                           "scale-x", 0.4, "scale-y", 0.4,
                           "fixed::scale-gravity", CLUTTER_GRAVITY_CENTER,
                           NULL);

  }

  g_signal_connect_after (
    clutter_actor_animate (board->level, CLUTTER_EASE_IN_QUAD, 700,
                           "scale-x", 0.4, "scale-y", 0.4,
                           "fixed::scale-gravity", CLUTTER_GRAVITY_CENTER,
                           "opacity", 0,
                           NULL),
    "completed", G_CALLBACK (end_game_anim_cb), NULL);

}
开发者ID:gfunkmonk2,项目名称:mate-games,代码行数:33,代码来源:main.c


示例3: mex_clock_bin_notify_focused_cb

static void
mex_clock_bin_notify_focused_cb (MxFocusManager *manager,
                                 GParamSpec     *pspec,
                                 MexClockBin    *self)
{
  ClutterActor *parent = NULL;
  MexClockBinPrivate *priv = self->priv;
  ClutterActor *focused = (ClutterActor *)
    mx_focus_manager_get_focused (manager);

  while (focused)
    {
      parent = clutter_actor_get_parent (focused);
      if (focused == (ClutterActor *)self)
        {
          clutter_actor_animate (CLUTTER_ACTOR (priv->clock_hbox),
                                 CLUTTER_EASE_OUT_QUAD,
                                 150, "opacity", 0x00, NULL);
          return;
        }
      focused = parent;
    }

  clutter_actor_animate (CLUTTER_ACTOR (priv->clock_hbox),
                         CLUTTER_EASE_OUT_QUAD, 150,
                         "opacity", 0xff, NULL);
}
开发者ID:frankopt,项目名称:media-explorer,代码行数:27,代码来源:mex-clock-bin.c


示例4: mex_player_set_controls_visible

static gboolean
mex_player_set_controls_visible (MexPlayer *player,
                                 gboolean   visible)
{
  MexPlayerPrivate *priv = player->priv;
  gfloat pos;
  ClutterStage *stage;
  MxFocusManager *fmanager;

  stage = (ClutterStage*) clutter_actor_get_stage (CLUTTER_ACTOR (player));
  fmanager = mx_focus_manager_get_for_stage (stage);

  pos = clutter_actor_get_height (priv->controls);
  if (visible)
    {
      priv->controls_prev_visible = FALSE;
      priv->controls_visible = TRUE;

      mx_widget_set_disabled (MX_WIDGET (priv->controls), FALSE);

      clutter_actor_animate (priv->controls, CLUTTER_EASE_IN_SINE, 250,
                             "opacity", 0xff,
                             "anchor-y", 0.0,
                             NULL);

      mex_player_restart_timer (player);

      if (priv->related_tile)
        {
          mx_focus_manager_push_focus_with_hint (fmanager,
                                                 MX_FOCUSABLE (priv->related_tile),
                                                 MX_FOCUS_HINT_PRIOR);

          g_object_unref (priv->related_tile);
          priv->related_tile = NULL;
        }
      else
        {
          mx_focus_manager_push_focus (fmanager, MX_FOCUSABLE (priv->controls));
        }
    }

  if (!visible)
    {
      priv->controls_visible = FALSE;
      clutter_actor_animate (priv->controls, CLUTTER_EASE_IN_SINE, 250,
                             "opacity", 0x00,
                             "anchor-y", -pos,
                             NULL);

      if (priv->hide_controls_source)
        {
          g_source_remove (priv->hide_controls_source);
          priv->hide_controls_source = 0;
        }
    }

  return TRUE;
}
开发者ID:dudochkin-victor,项目名称:mex,代码行数:59,代码来源:mex-player.c


示例5: expander_box_open_notify

static void
expander_box_open_notify (MexExpanderBox *box,
                          GParamSpec     *pspec,
                          MexColumn      *column)
{
  MexColumnPrivate *priv = MEX_COLUMN (column)->priv;
  GList *l;
  MexShadow *shadow;
  ClutterColor shadow_color = { 0, 0, 0, 128 };

  if (mex_expander_box_get_open (box))
    {
      for (l = priv->children; l; l = l->next)
        {
          if (l->data != box)
            clutter_actor_animate (l->data, CLUTTER_EASE_IN_OUT_QUAD, 200,
                                   "opacity", 56, NULL);
        }
      clutter_actor_animate (priv->header, CLUTTER_EASE_IN_OUT_QUAD, 200,
                             "opacity", 56, NULL);

      /* Restore the opened box to full opacity */
      clutter_actor_animate (CLUTTER_ACTOR (box), CLUTTER_EASE_IN_OUT_QUAD, 200,
                             "opacity", 255, NULL);

      shadow = mex_shadow_new (CLUTTER_ACTOR (box));
      mex_shadow_set_paint_flags (shadow,
                                  MEX_TEXTURE_FRAME_TOP | MEX_TEXTURE_FRAME_BOTTOM);
      mex_shadow_set_radius_y (shadow, 25);
      mex_shadow_set_color (shadow, &shadow_color);

      g_object_set_qdata (G_OBJECT (box), _item_shadow_quark (), shadow);

      priv->open_boxes ++;
    }
  else
    {
      priv->open_boxes --;
    }

  if (priv->open_boxes == 0)
    {
      /* restore all children to full opacity */
      for (l = priv->children; l; l = l->next)
        {
          clutter_actor_animate (l->data, CLUTTER_EASE_IN_OUT_QUAD, 200,
                                 "opacity", 255, NULL);
        }
      clutter_actor_animate (priv->header, CLUTTER_EASE_IN_OUT_QUAD, 200,
                             "opacity", 255, NULL);

      shadow = g_object_get_qdata (G_OBJECT (box), _item_shadow_quark ());
      if (shadow)
        {
          g_object_unref (shadow);
          g_object_set_qdata (G_OBJECT (box), _item_shadow_quark (), NULL);
        }
    }
}
开发者ID:olethanh,项目名称:media-explorer,代码行数:59,代码来源:mex-column.c


示例6: ease_welcome_actor_unfade

void ease_welcome_actor_unfade (EaseWelcomeActor* self) {
#line 206 "ease-welcome-actor.vala"
	g_return_if_fail (self != NULL);
#line 208 "ease-welcome-actor.vala"
	self->priv->is_selected = TRUE;
#line 209 "ease-welcome-actor.vala"
	clutter_actor_animate ((ClutterActor*) self->priv->slide_actor, (gulong) EASE_WELCOME_ACTOR_FADE_EASE, (guint) EASE_WELCOME_ACTOR_FADE_TIME, "opacity", 255, NULL);
#line 210 "ease-welcome-actor.vala"
	clutter_actor_animate ((ClutterActor*) self->priv->hilight_rect, (gulong) EASE_WELCOME_ACTOR_FADE_EASE, (guint) EASE_WELCOME_ACTOR_FADE_TIME, "opacity", 255, NULL);
#line 349 "ease-welcome-actor.c"
}
开发者ID:rmujica,项目名称:Nitido,代码行数:11,代码来源:ease-welcome-actor.c


示例7: ease_welcome_actor_fade

void ease_welcome_actor_fade (EaseWelcomeActor* self) {
#line 196 "ease-welcome-actor.vala"
	g_return_if_fail (self != NULL);
#line 198 "ease-welcome-actor.vala"
	self->priv->is_selected = FALSE;
#line 199 "ease-welcome-actor.vala"
	clutter_actor_animate ((ClutterActor*) self->priv->slide_actor, (gulong) EASE_WELCOME_ACTOR_FADE_EASE, (guint) EASE_WELCOME_ACTOR_FADE_TIME, "opacity", EASE_WELCOME_ACTOR_FADE_OPACITY, NULL);
#line 200 "ease-welcome-actor.vala"
	clutter_actor_animate ((ClutterActor*) self->priv->hilight_rect, (gulong) EASE_WELCOME_ACTOR_FADE_EASE, (guint) EASE_WELCOME_ACTOR_FADE_TIME, "opacity", 0, NULL);
#line 332 "ease-welcome-actor.c"
}
开发者ID:rmujica,项目名称:Nitido,代码行数:11,代码来源:ease-welcome-actor.c


示例8: mex_column_remove

static void
mex_column_remove (ClutterContainer *container,
                   ClutterActor     *actor)
{
  GList *link_;

  MexColumn *self = MEX_COLUMN (container);
  MexColumnPrivate *priv = self->priv;

  link_ = g_list_find (priv->children, actor);

  if (!link_)
    {
      g_warning (G_STRLOC ": Trying to remove an unknown child");
      return;
    }

  if (priv->current_focus == actor)
    {
      priv->current_focus = link_->next ? link_->next->data :
        (link_->prev ? link_->prev->data : NULL);
      priv->has_focus = FALSE;
    }

  /* Remove the old actor */
  g_object_ref (actor);

  clutter_actor_unparent (actor);
  priv->children = g_list_delete_link (priv->children, link_);
  priv->n_items --;

  /* children may not be at full opacity if the item removed was "open" */
  if (MEX_IS_EXPANDER_BOX (actor)
      && mex_expander_box_get_open (MEX_EXPANDER_BOX (actor)))
    {
      GList *l;

      for (l = priv->children; l; l = l->next)
        clutter_actor_animate (l->data, CLUTTER_EASE_IN_OUT_QUAD, 200,
                               "opacity", 255, NULL);

      clutter_actor_animate (priv->header, CLUTTER_EASE_IN_OUT_QUAD, 200,
                             "opacity", 255, NULL);
    }

  g_signal_emit_by_name (self, "actor-removed", actor);

  g_object_unref (actor);
}
开发者ID:olethanh,项目名称:media-explorer,代码行数:49,代码来源:mex-column.c


示例9: content_box_open_notify

static void
content_box_open_notify (MexContentBox *box,
                         GParamSpec    *pspec,
                         MexColumn     *column)
{
  MexColumnPrivate *priv = MEX_COLUMN (column)->priv;
  GList *l;
  ClutterActorMeta *shadow;

  if (mex_content_box_get_open (box))
    {
      for (l = priv->children; l; l = l->next)
        {
          if (l->data != box)
            clutter_actor_animate (l->data, CLUTTER_EASE_IN_OUT_QUAD, 200,
                                   "opacity", 56, NULL);
        }

      shadow = (ClutterActorMeta*) clutter_actor_get_effect (CLUTTER_ACTOR (box),
                                                             "shadow");
      clutter_actor_meta_set_enabled (shadow, TRUE);

      /* Restore the opened box to full opacity */
      clutter_actor_animate (CLUTTER_ACTOR (box), CLUTTER_EASE_IN_OUT_QUAD, 200,
                             "opacity", 255, NULL);

      priv->open_boxes ++;
    }
  else
    {
      priv->open_boxes --;
    }

  if (priv->open_boxes == 0)
    {
      /* restore all children to full opacity */
      for (l = priv->children; l; l = l->next)
        {
          clutter_actor_animate (l->data, CLUTTER_EASE_IN_OUT_QUAD, 200,
                                 "opacity", 255, NULL);
        }
      shadow = (ClutterActorMeta*) clutter_actor_get_effect (CLUTTER_ACTOR (box),
                                                             "shadow");
      clutter_actor_meta_set_enabled (shadow, FALSE);
    }

  g_object_notify (G_OBJECT (column), "opened");
}
开发者ID:ocrete,项目名称:media-explorer,代码行数:48,代码来源:mex-column.c


示例10: mx_menu_button_clicked_cb

static void
mx_menu_button_clicked_cb (ClutterActor *box,
                           MxAction     *action)
{
  MxMenu *menu;

  menu = MX_MENU (clutter_actor_get_parent (box));

  /* set the menu unreactive to prevent other items being hilighted */
  clutter_actor_set_reactive ((ClutterActor*) menu, FALSE);


  g_object_ref (menu);
  g_object_ref (action);

  g_signal_emit (menu, signals[ACTION_ACTIVATED], 0, action);
  g_signal_emit_by_name (action, "activated");

  clutter_actor_animate (CLUTTER_ACTOR (menu), CLUTTER_LINEAR, 250,
                         "opacity", (guchar) 0,
                         "signal-swapped::completed", clutter_actor_hide, menu,
                         NULL);

  g_object_unref (action);
  g_object_unref (menu);
}
开发者ID:jku,项目名称:mx,代码行数:26,代码来源:mx-menu.c


示例11: mx_menu_event

static gboolean
mx_menu_event (ClutterActor *actor,
               ClutterEvent *event)
{
  /* We swallow mouse events so that they don't fall through to whatever's
   * beneath us.
   */
  switch (event->type)
    {
    case CLUTTER_MOTION:
    case CLUTTER_BUTTON_PRESS:
    case CLUTTER_BUTTON_RELEASE:
    case CLUTTER_SCROLL:
      return TRUE;

    case CLUTTER_KEY_PRESS:
    case CLUTTER_KEY_RELEASE:
      /* hide the menu if the escape key was pressed */
      if (((ClutterKeyEvent*) event)->keyval == CLUTTER_KEY_Escape
          && CLUTTER_ACTOR_IS_VISIBLE (actor))
        {
          clutter_actor_set_reactive (actor, FALSE);
          clutter_actor_animate (actor, CLUTTER_LINEAR, 250,
                                 "opacity", (guchar) 0,
                                 "signal-swapped::completed",
                                 clutter_actor_hide,
                                 actor,
                                 NULL);
        }

    default:
      return FALSE;
    }
}
开发者ID:jku,项目名称:mx,代码行数:34,代码来源:mx-menu.c


示例12: destroy

/*
 * Simple TV-out like effect.
 */
static void
destroy (MetaPlugin *plugin, MetaWindowActor *window_actor)
{
  MetaWindowType type;
  ClutterActor *actor = CLUTTER_ACTOR (window_actor);
  MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);

  type = meta_window_get_window_type (meta_window);

  if (type == META_WINDOW_NORMAL)
    {
      ClutterAnimation *animation;
      EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
      ActorPrivate *apriv = get_actor_private (window_actor);

      animation = clutter_actor_animate (actor,
                                         CLUTTER_EASE_OUT_QUAD,
                                         DESTROY_TIMEOUT,
                                         "opacity", 0,
                                         "scale-x", 0.8,
                                         "scale-y", 0.8,
                                         NULL);
      apriv->tml_destroy = clutter_animation_get_timeline (animation);
      data->plugin = plugin;
      data->actor = actor;
      g_signal_connect (apriv->tml_destroy, "completed",
                        G_CALLBACK (on_destroy_effect_complete),
                        data);
    }
  else
    meta_plugin_destroy_completed (plugin, window_actor);
}
开发者ID:linuxdeepin,项目名称:deepin-mutter,代码行数:35,代码来源:default.c


示例13: key_press_cb

/* change the texture size with +/- */
static gboolean
key_press_cb (ClutterActor *actor,
              ClutterEvent *event,
              gpointer      user_data)
{
  ClutterActor *texture;
  gfloat texture_width, texture_height;
  guint key_pressed;

  texture = CLUTTER_ACTOR (user_data);
  clutter_actor_get_size (texture, &texture_width, &texture_height);

  key_pressed = clutter_event_get_key_symbol (event);

  if (key_pressed == CLUTTER_KEY_plus)
    {
      texture_width *= 1.0 + TEXTURE_SIZE_STEP;
      texture_height *= 1.0 + TEXTURE_SIZE_STEP;
    }
  else if (key_pressed == CLUTTER_KEY_minus)
    {
      texture_width *= 1.0 - TEXTURE_SIZE_STEP;
      texture_height *= 1.0 - TEXTURE_SIZE_STEP;
    }

  if (texture_width <= TEXTURE_SIZE_MAX && texture_width >= TEXTURE_SIZE_MIN)
    clutter_actor_animate (texture, CLUTTER_EASE_OUT_CUBIC, 500,
                           "width", texture_width,
                           "height", texture_height,
                           NULL);

  return TRUE;
}
开发者ID:Distrotech,项目名称:clutter,代码行数:34,代码来源:layouts-bind-constraint-overlay.c


示例14: mex_column_view_opened_cb

static void
mex_column_view_opened_cb (MexColumn     *column,
                           GParamSpec    *pspec,
                           MexColumnView *column_view)
{
  MexColumnViewPrivate *priv = column_view->priv;

  if (mex_column_get_opened (column))
    clutter_actor_animate (priv->header,
                           CLUTTER_EASE_IN_OUT_QUAD, 200,
                           "opacity", 56, NULL);
  else
    clutter_actor_animate (priv->header,
                           CLUTTER_EASE_IN_OUT_QUAD, 200,
                           "opacity", 255, NULL);
}
开发者ID:frankopt,项目名称:media-explorer,代码行数:16,代码来源:mex-column-view.c


示例15: size_change

/* Setup the video texture once its size is known */
void size_change (ClutterActor *texture, gint width, gint height, gpointer user_data) {
    ClutterActor *stage;
    gfloat new_x, new_y, new_width, new_height;
    gfloat stage_width, stage_height;
    ClutterAnimation *animation = NULL;

    stage = clutter_actor_get_stage (texture);
    if (stage == NULL)
        return;

    clutter_actor_get_size (stage, &stage_width, &stage_height);

    /* Center video on window and calculate new size preserving aspect ratio */
    new_height = (height * stage_width) / width;
    if (new_height <= stage_height) {
        new_width = stage_width;

        new_x = 0;
        new_y = (stage_height - new_height) / 2;
    } else {
        new_width  = (width * stage_height) / height;
        new_height = stage_height;

        new_x = (stage_width - new_width) / 2;
        new_y = 0;
    }
    clutter_actor_set_position (texture, new_x, new_y);
    clutter_actor_set_size (texture, new_width, new_height);
    clutter_actor_set_rotation (texture, CLUTTER_Y_AXIS, 0.0, stage_width / 2, 0, 0);
    /* Animate it */
    animation = clutter_actor_animate (texture, CLUTTER_LINEAR, 10000, "rotation-angle-y", 360.0, NULL);
    clutter_animation_set_loop (animation, TRUE);
}
开发者ID:huamulan,项目名称:gst-sdk-tutorial,代码行数:34,代码来源:basic-tutorial-15.c


示例16: maximize

/*
 * The Nature of Maximize operation is such that it is difficult to do a visual
 * effect that would work well. Scaling, the obvious effect, does not work that
 * well, because at the end of the effect we end up with window content bigger
 * and differently laid out than in the real window; this is a proof concept.
 *
 * (Something like a sound would be more appropriate.)
 */
static void
maximize (MetaPlugin *plugin,
          MetaWindowActor *window_actor,
          gint end_x, gint end_y, gint end_width, gint end_height)
{
  MetaWindowType type;
  ClutterActor *actor = CLUTTER_ACTOR (window_actor);
  MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);

  gdouble  scale_x    = 1.0;
  gdouble  scale_y    = 1.0;
  gfloat   anchor_x   = 0;
  gfloat   anchor_y   = 0;

  type = meta_window_get_window_type (meta_window);

  if (type == META_WINDOW_NORMAL)
    {
      ClutterAnimation *animation;
      EffectCompleteData *data = g_new0 (EffectCompleteData, 1);
      ActorPrivate *apriv = get_actor_private (window_actor);
      gfloat width, height;
      gfloat x, y;

      apriv->is_maximized = TRUE;

      clutter_actor_get_size (actor, &width, &height);
      clutter_actor_get_position (actor, &x, &y);

      /*
       * Work out the scale and anchor point so that the window is expanding
       * smoothly into the target size.
       */
      scale_x = (gdouble)end_width / (gdouble) width;
      scale_y = (gdouble)end_height / (gdouble) height;

      anchor_x = (gdouble)(x - end_x)*(gdouble)width /
        ((gdouble)(end_width - width));
      anchor_y = (gdouble)(y - end_y)*(gdouble)height /
        ((gdouble)(end_height - height));

      clutter_actor_move_anchor_point (actor, anchor_x, anchor_y);

      animation = clutter_actor_animate (actor,
                                         CLUTTER_EASE_IN_SINE,
                                         MAXIMIZE_TIMEOUT,
                                         "scale-x", scale_x,
                                         "scale-y", scale_y,
                                         NULL);
      apriv->tml_maximize = clutter_animation_get_timeline (animation);
      data->plugin = plugin;
      data->actor = actor;
      g_signal_connect (apriv->tml_maximize, "completed",
                        G_CALLBACK (on_maximize_effect_complete),
                        data);
      return;
    }

  meta_plugin_maximize_completed (plugin, window_actor);
}
开发者ID:bighead85,项目名称:budgie-desktop,代码行数:68,代码来源:plugin.c


示例17: mnp_clock_tile_drag_begin

static void
mnp_clock_tile_drag_begin (MxDraggable *draggable, gfloat event_x, gfloat event_y, gint event_button, ClutterModifierType  modifiers)
{
	ClutterActor *self = CLUTTER_ACTOR (draggable);
	ClutterActor *stage = clutter_actor_get_stage (self);
	gfloat orig_x, orig_y;
	MnpClockTile *tile = (MnpClockTile *)draggable;
	gfloat width, height;
	MnpClockTilePriv *priv = tile->priv;
	clutter_actor_get_size (self, &width, &height);
	
	g_object_ref (self);

	if (priv->clone)
		clutter_actor_destroy (priv->clone);
	
	priv->clone = clutter_clone_new (self);

	tile->priv->depth = clutter_actor_get_depth (self);
	clutter_actor_get_transformed_position (self, &orig_x, &orig_y);
	//clutter_actor_reparent (self, stage);
	//clutter_actor_set_size (self, width, -1);
	//clutter_actor_raise_top (self);
	//clutter_actor_set_position (self, orig_x, orig_y);
	
	clutter_container_add_actor (CLUTTER_CONTAINER (stage), priv->clone);
	clutter_actor_set_position (priv->clone, orig_x, orig_y);
	clutter_actor_set_size (priv->clone, width, height);
	
	g_object_unref (self);

	clutter_actor_animate (self, CLUTTER_EASE_OUT_CUBIC, 250,
				"opacity", 0,
				NULL);
}
开发者ID:dudochkin-victor,项目名称:gogoo-panel-datetime,代码行数:35,代码来源:mnp-clock-tile.c


示例18: on_drag_begin

static void
on_drag_begin (ClutterDragAction   *action,
               ClutterActor        *actor,
               gfloat               event_x,
               gfloat               event_y,
               ClutterModifierType  modifiers)
{
  gboolean is_copy = (modifiers & CLUTTER_SHIFT_MASK) ? TRUE : FALSE;
  ClutterActor *drag_handle = NULL;

  if (is_copy)
    {
      ClutterActor *stage = clutter_actor_get_stage (actor);

      drag_handle = clutter_rectangle_new ();
      clutter_actor_set_size (drag_handle, 48, 48);

      clutter_rectangle_set_color (CLUTTER_RECTANGLE (drag_handle),
                                   CLUTTER_COLOR_DarkSkyBlue);

      clutter_container_add_actor (CLUTTER_CONTAINER (stage), drag_handle);
      clutter_actor_set_position (drag_handle, event_x, event_y);
    }
  else
    drag_handle = actor;

  clutter_drag_action_set_drag_handle (action, drag_handle);

  /* fully desaturate the actor */
  clutter_actor_animate (actor, CLUTTER_LINEAR, 150,
                         "@effects.disable.factor", 1.0,
                         NULL);
}
开发者ID:nobled,项目名称:clutter,代码行数:33,代码来源:test-drag.c


示例19: gnibbles_worm_handle_bonus

static void
gnibbles_worm_handle_bonus (GnibblesWorm *worm)
{
  ClutterActor *actor = NULL;

  if ((board->walls[worm->xhead][worm->yhead] != EMPTYCHAR) &&
    (board->walls[worm->xhead][worm->yhead] != WARPLETTER)) {
    actor = gnibbles_worm_get_head_actor (worm);
    g_signal_connect_after (
      clutter_actor_animate (actor, CLUTTER_EASE_OUT_QUINT, 420,
                            "scale-x", 1.45, "scale-y", 1.45,
                            "fixed::scale-gravity", CLUTTER_GRAVITY_CENTER,
                            NULL),
      "completed", G_CALLBACK (worm_grok_scale_down), actor);
    gnibbles_worm_grok_bonus (worm);

    if ((board->walls[worm->xhead][worm->yhead] == BONUSREGULAR + 'A') &&
        !gnibbles_boni_fake (boni, worm->xhead, worm->yhead)) {

      gnibbles_boni_remove_bonus_final (boni, worm->xhead, worm->yhead);

      if (boni->numleft != 0)
        gnibbles_board_level_add_bonus (board, 1);

    } else
        gnibbles_boni_remove_bonus_final (boni, worm->xhead, worm->yhead);
  }

  if (board->walls[worm->xhead][worm->yhead] == WARPLETTER) {
    gnibbles_warpmanager_worm_change_pos (warpmanager, worm);
    games_sound_play ("teleport");
  }
}
开发者ID:gfunkmonk2,项目名称:mate-games,代码行数:33,代码来源:worm.c


示例20: gnibbles_worm_reduce_tail

void
gnibbles_worm_reduce_tail (GnibblesWorm *worm, gint erasesize)
{
  gint i;
  gfloat x,y;
  ClutterActor *tmp = NULL;
  ClutterActor *group = clutter_group_new ();

  if (erasesize) {
    if (g_list_length (worm->list) <= erasesize) {
      gnibbles_worm_reset (worm);
      return;
    }

    for (i = 0; i < erasesize; i++) {
      tmp = gtk_clutter_texture_new_from_pixbuf (
              worm_pixmaps[properties->wormprops[worm->number]->color - 12]);
      clutter_actor_get_position
        (CLUTTER_ACTOR (g_list_last (worm->list)->data), &x, &y);
      clutter_actor_set_position (CLUTTER_ACTOR (tmp), x, y);
      clutter_actor_set_size (CLUTTER_ACTOR (tmp),
                              properties->tilesize,
                              properties->tilesize);
      clutter_container_add_actor (CLUTTER_CONTAINER (group), tmp);

      gnibbles_worm_move_tail_pointer (worm);
    }
    worm->length -= erasesize;
    clutter_container_add_actor (CLUTTER_CONTAINER (stage), group);

    clutter_actor_animate (group, CLUTTER_EASE_OUT_ELASTIC, 850,
                           "opacity", 0,
                           NULL);
  }
}
开发者ID:gfunkmonk2,项目名称:mate-games,代码行数:35,代码来源:worm.c



注:本文中的clutter_actor_animate函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ clutter_actor_destroy函数代码示例发布时间:2022-05-30
下一篇:
C++ clutter_actor_add_child函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap