[vlc-commits] Plug gestures on video output

Jean-Baptiste Kempf git at videolan.org
Sun Feb 16 23:52:09 CET 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Feb 16 18:30:44 2014 +0100| [956a6bc8726bca9c9c0cb6e7e70e0ba9d10a1b96] | committer: Jean-Baptiste Kempf

Plug gestures on video output

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=956a6bc8726bca9c9c0cb6e7e70e0ba9d10a1b96
---

 modules/video_output/Modules.am   |   15 ++++++++++-----
 modules/video_output/msw/events.c |   12 ++++++++++++
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index a58c7bc..d88d82a 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -119,7 +119,8 @@ endif
 
 ### Win32 ###
 libdirect2d_plugin_la_SOURCES = msw/direct2d.c \
-	msw/common.c msw/common.h msw/events.c msw/events.h
+	msw/common.c msw/common.h msw/events.c msw/events.h \
+	../control/win32touch.c ../control/win32touch.h
 libdirect2d_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DMODULE_NAME_IS_direct2d
 libdirect2d_plugin_la_LIBADD = -lgdi32 -lole32 -luuid
@@ -128,7 +129,8 @@ vout_LTLIBRARIES += $(LTLIBdirect2d)
 EXTRA_LTLIBRARIES += libdirect2d_plugin.la
 
 libdirect3d_plugin_la_SOURCES = msw/direct3d.c \
-	msw/common.c msw/common.h msw/events.c msw/events.h msw/builtin_shaders.h
+	msw/common.c msw/common.h msw/events.c msw/events.h msw/builtin_shaders.h \
+	../control/win32touch.c ../control/win32touch.h
 libdirect3d_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DMODULE_NAME_IS_direct3d
 libdirect3d_plugin_la_LIBADD = -lgdi32 -lole32 -luuid
@@ -137,7 +139,8 @@ vout_LTLIBRARIES += $(LTLIBdirect3d)
 EXTRA_LTLIBRARIES += libdirect3d_plugin.la
 
 libdirectdraw_plugin_la_SOURCES = msw/directx.c \
-	msw/common.c msw/common.h msw/events.c msw/events.h
+	msw/common.c msw/common.h msw/events.c msw/events.h \
+	../control/win32touch.c ../control/win32touch.h
 libdirectdraw_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DMODULE_NAME_IS_directdraw
 libdirectdraw_plugin_la_LIBADD = -luser32 -lgdi32 -lole32 -luuid
@@ -146,7 +149,8 @@ vout_LTLIBRARIES += libdirectdraw_plugin.la
 endif
 
 libglwin32_plugin_la_SOURCES = msw/glwin32.c opengl.c opengl.h \
-	msw/common.c msw/common.h msw/events.c msw/events.h
+	msw/common.c msw/common.h msw/events.c msw/events.h \
+	../control/win32touch.c ../control/win32touch.h
 libglwin32_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DMODULE_NAME_IS_glwin32
 libglwin32_plugin_la_LIBADD = -lopengl32 -lgdi32 -lole32 -luuid
@@ -155,7 +159,8 @@ vout_LTLIBRARIES += $(LTLIBglwin32)
 EXTRA_LTLIBRARIES += libglwin32_plugin.la
 
 libwingdi_plugin_la_SOURCES = msw/wingdi.c \
-	msw/common.c msw/common.h msw/events.c msw/events.h
+	msw/common.c msw/common.h msw/events.c msw/events.h \
+	../control/win32touch.c ../control/win32touch.h
 libwingdi_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-DMODULE_NAME_IS_wingdi
 libwingdi_plugin_la_LIBADD = -lgdi32 -lole32 -luuid
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index 366bff6..d91a2a0 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -30,6 +30,8 @@
 # include "config.h"
 #endif
 
+#include "../../control/win32touch.h"
+
 #include <vlc_common.h>
 #include <vlc_vout_display.h>
 
@@ -67,6 +69,9 @@ struct event_thread_t
     HCURSOR cursor_empty;
     unsigned button_pressed;
 
+    /* Gestures */
+    win32_gesture_sys_t *p_gesture;
+
     /* Title */
     char *psz_title;
 
@@ -797,6 +802,8 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
         return VLC_EGENERIC;
     }
 
+    InitGestures( p_event->hwnd, &p_event->p_gesture );
+
     if( p_event->hparent )
     {
         LONG i_style;
@@ -882,6 +889,8 @@ static void Win32VoutCloseWindow( event_thread_t *p_event )
         DestroyIcon( p_event->vlc_icon );
 
     DestroyCursor( p_event->cursor_empty );
+
+    CloseGestures( p_event->p_gesture);
 }
 
 /*****************************************************************************
@@ -1035,6 +1044,9 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
     case WM_SETFOCUS:
         return 0;
 
+    case WM_GESTURE:
+        return DecodeGesture( VLC_OBJECT(vd), p_event->p_gesture, hwnd, message, wParam, lParam );
+
     default:
         //msg_Dbg( vd, "WinProc WM Default %i", message );
         break;



More information about the vlc-commits mailing list