RetroArch
frontend_driver.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  *
5  * RetroArch is free software: you can redistribute it and/or modify it under the terms
6  * of the GNU General Public License as published by the Free Software Found-
7  * ation, either version 3 of the License, or (at your option) any later version.
8  *
9  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with RetroArch.
14  * If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef __FRONTEND_DRIVER_H
18 #define __FRONTEND_DRIVER_H
19 
20 #include <stdint.h>
21 #include <stddef.h>
22 
23 #include <boolean.h>
24 #include <retro_common_api.h>
25 #include <lists/string_list.h>
26 
28 
30 {
36 };
37 
39 {
44 };
45 
47 {
57 };
58 
59 /* different platforms may only support some of these types */
61 {
66 };
67 
68 typedef struct path_change_data
69 {
70  void *data;
72 
73 typedef void (*environment_get_t)(int *argc, char *argv[], void *args,
74  void *params_data);
75 typedef void (*process_args_t)(int *argc, char *argv[]);
76 
77 typedef struct frontend_ctx_driver
78 {
80  void (*init)(void *data);
81  void (*deinit)(void *data);
82  void (*exitspawn)(char *s, size_t len);
83 
85  void (*exec)(const char *, bool);
86  bool (*set_fork)(enum frontend_fork fork_mode);
88  void (*get_name)(char *, size_t);
89  void (*get_os)(char *, size_t, int *major, int *minor);
90  int (*get_rating)(void);
93  enum frontend_powerstate (*get_powerstate)(int *seconds, int *percent);
94  int (*parse_drive_list)(void*, bool);
103 #ifdef HAVE_LAKKA
104  void (*get_lakka_version)(char *, size_t);
105 #endif
106  void (*watch_path_for_changes)(struct string_list *list, int flags, path_change_data_t **change_data);
109 
110  const char *ident;
111 
112  const struct video_driver *(*get_video_driver)(void);
114 
133 
143 
145 
154 
155 int frontend_driver_parse_drive_list(void *data, bool load_content);
156 
158 
159 bool frontend_driver_set_fork(enum frontend_fork fork_mode);
160 
161 void frontend_driver_process_args(int *argc, char *argv[]);
162 
163 bool frontend_driver_is_inited(void);
164 
165 void frontend_driver_init_first(void *args);
166 
167 void frontend_driver_free(void);
168 
170 
172 
174 
176 
177 void frontend_driver_shutdown(bool a);
178 
179 void frontend_driver_deinit(void *args);
180 
181 void frontend_driver_exitspawn(char *s, size_t len);
182 
183 bool frontend_driver_has_fork(void);
184 
185 bool frontend_driver_get_core_extension(char *s, size_t len);
186 
187 bool frontend_driver_get_salamander_basename(char *s, size_t len);
188 
190 
192 
194 
196 
198 
200 
202 
204 
206 
207 void frontend_driver_watch_path_for_changes(struct string_list *list, int flags, path_change_data_t **change_data);
208 
210 
212 
214 
215 #endif
void frontend_driver_content_loaded(void)
Definition: frontend_driver.c:248
frontend_ctx_driver_t frontend_ctx_wiiu
Definition: platform_wiiu.c:273
frontend_ctx_driver_t frontend_ctx_null
Definition: platform_null.c:20
frontend_architecture
Definition: frontend_driver.h:46
Definition: frontend_driver.h:77
Definition: frontend_driver.h:65
frontend_ctx_driver_t frontend_ctx_win32
Definition: platform_win32.c:565
Definition: frontend_driver.h:31
const char * ident
Definition: frontend_driver.h:110
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
void frontend_driver_detach_console(void)
Definition: frontend_driver.c:409
enum frontend_architecture frontend_driver_get_cpu_architecture(void)
Definition: frontend_driver.c:353
void frontend_driver_destroy_signal_handler_state(void)
Definition: frontend_driver.c:417
Definition: frontend_driver.h:51
void frontend_driver_shutdown(bool a)
Definition: frontend_driver.c:345
frontend_ctx_driver_t * frontend_ctx_init_first(void)
Definition: frontend_driver.c:125
frontend_ctx_driver_t frontend_ctx_switch
Definition: frontend_driver.h:131
void(* process_args_t)(int *argc, char *argv[])
Definition: frontend_driver.h:75
Definition: frontend_driver.h:62
GLenum GLsizei len
Definition: glext.h:7389
void(* init)(void *data)
Definition: frontend_driver.h:80
frontend_ctx_driver_t frontend_ctx_ps2
Definition: platform_ps2.c:523
GLdouble s
Definition: glext.h:6390
void(* install_signal_handler)(void)
Definition: frontend_driver.h:97
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
void frontend_driver_init_first(void *args)
Definition: frontend_driver.c:292
void(* get_os)(char *, size_t, int *major, int *minor)
Definition: frontend_driver.h:89
bool(* set_fork)(enum frontend_fork fork_mode)
Definition: frontend_driver.h:86
void frontend_driver_attach_console(void)
Definition: frontend_driver.c:401
void(* set_signal_handler_state)(int value)
Definition: frontend_driver.h:99
Definition: frontend_driver.h:34
frontend_ctx_driver_t frontend_ctx_uwp
Definition: platform_uwp.c:391
Definition: ibxm.h:9
frontend_ctx_driver_t * frontend_ctx_find_driver(const char *ident)
Definition: frontend_driver.c:105
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
typedef bool(RETRO_CALLCONV *retro_replace_image_index_t)(unsigned index
void frontend_driver_free(void)
Definition: frontend_driver.c:300
frontend_ctx_driver_t frontend_ctx_emscripten
Definition: platform_emscripten.c:239
frontend_ctx_driver_t frontend_ctx_psp
Definition: platform_psp.c:501
Definition: frontend_driver.h:41
frontend_ctx_driver_t frontend_ctx_xdk
Definition: platform_xdk.c:399
void(* deinit)(void *data)
Definition: frontend_driver.h:81
int(* get_rating)(void)
Definition: frontend_driver.h:90
Definition: frontend_driver.h:49
uint64_t(* get_total_mem)(void)
Definition: frontend_driver.h:95
int frontend_driver_parse_drive_list(void *data, bool load_content)
Definition: frontend_driver.c:239
Definition: frontend_driver.h:35
path_change_type
Definition: frontend_driver.h:60
frontend_ctx_driver_t frontend_ctx_qnx
Definition: platform_qnx.c:181
uint64_t frontend_driver_get_used_memory(void)
Definition: frontend_driver.c:369
void frontend_driver_exitspawn(char *s, size_t len)
Definition: frontend_driver.c:329
environment_get_t environment_get
Definition: frontend_driver.h:79
enum frontend_architecture(* get_architecture)(void)
Definition: frontend_driver.h:92
frontend_ctx_driver_t frontend_ctx_darwin
Definition: platform_darwin.m:733
void(* set_sustained_performance_mode)(bool on)
Definition: frontend_driver.h:108
Definition: frontend_driver.h:43
bool frontend_driver_get_salamander_basename(char *s, size_t len)
Definition: frontend_driver.c:190
Definition: frontend_driver.h:32
int(* get_signal_handler_state)(void)
Definition: frontend_driver.h:98
Definition: frontend_driver.h:50
dictionary args
Definition: test_shaders.py:20
void(* destroy_signal_handler_state)(void)
Definition: frontend_driver.h:100
frontend_ctx_driver_t frontend_ctx_ctr
Definition: platform_ctr.c:574
Definition: frontend_driver.h:42
environment_get_t frontend_driver_environment_get_ptr(void)
Definition: frontend_driver.c:305
bool frontend_driver_set_fork(enum frontend_fork fork_mode)
Definition: frontend_driver.c:266
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
void frontend_driver_deinit(void *args)
Definition: frontend_driver.c:337
Definition: frontend_driver.h:53
void(* content_loaded)(void)
Definition: frontend_driver.h:91
const char * ident
Definition: video_driver.h:809
process_args_t process_args
Definition: frontend_driver.h:84
void(* shutdown)(bool)
Definition: frontend_driver.h:87
frontend_powerstate
Definition: frontend_driver.h:29
void(* get_name)(char *, size_t)
Definition: frontend_driver.h:88
void frontend_driver_install_signal_handler(void)
Definition: frontend_driver.c:377
frontend_ctx_driver_t frontend_ctx_dos
Definition: platform_dos.c:47
Definition: video_driver.h:760
void frontend_driver_set_sustained_performance_mode(bool on)
Definition: frontend_driver.c:449
Definition: frontend_driver.h:54
frontend_ctx_driver_t frontend_ctx_unix
Definition: platform_unix.c:2468
bool frontend_driver_has_get_video_driver_func(void)
Definition: frontend_driver.c:313
void(* attach_console)(void)
Definition: frontend_driver.h:101
bool frontend_driver_check_for_path_changes(path_change_data_t *change_data)
Definition: frontend_driver.c:441
frontend_fork
Definition: frontend_driver.h:38
void(* exec)(const char *, bool)
Definition: frontend_driver.h:85
struct path_change_data path_change_data_t
bool frontend_driver_can_watch_for_changes(void)
Definition: frontend_driver.c:425
frontend_ctx_driver_t frontend_ctx_xenon
const struct video_driver * frontend_driver_get_video_driver(void)
Definition: frontend_driver.c:321
void(* exitspawn)(char *s, size_t len)
Definition: frontend_driver.h:82
bool frontend_driver_has_fork(void)
Definition: frontend_driver.c:257
Definition: frontend_driver.h:33
Definition: frontend_driver.h:68
void(* environment_get_t)(int *argc, char *argv[], void *args, void *params_data)
Definition: frontend_driver.h:73
GLsizei const GLfloat * value
Definition: glext.h:6709
bool frontend_driver_get_core_extension(char *s, size_t len)
Definition: frontend_driver.c:130
frontend_ctx_driver_t * frontend_get_ptr(void)
Definition: frontend_driver.c:234
void(* watch_path_for_changes)(struct string_list *list, int flags, path_change_data_t **change_data)
Definition: frontend_driver.h:106
bool frontend_driver_is_inited(void)
Definition: frontend_driver.c:284
void frontend_driver_watch_path_for_changes(struct string_list *list, int flags, path_change_data_t **change_data)
Definition: frontend_driver.c:433
uint64_t(* get_used_mem)(void)
Definition: frontend_driver.h:96
Definition: frontend_driver.h:48
void * data
Definition: frontend_driver.h:70
uint64_t frontend_driver_get_total_memory(void)
Definition: frontend_driver.c:361
frontend_ctx_driver_t frontend_ctx_ps3
Definition: platform_ps3.c:607
Definition: frontend_driver.h:55
enum frontend_powerstate(* get_powerstate)(int *seconds, int *percent)
Definition: frontend_driver.h:93
struct frontend_ctx_driver frontend_ctx_driver_t
void frontend_driver_process_args(int *argc, char *argv[])
Definition: frontend_driver.c:275
GLbitfield flags
Definition: glext.h:7828
Definition: frontend_driver.h:52
bool(* check_for_path_changes)(path_change_data_t *change_data)
Definition: frontend_driver.h:107
frontend_ctx_driver_t frontend_ctx_gx
Definition: platform_gx.c:546
unsigned __int64 uint64_t
Definition: stdint.h:136
void frontend_driver_set_signal_handler_state(int value)
Definition: frontend_driver.c:393
int frontend_driver_get_signal_handler_state(void)
Definition: frontend_driver.c:385
int(* parse_drive_list)(void *, bool)
Definition: frontend_driver.h:94
Definition: frontend_driver.h:64
Definition: frontend_driver.h:56
void(* detach_console)(void)
Definition: frontend_driver.h:102
Definition: string_list.h:47
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
Definition: frontend_driver.h:40
Definition: frontend_driver.h:63