コード例 #1
0
ファイル: skitt.cpp プロジェクト: fallrisk/led_drapes
void Skitt::process_command(char *command)
{
	if (!strcmp(command, "play")) {
		printf("Starting to stream animations for single play mode... ");
		animation->setPlayMode(SINGLE);
		if (!this->start_animation()) {
			printf("Failed to start animation.\n");
		}
		printf("Animation started.\n");
	} else if (!strcmp(command,"loop")) {
		animation->setPlayMode(LOOP);
		if (!start_animation()) {
			printf("Failed to start animation.\n");
		}
		printf("Animation started.\n");
	} else if (!strcmp(command,"rand")) {
	} else if (!strcmp(command,"stop") || !strcmp(command,"q")) {
			printf("Stopping animation... ");
			stop_animation();
			stop_playback_loop();
			printf("Animation stopped.\n");
			done = true;
	} else {
		printf("Command not recognized.\n");
	}
}
コード例 #2
0
ファイル: plugin.c プロジェクト: AlfredArouna/plymouth
static void
destroy_plugin (ply_boot_splash_plugin_t *plugin)
{
  if (plugin == NULL)
    return;

  if (plugin->loop != NULL)
    {
      stop_animation (plugin);

      ply_event_loop_stop_watching_for_exit (plugin->loop, (ply_event_loop_exit_handler_t)
                                             detach_from_event_loop,
                                             plugin);
      detach_from_event_loop (plugin);
    }

  ply_image_free (plugin->box_image);
  ply_image_free (plugin->lock_image);

  if (plugin->corner_image != NULL)
    ply_image_free (plugin->corner_image);

  free_views (plugin);
  free (plugin);
}
コード例 #3
0
static void
destroy_plugin (ply_boot_splash_plugin_t *plugin)
{
  ply_list_node_t *node;
  script_env_var_t *env_var;

  if (plugin == NULL)
    return;

  if (plugin->loop != NULL)
    {
      stop_animation (plugin);
      ply_event_loop_stop_watching_for_exit (plugin->loop,
                                             (ply_event_loop_exit_handler_t)
                                             detach_from_event_loop,
                                             plugin);
      detach_from_event_loop (plugin);
    }

  for (node = ply_list_get_first_node (plugin->script_env_vars);
       node != NULL;
       node = ply_list_get_next_node (plugin->script_env_vars, node))
    {
      env_var = ply_list_node_get_data (node);
      free (env_var->key);
      free (env_var->value);
      free (env_var);
    }
  ply_list_free (plugin->script_env_vars);
  free (plugin->script_filename);
  free (plugin->image_dir);
  free (plugin);
}
コード例 #4
0
ファイル: plugin.c プロジェクト: AlfredArouna/plymouth
static void
become_idle (ply_boot_splash_plugin_t *plugin,
             ply_trigger_t            *idle_trigger)
{
  stop_animation (plugin);

  ply_trigger_pull (idle_trigger, NULL);
}
コード例 #5
0
ファイル: object.cpp プロジェクト: renatolond/DsTools
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void sObject::destroy(void)
{
  if(m_sprite_id != -1)
  {
    stop_animation();
    PA_DeleteSprite(0, m_sprite_id);
    m_sprite_id = -1;
  }
}
コード例 #6
0
ファイル: animation.cpp プロジェクト: alphaclon/tmk_keyboard
void animation_previous()
{
    stop_animation();
    if (current_animation == animation_type_o_matic)
        current_animation = animation_LAST;
    current_animation = (animation_names)decrement(current_animation, 1, 0, animation_LAST);
    dprintf("animation_previous: %u\n", current_animation);

    set_animation(current_animation);
    start_animation();
}
コード例 #7
0
ファイル: animation.cpp プロジェクト: alphaclon/tmk_keyboard
void animation_next()
{
    stop_animation();

    current_animation = (animation_names)increment(current_animation, 1, 0, animation_LAST);
    if (current_animation == animation_LAST)
        current_animation = animation_type_o_matic;
    dprintf("animation_next: %u\n", current_animation);

    set_animation(current_animation);
    start_animation();
}
コード例 #8
0
ファイル: animation.cpp プロジェクト: alphaclon/tmk_keyboard
void animation_toggle(void)
{
    dprintf("animation_toggle\r\n");

    if (animation_is_running())
    {
        stop_animation();
        return;
    }

    set_animation(current_animation);
    start_animation();
}
コード例 #9
0
ファイル: plugin.c プロジェクト: AlfredArouna/plymouth
static void
display_question (ply_boot_splash_plugin_t *plugin,
                  const char               *prompt,
                  const char               *entry_text)
{
  pause_views (plugin);
  if (plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL)
    stop_animation (plugin, NULL);

  plugin->state = PLY_BOOT_SPLASH_DISPLAY_QUESTION_ENTRY;
  show_prompt (plugin, prompt, entry_text);
  redraw_views (plugin);
  unpause_views (plugin);
}
コード例 #10
0
ファイル: plugin.c プロジェクト: AlfredArouna/plymouth
static void
display_password (ply_boot_splash_plugin_t *plugin,
                  const char               *prompt,
                  int                       bullets)
{
  pause_views (plugin);
  if (plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL)
    stop_animation (plugin, NULL);

  plugin->state = PLY_BOOT_SPLASH_DISPLAY_PASSWORD_ENTRY;
  show_password_prompt (plugin, prompt, bullets);
  redraw_views (plugin);
  unpause_views (plugin);
}
コード例 #11
0
ファイル: plugin.c プロジェクト: halfline/plymouth
static void
become_idle (ply_boot_splash_plugin_t *plugin,
             ply_trigger_t            *idle_trigger)
{
        ply_trace ("deactivation requested");
        if (plugin->is_idle) {
                ply_trace ("plugin is already idle");
                ply_trigger_pull (idle_trigger, NULL);
                return;
        }

        stop_animation (plugin, idle_trigger);
        plugin->is_idle = true;
}
コード例 #12
0
ファイル: plugin.c プロジェクト: magcius/plymouth
static void
hide_splash_screen (ply_boot_splash_plugin_t *plugin,
                    ply_event_loop_t         *loop)
{
        assert (plugin != NULL);

        if (plugin->loop != NULL) {
                stop_animation (plugin);

                ply_event_loop_stop_watching_for_exit (plugin->loop, (ply_event_loop_exit_handler_t)
                                                       detach_from_event_loop,
                                                       plugin);
                detach_from_event_loop (plugin);
        }
}
コード例 #13
0
ファイル: AnimateBox.cpp プロジェクト: edeproject/edelib
int AnimateBox::handle(int e) {
	int ret = Fl_Box::handle(e);
	if(!(flags & FLAG_ANIMATING_SHOW_HIDE)) return ret;

	switch(e) {
		case FL_SHOW:
			start_animation();
			E_DEBUG("starting animation\n");
			break;
		case FL_HIDE:
			stop_animation();
			break;
	}

	return ret;
}
コード例 #14
0
ファイル: plugin.c プロジェクト: magcius/plymouth
static void
display_question (ply_boot_splash_plugin_t *plugin,
                  const char               *prompt,
                  const char               *entry_text)
{
        pause_views (plugin);
        if (plugin->state == PLY_BOOT_SPLASH_DISPLAY_NORMAL)
                stop_animation (plugin);

        plugin->state = PLY_BOOT_SPLASH_DISPLAY_PASSWORD_ENTRY;

        if (!prompt)
                prompt = "Password";

        show_prompt (plugin, prompt, entry_text);

        unpause_views (plugin);
}
コード例 #15
0
ファイル: plugin.c プロジェクト: AlfredArouna/plymouth
static void
destroy_plugin (ply_boot_splash_plugin_t *plugin)
{
  if (plugin == NULL)
    return;

  if (plugin->loop != NULL)
    {
      stop_animation (plugin);
      ply_event_loop_stop_watching_for_exit (plugin->loop,
                                             (ply_event_loop_exit_handler_t)
                                             detach_from_event_loop,
                                             plugin);
      detach_from_event_loop (plugin);
    }

  free (plugin->script_filename);
  free (plugin->image_dir);
  free (plugin);
}
コード例 #16
0
ファイル: plugin.c プロジェクト: magcius/plymouth
static void
hide_splash_screen (ply_boot_splash_plugin_t *plugin,
                    ply_event_loop_t         *loop)
{
        assert (plugin != NULL);

        ply_trace ("hiding splash screen");

        if (plugin->loop != NULL) {
                stop_animation (plugin);

                ply_event_loop_stop_watching_for_exit (plugin->loop,
                                                       (ply_event_loop_exit_handler_t)
                                                       detach_from_event_loop,
                                                       plugin);
                detach_from_event_loop (plugin);
        }

        hide_views (plugin);
        ply_show_new_kernel_messages (true);
}
コード例 #17
0
ファイル: plugin.c プロジェクト: AlfredArouna/plymouth
static void
become_idle (ply_boot_splash_plugin_t *plugin,
             ply_trigger_t            *idle_trigger)
{
  stop_animation (plugin, idle_trigger);
}
コード例 #18
0
ファイル: plugin.c プロジェクト: AlfredArouna/plymouth
static void
on_interrupt (ply_boot_splash_plugin_t *plugin)
{
  ply_event_loop_exit (plugin->loop, 1);
  stop_animation (plugin, NULL);
}
コード例 #19
0
ファイル: animation.cpp プロジェクト: alphaclon/tmk_keyboard
void set_and_start_animation(animation_names animation_by_name)
{
    stop_animation();
    set_animation(animation_by_name);
    start_animation();
}
コード例 #20
0
ファイル: AnimateBox.cpp プロジェクト: edeproject/edelib
void AnimateBox::rollover(void) {
	stop_animation();
	curr_image = images.begin();
}