RetroArch
menu_entry.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_ENTRY_H__
17 #define MENU_ENTRY_H__
18 
19 #include <stdint.h>
20 
21 #include <boolean.h>
22 #include <retro_common_api.h>
23 #include <retro_miscellaneous.h>
24 
25 #include "../../msg_hash.h"
26 
27 #include "../menu_input.h"
28 
30 
32 {
45 };
46 
47 typedef struct menu_entry
48 {
50  unsigned idx;
51  unsigned type;
52  unsigned spacing;
53  size_t entry_idx;
54  char *path;
55  char *label;
56  char *sublabel;
57  char *rich_label;
58  char *value;
59  bool checked;
60 } menu_entry_t;
61 
63 
64 char *menu_entry_get_path(menu_entry_t *entry);
65 
66 void menu_entry_get_label(menu_entry_t *entry, char *s, size_t len);
67 
68 unsigned menu_entry_get_spacing(menu_entry_t *entry);
69 
70 unsigned menu_entry_get_type_new(menu_entry_t *entry);
71 
73 
75 
77 
79 
81 
83 
85 
87 
89 
91 
92 void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len);
93 
95 
97 
99 
100 void menu_entry_get_value(menu_entry_t *entry, char *s, size_t len);
101 
102 void menu_entry_set_value(uint32_t i, const char *s);
103 
105 
107 
109 
110 bool menu_entry_is_currently_selected(unsigned id);
111 
112 void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
113  size_t i, void *userdata, bool use_representation);
114 
116 
118  unsigned i, enum menu_action action);
119 
120 void menu_entry_free(menu_entry_t *entry);
121 
122 void menu_entry_init(menu_entry_t *entry);
123 
125 
126 #endif
char * path
Definition: menu_entry.h:54
int32_t menu_entry_bind_index(uint32_t i)
Definition: menu_entry.c:186
Definition: menu_entry.h:41
void menu_entry_init(menu_entry_t *entry)
Definition: menu_entry.c:101
char * value
Definition: menu_entry.h:58
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
void menu_entry_set_value(uint32_t i, const char *s)
Definition: menu_entry.c:274
void menu_entry_get_value(menu_entry_t *entry, char *s, size_t len)
Definition: menu_entry.c:267
Definition: menu_entry.h:36
char * sublabel
Definition: menu_entry.h:56
Definition: menu_entry.h:47
GLenum GLsizei len
Definition: glext.h:7389
unsigned idx
Definition: menu_entry.h:50
Definition: menu_entry.h:37
bool menu_entry_pathdir_allow_empty(uint32_t i)
Definition: menu_entry.c:230
void menu_entry_bind_key_set(uint32_t i, int32_t value)
Definition: menu_entry.c:195
GLdouble s
Definition: glext.h:6390
Definition: menu_entry.h:35
struct string_list * menu_entry_enum_values(uint32_t i)
Definition: menu_entry.c:170
size_t entry_idx
Definition: menu_entry.h:53
void menu_entry_bind_joykey_set(uint32_t i, int32_t value)
Definition: menu_entry.c:204
Definition: menu_entry.h:42
uint32_t menu_entry_get_bool_value(uint32_t i)
Definition: menu_entry.c:161
bool menu_entry_is_currently_selected(unsigned id)
Definition: menu_entry.c:399
enum msg_hash_enums enum_idx
Definition: menu_entry.h:49
void menu_entry_pathdir_selected(uint32_t i)
Definition: menu_entry.c:222
void menu_entry_reset(uint32_t i)
Definition: menu_entry.c:257
Definition: menu_entry.h:43
unsigned type
Definition: menu_entry.h:51
void menu_entry_enum_set_value_with_string(uint32_t i, const char *s)
Definition: menu_entry.c:180
float menu_entry_num_min(uint32_t i)
Definition: menu_entry.c:288
bool checked
Definition: menu_entry.h:59
menu_entry_type
Definition: menu_entry.h:31
Definition: menu_entry.h:33
unsigned spacing
Definition: menu_entry.h:52
enum menu_entry_type menu_entry_get_type(uint32_t i)
Definition: menu_entry.c:37
char * label
Definition: menu_entry.h:55
void menu_entry_bind_joyaxis_set(uint32_t i, int32_t value)
Definition: menu_entry.c:213
signed int int32_t
Definition: stdint.h:123
Definition: menu_entry.h:34
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
char * menu_entry_get_rich_label(menu_entry_t *entry)
Definition: menu_entry.c:122
float menu_entry_num_max(uint32_t i)
Definition: menu_entry.c:295
unsigned menu_entry_get_spacing(menu_entry_t *entry)
Definition: menu_entry.c:147
char * rich_label
Definition: menu_entry.h:57
menu_action
Definition: menu_input.h:31
void menu_entry_get_label(menu_entry_t *entry, char *s, size_t len)
Definition: menu_entry.c:140
msg_hash_enums
Definition: msg_hash.h:152
struct menu_entry menu_entry_t
char * menu_entry_get_path(menu_entry_t *entry)
Definition: menu_entry.c:115
uint32_t menu_entry_pathdir_for_directory(uint32_t i)
Definition: menu_entry.c:238
Definition: menu_entry.h:44
GLsizei const GLfloat * value
Definition: glext.h:6709
int menu_entry_select(uint32_t i)
Definition: menu_entry.c:411
uint32_t menu_entry_num_has_range(uint32_t i)
Definition: menu_entry.c:280
void menu_entry_free(menu_entry_t *entry)
Definition: menu_entry.c:80
void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len)
Definition: menu_entry.c:246
unsigned menu_entry_get_type_new(menu_entry_t *entry)
Definition: menu_entry.c:154
Definition: menu_entry.h:39
int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
Definition: menu_entry.c:423
Definition: menu_entry.h:40
unsigned int uint32_t
Definition: stdint.h:126
char * menu_entry_get_sublabel(menu_entry_t *entry)
Definition: menu_entry.c:133
Definition: string_list.h:47
Definition: menu_entry.h:38
void menu_entry_get(menu_entry_t *entry, size_t stack_idx, size_t i, void *userdata, bool use_representation)
Definition: menu_entry.c:302