1 /******************************************************************************
2  Copyright (C) 2014 by Hugh Bailey <obs.jim@gmail.com>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  ******************************************************************************/
17 
18 #pragma once
19 
20 #include "util/c99defs.h"
21 
22 enum obs_interaction_flags {
23 	INTERACT_NONE = 0,
24 	INTERACT_CAPS_KEY = 1,
25 	INTERACT_SHIFT_KEY = 1 << 1,
26 	INTERACT_CONTROL_KEY = 1 << 2,
27 	INTERACT_ALT_KEY = 1 << 3,
28 	INTERACT_MOUSE_LEFT = 1 << 4,
29 	INTERACT_MOUSE_MIDDLE = 1 << 5,
30 	INTERACT_MOUSE_RIGHT = 1 << 6,
31 	INTERACT_COMMAND_KEY = 1 << 7,
32 	INTERACT_NUMLOCK_KEY = 1 << 8,
33 	INTERACT_IS_KEY_PAD = 1 << 9,
34 	INTERACT_IS_LEFT = 1 << 10,
35 	INTERACT_IS_RIGHT = 1 << 11,
36 };
37 
38 enum obs_mouse_button_type {
39 	MOUSE_LEFT,
40 	MOUSE_MIDDLE,
41 	MOUSE_RIGHT,
42 };
43 
44 struct obs_mouse_event {
45 	uint32_t modifiers;
46 	int32_t x;
47 	int32_t y;
48 };
49 
50 struct obs_key_event {
51 	uint32_t modifiers;
52 	char *text;
53 	uint32_t native_modifiers;
54 	uint32_t native_scancode;
55 	uint32_t native_vkey;
56 };
57