コード例 #1
0
static void
data_device_end_drag_grab (MetaWaylandDragGrab *drag_grab)
{
  if (drag_grab->drag_origin)
    {
      drag_grab->drag_origin = NULL;
      wl_list_remove (&drag_grab->drag_origin_listener.link);
    }

  if (drag_grab->drag_surface)
    {
      drag_grab->drag_surface = NULL;
      wl_list_remove (&drag_grab->drag_icon_listener.link);
    }

  if (drag_grab->drag_data_source)
    {
      drag_grab->drag_data_source->has_target = FALSE;
      wl_list_remove (&drag_grab->drag_data_source_listener.link);
    }

  if (drag_grab->feedback_actor)
    {
      clutter_actor_remove_all_children (drag_grab->feedback_actor);
      clutter_actor_destroy (drag_grab->feedback_actor);
    }

  drag_grab->seat->data_device.current_grab = NULL;

  drag_grab_focus (&drag_grab->generic, NULL);

  meta_wayland_pointer_end_grab (drag_grab->generic.pointer);
  g_slice_free (MetaWaylandDragGrab, drag_grab);
}
コード例 #2
0
ファイル: clutter-group.c プロジェクト: collinss/muffin
/**
 * clutter_group_remove_all:
 * @self: A #ClutterGroup
 *
 * Removes all children actors from the #ClutterGroup.
 *
 * Deprecated: 1.10: Use clutter_actor_remove_all_children() instead.
 */
void
clutter_group_remove_all (ClutterGroup *self)
{
  g_return_if_fail (CLUTTER_IS_GROUP (self));

  clutter_actor_remove_all_children (CLUTTER_ACTOR (self));
}
コード例 #3
0
static void
destroy_data_device_icon (struct wl_listener *listener, void *data)
{
  MetaWaylandDragGrab *drag_grab =
    wl_container_of (listener, drag_grab, drag_data_source_listener);

  drag_grab->drag_surface = NULL;

  if (drag_grab->feedback_actor)
    clutter_actor_remove_all_children (drag_grab->feedback_actor);
}
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);
}
コード例 #5
0
static void
mex_music_player_set_context (MexContentView *player,
                              MexModel       *model)
{
  MexMusicPlayerPrivate *priv = MEX_MUSIC_PLAYER (player)->priv;
  ClutterActor *box, *button;
  MexContent *content;
  gint i;

  if (priv->model)
    g_object_unref (priv->model);

  priv->model = model;

  if (model)
    g_object_ref (model);

  box = mex_script_get_actor (priv->script, "tracks");
  clutter_actor_remove_all_children (box);

  for (i = 0; (content = mex_model_get_content (model, i)); i++)
    {
      const gchar *title;

      title = mex_content_get_metadata (content, MEX_CONTENT_METADATA_TITLE);
      button = mx_button_new_with_label (title);
      mx_stylable_set_style_class (MX_STYLABLE (button), "Track");
      mx_button_set_is_toggle (MX_BUTTON (button), TRUE);
      g_object_set_data (G_OBJECT (button), "content", content);
      g_signal_connect (button, "clicked",
                        G_CALLBACK (mex_music_player_item_clicked), player);

      mx_button_set_icon_position (MX_BUTTON (button), MX_POSITION_RIGHT);

      clutter_actor_add_child (box, button);
    }
}