all repos — mgba @ 20b0c0d2fb7429190d94743379f009b7e5b4f5cb

mGBA Game Boy Advance Emulator

src/util/gui/menu.h (view raw)

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef GUI_MENU_H
 7#define GUI_MENU_H
 8
 9#include "util/vector.h"
10
11struct GUIMenuItem {
12	const char* title;
13	void* data;
14};
15
16DECLARE_VECTOR(GUIMenuItemList, struct GUIMenuItem);
17struct GUIMenu {
18	const char* title;
19	struct GUIMenuItemList items;
20	size_t index;
21};
22
23enum GUIMenuExitReason {
24	GUI_MENU_EXIT_ACCEPT,
25	GUI_MENU_EXIT_BACK,
26	GUI_MENU_EXIT_CANCEL,
27};
28
29struct GUIParams;
30enum GUIMenuExitReason GUIShowMenu(struct GUIParams* params, struct GUIMenu* menu, struct GUIMenuItem* item);
31
32#endif