/** * @brief Stop an anim instance that is on the anim_render_list from playing */ int anim_stop_playing(anim_instance* instance) { Assert(instance != NULL); if ( anim_playing(instance) ) { anim_release_render_instance(instance); } return 0; }
void keep_playing(XtPointer data) { XEvent xev; lasttime = NULL_XtIntervalId; if (playing) { while (XtAppPending(App)) /* clear out event queue */ { /* before adding another timeout. */ XtAppNextEvent(App, &xev); XtDispatchEvent(&xev); } if (lasttime == NULL_XtIntervalId) lasttime = XtAppAddTimeOut(App, speed, (XtTimerCallbackProc)keep_playing, (XtPointer) NULL); anim_playing(); } }