Mercurial > wgsdk
diff 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 |
line wrap: on
line diff
--- a/src/include/timer.h Fri Dec 16 21:55:37 2022 -0500 +++ b/src/include/timer.h Sun Feb 11 19:43:31 2024 -0500 @@ -1,20 +1,17 @@ #ifndef __timer_h #define __timer_h -#ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -#endif -#include <windows.h> + +#include <windef.h> +#include <winuser.h> struct timer { - int initialized; - int is_timer_alive; + UINT_PTR id; UINT interval; - HWND winampClientWindow; TIMERPROC timer_proc; }; -void timer_init(struct timer* timer, HWND winampClientWindow, TIMERPROC timer_proc); -void timer_set(struct timer* timer, HWND winampClientWindow); -void timer_stop(struct timer* timer, HWND winampClientWindow); +void timer_init(struct timer* timer, UINT interval, TIMERPROC timer_proc); +int timer_set(struct timer* timer); +int timer_stop(struct timer* timer); #endif // __timer_h \ No newline at end of file