RetroArch/apple/iOS/input/ios_input.h

50 lines
1.4 KiB
C
Raw Normal View History

/* RetroArch - A frontend for libretro.
* Copyright (C) 2013 - Jason Fetters
*
* 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/>.
*/
#ifndef __IOS_RARCH_INPUT_H__
#define __IOS_RARCH_INPUT_H__
// Input responder
#define MAX_TOUCHES 16
#define MAX_KEYS 256
2013-06-19 19:05:44 -04:00
#define MAX_PADS 4
typedef struct
{
int16_t screen_x, screen_y;
int16_t fixed_x, fixed_y;
int16_t full_x, full_y;
} ios_touch_data_t;
typedef struct
{
ios_touch_data_t touches[MAX_TOUCHES];
uint32_t touch_count;
uint32_t keys[MAX_KEYS];
2013-06-19 19:05:44 -04:00
uint32_t pad_buttons[MAX_PADS];
int16_t pad_axis[MAX_PADS][4];
} ios_input_data_t;
2013-06-22 13:09:38 -04:00
extern ios_input_data_t g_current_input_data; //< Main thread data
extern ios_input_data_t g_polled_input_data; //< Game thread data
2013-06-22 13:09:38 -04:00
// Main thread only
void ios_input_enable_icade(bool on);
void ios_input_handle_key_event(unsigned keycode, bool down);
#endif