1 /*
2  *     XaoS, a fast portable realtime fractal zoomer
3  *                  Copyright (C) 1996,1997 by
4  *
5  *      Jan Hubicka          (hubicka@paru.cas.cz)
6  *      Thomas Marsh         (tmarsh@austin.ibm.com)
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */
22 
23 #ifndef TIMERS_H
24 #define TIMERS_H
25 #include "config.h"
26 
27 struct timer;
28 struct timeemulator;
29 typedef struct timer tl_timer;
30 typedef struct timer tl_group;
31 
32 void tl_update_time(void);
33 tl_timer *tl_create_timer(void);
34 tl_group *tl_create_group(void);
35 void tl_set_interval(tl_timer *timer, int interval);
36 void tl_set_handler(tl_timer *timer, void (*handler)(void *), void *userdata);
37 void tl_set_multihandler(tl_timer *timer, void (*handler)(void *, int),
38                          void *userdata);
39 void tl_add_timer(tl_group *group, tl_timer *timer);
40 void tl_remove_timer(tl_timer *timer);
41 void tl_free_timer(tl_timer *timer);
42 void tl_free_group(tl_group *timer);
43 void tl_stop_timer(tl_timer *t);
44 void tl_resume_timer(tl_timer *t);
45 void tl_slowdown_timer(tl_timer *t, int time);
46 int tl_process_group(tl_group *group, int *activated);
47 extern tl_group *syncgroup;
48 void tl_sleep(int);
49 void tl_allegromode(int mode); /*Just for djgpp */
50 int tl_lookup_timer(tl_timer *t);
51 void tl_reset_timer(tl_timer *t);
52 
53 struct timeemulator *tl_create_emulator(void);
54 void tl_free_emulator(struct timeemulator *t);
55 void tl_elpased(struct timeemulator *t, int elpased);
56 void tl_emulate_timer(struct timer *t, struct timeemulator *e);
57 void tl_unemulate_timer(struct timer *t);
58 
59 #endif /* TIMER_H */
60