Commit 07e804d8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: remove unused mouse state display & window events

parent 57c428ea
......@@ -192,12 +192,6 @@ enum {
VOUT_DISPLAY_EVENT_CLOSE,
VOUT_DISPLAY_EVENT_KEY,
/* Full mouse state.
* You can use it OR use the other mouse events. The core will do
* the conversion.
*/
VOUT_DISPLAY_EVENT_MOUSE_STATE,
/* Mouse event */
VOUT_DISPLAY_EVENT_MOUSE_MOVED,
VOUT_DISPLAY_EVENT_MOUSE_PRESSED,
......@@ -366,11 +360,6 @@ static inline void vout_display_SendWindowState(vout_display_t *vd, unsigned sta
vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_WINDOW_STATE, state);
}
#endif
/* The mouse position (State and Moved event) must be expressed against vout_display_t::source unit */
static inline void vout_display_SendEventMouseState(vout_display_t *vd, int x, int y, int button_mask)
{
vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_MOUSE_STATE, x, y, button_mask);
}
static inline void vout_display_SendEventMouseMoved(vout_display_t *vd, int x, int y)
{
vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_MOUSE_MOVED, x, y);
......
......@@ -78,7 +78,6 @@ enum {
* Window mouse event type for vout_window_mouse_event_t
*/
enum vout_window_mouse_event_type {
VOUT_WINDOW_MOUSE_STATE,
VOUT_WINDOW_MOUSE_MOVED,
VOUT_WINDOW_MOUSE_PRESSED,
VOUT_WINDOW_MOUSE_RELEASED,
......@@ -318,21 +317,6 @@ static inline void vout_window_SendMouseEvent(vout_window_t *window,
window->owner.cbs->mouse_event(window, mouse);
}
/**
* Send a full mouse state
*
* The mouse position must be expressed against window unit. You can use this
* function of others vout_window_ReportMouse*() functions.
*/
static inline void vout_window_ReportMouseState(vout_window_t *window,
int x, int y, int button_mask)
{
const vout_window_mouse_event_t mouse = {
VOUT_WINDOW_MOUSE_STATE, x, y, button_mask
};
vout_window_SendMouseEvent(window, &mouse);
}
/**
* Send a mouse movement
*
......
......@@ -488,17 +488,6 @@ static void VoutDisplayEventMouse(vout_display_t *vd, int event, va_list args)
bool is_ignored = false;
switch (event) {
case VOUT_DISPLAY_EVENT_MOUSE_STATE: {
const int x = (int)va_arg(args, int);
const int y = (int)va_arg(args, int);
const int button_mask = (int)va_arg(args, int);
vlc_mouse_Init(&m);
m.i_x = x;
m.i_y = y;
m.i_pressed = button_mask;
break;
}
case VOUT_DISPLAY_EVENT_MOUSE_MOVED: {
const int x = (int)va_arg(args, int);
const int y = (int)va_arg(args, int);
......@@ -587,7 +576,6 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
vout_SendEventKey(osys->vout, key);
break;
}
case VOUT_DISPLAY_EVENT_MOUSE_STATE:
case VOUT_DISPLAY_EVENT_MOUSE_MOVED:
case VOUT_DISPLAY_EVENT_MOUSE_PRESSED:
case VOUT_DISPLAY_EVENT_MOUSE_RELEASED:
......@@ -1304,7 +1292,6 @@ static void SplitterEvent(vout_display_t *vd, int event, va_list args)
switch (event) {
#if 0
case VOUT_DISPLAY_EVENT_MOUSE_STATE:
case VOUT_DISPLAY_EVENT_MOUSE_MOVED:
case VOUT_DISPLAY_EVENT_MOUSE_PRESSED:
case VOUT_DISPLAY_EVENT_MOUSE_RELEASED:
......
......@@ -1396,7 +1396,6 @@ static void ThreadChangeWindowMouse(vout_thread_t *vout,
vout_display_t *vd = vout->p->display.vd;
switch (mouse->type)
{
case VOUT_WINDOW_MOUSE_STATE:
case VOUT_WINDOW_MOUSE_MOVED:
{
vout_display_place_t place;
......@@ -1412,10 +1411,7 @@ static void ThreadChangeWindowMouse(vout_thread_t *vout,
(int64_t)(mouse->y - place.y) *
vd->source.i_visible_height/ place.height;
if (mouse->type == VOUT_WINDOW_MOUSE_STATE)
vout_display_SendEventMouseState(vd, x, y, mouse->button_mask);
else
vout_display_SendEventMouseMoved(vd, x, y);
vout_display_SendEventMouseMoved(vd, x, y);
break;
}
case VOUT_WINDOW_MOUSE_PRESSED:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment