RetroArch
nk_menu.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2011-2017 - Daniel De Matteis
3  * Copyright (C) 2014-2017 - Jean-André Santoni
4  * Copyright (C) 2016-2017- Andrés Suárez
5  *
6  * RetroArch is free software: you can redistribute it and/or modify it under the terms
7  * of the GNU General Public License as published by the Free Software Found-
8  * ation, either version 3 of the License, or (at your option) any later version.
9  *
10  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  * PURPOSE. See the GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along with RetroArch.
15  * If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 /* This file is intended for menu functions, custom controls, etc. */
19 
20 #ifndef _NK_MENU_H
21 #define _NK_MENU_H
22 
23 #include "nk_common.h"
24 
25 #include "../../menu_driver.h"
26 #include "../../menu_input.h"
27 
28 enum
29 {
32 };
33 
34 struct icons {
35  struct nk_image folder;
36  struct nk_image monitor;
37  struct nk_image gamepad;
39  struct nk_image speaker;
40  struct nk_image invader;
41  struct nk_image page_on;
43 };
44 
45 struct window {
46  bool open;
47  struct nk_vec2 position;
48  struct nk_vec2 size;
49 };
50 
51 typedef struct nk_menu_handle
52 {
53  /* nuklear mandatory */
54  void *memory;
55  struct nk_context ctx;
58 
59  /* window control variables */
60  struct nk_vec2 size;
62  struct window window[5];
63 
64  /* menu driver variables */
66 
67  /* image & theme related variables */
69  struct icons icons;
70 
71  struct
72  {
75  } textures;
76 
79 
81 
83 void nk_wnd_set_state(nk_menu_handle_t *nk, const int id,
84  struct nk_vec2 pos, struct nk_vec2 size);
85 void nk_wnd_get_state(nk_menu_handle_t *nk, const int id,
86  struct nk_vec2 *pos, struct nk_vec2 *size);
87 void nk_common_set_style(struct nk_context *ctx);
88 
89 #endif
struct nk_image invader
Definition: nk_menu.h:40
void nk_wnd_set_state(nk_menu_handle_t *nk, const int id, struct nk_vec2 pos, struct nk_vec2 size)
Definition: nk_menu.c:23
Definition: nuklear.h:453
struct nk_image page_on
Definition: nk_menu.h:41
video_font_raster_block_t list_block
Definition: nk_menu.h:77
struct nk_menu_handle nk_menu_handle_t
GLsizeiptr size
Definition: glext.h:6559
Definition: nuklear.h:455
void nk_common_set_style(struct nk_context *ctx)
Definition: nk_menu.c:39
Definition: nuklear.h:2168
#define PATH_MAX_LENGTH
Definition: retro_miscellaneous.h:83
char box_message[PATH_MAX_LENGTH]
Definition: nk_menu.h:65
struct nk_menu_handle::@806 textures
Definition: nk_menu.h:51
struct nk_image speaker
Definition: nk_menu.h:39
uintptr_t menu_texture_item
Definition: menu_driver.h:348
struct nk_image page_off
Definition: nk_menu.h:42
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
struct nk_memory_status status
Definition: nk_menu.h:56
Definition: nk_menu.h:31
Definition: video_coord_array.h:84
void nk_wnd_get_state(nk_menu_handle_t *nk, const int id, struct nk_vec2 *pos, struct nk_vec2 *size)
Definition: nk_menu.c:31
struct nk_color nk_colors[NK_COLOR_COUNT]
Definition: nk_menu.h:80
void * memory
Definition: nk_menu.h:54
struct nk_image gamepad
Definition: nk_menu.h:37
Definition: nk_menu.h:45
menu_action
Definition: menu_input.h:31
Definition: nk_menu.h:30
struct nk_context ctx
Definition: nk_menu.h:55
struct nk_image folder
Definition: nk_menu.h:35
bool open
Definition: nk_menu.h:46
Definition: configuration.h:73
Definition: nk_menu.h:34
menu_texture_item bg
Definition: nk_menu.h:73
Definition: nuklear.h:461
Definition: nuklear.h:4133
void nk_wnd_debug(nk_menu_handle_t *nk)
Definition: nk_wnd_debug.c:36
char assets_directory[PATH_MAX_LENGTH]
Definition: nk_menu.h:68
menu_texture_item pointer
Definition: nk_menu.h:74
struct nk_vec2 position
Definition: nk_menu.h:47
enum menu_action action
Definition: nk_menu.h:57
Definition: nuklear.h:2659
bool size_changed
Definition: nk_menu.h:61
struct nk_image monitor
Definition: nk_menu.h:36