src/events/SDL_mouse_c.h
changeset 2710 44e49d3fa6cf
parent 2152 003c1b5b07da
child 2712 c4e697245676
     1.1 --- a/src/events/SDL_mouse_c.h	Mon Aug 25 05:30:28 2008 +0000
     1.2 +++ b/src/events/SDL_mouse_c.h	Mon Aug 25 06:33:00 2008 +0000
     1.3 @@ -29,9 +29,7 @@
     1.4  struct SDL_Cursor
     1.5  {
     1.6      SDL_Mouse *mouse;
     1.7 -
     1.8      SDL_Cursor *next;
     1.9 -
    1.10      void *driverdata;
    1.11  };
    1.12  
    1.13 @@ -56,14 +54,27 @@
    1.14      /* Free the mouse when it's time */
    1.15      void (*FreeMouse) (SDL_Mouse * mouse);
    1.16  
    1.17 +    /* data common for tablets */
    1.18 +    int pressure;
    1.19 +    int pressure_max;
    1.20 +    int pressure_min;
    1.21 +    int tilt;                   /* for future use */
    1.22 +    int rotation;               /* for future use */
    1.23 +    int total_ends;
    1.24 +    int current_end;
    1.25 +
    1.26      /* Data common to all mice */
    1.27      SDL_WindowID focus;
    1.28 +    int which;
    1.29      int x;
    1.30      int y;
    1.31 +    int z;                      /* for future use */
    1.32      int xdelta;
    1.33      int ydelta;
    1.34 +    char *name;
    1.35      Uint8 buttonstate;
    1.36      SDL_bool relative_mode;
    1.37 +    SDL_bool proximity;
    1.38      SDL_bool flush_motion;
    1.39  
    1.40      SDL_Cursor *cursors;
    1.41 @@ -74,17 +85,23 @@
    1.42      void *driverdata;
    1.43  };
    1.44  
    1.45 -
    1.46  /* Initialize the mouse subsystem */
    1.47  extern int SDL_MouseInit(void);
    1.48  
    1.49  /* Get the mouse at an index */
    1.50  extern SDL_Mouse *SDL_GetMouse(int index);
    1.51  
    1.52 +/* Assign an id to a mouse at an index */
    1.53 +extern int SDL_SetMouseIndexId(int id, int index);
    1.54 +
    1.55 +/* Get the mouse by id */
    1.56 +extern SDL_Mouse *SDL_GetMouseByID(int id);
    1.57 +
    1.58  /* Add a mouse, possibly reattaching at a particular index (or -1),
    1.59     returning the index of the mouse, or -1 if there was an error.
    1.60   */
    1.61 -extern int SDL_AddMouse(const SDL_Mouse * mouse, int index);
    1.62 +extern int SDL_AddMouse(const SDL_Mouse * mouse, int index, char *name,
    1.63 +                        int pressure_max, int pressure_min, int ends);
    1.64  
    1.65  /* Remove a mouse at an index, clearing the slot for later */
    1.66  extern void SDL_DelMouse(int index);
    1.67 @@ -93,20 +110,24 @@
    1.68  extern void SDL_ResetMouse(int index);
    1.69  
    1.70  /* Set the mouse focus window */
    1.71 -extern void SDL_SetMouseFocus(int index, SDL_WindowID windowID);
    1.72 +extern void SDL_SetMouseFocus(int id, SDL_WindowID windowID);
    1.73  
    1.74  /* Send a mouse motion event for a mouse at an index */
    1.75 -extern int SDL_SendMouseMotion(int index, int relative, int x, int y);
    1.76 +extern int SDL_SendMouseMotion(int id, int relative, int x, int y, int z);
    1.77  
    1.78  /* Send a mouse button event for a mouse at an index */
    1.79 -extern int SDL_SendMouseButton(int index, Uint8 state, Uint8 button);
    1.80 +extern int SDL_SendMouseButton(int id, Uint8 state, Uint8 button);
    1.81  
    1.82  /* Send a mouse wheel event for a mouse at an index */
    1.83 -extern int SDL_SendMouseWheel(int index, int x, int y);
    1.84 +extern int SDL_SendMouseWheel(int id, int x, int y);
    1.85  
    1.86  /* Shutdown the mouse subsystem */
    1.87  extern void SDL_MouseQuit(void);
    1.88  
    1.89 +/* FIXME: Where do these functions go in this header? */
    1.90 +extern void SDL_UpdateCoordinates(int x, int y);
    1.91 +extern void SDL_ChangeEnd(int id, int end);
    1.92 +
    1.93  #endif /* _SDL_mouse_c_h */
    1.94  
    1.95  /* vi: set ts=4 sw=4 expandtab: */