示例#1
0
static VALUE
rbclt_stage_show_cursor (VALUE self)
{
  ClutterStage *stage = CLUTTER_STAGE (RVAL2GOBJ (self));
  clutter_stage_show_cursor (stage);
  return self;
}
示例#2
0
static void
show_controls (UserInterface * ui, gboolean vis)
{
  gboolean cursor;

  if (vis == TRUE && ui->controls_showing == TRUE) {
    // ToDo: add 3 more seconds to the controls hiding delay
    g_object_get (G_OBJECT (ui->stage), "cursor-visible", &cursor, NULL);
    if (!cursor)
      clutter_stage_show_cursor (CLUTTER_STAGE (ui->stage));
    if (ui->controls_timeout == -1) {
      ui->controls_timeout = g_timeout_add_seconds (CTL_SHOW_SEC,
          controls_timeout_cb, ui);
    }
  }

  else if (vis == TRUE && ui->controls_showing == FALSE) {
    ui->controls_showing = TRUE;

    progress_update_seekbar (ui);
    progress_update_text (ui);
    clutter_stage_show_cursor (CLUTTER_STAGE (ui->stage));
    clutter_actor_animate (ui->control_box, CLUTTER_EASE_OUT_QUINT,
        CTL_FADE_DURATION, "opacity", 0xa0, NULL);

    if (ui->controls_timeout == -1) {
      ui->controls_timeout = g_timeout_add_seconds (CTL_SHOW_SEC,
          controls_timeout_cb, ui);
    }
  }

  else if (vis == FALSE && ui->controls_showing == TRUE) {
    ui->controls_showing = FALSE;

    clutter_stage_hide_cursor (CLUTTER_STAGE (ui->stage));
    clutter_actor_animate (ui->control_box, CLUTTER_EASE_OUT_QUINT,
        CTL_FADE_DURATION, "opacity", 0, NULL);
  }
}
static gboolean
stage_motion_event_cb (ClutterActor *stage, ClutterEvent *event, ClutterActor *controls)
{
    if (g_object_get_data (G_OBJECT (controls), "cursor-in-controls") != NULL) {
        rb_debug ("bleep");
        return FALSE;
    }

    clutter_stage_show_cursor (CLUTTER_STAGE (stage));

    clutter_actor_show (controls);

    stop_hide_timer (controls);
    start_hide_timer (controls);

    return FALSE;
}
示例#4
0
文件: main.c 项目: aalex/jasm
/**
 * In windowed mode, shows the cursor.
 */
void on_unfullscreen(ClutterStage* stage, gpointer user_data)
{
    UNUSED(user_data);
    clutter_stage_show_cursor(stage);
    update_textures_sizes(stage);
}
示例#5
0
static void
show_cursor (void)
{
  clutter_stage_show_cursor (CLUTTER_STAGE (stage));
}