2015-04-11 23:31:03 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
|
|
|
*
|
|
|
|
* 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 __UI_COMPANION_DRIVER_H
|
|
|
|
#define __UI_COMPANION_DRIVER_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <boolean.h>
|
|
|
|
|
2015-05-11 07:56:13 +00:00
|
|
|
#include <file/file_list.h>
|
|
|
|
|
2015-04-11 23:31:03 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../config.h"
|
|
|
|
#endif
|
|
|
|
|
2015-04-13 11:46:48 +00:00
|
|
|
#include "../command_event.h"
|
|
|
|
|
2015-04-11 23:31:03 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct ui_companion_driver
|
|
|
|
{
|
2015-04-12 00:09:14 +00:00
|
|
|
void *(*init)(void);
|
2015-04-11 23:31:03 +00:00
|
|
|
void (*deinit)(void *data);
|
2015-04-12 00:12:30 +00:00
|
|
|
int (*iterate)(void *data, unsigned action);
|
2015-04-13 00:14:34 +00:00
|
|
|
void (*toggle)(void *data);
|
2015-04-20 16:36:36 +00:00
|
|
|
void (*event_command)(void *data, enum event_command action);
|
2015-04-12 00:12:30 +00:00
|
|
|
void (*notify_content_loaded)(void *data);
|
2015-05-11 07:56:13 +00:00
|
|
|
void (*notify_list_loaded)(void *data, file_list_t *list, file_list_t *menu_list);
|
2015-08-30 11:03:34 +00:00
|
|
|
void (*notify_refresh)(void *data);
|
2015-09-22 20:20:03 +00:00
|
|
|
void (*msg_queue_push)(const char *msg, unsigned priority, unsigned duration, bool flush);
|
2015-08-15 00:42:04 +00:00
|
|
|
void (*render_messagebox)(const char *msg);
|
2015-04-11 23:31:03 +00:00
|
|
|
const char *ident;
|
|
|
|
} ui_companion_driver_t;
|
|
|
|
|
|
|
|
extern const ui_companion_driver_t ui_companion_null;
|
2015-04-20 10:43:07 +00:00
|
|
|
extern const ui_companion_driver_t ui_companion_cocoa;
|
2015-04-12 01:02:48 +00:00
|
|
|
extern const ui_companion_driver_t ui_companion_cocoatouch;
|
2015-04-12 16:56:23 +00:00
|
|
|
extern const ui_companion_driver_t ui_companion_qt;
|
2015-11-19 06:23:41 +00:00
|
|
|
extern const ui_companion_driver_t ui_companion_win32;
|
2015-04-11 23:31:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ui_companion_find_driver:
|
|
|
|
* @ident : Identifier name of driver to find.
|
|
|
|
*
|
|
|
|
* Finds driver with @ident. Does not initialize.
|
|
|
|
*
|
|
|
|
* Returns: pointer to driver if successful, otherwise NULL.
|
|
|
|
**/
|
|
|
|
const ui_companion_driver_t *ui_companion_find_driver(const char *ident);
|
|
|
|
|
|
|
|
const ui_companion_driver_t *ui_companion_get_ptr(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ui_companion_init_first:
|
|
|
|
*
|
|
|
|
* Finds first suitable driver and initialize.
|
|
|
|
*
|
|
|
|
* Returns: pointer to first suitable driver, otherwise NULL.
|
|
|
|
**/
|
|
|
|
const ui_companion_driver_t *ui_companion_init_first(void);
|
|
|
|
|
2015-08-05 11:56:59 +00:00
|
|
|
bool ui_companion_is_on_foreground(void);
|
|
|
|
|
|
|
|
void ui_companion_set_foreground(unsigned enable);
|
|
|
|
|
2015-04-20 16:36:36 +00:00
|
|
|
void ui_companion_event_command(enum event_command action);
|
2015-04-20 16:34:55 +00:00
|
|
|
|
2015-04-11 23:31:03 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|