2013-03-03 18:50:38 -05:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2016-01-10 04:33:01 +01:00
|
|
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
2014-01-01 01:50:59 +01:00
|
|
|
* Copyright (C) 2013-2014 - Jason Fetters
|
2013-03-03 18:50:38 -05:00
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-04-19 17:58:15 +02:00
|
|
|
#ifndef __COCOA_INPUT_H__
|
|
|
|
#define __COCOA_INPUT_H__
|
2013-03-19 21:36:34 -04:00
|
|
|
|
2015-04-04 23:27:42 +02:00
|
|
|
#include <stdint.h>
|
2015-06-19 03:45:23 +02:00
|
|
|
#include <boolean.h>
|
2013-10-03 17:43:41 -04:00
|
|
|
|
2014-09-02 16:50:28 +02:00
|
|
|
/* Input responder */
|
2015-04-04 23:27:42 +02:00
|
|
|
#define MAX_TOUCHES 16
|
2013-03-03 18:50:38 -05:00
|
|
|
|
2013-04-04 13:06:32 -04:00
|
|
|
typedef struct
|
2013-03-03 18:50:38 -05:00
|
|
|
{
|
|
|
|
int16_t screen_x, screen_y;
|
|
|
|
int16_t fixed_x, fixed_y;
|
|
|
|
int16_t full_x, full_y;
|
2015-04-19 17:58:15 +02:00
|
|
|
} cocoa_touch_data_t;
|
2013-03-03 18:50:38 -05:00
|
|
|
|
2013-04-04 13:06:32 -04:00
|
|
|
typedef struct
|
|
|
|
{
|
2015-06-19 03:45:23 +02:00
|
|
|
bool blocked;
|
2015-04-19 17:58:15 +02:00
|
|
|
cocoa_touch_data_t touches[MAX_TOUCHES];
|
2013-04-04 13:06:32 -04:00
|
|
|
uint32_t touch_count;
|
|
|
|
|
2013-08-11 00:20:15 -04:00
|
|
|
uint32_t mouse_buttons;
|
2015-11-16 06:46:29 +01:00
|
|
|
int16_t mouse_x_last;
|
|
|
|
int16_t mouse_y_last;
|
|
|
|
int16_t window_pos_x;
|
|
|
|
int16_t window_pos_y;
|
2015-10-08 21:04:27 +02:00
|
|
|
int16_t mouse_rel_x;
|
|
|
|
int16_t mouse_rel_y;
|
2015-03-11 00:35:26 +01:00
|
|
|
int16_t mouse_wu;
|
|
|
|
int16_t mouse_wd;
|
2016-10-05 02:00:11 +02:00
|
|
|
int16_t mouse_wl;
|
|
|
|
int16_t mouse_wr;
|
2013-08-11 00:20:15 -04:00
|
|
|
|
2015-11-16 03:57:52 +01:00
|
|
|
const input_device_driver_t *sec_joypad;
|
2015-04-14 16:37:59 +02:00
|
|
|
const input_device_driver_t *joypad;
|
2015-04-19 17:58:15 +02:00
|
|
|
} cocoa_input_data_t;
|
2013-04-04 13:06:32 -04:00
|
|
|
|
2015-04-19 17:58:15 +02:00
|
|
|
extern int32_t cocoa_input_find_any_key(void);
|
2014-09-02 16:50:28 +02:00
|
|
|
|
2015-04-19 17:58:15 +02:00
|
|
|
extern int32_t cocoa_input_find_any_button(uint32_t port);
|
2014-09-02 16:50:28 +02:00
|
|
|
|
2015-04-19 17:58:15 +02:00
|
|
|
extern int32_t cocoa_input_find_any_axis(uint32_t port);
|
2013-09-09 17:52:02 -04:00
|
|
|
|
2013-03-29 20:00:42 -04:00
|
|
|
#endif
|