include/SDL_mouse.h
changeset 7191 75360622e65f
parent 7104 4e4ca313000c
child 8149 681eb46b8ac4
     1.1 --- a/include/SDL_mouse.h	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/include/SDL_mouse.h	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -21,7 +21,7 @@
     1.4  
     1.5  /**
     1.6   *  \file SDL_mouse.h
     1.7 - *  
     1.8 + *
     1.9   *  Include file for SDL mouse event handling.
    1.10   */
    1.11  
    1.12 @@ -35,9 +35,7 @@
    1.13  #include "begin_code.h"
    1.14  /* Set up for C function definitions, even when using C++ */
    1.15  #ifdef __cplusplus
    1.16 -/* *INDENT-OFF* */
    1.17  extern "C" {
    1.18 -/* *INDENT-ON* */
    1.19  #endif
    1.20  
    1.21  typedef struct SDL_Cursor SDL_Cursor;   /* Implementation dependent */
    1.22 @@ -71,7 +69,7 @@
    1.23  
    1.24  /**
    1.25   *  \brief Retrieve the current state of the mouse.
    1.26 - *  
    1.27 + *
    1.28   *  The current button state is returned as a button bitmask, which can
    1.29   *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the
    1.30   *  mouse cursor position relative to the focus window for the currently
    1.31 @@ -90,11 +88,11 @@
    1.32  
    1.33  /**
    1.34   *  \brief Moves the mouse to the given position within the window.
    1.35 - *  
    1.36 + *
    1.37   *  \param window The window to move the mouse into, or NULL for the current mouse focus
    1.38   *  \param x The x coordinate within the window
    1.39   *  \param y The y coordinate within the window
    1.40 - *  
    1.41 + *
    1.42   *  \note This function generates a mouse motion event
    1.43   */
    1.44  extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
    1.45 @@ -102,25 +100,25 @@
    1.46  
    1.47  /**
    1.48   *  \brief Set relative mouse mode.
    1.49 - *  
    1.50 + *
    1.51   *  \param enabled Whether or not to enable relative mode
    1.52   *
    1.53   *  \return 0 on success, or -1 if relative mode is not supported.
    1.54 - *  
    1.55 + *
    1.56   *  While the mouse is in relative mode, the cursor is hidden, and the
    1.57   *  driver will try to report continuous motion in the current window.
    1.58   *  Only relative motion events will be delivered, the mouse position
    1.59   *  will not change.
    1.60 - *  
    1.61 + *
    1.62   *  \note This function will flush any pending mouse motion.
    1.63 - *  
    1.64 + *
    1.65   *  \sa SDL_GetRelativeMouseMode()
    1.66   */
    1.67  extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
    1.68  
    1.69  /**
    1.70   *  \brief Query whether relative mouse mode is enabled.
    1.71 - *  
    1.72 + *
    1.73   *  \sa SDL_SetRelativeMouseMode()
    1.74   */
    1.75  extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
    1.76 @@ -128,19 +126,19 @@
    1.77  /**
    1.78   *  \brief Create a cursor, using the specified bitmap data and
    1.79   *         mask (in MSB format).
    1.80 - *  
    1.81 + *
    1.82   *  The cursor width must be a multiple of 8 bits.
    1.83 - *  
    1.84 + *
    1.85   *  The cursor is created in black and white according to the following:
    1.86   *  <table>
    1.87   *  <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>
    1.88   *  <tr><td>  0   </td><td>  1   </td><td> White </td></tr>
    1.89   *  <tr><td>  1   </td><td>  1   </td><td> Black </td></tr>
    1.90   *  <tr><td>  0   </td><td>  0   </td><td> Transparent </td></tr>
    1.91 - *  <tr><td>  1   </td><td>  0   </td><td> Inverted color if possible, black 
    1.92 + *  <tr><td>  1   </td><td>  0   </td><td> Inverted color if possible, black
    1.93   *                                         if not. </td></tr>
    1.94   *  </table>
    1.95 - *  
    1.96 + *
    1.97   *  \sa SDL_FreeCursor()
    1.98   */
    1.99  extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,
   1.100 @@ -150,7 +148,7 @@
   1.101  
   1.102  /**
   1.103   *  \brief Create a color cursor.
   1.104 - *  
   1.105 + *
   1.106   *  \sa SDL_FreeCursor()
   1.107   */
   1.108  extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,
   1.109 @@ -181,17 +179,17 @@
   1.110  
   1.111  /**
   1.112   *  \brief Frees a cursor created with SDL_CreateCursor().
   1.113 - *  
   1.114 + *
   1.115   *  \sa SDL_CreateCursor()
   1.116   */
   1.117  extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
   1.118  
   1.119  /**
   1.120   *  \brief Toggle whether or not the cursor is shown.
   1.121 - *  
   1.122 - *  \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current 
   1.123 + *
   1.124 + *  \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current
   1.125   *                state.
   1.126 - *  
   1.127 + *
   1.128   *  \return 1 if the cursor is shown, or 0 if the cursor is hidden.
   1.129   */
   1.130  extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
   1.131 @@ -202,24 +200,22 @@
   1.132   *   - Button 2:  Middle mouse button
   1.133   *   - Button 3:  Right mouse button
   1.134   */
   1.135 -#define SDL_BUTTON(X)		(1 << ((X)-1))
   1.136 -#define SDL_BUTTON_LEFT		1
   1.137 -#define SDL_BUTTON_MIDDLE	2
   1.138 -#define SDL_BUTTON_RIGHT	3
   1.139 -#define SDL_BUTTON_X1		4
   1.140 -#define SDL_BUTTON_X2		5
   1.141 -#define SDL_BUTTON_LMASK	SDL_BUTTON(SDL_BUTTON_LEFT)
   1.142 -#define SDL_BUTTON_MMASK	SDL_BUTTON(SDL_BUTTON_MIDDLE)
   1.143 -#define SDL_BUTTON_RMASK	SDL_BUTTON(SDL_BUTTON_RIGHT)
   1.144 -#define SDL_BUTTON_X1MASK	SDL_BUTTON(SDL_BUTTON_X1)
   1.145 -#define SDL_BUTTON_X2MASK	SDL_BUTTON(SDL_BUTTON_X2)
   1.146 +#define SDL_BUTTON(X)       (1 << ((X)-1))
   1.147 +#define SDL_BUTTON_LEFT     1
   1.148 +#define SDL_BUTTON_MIDDLE   2
   1.149 +#define SDL_BUTTON_RIGHT    3
   1.150 +#define SDL_BUTTON_X1       4
   1.151 +#define SDL_BUTTON_X2       5
   1.152 +#define SDL_BUTTON_LMASK    SDL_BUTTON(SDL_BUTTON_LEFT)
   1.153 +#define SDL_BUTTON_MMASK    SDL_BUTTON(SDL_BUTTON_MIDDLE)
   1.154 +#define SDL_BUTTON_RMASK    SDL_BUTTON(SDL_BUTTON_RIGHT)
   1.155 +#define SDL_BUTTON_X1MASK   SDL_BUTTON(SDL_BUTTON_X1)
   1.156 +#define SDL_BUTTON_X2MASK   SDL_BUTTON(SDL_BUTTON_X2)
   1.157  
   1.158  
   1.159  /* Ends C function definitions when using C++ */
   1.160  #ifdef __cplusplus
   1.161 -/* *INDENT-OFF* */
   1.162  }
   1.163 -/* *INDENT-ON* */
   1.164  #endif
   1.165  #include "close_code.h"
   1.166