include/SDL_joystick.h
changeset 7191 75360622e65f
parent 6974 11a03a79dfe8
child 7341 675c85d46f30
     1.1 --- a/include/SDL_joystick.h	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/include/SDL_joystick.h	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -21,7 +21,7 @@
     1.4  
     1.5  /**
     1.6   *  \file SDL_joystick.h
     1.7 - *  
     1.8 + *
     1.9   *  Include file for SDL joystick event handling
    1.10   *
    1.11   * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
    1.12 @@ -30,7 +30,7 @@
    1.13   * The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
    1.14   *   then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
    1.15   *
    1.16 - * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of 
    1.17 + * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
    1.18   *   the device (a X360 wired controller for example). This identifier is platform dependent.
    1.19   *
    1.20   *
    1.21 @@ -45,9 +45,7 @@
    1.22  #include "begin_code.h"
    1.23  /* Set up for C function definitions, even when using C++ */
    1.24  #ifdef __cplusplus
    1.25 -/* *INDENT-OFF* */
    1.26  extern "C" {
    1.27 -/* *INDENT-ON* */
    1.28  #endif
    1.29  
    1.30  /**
    1.31 @@ -64,7 +62,7 @@
    1.32  
    1.33  /* A structure that encodes the stable unique id for a joystick device */
    1.34  typedef struct {
    1.35 -	Uint8 data[16];
    1.36 +    Uint8 data[16];
    1.37  } SDL_JoystickGUID;
    1.38  
    1.39  typedef Sint32 SDL_JoystickID;
    1.40 @@ -84,11 +82,11 @@
    1.41  extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
    1.42  
    1.43  /**
    1.44 - *  Open a joystick for use.  
    1.45 - *  The index passed as an argument refers tothe N'th joystick on the system.  
    1.46 + *  Open a joystick for use.
    1.47 + *  The index passed as an argument refers tothe N'th joystick on the system.
    1.48   *  This index is the value which will identify this joystick in future joystick
    1.49   *  events.
    1.50 - *  
    1.51 + *
    1.52   *  \return A joystick identifier, or NULL if an error occurred.
    1.53   */
    1.54  extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
    1.55 @@ -98,7 +96,7 @@
    1.56   *  If no name can be found, this function returns NULL.
    1.57   */
    1.58  extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
    1.59 -	
    1.60 +
    1.61  /**
    1.62   *  Return the GUID for the joystick at this index
    1.63   */
    1.64 @@ -137,7 +135,7 @@
    1.65  
    1.66  /**
    1.67   *  Get the number of trackballs on a joystick.
    1.68 - *  
    1.69 + *
    1.70   *  Joystick trackballs have only relative motion events associated
    1.71   *  with them and their state cannot be polled.
    1.72   */
    1.73 @@ -155,7 +153,7 @@
    1.74  
    1.75  /**
    1.76   *  Update the current state of the open joysticks.
    1.77 - *  
    1.78 + *
    1.79   *  This is called automatically by the event loop if any joystick
    1.80   *  events are enabled.
    1.81   */
    1.82 @@ -163,20 +161,20 @@
    1.83  
    1.84  /**
    1.85   *  Enable/disable joystick event polling.
    1.86 - *  
    1.87 + *
    1.88   *  If joystick events are disabled, you must call SDL_JoystickUpdate()
    1.89   *  yourself and check the state of the joystick when you want joystick
    1.90   *  information.
    1.91 - *  
    1.92 + *
    1.93   *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
    1.94   */
    1.95  extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
    1.96  
    1.97  /**
    1.98   *  Get the current state of an axis control on a joystick.
    1.99 - *  
   1.100 + *
   1.101   *  The state is a value ranging from -32768 to 32767.
   1.102 - *  
   1.103 + *
   1.104   *  The axis indices start at index 0.
   1.105   */
   1.106  extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
   1.107 @@ -186,22 +184,22 @@
   1.108   *  \name Hat positions
   1.109   */
   1.110  /*@{*/
   1.111 -#define SDL_HAT_CENTERED	0x00
   1.112 -#define SDL_HAT_UP		0x01
   1.113 -#define SDL_HAT_RIGHT		0x02
   1.114 -#define SDL_HAT_DOWN		0x04
   1.115 -#define SDL_HAT_LEFT		0x08
   1.116 -#define SDL_HAT_RIGHTUP		(SDL_HAT_RIGHT|SDL_HAT_UP)
   1.117 -#define SDL_HAT_RIGHTDOWN	(SDL_HAT_RIGHT|SDL_HAT_DOWN)
   1.118 -#define SDL_HAT_LEFTUP		(SDL_HAT_LEFT|SDL_HAT_UP)
   1.119 -#define SDL_HAT_LEFTDOWN	(SDL_HAT_LEFT|SDL_HAT_DOWN)
   1.120 +#define SDL_HAT_CENTERED    0x00
   1.121 +#define SDL_HAT_UP      0x01
   1.122 +#define SDL_HAT_RIGHT       0x02
   1.123 +#define SDL_HAT_DOWN        0x04
   1.124 +#define SDL_HAT_LEFT        0x08
   1.125 +#define SDL_HAT_RIGHTUP     (SDL_HAT_RIGHT|SDL_HAT_UP)
   1.126 +#define SDL_HAT_RIGHTDOWN   (SDL_HAT_RIGHT|SDL_HAT_DOWN)
   1.127 +#define SDL_HAT_LEFTUP      (SDL_HAT_LEFT|SDL_HAT_UP)
   1.128 +#define SDL_HAT_LEFTDOWN    (SDL_HAT_LEFT|SDL_HAT_DOWN)
   1.129  /*@}*/
   1.130  
   1.131  /**
   1.132   *  Get the current state of a POV hat on a joystick.
   1.133   *
   1.134   *  The hat indices start at index 0.
   1.135 - *  
   1.136 + *
   1.137   *  \return The return value is one of the following positions:
   1.138   *           - ::SDL_HAT_CENTERED
   1.139   *           - ::SDL_HAT_UP
   1.140 @@ -218,9 +216,9 @@
   1.141  
   1.142  /**
   1.143   *  Get the ball axis change since the last poll.
   1.144 - *  
   1.145 + *
   1.146   *  \return 0, or -1 if you passed it invalid parameters.
   1.147 - *  
   1.148 + *
   1.149   *  The ball indices start at index 0.
   1.150   */
   1.151  extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
   1.152 @@ -228,7 +226,7 @@
   1.153  
   1.154  /**
   1.155   *  Get the current state of a button on a joystick.
   1.156 - *  
   1.157 + *
   1.158   *  The button indices start at index 0.
   1.159   */
   1.160  extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
   1.161 @@ -242,9 +240,7 @@
   1.162  
   1.163  /* Ends C function definitions when using C++ */
   1.164  #ifdef __cplusplus
   1.165 -/* *INDENT-OFF* */
   1.166  }
   1.167 -/* *INDENT-ON* */
   1.168  #endif
   1.169  #include "close_code.h"
   1.170