mirror of
https://github.com/libretro/RetroArch
synced 2025-03-06 04:13:52 +00:00
(Msg window) Add backends for Win32/Cocoa
This commit is contained in:
parent
a247b16164
commit
10a25209da
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
44
ui/drivers/cocoa/ui_cocoa_msg_window.m
Normal file
44
ui/drivers/cocoa/ui_cocoa_msg_window.m
Normal 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"
|
||||
};
|
@ -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",
|
||||
|
@ -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",
|
||||
|
46
ui/drivers/win32/ui_win32_msg_window.c
Normal file
46
ui/drivers/win32/ui_win32_msg_window.c
Normal 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"
|
||||
};
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user