include/SDL_mouse.h
changeset 8927 be64f5daf64b
parent 8149 681eb46b8ac4
child 8945 04248c700ada
equal deleted inserted replaced
8783:400f1d2b9e52 8927:be64f5daf64b
   115  *  \sa SDL_GetRelativeMouseMode()
   115  *  \sa SDL_GetRelativeMouseMode()
   116  */
   116  */
   117 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
   117 extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
   118 
   118 
   119 /**
   119 /**
       
   120  *  \brief Capture the mouse, to track input outside an SDL window.
       
   121  *
       
   122  *  \param enabled Whether or not to enable capturing
       
   123  *
       
   124  *  Capturing enables your app to obtain mouse events globally, instead of
       
   125  *  just within your window. Not all video targets support this function.
       
   126  *  When capturing is enabled, the current window will get all mouse events,
       
   127  *  but unlike relative mode, no change is made to the cursor and it is
       
   128  *  not restrained to your window.
       
   129  *
       
   130  *  This function may also deny mouse input to other windows--both those in
       
   131  *  your application and others on the system--so you should use this
       
   132  *  function sparingly, and in small bursts. For example, you might want to
       
   133  *  track the mouse while the user is dragging something, until the user
       
   134  *  releases a mouse button. It is not recommended that you capture the mouse
       
   135  *  for long periods of time, such as the entire time your app is running.
       
   136  *
       
   137  *  While captured, mouse events still report coordinates relative to the
       
   138  *  current (foreground) window, but those coordinates may be outside the
       
   139  *  bounds of the window (including negative values). Capturing is only
       
   140  *  allowed for the foreground window. If the window loses focus while
       
   141  *  capturing, the capture will be disabled automatically.
       
   142  *
       
   143  *  While capturing is enabled, the current window will have the
       
   144  *  SDL_WINDOW_MOUSE_CAPTURE flag set.
       
   145  *
       
   146  *  \return 0 on success, or -1 if not supported.
       
   147  */
       
   148 extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
       
   149 
       
   150 /**
   120  *  \brief Query whether relative mouse mode is enabled.
   151  *  \brief Query whether relative mouse mode is enabled.
   121  *
   152  *
   122  *  \sa SDL_SetRelativeMouseMode()
   153  *  \sa SDL_SetRelativeMouseMode()
   123  */
   154  */
   124 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);
   155 extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);