File: openbox-menu.h

package info (click to toggle)
openbox-menu 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 196 kB
  • ctags: 62
  • sloc: ansic: 652; makefile: 68
file content (64 lines) | stat: -rw-r--r-- 1,994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 *      openbox-menu.h - this file is part of openbox-menu
 *      Copyright (C) 2010-13 mimas <mimasgpc@free.fr>
 *
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU Lesser General Public License as published
 *      by the Free Software Foundation; version 3.0 only.
 *
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */

#ifndef __OPENBOXMENU_APP__
#define __OPENBOXMENU_APP__
#include <menu-cache.h>

#define VERSION "0.5.1"
#define APPMENU_SIZE 30
#define TERMINAL_CMD "xterm -e"

#ifndef __VERSION_MINOR // since menu-cache 0.5.0.
#warning "If you are running a 0.3.x version of libmenu-cache, you need to compile the 3.6.7 version of openbox-menu"
#endif

typedef enum {
	NO_ERROR = 0,
	CONFIG_ERROR,
	MENU_DIR_ERROR,
	MENU_EMPTY_ERROR,
	LOOKUP_ERROR,
	MENU_CACHE_ERROR,
} OBM_Error;


typedef struct {
	/* Configuration */
	gchar    *output;
	guint32   show_flag;
	GString  *builder;      /* */
	gchar    *terminal_cmd; /* command to launch program in a terminal */
	gboolean  comment;      /* display description instead of name */
	gboolean  sn;           /* startup notification */
	gboolean  no_icons;     /* icons disabled */
	gboolean  persistent;
	gchar    *menu_file;
	gchar    *template;
	guint     code;
} OB_Menu;

guint app_is_visible (MenuCacheApp *, guint32);
gchar *clean_exec (MenuCacheApp *);
gchar *safe_name (const char *);
gchar *item_icon_path (MenuCacheItem*);

void menu_display (MenuCache *, OB_Menu *);

#endif // __OPENBOXMENU_APP__