Better implementation of own window timers, not using ghost.
That makes blender's WM nice in control, and gives callers
of timers the opportunitie to evaluate time passed since
previous step. This system also only generates one timer 
event per main loop (events - handlers - notifiers - draw)

Small fix: allow keymap modifier to give KM_ANY to ignore
modifier keys, this to have TIMER keymap work.
This commit is contained in:
2008-12-22 12:57:53 +00:00
parent 5e443fd45d
commit 9e38e6aeb0
15 changed files with 186 additions and 84 deletions

View File

@@ -99,9 +99,10 @@ void WM_event_add_notifier(struct bContext *C, int type, int value, void *data)
void wm_event_add (wmWindow *win, struct wmEvent *event_to_add); /* XXX only for warning */
/* one-shot timer, returns wmTimerData.handle */
struct wmTimerHandle *WM_event_add_window_timer(wmWindow *win, int delay_ms, int interval_ms);
void WM_event_remove_window_timer(wmWindow *wm, struct wmTimerHandle *handle);
/* at maximum, every timestep seconds it triggers TIMER events */
struct wmTimer *WM_event_add_window_timer(wmWindow *win, double timestep);
void WM_event_remove_window_timer(wmWindow *win, struct wmTimer *timer);
void WM_event_window_timer_sleep(wmWindow *win, struct wmTimer *timer, int dosleep);
/* operator api, default callbacks */
/* confirm menu + exec */