1 /*  RetroArch - A frontend for libretro.
2  *  Copyright (C) 2011-2017 - Daniel De Matteis
3  *  Copyright (C) 2013-2014 - Jason Fetters
4  *
5  *  RetroArch is free software: you can redistribute it and/or modify it under the terms
6  *  of the GNU General Public License as published by the Free Software Found-
7  *  ation, either version 3 of the License, or (at your option) any later version.
8  *
9  *  RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  *  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  *  PURPOSE.  See the GNU General Public License for more details.
12  *
13  *  You should have received a copy of the GNU General Public License along with RetroArch.
14  *  If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef __COCOA_INPUT_H__
18 #define __COCOA_INPUT_H__
19 
20 #include <stdint.h>
21 #include <boolean.h>
22 
23 #ifdef HAVE_CONFIG_H
24 #include "../../config.def.h"
25 #endif
26 
27 #include "../input_driver.h"
28 
29 /* Input responder */
30 #define MAX_TOUCHES  16
31 
32 typedef struct
33 {
34    int16_t screen_x, screen_y;
35    int16_t fixed_x, fixed_y;
36    int16_t full_x, full_y;
37 } cocoa_touch_data_t;
38 
39 typedef struct
40 {
41    uint32_t touch_count;
42 
43    uint32_t mouse_buttons;
44    cocoa_touch_data_t touches[MAX_TOUCHES]; /* int16_t alignment */
45    int16_t mouse_x_last;
46    int16_t mouse_y_last;
47    int16_t window_pos_x;
48    int16_t window_pos_y;
49    int16_t mouse_rel_x;
50    int16_t mouse_rel_y;
51    int16_t mouse_wu;
52    int16_t mouse_wd;
53    int16_t mouse_wl;
54    int16_t mouse_wr;
55 } cocoa_input_data_t;
56 
57 #endif
58