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"); } }
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); }
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); }
static void become_idle (ply_boot_splash_plugin_t *plugin, ply_trigger_t *idle_trigger) { stop_animation (plugin); ply_trigger_pull (idle_trigger, NULL); }
//-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- void sObject::destroy(void) { if(m_sprite_id != -1) { stop_animation(); PA_DeleteSprite(0, m_sprite_id); m_sprite_id = -1; } }
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(); }
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(); }
void animation_toggle(void) { dprintf("animation_toggle\r\n"); if (animation_is_running()) { stop_animation(); return; } set_animation(current_animation); start_animation(); }
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); }
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); }
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; }
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); } }
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; }
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); }
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); }
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); }
static void become_idle (ply_boot_splash_plugin_t *plugin, ply_trigger_t *idle_trigger) { stop_animation (plugin, idle_trigger); }
static void on_interrupt (ply_boot_splash_plugin_t *plugin) { ply_event_loop_exit (plugin->loop, 1); stop_animation (plugin, NULL); }
void set_and_start_animation(animation_names animation_by_name) { stop_animation(); set_animation(animation_by_name); start_animation(); }
void AnimateBox::rollover(void) { stop_animation(); curr_image = images.begin(); }