Add ui_null_msg_window

This commit is contained in:
twinaphex 2016-06-08 06:29:52 +02:00
parent c35e75a0bd
commit a247b16164
9 changed files with 55 additions and 0 deletions

View File

@ -117,6 +117,7 @@ OBJ += frontend/frontend.o \
ui/ui_companion_driver.o \
ui/drivers/ui_null.o \
ui/drivers/null/ui_null_window.o \
ui/drivers/null/ui_null_msg_window.o \
ui/drivers/null/ui_null_application.o \
core_impl.o \
retroarch.o \

View File

@ -723,6 +723,7 @@ UI
#include "../ui/drivers/ui_null.c"
#include "../ui/drivers/null/ui_null_window.c"
#include "../ui/drivers/null/ui_null_msg_window.c"
#include "../ui/drivers/null/ui_null_application.c"
#ifdef HAVE_QT

View File

@ -0,0 +1,44 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2016 - 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/>.
*/
#include <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "../../ui_companion_driver.h"
static enum ui_msg_window_response ui_msg_window_null_error(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_null_information(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_null_question(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
const ui_msg_window_t ui_msg_window_null = {
ui_msg_window_null_error,
ui_msg_window_null_information,
ui_msg_window_null_question,
"null"
};

View File

@ -585,6 +585,7 @@ const ui_companion_driver_t ui_companion_cocoa = {
NULL,
NULL,
NULL,
&ui_msg_window_null,
&ui_window_cocoa,
&ui_application_cocoa,
"cocoa",

View File

@ -687,6 +687,7 @@ const ui_companion_driver_t ui_companion_cocoatouch = {
ui_companion_cocoatouch_notify_refresh,
ui_companion_cocoatouch_msg_queue_push,
ui_companion_cocoatouch_render_messagebox,
&ui_msg_window_null,
&ui_window_null,
&ui_application_null,
"cocoatouch",

View File

@ -88,6 +88,7 @@ const ui_companion_driver_t ui_companion_null = {
NULL,
NULL,
NULL,
&ui_msg_window_null,
&ui_window_null,
&ui_application_null,
"null",

View File

@ -132,6 +132,7 @@ const ui_companion_driver_t ui_companion_qt = {
NULL,
NULL,
NULL,
&ui_msg_window_null,
&ui_window_null,
&ui_application_null,
"qt",

View File

@ -729,6 +729,7 @@ const ui_companion_driver_t ui_companion_win32 = {
NULL,
NULL,
NULL,
&ui_msg_window_null,
&ui_window_win32,
&ui_application_win32,
"win32",

View File

@ -59,6 +59,7 @@ typedef struct ui_msg_window
enum ui_msg_window_response (*error)(ui_msg_window_state *state);
enum ui_msg_window_response (*information)(ui_msg_window_state *state);
enum ui_msg_window_response (*question)(ui_msg_window_state *state);
const char *ident;
} ui_msg_window_t;
typedef struct ui_application
@ -91,6 +92,7 @@ typedef struct ui_companion_driver
void (*notify_refresh)(void *data);
void (*msg_queue_push)(const char *msg, unsigned priority, unsigned duration, bool flush);
void (*render_messagebox)(const char *msg);
const ui_msg_window_t *msg_window;
const ui_window_t *window;
const ui_application_t *application;
const char *ident;
@ -100,6 +102,8 @@ extern const ui_window_t ui_window_null;
extern const ui_window_t ui_window_cocoa;
extern const ui_window_t ui_window_win32;
extern const ui_msg_window_t ui_msg_window_null;
extern const ui_application_t ui_application_null;
extern const ui_application_t ui_application_win32;
extern const ui_application_t ui_application_cocoa;