include/SDL_timer.h
changeset 1895 c121d94672cb
parent 1358 c71e05b4dc2e
child 2859 99210400e8b9
     1.1 --- a/include/SDL_timer.h	Thu Jul 06 18:01:37 2006 +0000
     1.2 +++ b/include/SDL_timer.h	Mon Jul 10 21:04:37 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 + */
    1.36  extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
    1.37  
    1.38  /* Wait a specified number of milliseconds before returning */
    1.39  extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
    1.40  
    1.41  /* Function prototype for the timer callback function */
    1.42 -typedef Uint32 (SDLCALL *SDL_TimerCallback)(Uint32 interval);
    1.43 +typedef Uint32(SDLCALL * SDL_TimerCallback) (Uint32 interval);
    1.44  
    1.45  /* Set a callback to run after the specified number of milliseconds has
    1.46   * elapsed. The callback function is passed the current timer interval
    1.47 @@ -79,7 +85,8 @@
    1.48   *
    1.49   * This function returns 0 if successful, or -1 if there was an error.
    1.50   */
    1.51 -extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
    1.52 +extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval,
    1.53 +                                         SDL_TimerCallback callback);
    1.54  
    1.55  /* New timer API, supports multiple timers
    1.56   * Written by Stephane Peter <megastep@lokigames.com>
    1.57 @@ -91,7 +98,7 @@
    1.58   * passed in, the periodic alarm continues, otherwise a new alarm is
    1.59   * scheduled.  If the callback returns 0, the periodic alarm is cancelled.
    1.60   */
    1.61 -typedef Uint32 (SDLCALL *SDL_NewTimerCallback)(Uint32 interval, void *param);
    1.62 +typedef Uint32(SDLCALL * SDL_NewTimerCallback) (Uint32 interval, void *param);
    1.63  
    1.64  /* Definition of the timer ID type */
    1.65  typedef struct _SDL_TimerID *SDL_TimerID;
    1.66 @@ -99,7 +106,9 @@
    1.67  /* Add a new timer to the pool of timers already running.
    1.68     Returns a timer ID, or NULL when an error occurs.
    1.69   */
    1.70 -extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);
    1.71 +extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
    1.72 +                                                 SDL_NewTimerCallback
    1.73 +                                                 callback, void *param);
    1.74  
    1.75  /* Remove one of the multiple timers knowing its ID.
    1.76   * Returns a boolean value indicating success.
    1.77 @@ -108,8 +117,12 @@
    1.78  
    1.79  /* Ends C function definitions when using C++ */
    1.80  #ifdef __cplusplus
    1.81 +/* *INDENT-OFF* */
    1.82  }
    1.83 +/* *INDENT-ON* */
    1.84  #endif
    1.85  #include "close_code.h"
    1.86  
    1.87  #endif /* _SDL_timer_h */
    1.88 +
    1.89 +/* vi: set ts=4 sw=4 expandtab: */