(Msg window) Add backends for Win32/Cocoa

This commit is contained in:
twinaphex 2016-06-08 06:33:15 +02:00
parent a247b16164
commit 10a25209da
8 changed files with 97 additions and 2 deletions

View File

@ -652,6 +652,7 @@ endif
ifneq ($(findstring Win32,$(OS)),)
OBJ += ui/drivers/ui_win32.o \
ui/drivers/win32/ui_win32_window.o \
ui/drivers/win32/ui_win32_msg_window.o \
ui/drivers/win32/ui_win32_application.o
endif

View File

@ -733,6 +733,7 @@ UI
#if defined(_WIN32) && !defined(_XBOX)
#include "../ui/drivers/ui_win32.c"
#include "../ui/drivers/win32/ui_win32_window.c"
#include "../ui/drivers/win32/ui_win32_msg_window.c"
#include "../ui/drivers/win32/ui_win32_application.c"
#endif

View File

@ -42,6 +42,7 @@
#elif defined(HAVE_COCOA)
#include "../ui/drivers/ui_cocoa.m"
#include "../ui/drivers/cocoa/ui_cocoa_window.m"
#include "../ui/drivers/cocoa/ui_cocoa_msg_window.m"
#include "../ui/drivers/cocoa/ui_cocoa_application.m"
#endif

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_cocoa_error(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_cocoa_information(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_cocoa_question(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
const ui_msg_window_t ui_msg_window_cocoa = {
ui_msg_window_cocoa_error,
ui_msg_window_cocoa_information,
ui_msg_window_cocoa_question,
"cocoa"
};

View File

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

View File

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

View File

@ -0,0 +1,46 @@
/* 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 <windows.h>
#include "../../ui_companion_driver.h"
static enum ui_msg_window_response ui_msg_window_win32_error(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_win32_information(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
static enum ui_msg_window_response ui_msg_window_win32_question(ui_msg_window_state *state)
{
return UI_MSG_RESPONSE_CANCEL;
}
const ui_msg_window_t ui_msg_window_win32 = {
ui_msg_window_win32_error,
ui_msg_window_win32_information,
ui_msg_window_win32_question,
"win32"
};

View File

@ -103,6 +103,8 @@ 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_msg_window_t ui_msg_window_win32;
extern const ui_msg_window_t ui_msg_window_cocoa;
extern const ui_application_t ui_application_null;
extern const ui_application_t ui_application_win32;