wmaker: Moved function prototype to the appropriate header
[wmaker-crm.git] / util / wmmenugen.h
blob3a60ab2ac3dc7d7a0645f532d918f44db3e65b25
1 /*
2 * wmmenugen - Window Maker PropList menu generator
4 * Copyright (c) 2010. Tamas Tevesz <ice@extreme.hu>
6 * This program 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 2 of the License, or
9 * (at your option) any later version.
11 * This program 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.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef WMMENUGEN_H
22 #define WMMENUGEN_H
24 #include <WINGs/WUtil.h>
26 #include "../src/wconfig.h"
28 /* flags attached to a particular WMMenuEntry */
29 #define F_TERMINAL (1 << 0)
30 #define F_RESTART_SELF (1 << 1)
31 #define F_RESTART_OTHER (1 << 2)
32 #define F_QUIT (1 << 3)
35 /* a representation of a Window Maker menu entry. all menus are
36 * transformed into this form.
38 typedef struct {
39 char *Name; /* display name; submenu path of submenu */
40 char *CmdLine; /* command to execute, NULL if submenu */
41 char *SubMenu; /* submenu to place entry in; only used when an entry is */
42 /* added to the tree by the parser; new entries created in */
43 /* main (submenu creation) should set this to NULL */
44 int Flags; /* flags */
45 } WMMenuEntry;
47 /* the abstract menu tree
49 extern WMTreeNode *menu;
51 extern char *env_lang, *env_ctry, *env_enc, *env_mod;
53 /* wmmenu_misc.c
55 void parse_locale(const char *what, char **env_lang, char **env_ctry, char **env_enc, char **env_mod);
56 char *find_terminal_emulator(void);
57 Bool fileInPath(const char *file);
59 /* implemented parsers
61 void parse_xdg(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEntry));
62 void parse_wmconfig(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEntry));
63 Bool wmconfig_validate_file(const char *filename, const struct stat *st, int tflags, struct FTW *ftw);
65 #endif /* WMMENUGEN_H */