include/SDL_joystick.h
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1358 c71e05b4dc2e
child 1668 4da1ee79c9af
     1.1 --- a/include/SDL_joystick.h	Sun May 21 17:27:13 2006 +0000
     1.2 +++ b/include/SDL_joystick.h	Sun May 28 13:04:16 2006 +0000
     1.3 @@ -20,7 +20,11 @@
     1.4      slouken@libsdl.org
     1.5  */
     1.6  
     1.7 -/* Include file for SDL joystick event handling */
     1.8 +/**
     1.9 + * \file SDL_joystick.h
    1.10 + *
    1.11 + * Include file for SDL joystick event handling
    1.12 + */
    1.13  
    1.14  #ifndef _SDL_joystick_h
    1.15  #define _SDL_joystick_h
    1.16 @@ -31,7 +35,9 @@
    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  /* In order to use these functions, SDL_Init() must have been called
    1.26 @@ -48,14 +54,14 @@
    1.27  /*
    1.28   * Count the number of joysticks attached to the system
    1.29   */
    1.30 -extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
    1.31 +extern DECLSPEC int SDLCALL SDL_NumJoysticks (void);
    1.32  
    1.33  /*
    1.34   * Get the implementation dependent name of a joystick.
    1.35   * This can be called before any joysticks are opened.
    1.36   * If no name can be found, this function returns NULL.
    1.37   */
    1.38 -extern DECLSPEC const char * SDLCALL SDL_JoystickName(int device_index);
    1.39 +extern DECLSPEC const char *SDLCALL SDL_JoystickName (int device_index);
    1.40  
    1.41  /*
    1.42   * Open a joystick for use - the index passed as an argument refers to
    1.43 @@ -64,46 +70,46 @@
    1.44   *
    1.45   * This function returns a joystick identifier, or NULL if an error occurred.
    1.46   */
    1.47 -extern DECLSPEC SDL_Joystick * SDLCALL SDL_JoystickOpen(int device_index);
    1.48 +extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen (int device_index);
    1.49  
    1.50  /*
    1.51   * Returns 1 if the joystick has been opened, or 0 if it has not.
    1.52   */
    1.53 -extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
    1.54 +extern DECLSPEC int SDLCALL SDL_JoystickOpened (int device_index);
    1.55  
    1.56  /*
    1.57   * Get the device index of an opened joystick.
    1.58   */
    1.59 -extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick *joystick);
    1.60 +extern DECLSPEC int SDLCALL SDL_JoystickIndex (SDL_Joystick * joystick);
    1.61  
    1.62  /*
    1.63   * Get the number of general axis controls on a joystick
    1.64   */
    1.65 -extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
    1.66 +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes (SDL_Joystick * joystick);
    1.67  
    1.68  /*
    1.69   * Get the number of trackballs on a joystick
    1.70   * Joystick trackballs have only relative motion events associated
    1.71   * with them and their state cannot be polled.
    1.72   */
    1.73 -extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
    1.74 +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls (SDL_Joystick * joystick);
    1.75  
    1.76  /*
    1.77   * Get the number of POV hats on a joystick
    1.78   */
    1.79 -extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
    1.80 +extern DECLSPEC int SDLCALL SDL_JoystickNumHats (SDL_Joystick * joystick);
    1.81  
    1.82  /*
    1.83   * Get the number of buttons on a joystick
    1.84   */
    1.85 -extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
    1.86 +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons (SDL_Joystick * joystick);
    1.87  
    1.88  /*
    1.89   * Update the current state of the open joysticks.
    1.90   * This is called automatically by the event loop if any joystick
    1.91   * events are enabled.
    1.92   */
    1.93 -extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
    1.94 +extern DECLSPEC void SDLCALL SDL_JoystickUpdate (void);
    1.95  
    1.96  /*
    1.97   * Enable/disable joystick event polling.
    1.98 @@ -112,14 +118,15 @@
    1.99   * information.
   1.100   * The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
   1.101   */
   1.102 -extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
   1.103 +extern DECLSPEC int SDLCALL SDL_JoystickEventState (int state);
   1.104  
   1.105  /*
   1.106   * Get the current state of an axis control on a joystick
   1.107   * The state is a value ranging from -32768 to 32767.
   1.108   * The axis indices start at index 0.
   1.109   */
   1.110 -extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);
   1.111 +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis (SDL_Joystick * joystick,
   1.112 +                                                    int axis);
   1.113  
   1.114  /*
   1.115   * Get the current state of a POV hat on a joystick
   1.116 @@ -137,31 +144,38 @@
   1.117  /*
   1.118   * The hat indices start at index 0.
   1.119   */
   1.120 -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);
   1.121 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat (SDL_Joystick * joystick,
   1.122 +                                                  int hat);
   1.123  
   1.124  /*
   1.125   * Get the ball axis change since the last poll
   1.126   * This returns 0, or -1 if you passed it invalid parameters.
   1.127   * The ball indices start at index 0.
   1.128   */
   1.129 -extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
   1.130 +extern DECLSPEC int SDLCALL SDL_JoystickGetBall (SDL_Joystick * joystick,
   1.131 +                                                 int ball, int *dx, int *dy);
   1.132  
   1.133  /*
   1.134   * Get the current state of a button on a joystick
   1.135   * The button indices start at index 0.
   1.136   */
   1.137 -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick, int button);
   1.138 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton (SDL_Joystick * joystick,
   1.139 +                                                     int button);
   1.140  
   1.141  /*
   1.142   * Close a joystick previously opened with SDL_JoystickOpen()
   1.143   */
   1.144 -extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
   1.145 +extern DECLSPEC void SDLCALL SDL_JoystickClose (SDL_Joystick * joystick);
   1.146  
   1.147  
   1.148  /* Ends C function definitions when using C++ */
   1.149  #ifdef __cplusplus
   1.150 +/* *INDENT-OFF* */
   1.151  }
   1.152 +/* *INDENT-ON* */
   1.153  #endif
   1.154  #include "close_code.h"
   1.155  
   1.156  #endif /* _SDL_joystick_h */
   1.157 +
   1.158 +/* vi: set ts=4 sw=4 expandtab: */