#include "SDL_internal.h"
#ifndef SDL_mouse_c_h_
#define SDL_mouse_c_h_
#define SDL_GLOBAL_MOUSE_ID 0
#define SDL_DEFAULT_MOUSE_ID 1
typedef struct SDL_CursorData SDL_CursorData;
struct SDL_Cursor;
typedef struct
{
Uint64 last_update;
int num_frames;
int current_frame;
struct SDL_Cursor **frames;
Uint32 *durations;
} SDL_CursorAnimation;
struct SDL_Cursor
{
SDL_CursorAnimation *animation;
SDL_CursorData *internal;
struct SDL_Cursor *next;
};
typedef struct
{
Uint64 last_timestamp;
double click_motion_x;
double click_motion_y;
Uint8 click_count;
} SDL_MouseClickState;
typedef struct
{
SDL_MouseID mouseID;
Uint32 buttonstate;
int num_clickstates;
SDL_MouseClickState *clickstate;
} SDL_MouseInputSource;
typedef struct
{
SDL_Cursor *(*CreateCursor)(SDL_Surface *surface, int hot_x, int hot_y);
SDL_Cursor *(*CreateAnimatedCursor)(SDL_CursorFrameInfo *frames, int frame_count, int hot_x, int hot_y);
SDL_Cursor *(*CreateSystemCursor)(SDL_SystemCursor id);
bool (*ShowCursor)(SDL_Cursor *cursor);
bool (*MoveCursor)(SDL_Cursor *cursor);
void (*FreeCursor)(SDL_Cursor *cursor);
bool (*WarpMouse)(SDL_Window *window, float x, float y);
bool (*WarpMouseGlobal)(float x, float y);
bool (*SetRelativeMouseMode)(bool enabled);
bool (*CaptureMouse)(SDL_Window *window);
SDL_MouseButtonFlags (*GetGlobalMouseState)(float *x, float *y);
SDL_MouseMotionTransformCallback ApplySystemScale;
void *system_scale_data;
SDL_MouseMotionTransformCallback InputTransform;
void *input_transform_data;
Uint8 integer_mode_flags; float integer_mode_residual_motion_x;
float integer_mode_residual_motion_y;
SDL_Window *focus;
float x;
float y;
float x_accu;
float y_accu;
float last_x, last_y; float residual_scroll_x;
float residual_scroll_y;
double click_motion_x;
double click_motion_y;
bool has_position;
bool relative_mode;
bool relative_mode_warp_motion;
bool relative_mode_hide_cursor;
bool relative_mode_center;
bool warp_emulation_hint;
bool warp_emulation_active;
bool warp_emulation_prohibited;
Uint64 last_center_warp_time_ns;
bool enable_normal_speed_scale;
float normal_speed_scale;
bool enable_relative_speed_scale;
float relative_speed_scale;
bool enable_relative_system_scale;
Uint32 double_click_time;
int double_click_radius;
bool touch_mouse_events;
bool mouse_touch_events;
bool pen_mouse_events;
bool pen_touch_events;
bool was_touch_mouse_events; bool added_mouse_touch_device; bool added_pen_touch_device; #ifdef SDL_PLATFORM_VITA
Uint8 vita_touch_mouse_device;
#endif
bool auto_capture;
bool capture_desired;
SDL_Window *capture_window;
int num_sources;
SDL_MouseInputSource *sources;
SDL_Cursor *cursors;
SDL_Cursor *def_cursor;
SDL_Cursor *cur_cursor;
bool cursor_visible;
void *internal;
} SDL_Mouse;
extern bool SDL_PreInitMouse(void);
extern void SDL_PostInitMouse(void);
extern bool SDL_IsMouse(Uint16 vendor, Uint16 product);
extern void SDL_AddMouse(SDL_MouseID mouseID, const char *name);
extern void SDL_RemoveMouse(SDL_MouseID mouseID);
extern SDL_Mouse *SDL_GetMouse(void);
extern void SDL_RedrawCursor(void);
extern void SDL_SetDefaultCursor(SDL_Cursor *cursor);
extern SDL_SystemCursor SDL_GetDefaultSystemCursor(void);
extern void SDL_UpdateCursorAnimation(void);
extern void SDL_SetMouseFocus(SDL_Window *window);
extern bool SDL_UpdateMouseCapture(bool force_release);
extern void SDL_SendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL_MouseID mouseID, bool relative, float x, float y);
extern void SDL_SendMouseButton(Uint64 timestamp, SDL_Window *window, SDL_MouseID mouseID, Uint8 button, bool down);
extern void SDL_SendMouseButtonClicks(Uint64 timestamp, SDL_Window *window, SDL_MouseID mouseID, Uint8 button, bool down, int clicks);
extern void SDL_SendMouseWheel(Uint64 timestamp, SDL_Window *window, SDL_MouseID mouseID, float x, float y, SDL_MouseWheelDirection direction);
extern void SDL_PerformWarpMouseInWindow(SDL_Window *window, float x, float y, bool ignore_relative_mode);
extern bool SDL_SetRelativeMouseMode(bool enabled);
extern bool SDL_GetRelativeMouseMode(void);
extern bool SDL_UpdateRelativeMouseMode(void);
extern void SDL_DisableMouseWarpEmulation(void);
#if 0#endif
extern bool SDL_MousePositionInWindow(SDL_Window *window, float x, float y);
extern void SDL_QuitMouse(void);
#endif