mirror of
https://github.com/libretro/RetroArch
synced 2025-02-02 14:54:10 +00:00
Create stub window interface
This commit is contained in:
parent
563089558b
commit
61e1c13ae6
@ -108,6 +108,7 @@ OBJ += frontend/frontend.o \
|
|||||||
frontend/drivers/platform_null.o \
|
frontend/drivers/platform_null.o \
|
||||||
ui/ui_companion_driver.o \
|
ui/ui_companion_driver.o \
|
||||||
ui/drivers/ui_null.o \
|
ui/drivers/ui_null.o \
|
||||||
|
ui/drivers/null/ui_null_window.o \
|
||||||
core_impl.o \
|
core_impl.o \
|
||||||
retroarch.o \
|
retroarch.o \
|
||||||
input/input_keyboard.o \
|
input/input_keyboard.o \
|
||||||
@ -629,8 +630,8 @@ endif
|
|||||||
# Companion UI
|
# Companion UI
|
||||||
|
|
||||||
ifneq ($(findstring Win32,$(OS)),)
|
ifneq ($(findstring Win32,$(OS)),)
|
||||||
OBJ += ui/drivers/ui_win32.o
|
OBJ += ui/drivers/ui_win32.o \
|
||||||
|
ui/drivers/win32/ui_win32_window.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Video
|
# Video
|
||||||
|
@ -723,6 +723,7 @@ UI
|
|||||||
#include "../ui/ui_companion_driver.c"
|
#include "../ui/ui_companion_driver.c"
|
||||||
|
|
||||||
#include "../ui/drivers/ui_null.c"
|
#include "../ui/drivers/ui_null.c"
|
||||||
|
#include "../ui/drivers/null/ui_null_window.c"
|
||||||
|
|
||||||
#ifdef HAVE_QT
|
#ifdef HAVE_QT
|
||||||
#include "../ui/drivers/ui_qt.c"
|
#include "../ui/drivers/ui_qt.c"
|
||||||
@ -730,6 +731,7 @@ UI
|
|||||||
|
|
||||||
#if defined(_WIN32) && !defined(_XBOX)
|
#if defined(_WIN32) && !defined(_XBOX)
|
||||||
#include "../ui/drivers/ui_win32.c"
|
#include "../ui/drivers/ui_win32.c"
|
||||||
|
#include "../ui/drivers/win32/ui_win32_window.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*============================================================
|
/*============================================================
|
||||||
|
32
ui/drivers/null/ui_null_window.c
Normal file
32
ui/drivers/null/ui_null_window.c
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/* 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 void ui_window_null_set_visible(void *data,
|
||||||
|
bool set_visible)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const ui_window_t ui_window_null = {
|
||||||
|
ui_window_null_set_visible,
|
||||||
|
"null",
|
||||||
|
};
|
@ -1,6 +1,6 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* RetroArch - A frontend for libretro.
|
||||||
* Copyright (C) 2013-2014 - Jason Fetters
|
* Copyright (C) 2013-2014 - Jason Fetters
|
||||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||||
*
|
*
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
* 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-
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
@ -595,5 +595,6 @@ const ui_companion_driver_t ui_companion_cocoa = {
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
&ui_window_null,
|
||||||
"cocoa",
|
"cocoa",
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* RetroArch - A frontend for libretro.
|
||||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||||
*
|
*
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
* 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-
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
@ -687,5 +687,6 @@ const ui_companion_driver_t ui_companion_cocoatouch = {
|
|||||||
ui_companion_cocoatouch_notify_refresh,
|
ui_companion_cocoatouch_notify_refresh,
|
||||||
ui_companion_cocoatouch_msg_queue_push,
|
ui_companion_cocoatouch_msg_queue_push,
|
||||||
ui_companion_cocoatouch_render_messagebox,
|
ui_companion_cocoatouch_render_messagebox,
|
||||||
|
&ui_window_null,
|
||||||
"cocoatouch",
|
"cocoatouch",
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* RetroArch - A frontend for libretro.
|
||||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||||
*
|
*
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
* 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-
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
@ -88,5 +88,6 @@ const ui_companion_driver_t ui_companion_null = {
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
&ui_window_null,
|
||||||
"null",
|
"null",
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* RetroArch - A frontend for libretro.
|
||||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||||
*
|
*
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
* 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-
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
@ -132,5 +132,6 @@ const ui_companion_driver_t ui_companion_qt = {
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
&ui_window_null,
|
||||||
"qt",
|
"qt",
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* RetroArch - A frontend for libretro.
|
/* RetroArch - A frontend for libretro.
|
||||||
* Copyright (C) 2015 - Ali Bouhlel
|
* Copyright (C) 2015-2016 - Ali Bouhlel
|
||||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||||
*
|
*
|
||||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
* 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-
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
@ -725,5 +725,6 @@ const ui_companion_driver_t ui_companion_win32 = {
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
&ui_window_win32,
|
||||||
"win32",
|
"win32",
|
||||||
};
|
};
|
||||||
|
57
ui/drivers/win32/ui_win32_window.c
Normal file
57
ui/drivers/win32/ui_win32_window.c
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/* RetroArch - A frontend for libretro.
|
||||||
|
* Copyright (C) 2015-2016 - Ali Bouhlel
|
||||||
|
* 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>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma comment( lib, "comctl32" )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define IDI_ICON 1
|
||||||
|
|
||||||
|
#ifndef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32_IE
|
||||||
|
#define _WIN32_IE 0x0300
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <commdlg.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
|
||||||
|
#include <retro_inline.h>
|
||||||
|
#include <file/file_path.h>
|
||||||
|
|
||||||
|
#include "../../ui_companion_driver.h"
|
||||||
|
#include "../../../driver.h"
|
||||||
|
#include "../../../runloop.h"
|
||||||
|
#include "../../../tasks/tasks_internal.h"
|
||||||
|
|
||||||
|
static void ui_window_win32_set_visible(void *data,
|
||||||
|
bool set_visible)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
const ui_window_t ui_window_win32 = {
|
||||||
|
ui_window_win32_set_visible,
|
||||||
|
"win32",
|
||||||
|
};
|
@ -31,6 +31,12 @@
|
|||||||
|
|
||||||
RETRO_BEGIN_DECLS
|
RETRO_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct ui_window
|
||||||
|
{
|
||||||
|
void (*set_visible)(void *data, bool visible);
|
||||||
|
const char *ident;
|
||||||
|
} ui_window_t;
|
||||||
|
|
||||||
typedef struct ui_companion_driver
|
typedef struct ui_companion_driver
|
||||||
{
|
{
|
||||||
void *(*init)(void);
|
void *(*init)(void);
|
||||||
@ -43,9 +49,13 @@ typedef struct ui_companion_driver
|
|||||||
void (*notify_refresh)(void *data);
|
void (*notify_refresh)(void *data);
|
||||||
void (*msg_queue_push)(const char *msg, unsigned priority, unsigned duration, bool flush);
|
void (*msg_queue_push)(const char *msg, unsigned priority, unsigned duration, bool flush);
|
||||||
void (*render_messagebox)(const char *msg);
|
void (*render_messagebox)(const char *msg);
|
||||||
|
const ui_window_t *window;
|
||||||
const char *ident;
|
const char *ident;
|
||||||
} ui_companion_driver_t;
|
} ui_companion_driver_t;
|
||||||
|
|
||||||
|
extern const ui_window_t ui_window_null;
|
||||||
|
extern const ui_window_t ui_window_win32;
|
||||||
|
|
||||||
extern const ui_companion_driver_t ui_companion_null;
|
extern const ui_companion_driver_t ui_companion_null;
|
||||||
extern const ui_companion_driver_t ui_companion_cocoa;
|
extern const ui_companion_driver_t ui_companion_cocoa;
|
||||||
extern const ui_companion_driver_t ui_companion_cocoatouch;
|
extern const ui_companion_driver_t ui_companion_cocoatouch;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user