Mercurial > sdl-ios-xcode
diff include/SDL_timer.h @ 4217:4c4113c2162c SDL-1.2
Fixed bug #706
Ken Bull 2009-02-25 13:22:02 PST
Adds Doxygen support for all headers (except config and boilerplate headers) in
the include folder for SDL-1.2 revision 4446.
While in general SDL is quite thoroughly commented, none of these comments are
correctly formatted for Doxygen and are generally inconsistent in their
formatting.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 21 Sep 2009 09:38:10 +0000 |
parents | a1b03ba2fcd0 |
children |
line wrap: on
line diff
--- a/include/SDL_timer.h Mon Sep 21 09:27:08 2009 +0000 +++ b/include/SDL_timer.h Mon Sep 21 09:38:10 2009 +0000 @@ -23,7 +23,9 @@ #ifndef _SDL_timer_h #define _SDL_timer_h -/* Header for the SDL time management routines */ +/** @file SDL_timer.h + * Header for the SDL time management routines + */ #include "SDL_stdinc.h" #include "SDL_error.h" @@ -34,24 +36,26 @@ extern "C" { #endif -/* This is the OS scheduler timeslice, in milliseconds */ +/** This is the OS scheduler timeslice, in milliseconds */ #define SDL_TIMESLICE 10 -/* This is the maximum resolution of the SDL timer on all platforms */ -#define TIMER_RESOLUTION 10 /* Experimentally determined */ +/** This is the maximum resolution of the SDL timer on all platforms */ +#define TIMER_RESOLUTION 10 /**< Experimentally determined */ -/* Get the number of milliseconds since the SDL library initialization. +/** + * Get the number of milliseconds since the SDL library initialization. * Note that this value wraps if the program runs for more than ~49 days. */ extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); -/* Wait a specified number of milliseconds before returning */ +/** Wait a specified number of milliseconds before returning */ extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); -/* Function prototype for the timer callback function */ +/** Function prototype for the timer callback function */ typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval); -/* Set a callback to run after the specified number of milliseconds has +/** + * Set a callback to run after the specified number of milliseconds has * elapsed. The callback function is passed the current timer interval * and returns the next timer interval. If the returned value is the * same as the one passed in, the periodic alarm continues, otherwise a @@ -68,7 +72,7 @@ * later on an unloaded system. If you wanted to set a flag signaling * a frame update at 30 frames per second (every 33 ms), you might set a * timer for 30 ms: - * SDL_SetTimer((33/10)*10, flag_update); + * @code SDL_SetTimer((33/10)*10, flag_update); @endcode * * If you use this function, you need to pass SDL_INIT_TIMER to SDL_Init(). * @@ -81,11 +85,14 @@ */ extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback); -/* New timer API, supports multiple timers +/** @name New timer API + * New timer API, supports multiple timers * Written by Stephane Peter <megastep@lokigames.com> */ +/*@{*/ -/* Function prototype for the new timer callback function. +/** + * Function prototype for the new timer callback function. * The callback function is passed the current timer interval and returns * the next timer interval. If the returned value is the same as the one * passed in, the periodic alarm continues, otherwise a new alarm is @@ -93,19 +100,22 @@ */ typedef Uint32 (SDLCALL *SDL_NewTimerCallback)(Uint32 interval, void *param); -/* Definition of the timer ID type */ +/** Definition of the timer ID type */ typedef struct _SDL_TimerID *SDL_TimerID; -/* Add a new timer to the pool of timers already running. - Returns a timer ID, or NULL when an error occurs. +/** Add a new timer to the pool of timers already running. + * Returns a timer ID, or NULL when an error occurs. */ extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param); -/* Remove one of the multiple timers knowing its ID. +/** + * Remove one of the multiple timers knowing its ID. * Returns a boolean value indicating success. */ extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID t); +/*@}*/ + /* Ends C function definitions when using C++ */ #ifdef __cplusplus }