[vlc-commits] vout: remove unused mouse state display & window events
Rémi Denis-Courmont
git at videolan.org
Sun May 20 19:51:08 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May 18 18:55:40 2018 +0300| [07e804d8a10d59dc94823575586cc3aede32a3aa] | committer: Rémi Denis-Courmont
vout: remove unused mouse state display & window events
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07e804d8a10d59dc94823575586cc3aede32a3aa
---
include/vlc_vout_display.h | 11 -----------
include/vlc_vout_window.h | 16 ----------------
src/video_output/display.c | 13 -------------
src/video_output/video_output.c | 6 +-----
4 files changed, 1 insertion(+), 45 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 4d0f418dea..5da04e82b1 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -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);
diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index f764c38fc1..c674c262c2 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -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,
@@ -319,21 +318,6 @@ static inline void vout_window_SendMouseEvent(vout_window_t *window,
}
/**
- * 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
*
* The mouse position must be expressed against window unit.
diff --git a/src/video_output/display.c b/src/video_output/display.c
index a27d721de8..95e1e8b529 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -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:
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 25b75d7e8b..4d10566d91 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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:
More information about the vlc-commits
mailing list