2 * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3 * Copyright (C) 2004-2007 Kim Woelders
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to
7 * deal in the Software without restriction, including without limitation the
8 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 * sell copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies of the Software, its documentation and marketing & publicity
14 * materials, and acknowledgment shall be given in the documentation, materials
15 * and software packages that this Software was used.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 typedef struct _menu Menu;
30 typedef struct _menuitem MenuItem;
31 typedef struct _menustyle MenuStyle;
33 typedef int (MenuLoader) (Menu * m);
36 int MenuStyleConfigLoad(FILE * fs);
37 MenuStyle *MenuStyleFind(const char *name);
39 int MenuConfigLoad(FILE * fs);
40 Menu *MenuCreate(const char *name, const char *title,
41 Menu * parent, MenuStyle * ms);
42 void MenuDestroy(Menu * m);
43 void MenuHide(Menu * m);
44 void MenuEmpty(Menu * m, int destroying);
45 int MenuLoad(Menu * m);
46 Menu *MenuFind(const char *name, const char *param);
47 MenuItem *MenuItemCreate(const char *text, ImageClass * ic,
48 const char *action_params, Menu * child);
49 void MenuSetInternal(Menu * m);
50 void MenuSetDynamic(Menu * m);
51 void MenuSetName(Menu * m, const char *name);
52 void MenuSetAlias(Menu * m, const char *alias);
53 void MenuSetStyle(Menu * m, MenuStyle * ms);
54 void MenuSetTitle(Menu * m, const char *title);
55 void MenuSetIconSize(Menu * m, int size);
56 void MenuSetData(Menu * m, char *data);
57 void MenuSetLoader(Menu * m, MenuLoader * loader);
58 void MenuSetTimestamp(Menu * m, time_t t);
59 void MenuAddItem(Menu * m, MenuItem * mi);
60 const char *MenuGetName(const Menu * m);
61 const char *MenuGetData(const Menu * m);
62 time_t MenuGetTimestamp(const Menu * m);
64 int MenusActive(void);
67 Menu *MenusCreateInternal(const char *type, const char *name,
68 const char *style, const char *prm);
70 #endif /* _MENUS_H_ */