145 lines
3.8 KiB
C
Raw Normal View History

2012-04-21 23:13:50 +02:00
/* RetroArch - A frontend for libretro.
2013-01-01 01:37:37 +01:00
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
2013-03-11 07:13:11 +01:00
* Copyright (C) 2011-2013 - Daniel De Matteis
* Copyright (C) 2012-2013 - Michael Lelli
2012-01-08 00:57:44 +01:00
*
2012-04-21 23:13:50 +02:00
* RetroArch is free software: you can redistribute it and/or modify it under the terms
2012-01-08 00:57:44 +01:00
* 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.
*
2012-04-21 23:13:50 +02:00
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
2012-01-08 00:57:44 +01:00
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
2012-04-21 23:31:57 +02:00
* You should have received a copy of the GNU General Public License along with RetroArch.
2012-01-08 00:57:44 +01:00
* If not, see <http://www.gnu.org/licenses/>.
*/
2012-05-06 04:04:33 +02:00
#ifndef RGUI_H__
#define RGUI_H__
2012-01-08 00:57:44 +01:00
#include <stdint.h>
#include <stddef.h>
#ifndef __cplusplus
#include <stdbool.h>
#else
extern "C" {
#endif
#define RGUI_MAX_SHADERS 8
2012-01-08 00:57:44 +01:00
typedef enum
{
2012-05-06 04:04:33 +02:00
RGUI_FILE_PLAIN,
RGUI_FILE_DIRECTORY,
2012-07-16 17:57:43 -04:00
RGUI_FILE_DEVICE,
RGUI_SETTINGS,
2012-07-16 17:57:43 -04:00
// Shader stuff
RGUI_SETTINGS_SHADER_MANAGER,
2013-04-14 01:45:33 +02:00
RGUI_SETTINGS_SHADER_FILTER,
2013-04-14 01:27:13 +02:00
RGUI_SETTINGS_SHADER_PRESET,
RGUI_SETTINGS_SHADER_APPLY,
RGUI_SETTINGS_SHADER_PASSES,
RGUI_SETTINGS_SHADER_0,
RGUI_SETTINGS_SHADER_0_FILTER,
RGUI_SETTINGS_SHADER_0_SCALE,
RGUI_SETTINGS_SHADER_LAST = RGUI_SETTINGS_SHADER_0_SCALE + (3 * (RGUI_MAX_SHADERS - 1)),
2012-07-16 17:57:43 -04:00
// settings options are done here too
RGUI_SETTINGS_OPEN_FILEBROWSER,
2013-04-08 01:51:18 +02:00
RGUI_SETTINGS_CORE,
RGUI_SETTINGS_CORE_OPTIONS,
2013-01-18 15:22:03 +01:00
RGUI_SETTINGS_REWIND_ENABLE,
RGUI_SETTINGS_REWIND_GRANULARITY,
2012-08-12 03:38:23 -04:00
RGUI_SETTINGS_SAVESTATE_SAVE,
RGUI_SETTINGS_SAVESTATE_LOAD,
2013-03-10 17:54:46 -04:00
#ifdef HAVE_SCREENSHOTS
RGUI_SETTINGS_SCREENSHOT,
2013-03-10 17:54:46 -04:00
#endif
RGUI_SETTINGS_RESTART_GAME,
RGUI_SETTINGS_VIDEO_FILTER,
RGUI_SETTINGS_VIDEO_SOFT_FILTER,
#ifdef GEKKO
RGUI_SETTINGS_VIDEO_RESOLUTION,
#endif
RGUI_SETTINGS_VIDEO_GAMMA,
RGUI_SETTINGS_VIDEO_ASPECT_RATIO,
2012-08-20 21:56:07 -04:00
RGUI_SETTINGS_CUSTOM_VIEWPORT,
RGUI_SETTINGS_CUSTOM_VIEWPORT_2,
RGUI_SETTINGS_VIDEO_ROTATION,
RGUI_SETTINGS_AUDIO_MUTE,
2012-07-27 20:39:49 -04:00
RGUI_SETTINGS_AUDIO_CONTROL_RATE,
RGUI_SETTINGS_ZIP_EXTRACT,
RGUI_SETTINGS_SRAM_DIR,
RGUI_SETTINGS_STATE_DIR,
RGUI_SETTINGS_CONTROLLER_1,
RGUI_SETTINGS_CONTROLLER_2,
RGUI_SETTINGS_CONTROLLER_3,
RGUI_SETTINGS_CONTROLLER_4,
2012-08-27 16:09:53 -04:00
RGUI_SETTINGS_DEBUG_TEXT,
RGUI_SETTINGS_RESTART_EMULATOR,
2013-03-24 06:32:22 +01:00
RGUI_SETTINGS_RESUME_GAME,
RGUI_SETTINGS_QUIT_RARCH,
RGUI_SETTINGS_BIND_DEVICE,
RGUI_SETTINGS_BIND_DPAD_EMULATION,
RGUI_SETTINGS_BIND_UP,
RGUI_SETTINGS_BIND_DOWN,
RGUI_SETTINGS_BIND_LEFT,
RGUI_SETTINGS_BIND_RIGHT,
RGUI_SETTINGS_BIND_A,
RGUI_SETTINGS_BIND_B,
RGUI_SETTINGS_BIND_X,
RGUI_SETTINGS_BIND_Y,
RGUI_SETTINGS_BIND_START,
RGUI_SETTINGS_BIND_SELECT,
RGUI_SETTINGS_BIND_L,
RGUI_SETTINGS_BIND_R,
RGUI_SETTINGS_BIND_L2,
RGUI_SETTINGS_BIND_R2,
RGUI_SETTINGS_BIND_L3,
RGUI_SETTINGS_BIND_R3,
2013-04-04 22:08:23 +02:00
RGUI_SETTINGS_CORE_OPTION_NONE = 0xffff,
RGUI_SETTINGS_CORE_OPTION_START = 0x10000
2012-05-06 04:04:33 +02:00
} rgui_file_type_t;
2012-01-08 00:57:44 +01:00
typedef enum
{
2012-05-06 04:04:33 +02:00
RGUI_ACTION_UP,
RGUI_ACTION_DOWN,
RGUI_ACTION_LEFT,
RGUI_ACTION_RIGHT,
RGUI_ACTION_OK,
RGUI_ACTION_CANCEL,
RGUI_ACTION_REFRESH,
2012-07-16 17:57:43 -04:00
RGUI_ACTION_SETTINGS,
RGUI_ACTION_START,
RGUI_ACTION_MESSAGE,
2012-05-06 04:04:33 +02:00
RGUI_ACTION_NOOP
} rgui_action_t;
2012-01-08 00:57:44 +01:00
2012-05-06 04:04:33 +02:00
typedef struct rgui_handle rgui_handle_t;
2012-01-08 00:57:44 +01:00
typedef void (*rgui_file_enum_cb_t)(void *ctx,
const char *path, unsigned file_type, size_t directory_ptr);
2012-05-06 04:04:33 +02:00
typedef bool (*rgui_folder_enum_cb_t)(const char *directory,
rgui_file_enum_cb_t file_cb, void *userdata, void *ctx);
2012-01-08 00:57:44 +01:00
extern unsigned RGUI_WIDTH;
extern unsigned RGUI_HEIGHT;
2012-01-08 00:57:44 +01:00
2013-01-11 04:36:40 +01:00
int rgui_iterate(rgui_handle_t *rgui, rgui_action_t action);
2012-01-08 00:57:44 +01:00
void menu_init(void);
bool menu_iterate(void);
void menu_free(void);
2012-01-08 00:57:44 +01:00
#ifdef __cplusplus
}
#endif
#endif