src/events/SDL_mouse_c.h
changeset 5371 fc3d3d580777
parent 5262 b530ef003506
child 5376 183ec2d4485c
     1.1 --- a/src/events/SDL_mouse_c.h	Sun Feb 20 23:51:59 2011 -0800
     1.2 +++ b/src/events/SDL_mouse_c.h	Mon Feb 21 10:50:53 2011 -0800
     1.3 @@ -24,15 +24,54 @@
     1.4  #ifndef _SDL_mouse_c_h
     1.5  #define _SDL_mouse_c_h
     1.6  
     1.7 +#include "SDL_mouse.h"
     1.8 +
     1.9  struct SDL_Cursor
    1.10  {
    1.11      struct SDL_Cursor *next;
    1.12      void *driverdata;
    1.13  };
    1.14  
    1.15 +typedef struct
    1.16 +{
    1.17 +    /* Create a cursor from a surface */
    1.18 +    SDL_Cursor *(*CreateCursor) (SDL_Surface * surface, int hot_x, int hot_y);
    1.19 +
    1.20 +    /* Show the specified cursor, or hide if cursor is NULL */
    1.21 +    int (*ShowCursor) (SDL_Cursor * cursor);
    1.22 +
    1.23 +    /* This is called when a mouse motion event occurs */
    1.24 +    void (*MoveCursor) (SDL_Cursor * cursor);
    1.25 +
    1.26 +    /* Free a window manager cursor */
    1.27 +    void (*FreeCursor) (SDL_Cursor * cursor);
    1.28 +
    1.29 +    /* Warp the mouse to (x,y) */
    1.30 +    void (*WarpMouse) (SDL_Window * window, int x, int y);
    1.31 +
    1.32 +    /* Data common to all mice */
    1.33 +    SDL_Window *focus;
    1.34 +    int x;
    1.35 +    int y;
    1.36 +    int xdelta;
    1.37 +    int ydelta;
    1.38 +    int last_x, last_y;         /* the last reported x and y coordinates */
    1.39 +    Uint8 buttonstate;
    1.40 +    SDL_bool relative_mode;
    1.41 +
    1.42 +    SDL_Cursor *cursors;
    1.43 +    SDL_Cursor *def_cursor;
    1.44 +    SDL_Cursor *cur_cursor;
    1.45 +    SDL_bool cursor_shown;
    1.46 +} SDL_Mouse;
    1.47 +
    1.48 +
    1.49  /* Initialize the mouse subsystem */
    1.50  extern int SDL_MouseInit(void);
    1.51  
    1.52 +/* Get the mouse state structure */
    1.53 +SDL_Mouse *SDL_GetMouse(void);
    1.54 +
    1.55  /* Clear the mouse state */
    1.56  extern void SDL_ResetMouse(void);
    1.57