93 return ( p_mouse->
i_pressed & (1 << i_button) ) != 0;
119 *pi_x = p_new->
i_x - p_old->
i_x;
120 *pi_y = p_new->
i_y - p_old->
i_y;
127 return p_old->
i_x != p_new->
i_x || p_old->
i_y != p_new->
i_y ||
133 return p_old->
i_x != p_new->
i_x || p_old->
i_y != p_new->
i_y;
144 const int i_mask = 1 << i_button;
151 const int i_mask = 1 << i_button;
Mouse state.
Definition: vlc_mouse.h:46
bool b_double_click
Definition: vlc_mouse.h:53
int i_pressed
Definition: vlc_mouse.h:51
int i_x
Definition: vlc_mouse.h:48
int i_y
Definition: vlc_mouse.h:49
This file is a collection of common definitions and types.
struct vlc_mouse_t vlc_mouse_t
Mouse state.
static void vlc_mouse_SetReleased(vlc_mouse_t *p_mouse, int i_button)
Definition: vlc_mouse.h:78
static bool vlc_mouse_IsWheelDownPressed(const vlc_mouse_t *p_mouse)
Definition: vlc_mouse.h:112
static bool vlc_mouse_IsRightPressed(const vlc_mouse_t *p_mouse)
Definition: vlc_mouse.h:104
static bool vlc_mouse_IsLeftPressed(const vlc_mouse_t *p_mouse)
Definition: vlc_mouse.h:96
vlc_mouse_button
Mouse buttons.
Definition: vlc_mouse.h:31
@ MOUSE_BUTTON_LEFT
Definition: vlc_mouse.h:32
@ MOUSE_BUTTON_WHEEL_LEFT
Definition: vlc_mouse.h:37
@ MOUSE_BUTTON_WHEEL_UP
Definition: vlc_mouse.h:35
@ MOUSE_BUTTON_RIGHT
Definition: vlc_mouse.h:34
@ MOUSE_BUTTON_WHEEL_DOWN
Definition: vlc_mouse.h:36
@ MOUSE_BUTTON_WHEEL_RIGHT
Definition: vlc_mouse.h:38
@ MOUSE_BUTTON_CENTER
Definition: vlc_mouse.h:33
@ MOUSE_BUTTON_MAX
Definition: vlc_mouse.h:39
static void vlc_mouse_Init(vlc_mouse_t *p_mouse)
Definition: vlc_mouse.h:64
static bool vlc_mouse_IsPressed(const vlc_mouse_t *p_mouse, int i_button)
Definition: vlc_mouse.h:91
static bool vlc_mouse_IsCenterPressed(const vlc_mouse_t *p_mouse)
Definition: vlc_mouse.h:100
static bool vlc_mouse_HasReleased(const vlc_mouse_t *p_old, const vlc_mouse_t *p_new, int i_button)
Definition: vlc_mouse.h:148
static bool vlc_mouse_HasPressed(const vlc_mouse_t *p_old, const vlc_mouse_t *p_new, int i_button)
Definition: vlc_mouse.h:141
static bool vlc_mouse_IsWheelUpPressed(const vlc_mouse_t *p_mouse)
Definition: vlc_mouse.h:108
static void vlc_mouse_GetMotion(int *pi_x, int *pi_y, const vlc_mouse_t *p_old, const vlc_mouse_t *p_new)
Definition: vlc_mouse.h:116
void(* vlc_mouse_event)(const vlc_mouse_t *mouse, void *user_data)
Mouse event callback.
Definition: vlc_mouse.h:62
static bool vlc_mouse_HasButton(const vlc_mouse_t *p_old, const vlc_mouse_t *p_new)
Definition: vlc_mouse.h:136
static void vlc_mouse_SetPressed(vlc_mouse_t *p_mouse, int i_button)
Definition: vlc_mouse.h:73
static bool vlc_mouse_HasChanged(const vlc_mouse_t *p_old, const vlc_mouse_t *p_new)
Definition: vlc_mouse.h:125
static void vlc_mouse_SetPosition(vlc_mouse_t *p_mouse, int i_x, int i_y)
Definition: vlc_mouse.h:83
static bool vlc_mouse_HasMoved(const vlc_mouse_t *p_old, const vlc_mouse_t *p_new)
Definition: vlc_mouse.h:131