diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-22 15:57:53 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-22 15:57:53 +0300 |
commit | 9e38e6aeb03e29d053679141134875edbff23d4a (patch) | |
tree | 2b52f73663939e9ce2ed166536d416132024f6d0 /source/blender/windowmanager/WM_types.h | |
parent | 5e443fd45dcd753868e7578b08692c158e8ad657 (diff) |
2.5
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.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index bccbcc178ba..8944429ecb2 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -163,8 +163,17 @@ typedef struct wmTabletData { float Ytilt; /* as above */ } wmTabletData; -struct wmTimerHandle; -typedef struct wmTimerHandle wmTimerHandle; +typedef struct wmTimer { + struct wmTimer *next, *prev; + double timestep; /* set by timer user */ + + double duration; /* total running time in seconds */ + double delta; /* time since previous step in seconds */ + + double ltime; /* internal, last time timer was activated */ + int sleep; /* internal, put timers to sleep when needed */ +} wmTimer; + /* ****************** Messages ********************* */ |