[vlc-devel] [PATCH 1/2] actions: add wheel button to keycode helper

Victorien Le Couviour--Tuffet victorien.lecouviour.tuffet at gmail.com
Wed Nov 28 15:11:35 CET 2018


---
 include/vlc_actions.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/vlc_actions.h b/include/vlc_actions.h
index 404c1662a8..ff4dbcbd3b 100644
--- a/include/vlc_actions.h
+++ b/include/vlc_actions.h
@@ -24,6 +24,8 @@
 #ifndef VLC_ACTIONS_H
 #define VLC_ACTIONS_H 1
 
+# include <vlc_mouse.h>
+
 /* Called from src/libvlc.c */
 int
 libvlc_InternalActionsInit(libvlc_int_t *p_libvlc);
@@ -113,6 +115,8 @@ libvlc_InternalActionsClean(libvlc_int_t *p_libvlc);
 #define KEY_MOUSEWHEELDOWN   0x00F10000
 #define KEY_MOUSEWHEELLEFT   0x00F20000
 #define KEY_MOUSEWHEELRIGHT  0x00F30000
+#define KEY_MOUSEWHEEL_FROM_BUTTON(button) \
+    (KEY_MOUSEWHEELUP | ((button - MOUSE_BUTTON_WHEEL_UP) << 16))
 
 VLC_API char *vlc_keycode2str(uint_fast32_t i_key, bool locale) VLC_USED;
 VLC_API uint_fast32_t vlc_str2keycode(const char *str) VLC_USED;
-- 
2.19.1



More information about the vlc-devel mailing list