RetroArch
menu_entries.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2011-2017 - Daniel De Matteis
3  *
4  * RetroArch is free software: you can redistribute it and/or modify it under the terms
5  * of the GNU General Public License as published by the Free Software Found-
6  * ation, either version 3 of the License, or (at your option) any later version.
7  *
8  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  * PURPOSE. See the GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License along with RetroArch.
13  * If not, see <http://www.gnu.org/licenses/>.
14  */
15 
16 #ifndef __MENU_ENTRIES_H__
17 #define __MENU_ENTRIES_H__
18 
19 #include <stdint.h>
20 #include <stddef.h>
21 
22 #include <boolean.h>
23 #include <retro_common_api.h>
24 
25 #include <lists/file_list.h>
26 
27 #include "menu_setting.h"
28 #include "menu_displaylist.h"
29 
31 
33 {
46  /* Sets the starting index of the menu entry list. */
48  /* Returns the starting index of the menu entry list. */
53 };
54 
56 {
60 };
61 
62 typedef struct menu_list menu_list_t;
63 
64 typedef struct menu_ctx_list
65 {
67  const char *path;
68  char *fullpath;
69  const char *label;
70  unsigned entry_type;
71  unsigned action;
72  size_t idx;
73  size_t selection;
74  size_t size;
75  size_t list_size;
76  void *entry;
79 
80 typedef struct menu_file_list_cbs
81 {
83  const char *action_iterate_ident;
85  const char *action_select_ident;
87  const char *action_ok_ident;
88  const char *action_cancel_ident;
89  const char *action_scan_ident;
90  const char *action_right_ident;
91  const char *action_start_ident;
92  const char *action_info_ident;
94  const char *action_left_ident;
95  const char *action_refresh_ident;
96  const char *action_up_ident;
97  const char *action_label_ident;
98  const char *action_sublabel_ident;
99  const char *action_down_ident;
101 
102  bool checked;
103 
105 
106  int (*action_iterate)(const char *label, unsigned action);
108  int (*action_select)(const char *path, const char *label, unsigned type,
109  size_t idx);
110  int (*action_get_title)(const char *path, const char *label,
111  unsigned type, char *s, size_t len);
112  int (*action_ok)(const char *path, const char *label, unsigned type,
113  size_t idx, size_t entry_idx);
114  int (*action_cancel)(const char *path, const char *label, unsigned type,
115  size_t idx);
116  int (*action_scan)(const char *path, const char *label, unsigned type,
117  size_t idx);
118  int (*action_start)(unsigned type, const char *label);
119  int (*action_info)(unsigned type, const char *label);
120  int (*action_content_list_switch)(void *data, void *userdata, const char
121  *path, const char *label, unsigned type);
122  int (*action_left)(unsigned type, const char *label, bool wraparound);
123  int (*action_right)(unsigned type, const char *label, bool wraparound);
125  int (*action_up)(unsigned type, const char *label);
126  int (*action_label)(file_list_t *list,
127  unsigned type, unsigned i,
128  const char *label, const char *path,
129  char *s, size_t len);
131  unsigned type, unsigned i,
132  const char *label, const char *path,
133  char *s, size_t len);
134  int (*action_down)(unsigned type, const char *label);
136  unsigned *w, unsigned type, unsigned i,
137  const char *label, char *s, size_t len,
138  const char *entry_label,
139  const char *path,
140  char *path_buf, size_t path_buf_size);
142 
143 int menu_entries_get_title(char *title, size_t title_len);
144 
145 int menu_entries_get_core_title(char *title_msg, size_t title_msg_len);
146 
147 int menu_entries_get_core_name(char *s, size_t len);
148 
150 
152 
153 void menu_entries_append(file_list_t *list, const char *path, const char *label,
154  unsigned type, size_t directory_ptr, size_t entry_idx);
155 
156 void menu_entries_get_last_stack(const char **path, const char **label,
157  unsigned *file_type, enum msg_hash_enums *enum_idx, size_t *entry_idx);
158 
160 
161 void menu_entries_pop_stack(size_t *ptr, size_t idx, bool animate);
162 
163 void menu_entries_flush_stack(const char *needle, unsigned final_type);
164 
165 size_t menu_entries_get_stack_size(size_t idx);
166 
167 size_t menu_entries_get_size(void);
168 
169 void menu_entries_get_at_offset(const file_list_t *list, size_t idx,
170  const char **path, const char **label, unsigned *file_type,
171  size_t *entry_idx, const char **alt);
172 
174 
175 void menu_entries_prepend(file_list_t *list, const char *path, const char *label,
176  enum msg_hash_enums enum_idx,
177  unsigned type, size_t directory_ptr, size_t entry_idx);
178 
179 void menu_entries_append_enum(file_list_t *list, const char *path, const char *label,
180  enum msg_hash_enums enum_idx,
181  unsigned type, size_t directory_ptr, size_t entry_idx);
182 
184 
186  bool checked);
187 
189 
190 #endif
char * fullpath
Definition: menu_entries.h:68
size_t menu_entries_get_stack_size(size_t idx)
Definition: menu_entries.c:684
Definition: menu_entries.h:49
const char * action_get_title_ident
Definition: menu_entries.h:86
int(* action_label)(file_list_t *list, unsigned type, unsigned i, const char *label, const char *path, char *s, size_t len)
Definition: menu_entries.h:126
const GLvoid * ptr
Definition: nx_glsym.h:242
Definition: menu_entries.h:40
const char * action_info_ident
Definition: menu_entries.h:92
void menu_entries_append(file_list_t *list, const char *path, const char *label, unsigned type, size_t directory_ptr, size_t entry_idx)
Definition: menu_entries.c:499
int(* action_scan)(const char *path, const char *label, unsigned type, size_t idx)
Definition: menu_entries.h:116
size_t menu_entries_get_size(void)
Definition: menu_entries.c:692
Definition: menu_entries.h:36
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
menu_entries_ctl_state
Definition: menu_entries.h:32
int(* action_left)(unsigned type, const char *label, bool wraparound)
Definition: menu_entries.h:122
size_t list_size
Definition: menu_entries.h:75
int(* action_start)(unsigned type, const char *label)
Definition: menu_entries.h:118
size_t idx
Definition: menu_entries.h:72
int menu_entries_get_core_title(char *title_msg, size_t title_msg_len)
Definition: menu_entries.c:417
file_list_t * list
Definition: menu_entries.h:77
GLsizei const GLchar ** path
Definition: glext.h:7901
const char * action_content_list_switch_ident
Definition: menu_entries.h:93
int(* action_up)(unsigned type, const char *label)
Definition: menu_entries.h:125
GLenum GLsizei len
Definition: glext.h:7389
int(* action_refresh)(file_list_t *list, file_list_t *menu_list)
Definition: menu_entries.h:124
void menu_entries_pop_stack(size_t *ptr, size_t idx, bool animate)
Definition: menu_entries.c:677
void menu_entries_flush_stack(const char *needle, unsigned final_type)
Definition: menu_entries.c:670
const char * action_label_ident
Definition: menu_entries.h:97
int menu_entries_get_title(char *title, size_t title_len)
Definition: menu_entries.c:379
GLdouble s
Definition: glext.h:6390
const struct retro_game_info * info
Definition: libretro.h:2121
Definition: menu_entries.h:52
int(* action_get_title)(const char *path, const char *label, unsigned type, char *s, size_t len)
Definition: menu_entries.h:110
Definition: menu_entries.h:38
Definition: menu_entries.h:64
Definition: menu_displaylist.h:194
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
Definition: setting_list.h:92
const char * action_down_ident
Definition: menu_entries.h:99
int(* action_select)(const char *path, const char *label, unsigned type, size_t idx)
Definition: menu_entries.h:108
Definition: ibxm.h:9
void menu_entries_prepend(file_list_t *list, const char *path, const char *label, enum msg_hash_enums enum_idx, unsigned type, size_t directory_ptr, size_t entry_idx)
Definition: menu_entries.c:599
int(* action_ok)(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx)
Definition: menu_entries.h:112
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
const char * action_start_ident
Definition: menu_entries.h:91
GLuint GLsizei const GLchar * label
Definition: glext.h:8583
void menu_entries_set_checked(file_list_t *list, size_t entry_idx, bool checked)
Definition: menu_entries.c:490
const char * action_scan_ident
Definition: menu_entries.h:89
int(* action_sublabel)(file_list_t *list, unsigned type, unsigned i, const char *label, const char *path, char *s, size_t len)
Definition: menu_entries.h:130
Definition: menu_entries.c:37
int(* action_info)(unsigned type, const char *label)
Definition: menu_entries.h:119
GLenum type
Definition: glext.h:6233
Definition: menu_entries.h:57
file_list_t * menu_entries_get_selection_buf_ptr(size_t idx)
Definition: menu_entries.c:465
void menu_entries_get_at_offset(const file_list_t *list, size_t idx, const char **path, const char **label, unsigned *file_type, size_t *entry_idx, const char **alt)
Definition: menu_entries.c:239
int(* action_right)(unsigned type, const char *label, bool wraparound)
Definition: menu_entries.h:123
bool menu_entries_ctl(enum menu_entries_ctl_state state, void *data)
Definition: menu_entries.c:711
unsigned entry_idx
Definition: menu_cbs_ok.c:2308
int(* action_content_list_switch)(void *data, void *userdata, const char *path, const char *label, unsigned type)
Definition: menu_entries.h:120
const char * action_left_ident
Definition: menu_entries.h:94
Definition: menu_entries.h:80
void menu_entries_get_last_stack(const char **path, const char **label, unsigned *file_type, enum msg_hash_enums *enum_idx, size_t *entry_idx)
Definition: menu_entries.c:655
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
enum msg_hash_enums enum_idx
Definition: menu_entries.h:82
const char * action_up_ident
Definition: menu_entries.h:96
unsigned action
Definition: menu_entries.h:71
struct menu_file_list_cbs menu_file_list_cbs_t
Definition: menu_entries.h:45
Definition: menu_entries.h:47
void(* action_get_value)(file_list_t *list, unsigned *w, unsigned type, unsigned i, const char *label, char *s, size_t len, const char *entry_label, const char *path, char *path_buf, size_t path_buf_size)
Definition: menu_entries.h:135
bool checked
Definition: menu_entries.h:102
int(* action_cancel)(const char *path, const char *label, unsigned type, size_t idx)
Definition: menu_entries.h:114
const char * label
Definition: menu_entries.h:69
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 idx
Definition: pixman-arm-neon-asm.h:96
const char * action_ok_ident
Definition: menu_entries.h:87
struct menu_ctx_list menu_ctx_list_t
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
Definition: file_list.h:47
void menu_entries_append_enum(file_list_t *list, const char *path, const char *label, enum msg_hash_enums enum_idx, unsigned type, size_t directory_ptr, size_t entry_idx)
Definition: menu_entries.c:546
Definition: menu_entries.h:44
Definition: menu_entries.h:50
const char * action_right_ident
Definition: menu_entries.h:90
Definition: menu_entries.h:37
const char * path
Definition: menu_entries.h:67
Definition: menu_entries.h:34
menu_list_type
Definition: menu_entries.h:55
const char * action_refresh_ident
Definition: menu_entries.h:95
msg_hash_enums
Definition: msg_hash.h:152
const char * action_get_value_ident
Definition: menu_entries.h:100
size_t size
Definition: menu_entries.h:74
Definition: menu_entries.h:58
int(* action_iterate)(const char *label, unsigned action)
Definition: menu_entries.h:106
Definition: menu_entries.h:59
size_t selection
Definition: menu_entries.h:73
void * entry
Definition: menu_entries.h:76
enum menu_list_type type
Definition: menu_entries.h:66
unsigned entry_type
Definition: menu_entries.h:70
int(* action_deferred_push)(menu_displaylist_info_t *info)
Definition: menu_entries.h:107
file_list_t * menu_entries_get_menu_stack_ptr(size_t idx)
Definition: menu_entries.c:457
int menu_entries_get_core_name(char *s, size_t len)
Definition: menu_entries.c:397
Definition: menu_entries.h:51
menu_file_list_cbs_t * menu_entries_get_last_stack_actiondata(void)
Definition: menu_entries.c:646
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
const char * action_iterate_ident
Definition: menu_entries.h:83
Definition: menu_entries.h:35
const char * action_sublabel_ident
Definition: menu_entries.h:98
rarch_setting_t * menu_entries_get_setting(uint32_t i)
Definition: menu_entries.c:700
Definition: menu_entries.h:42
int(* action_down)(unsigned type, const char *label)
Definition: menu_entries.h:134
rarch_setting_t * setting
Definition: menu_entries.h:104
unsigned int uint32_t
Definition: stdint.h:126
Definition: menu_entries.h:43
const char * action_select_ident
Definition: menu_entries.h:85
const char * action_deferred_push_ident
Definition: menu_entries.h:84
Definition: menu_entries.h:39
const char * action_cancel_ident
Definition: menu_entries.h:88
Definition: menu_entries.h:41