Mercurial > wgsdk
comparison src/include/timer.h @ 10:42ac054c0231
*: huge refactoring
dirtools now uses wchar (wayyy overdue)
the timer doesn't have a stupid design anymore
we don't use windows.h at all now
...
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 11 Feb 2024 19:43:31 -0500 |
parents | be4835547dd0 |
children |
comparison
equal
deleted
inserted
replaced
9:07f0e2f43204 | 10:42ac054c0231 |
---|---|
1 #ifndef __timer_h | 1 #ifndef __timer_h |
2 #define __timer_h | 2 #define __timer_h |
3 #ifndef WIN32_LEAN_AND_MEAN | 3 |
4 # define WIN32_LEAN_AND_MEAN | 4 #include <windef.h> |
5 #endif | 5 #include <winuser.h> |
6 #include <windows.h> | |
7 | 6 |
8 struct timer { | 7 struct timer { |
9 int initialized; | 8 UINT_PTR id; |
10 int is_timer_alive; | |
11 UINT interval; | 9 UINT interval; |
12 HWND winampClientWindow; | |
13 TIMERPROC timer_proc; | 10 TIMERPROC timer_proc; |
14 }; | 11 }; |
15 | 12 |
16 void timer_init(struct timer* timer, HWND winampClientWindow, TIMERPROC timer_proc); | 13 void timer_init(struct timer* timer, UINT interval, TIMERPROC timer_proc); |
17 void timer_set(struct timer* timer, HWND winampClientWindow); | 14 int timer_set(struct timer* timer); |
18 void timer_stop(struct timer* timer, HWND winampClientWindow); | 15 int timer_stop(struct timer* timer); |
19 | 16 |
20 #endif // __timer_h | 17 #endif // __timer_h |