/*
 * Copyright (C) 2017-2020 Philip Jones
 *
 * Licensed under the MIT License.
 * See either the LICENSE file, or:
 *
 * https://opensource.org/licenses/MIT
 *
 */

#ifndef GBCC_INPUT_H
#define GBCC_INPUT_H

#include <stdbool.h>

struct gbcc;
struct gbcc_accelerometer;

enum gbcc_key {
	GBCC_KEY_A,
	GBCC_KEY_B,
	GBCC_KEY_START,
	GBCC_KEY_SELECT,
	GBCC_KEY_UP,
	GBCC_KEY_DOWN,
	GBCC_KEY_LEFT,
	GBCC_KEY_RIGHT,
	GBCC_KEY_TURBO,
	GBCC_KEY_SCREENSHOT,
	GBCC_KEY_RAW_SCREENSHOT,
	GBCC_KEY_PAUSE,
	GBCC_KEY_PRINTER,
	GBCC_KEY_FPS,
	GBCC_KEY_FRAME_BLENDING,
	GBCC_KEY_VSYNC,
	GBCC_KEY_VRAM,
	GBCC_KEY_DISPLAY_BACKGROUND,
	GBCC_KEY_DISPLAY_WINDOW,
	GBCC_KEY_DISPLAY_SPRITES,
	GBCC_KEY_LINK_CABLE,
	GBCC_KEY_AUTOSAVE,
	GBCC_KEY_BACKGROUND_PLAY,
	GBCC_KEY_MENU,
	GBCC_KEY_INTERLACE,
	GBCC_KEY_SHADER,
	GBCC_KEY_CHEATS,
	GBCC_KEY_ACCELEROMETER_UP,
	GBCC_KEY_ACCELEROMETER_DOWN,
	GBCC_KEY_ACCELEROMETER_LEFT,
	GBCC_KEY_ACCELEROMETER_RIGHT,
	GBCC_KEY_ACCELEROMETER_MAX_UP,
	GBCC_KEY_ACCELEROMETER_MAX_DOWN,
	GBCC_KEY_ACCELEROMETER_MAX_LEFT,
	GBCC_KEY_ACCELEROMETER_MAX_RIGHT,
	GBCC_KEY_SAVE_STATE_1,
	GBCC_KEY_SAVE_STATE_2,
	GBCC_KEY_SAVE_STATE_3,
	GBCC_KEY_SAVE_STATE_4,
	GBCC_KEY_SAVE_STATE_5,
	GBCC_KEY_SAVE_STATE_6,
	GBCC_KEY_SAVE_STATE_7,
	GBCC_KEY_SAVE_STATE_8,
	GBCC_KEY_SAVE_STATE_9,
	GBCC_KEY_LOAD_STATE_1,
	GBCC_KEY_LOAD_STATE_2,
	GBCC_KEY_LOAD_STATE_3,
	GBCC_KEY_LOAD_STATE_4,
	GBCC_KEY_LOAD_STATE_5,
	GBCC_KEY_LOAD_STATE_6,
	GBCC_KEY_LOAD_STATE_7,
	GBCC_KEY_LOAD_STATE_8,
	GBCC_KEY_LOAD_STATE_9
};

void gbcc_input_process_key(struct gbcc *gbc, enum gbcc_key key, bool pressed);
void gbcc_input_accelerometer_update(struct gbcc_accelerometer *acc);

#endif /* GBCC_INPUT_H */
