include/SDL_timer.h
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1358 c71e05b4dc2e
child 1668 4da1ee79c9af
     1.1 --- a/include/SDL_timer.h	Sun May 21 17:27:13 2006 +0000
     1.2 +++ b/include/SDL_timer.h	Sun May 28 13:04:16 2006 +0000
     1.3 @@ -23,7 +23,11 @@
     1.4  #ifndef _SDL_timer_h
     1.5  #define _SDL_timer_h
     1.6  
     1.7 -/* Header for the SDL time management routines */
     1.8 +/**
     1.9 + * \file SDL_timer.h
    1.10 + *
    1.11 + * Header for the SDL time management routines
    1.12 + */
    1.13  
    1.14  #include "SDL_stdinc.h"
    1.15  #include "SDL_error.h"
    1.16 @@ -31,25 +35,27 @@
    1.17  #include "begin_code.h"
    1.18  /* Set up for C function definitions, even when using C++ */
    1.19  #ifdef __cplusplus
    1.20 +/* *INDENT-OFF* */
    1.21  extern "C" {
    1.22 +/* *INDENT-ON* */
    1.23  #endif
    1.24  
    1.25  /* This is the OS scheduler timeslice, in milliseconds */
    1.26  #define SDL_TIMESLICE		10
    1.27  
    1.28  /* This is the maximum resolution of the SDL timer on all platforms */
    1.29 -#define TIMER_RESOLUTION	10	/* Experimentally determined */
    1.30 +#define TIMER_RESOLUTION	10      /* Experimentally determined */
    1.31  
    1.32  /* Get the number of milliseconds since the SDL library initialization.
    1.33   * Note that this value wraps if the program runs for more than ~49 days.
    1.34 - */ 
    1.35 -extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
    1.36 + */
    1.37 +extern DECLSPEC Uint32 SDLCALL SDL_GetTicks (void);
    1.38  
    1.39  /* Wait a specified number of milliseconds before returning */
    1.40 -extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
    1.41 +extern DECLSPEC void SDLCALL SDL_Delay (Uint32 ms);
    1.42  
    1.43  /* Function prototype for the timer callback function */
    1.44 -typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval);
    1.45 +typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval);
    1.46  
    1.47  /* Set a callback to run after the specified number of milliseconds has
    1.48   * elapsed. The callback function is passed the current timer interval
    1.49 @@ -79,7 +85,8 @@
    1.50   *
    1.51   * This function returns 0 if successful, or -1 if there was an error.
    1.52   */
    1.53 -extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
    1.54 +extern DECLSPEC int SDLCALL SDL_SetTimer (Uint32 interval,
    1.55 +                                          SDL_TimerCallback callback);
    1.56  
    1.57  /* New timer API, supports multiple timers
    1.58   * Written by Stephane Peter <megastep@lokigames.com>
    1.59 @@ -91,7 +98,8 @@
    1.60   * passed in, the periodic alarm continues, otherwise a new alarm is
    1.61   * scheduled.  If the callback returns 0, the periodic alarm is cancelled.
    1.62   */
    1.63 -typedef Uint32 (SDLCALL *SDL_NewTimerCallback)(Uint32 interval, void *param);
    1.64 +typedef Uint32 (SDLCALL * SDL_NewTimerCallback) (Uint32 interval,
    1.65 +                                                 void *param);
    1.66  
    1.67  /* Definition of the timer ID type */
    1.68  typedef struct _SDL_TimerID *SDL_TimerID;
    1.69 @@ -99,17 +107,23 @@
    1.70  /* Add a new timer to the pool of timers already running.
    1.71     Returns a timer ID, or NULL when an error occurs.
    1.72   */
    1.73 -extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);
    1.74 +extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer (Uint32 interval,
    1.75 +                                                  SDL_NewTimerCallback
    1.76 +                                                  callback, void *param);
    1.77  
    1.78  /* Remove one of the multiple timers knowing its ID.
    1.79   * Returns a boolean value indicating success.
    1.80   */
    1.81 -extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID t);
    1.82 +extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer (SDL_TimerID t);
    1.83  
    1.84  /* Ends C function definitions when using C++ */
    1.85  #ifdef __cplusplus
    1.86 +/* *INDENT-OFF* */
    1.87  }
    1.88 +/* *INDENT-ON* */
    1.89  #endif
    1.90  #include "close_code.h"
    1.91  
    1.92  #endif /* _SDL_timer_h */
    1.93 +
    1.94 +/* vi: set ts=4 sw=4 expandtab: */