From 10dbe966e120632efaae4cbd5c1336fc163e5c07 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 11 Aug 2015 12:11:48 +0200 Subject: Add WM_event_add/remove_timer_notifier() helpers. This basically does the 'timer' part of Jobs system: it sends a given notifier on every timer step. This is needed for background tasks (not full-fledged jobs, lighter BLI_tasks based) that want to update UI (like for up-comming new thumbnail handling in filebrowser). --- source/blender/windowmanager/WM_api.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/windowmanager/WM_api.h') diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 28e24e442ca..274265773a4 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -208,7 +208,9 @@ void wm_event_init_from_window(struct wmWindow *win, struct wmEvent *event); /* at maximum, every timestep seconds it triggers event_type events */ struct wmTimer *WM_event_add_timer(struct wmWindowManager *wm, struct wmWindow *win, int event_type, double timestep); +struct wmTimer *WM_event_add_timer_notifier(struct wmWindowManager *wm, struct wmWindow *win, unsigned int type, double timestep); void WM_event_remove_timer(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer); +void WM_event_remove_timer_notifier(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer); void WM_event_timer_sleep(struct wmWindowManager *wm, struct wmWindow *win, struct wmTimer *timer, bool do_sleep); /* operator api, default callbacks */ -- cgit v1.2.3