src/events/SDL_mouse_c.h
changeset 4465 3e69e077cb95
parent 3697 f7b03b6838cb
child 4484 9322f7db8603
     1.1 --- a/src/events/SDL_mouse_c.h	Sun May 09 19:55:28 2010 -0700
     1.2 +++ b/src/events/SDL_mouse_c.h	Sun May 09 20:47:22 2010 -0700
     1.3 @@ -24,108 +24,33 @@
     1.4  #ifndef _SDL_mouse_c_h
     1.5  #define _SDL_mouse_c_h
     1.6  
     1.7 -typedef struct SDL_Mouse SDL_Mouse;
     1.8 -
     1.9  struct SDL_Cursor
    1.10  {
    1.11 -    SDL_Mouse *mouse;
    1.12      SDL_Cursor *next;
    1.13      void *driverdata;
    1.14  };
    1.15  
    1.16 -struct SDL_Mouse
    1.17 -{
    1.18 -    /* Create a cursor from a surface */
    1.19 -    SDL_Cursor *(*CreateCursor) (SDL_Surface * surface, int hot_x, int hot_y);
    1.20 -
    1.21 -    /* Show the specified cursor, or hide if cursor is NULL */
    1.22 -    int (*ShowCursor) (SDL_Cursor * cursor);
    1.23 -
    1.24 -    /* This is called when a mouse motion event occurs */
    1.25 -    void (*MoveCursor) (SDL_Cursor * cursor);
    1.26 -
    1.27 -    /* Free a window manager cursor */
    1.28 -    void (*FreeCursor) (SDL_Cursor * cursor);
    1.29 -
    1.30 -    /* Warp the mouse to (x,y) */
    1.31 -    void (*WarpMouse) (SDL_Mouse * mouse, SDL_Window * window, int x,
    1.32 -                       int y);
    1.33 -
    1.34 -    /* Free the mouse when it's time */
    1.35 -    void (*FreeMouse) (SDL_Mouse * mouse);
    1.36 -
    1.37 -    /* data common for tablets */
    1.38 -    int pressure;
    1.39 -    int pressure_max;
    1.40 -    int pressure_min;
    1.41 -    int tilt;                   /* for future use */
    1.42 -    int rotation;               /* for future use */
    1.43 -    int total_ends;
    1.44 -    int current_end;
    1.45 -
    1.46 -    /* Data common to all mice */
    1.47 -    int id;
    1.48 -    SDL_Window *focus;
    1.49 -    int which;
    1.50 -    int x;
    1.51 -    int y;
    1.52 -    int z;                      /* for future use */
    1.53 -    int xdelta;
    1.54 -    int ydelta;
    1.55 -    int last_x, last_y;         /* the last reported x and y coordinates */
    1.56 -    char *name;
    1.57 -    Uint8 buttonstate;
    1.58 -    SDL_bool relative_mode;
    1.59 -    SDL_bool proximity;
    1.60 -    SDL_bool flush_motion;
    1.61 -
    1.62 -    SDL_Cursor *cursors;
    1.63 -    SDL_Cursor *def_cursor;
    1.64 -    SDL_Cursor *cur_cursor;
    1.65 -    SDL_bool cursor_shown;
    1.66 -
    1.67 -    void *driverdata;
    1.68 -};
    1.69 -
    1.70  /* Initialize the mouse subsystem */
    1.71  extern int SDL_MouseInit(void);
    1.72  
    1.73 -/* Get the mouse at an index */
    1.74 -extern SDL_Mouse *SDL_GetMouse(int index);
    1.75 -
    1.76 -/* Add a mouse, possibly reattaching at a particular index (or -1),
    1.77 -   returning the index of the mouse, or -1 if there was an error.
    1.78 - */
    1.79 -extern int SDL_AddMouse(const SDL_Mouse * mouse, char *name,
    1.80 -                        int pressure_max, int pressure_min, int ends);
    1.81 -
    1.82 -/* Remove a mouse at an index, clearing the slot for later */
    1.83 -extern void SDL_DelMouse(int index);
    1.84 -
    1.85 -/* Clear the button state of a mouse at an index */
    1.86 -extern void SDL_ResetMouse(int index);
    1.87 +/* Clear the mouse state */
    1.88 +extern void SDL_ResetMouse(void);
    1.89  
    1.90  /* Set the mouse focus window */
    1.91 -extern void SDL_SetMouseFocus(int id, SDL_Window * window);
    1.92 +extern void SDL_SetMouseFocus(SDL_Window * window);
    1.93  
    1.94 -/* Send a mouse motion event for a mouse */
    1.95 -extern int SDL_SendMouseMotion(int id, int relative, int x, int y, int z);
    1.96 +/* Send a mouse motion event */
    1.97 +extern int SDL_SendMouseMotion(int relative, int x, int y);
    1.98  
    1.99 -/* Send a mouse button event for a mouse */
   1.100 -extern int SDL_SendMouseButton(int id, Uint8 state, Uint8 button);
   1.101 +/* Send a mouse button event */
   1.102 +extern int SDL_SendMouseButton(Uint8 state, Uint8 button);
   1.103  
   1.104 -/* Send a mouse wheel event for a mouse */
   1.105 -extern int SDL_SendMouseWheel(int id, int x, int y);
   1.106 -
   1.107 -/* Send a proximity event for a mouse */
   1.108 -extern int SDL_SendProximity(int id, int x, int y, int type);
   1.109 +/* Send a mouse wheel event */
   1.110 +extern int SDL_SendMouseWheel(int x, int y);
   1.111  
   1.112  /* Shutdown the mouse subsystem */
   1.113  extern void SDL_MouseQuit(void);
   1.114  
   1.115 -/* FIXME: Where do these functions go in this header? */
   1.116 -extern void SDL_ChangeEnd(int id, int end);
   1.117 -
   1.118  #endif /* _SDL_mouse_c_h */
   1.119  
   1.120  /* vi: set ts=4 sw=4 expandtab: */