]> git.sesse.net Git - vlc/blob - modules/video_output/msw/win32touch.h
demux: libmp4: add mp4a/mp4v esds restrictions
[vlc] / modules / video_output / msw / win32touch.h
1 /*****************************************************************************
2  * win32touch.c: touch gestures recognition
3  *****************************************************************************
4  * Copyright © 2013-2014 VideoLAN
5  *
6  * Authors: Ludovic Fauvet <etix@videolan.org>
7  *          Jean-Baptiste Kempf <jb@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef VLC_GESTURE_H_
25 #define VLC_GESTURE_H_
26
27 # ifdef _WIN32_WINNT
28 #  undef _WIN32_WINNT
29 # endif
30 # define _WIN32_WINNT 0x0601
31 # include <windows.h>
32 # include <winuser.h>
33
34 #ifdef HAVE_CONFIG_H
35 # include "config.h"
36 #endif
37
38 #include <vlc_common.h>
39
40 #ifndef WM_GESTURE
41 # define WM_GESTURE 0x0119
42 #endif
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 enum {
49     GESTURE_ACTION_UNDEFINED = 0,
50     GESTURE_ACTION_VOLUME,
51     GESTURE_ACTION_JUMP,
52     GESTURE_ACTION_BRIGHTNESS
53 };
54
55 typedef struct {
56     DWORD       i_type;                 /* Gesture ID */
57     int         i_action;               /* GESTURE_ACTION */
58
59     int         i_beginx;               /* Start X position */
60     int         i_beginy;               /* Start Y position */
61     int         i_lasty;                /* Last known Y position for PAN */
62
63     ULONGLONG   i_ullArguments;         /* Base values to compare between 2 zoom gestures */
64     bool        b_2fingers;             /* Did we detect 2 fingers? */
65
66     HINSTANCE   huser_dll;              /* user32.dll */
67     BOOL (WINAPI * OurCloseGestureInfoHandle)(HGESTUREINFO hGestureInfo);
68     BOOL (WINAPI * OurGetGestureInfo)(HGESTUREINFO hGestureInfo, PGESTUREINFO pGestureInfo);
69 } win32_gesture_sys_t;
70
71
72 BOOL InitGestures( HWND hwnd, win32_gesture_sys_t **p_gesture );
73
74 LRESULT DecodeGesture( vlc_object_t *p_intf, win32_gesture_sys_t *p_gesture,
75         HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
76
77 void CloseGestures( win32_gesture_sys_t *p_gesture );
78
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif