RetroArch/input/apple_input.h

71 lines
1.9 KiB
C
Raw Normal View History

/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2014 - Daniel De Matteis
2014-01-01 00:50:59 +00:00
* Copyright (C) 2013-2014 - 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 __APPLE_RARCH_INPUT_H__
#define __APPLE_RARCH_INPUT_H__
#include "../general.h"
#include "connect/joypad_connection.h"
2014-09-02 14:50:28 +00:00
/* Input responder */
#define MAX_TOUCHES 16
#define MAX_KEYS 256
2014-09-30 13:03:22 +00:00
#ifndef NUM_HATS
#define NUM_HATS 4
#endif
typedef struct
{
int16_t screen_x, screen_y;
int16_t fixed_x, fixed_y;
int16_t full_x, full_y;
} apple_touch_data_t;
typedef struct
{
apple_touch_data_t touches[MAX_TOUCHES];
uint32_t touch_count;
uint32_t mouse_buttons;
int16_t mouse_delta[2];
uint32_t key_state[MAX_KEYS];
2014-09-30 13:03:22 +00:00
uint32_t buttons[MAX_PLAYERS];
int16_t axes[MAX_PLAYERS][4];
int8_t hats[NUM_HATS][2];
const rarch_joypad_driver_t *joypad;
} apple_input_data_t;
void apple_input_enable_icade(bool on);
2014-09-02 14:50:28 +00:00
void apple_input_enable_small_keyboard(bool on);
2014-09-02 14:50:28 +00:00
void apple_input_reset_icade_buttons(void);
2014-09-02 14:50:28 +00:00
void apple_input_keyboard_event(bool down, unsigned code,
uint32_t character, uint32_t mod);
extern int32_t apple_input_find_any_key(void);
2014-09-02 14:50:28 +00:00
extern int32_t apple_input_find_any_button(uint32_t port);
2014-09-02 14:50:28 +00:00
extern int32_t apple_input_find_any_axis(uint32_t port);
#endif