/usr/include/allegro/timer.h is in liballegro4-dev 2:4.4.2-10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | /* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Timer routines.
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*/
#ifndef ALLEGRO_TIMER_H
#define ALLEGRO_TIMER_H
#include "base.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TIMERS_PER_SECOND 1193181L
#define SECS_TO_TIMER(x) ((long)(x) * TIMERS_PER_SECOND)
#define MSEC_TO_TIMER(x) ((long)(x) * (TIMERS_PER_SECOND / 1000))
#define BPS_TO_TIMER(x) (TIMERS_PER_SECOND / (long)(x))
#define BPM_TO_TIMER(x) ((60 * TIMERS_PER_SECOND) / (long)(x))
typedef struct TIMER_DRIVER
{
int id;
AL_CONST char *name;
AL_CONST char *desc;
AL_CONST char *ascii_name;
AL_METHOD(int, init, (void));
AL_METHOD(void, exit, (void));
AL_METHOD(int, install_int, (AL_METHOD(void, proc, (void)), long speed));
AL_METHOD(void, remove_int, (AL_METHOD(void, proc, (void))));
AL_METHOD(int, install_param_int, (AL_METHOD(void, proc, (void *param)), void *param, long speed));
AL_METHOD(void, remove_param_int, (AL_METHOD(void, proc, (void *param)), void *param));
AL_METHOD(int, can_simulate_retrace, (void));
AL_METHOD(void, simulate_retrace, (int enable));
AL_METHOD(void, rest, (unsigned int tyme, AL_METHOD(void, callback, (void))));
} TIMER_DRIVER;
AL_VAR(TIMER_DRIVER *, timer_driver);
AL_ARRAY(_DRIVER_INFO, _timer_driver_list);
AL_FUNC(int, install_timer, (void));
AL_FUNC(void, remove_timer, (void));
AL_FUNC(int, install_int_ex, (AL_METHOD(void, proc, (void)), long speed));
AL_FUNC(int, install_int, (AL_METHOD(void, proc, (void)), long speed));
AL_FUNC(void, remove_int, (AL_METHOD(void, proc, (void))));
AL_FUNC(int, install_param_int_ex, (AL_METHOD(void, proc, (void *param)), void *param, long speed));
AL_FUNC(int, install_param_int, (AL_METHOD(void, proc, (void *param)), void *param, long speed));
AL_FUNC(void, remove_param_int, (AL_METHOD(void, proc, (void *param)), void *param));
AL_VAR(volatile int, retrace_count);
AL_FUNC(void, rest, (unsigned int tyme));
AL_FUNC(void, rest_callback, (unsigned int tyme, AL_METHOD(void, callback, (void))));
#ifdef __cplusplus
}
#endif
#endif /* ifndef ALLEGRO_TIMER_H */
|