1 /*
2  * Copyright (c) 2015-2019 gnome-mpv
3  *
4  * This file is part of Celluloid.
5  *
6  * Celluloid is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Celluloid is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Celluloid.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef MENU_H
21 #define MENU_H
22 
23 #include <glib.h>
24 #include <gio/gio.h>
25 
26 G_BEGIN_DECLS
27 
28 #define CELLULOID_MENU_ITEM(title, action) {title, action, NULL}
29 #define CELLULOID_MENU_SUBMENU(title, submenu) {title, NULL, submenu}
30 #define CELLULOID_MENU_SEPARATOR {NULL, "", NULL}
31 #define CELLULOID_MENU_END {NULL, NULL, NULL}
32 
33 struct CelluloidMenuEntry
34 {
35 	gchar *title;
36 	gchar *action;
37 	GMenu *submenu;
38 };
39 
40 typedef struct CelluloidMenuEntry CelluloidMenuEntry;
41 
42 void
43 celluloid_menu_build_full(	GMenu *celluloid_menu,
44 				const GPtrArray *track_list,
45 				const GPtrArray *disc_list );
46 
47 void
48 celluloid_menu_build_menu_btn(GMenu *celluloid_menu, const GPtrArray *track_list);
49 
50 void
51 celluloid_menu_build_open_btn(GMenu *celluloid_menu, const GPtrArray *disc_list);
52 
53 void
54 celluloid_menu_build_app_menu(GMenu *celluloid_menu);
55 
56 void
57 celluloid_menu_build_menu(	GMenu *menu,
58 				const CelluloidMenuEntry *entries,
59 				gboolean flat );
60 
61 G_END_DECLS
62 
63 #endif
64