3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #define MENU_FLAG_SHOW 0x1
24 #define MENU_FLAG_DISABLED 0x2
26 #define MENUITEM_FLAG_MOUSE 0x1
27 #define MENUITEM_FLAG_CLICKED 0x2
29 typedef unsigned (wmmenu_handler
) ();
31 typedef struct wmmenuitem_context
{
32 struct wmmenuitem_context
*next
, *prev
;
34 wmmenu_handler
*handler
;
39 typedef struct wmmenu_context
{
40 struct wmmenu_context
*next
, *prev
;
52 extern wmmenu
*menu_create (unsigned x
, unsigned y
, const char *caption
);
53 extern wmmenuitem
*menu_additem (wmmenu
*menu
, const char *caption
, wmmenu_handler
*handler
);
54 extern unsigned char menuitem_flags (wmmenuitem
*item
);
55 extern unsigned menu_draw_all ();
56 extern unsigned menu_show (wmmenu
*menu
);
57 extern unsigned init_menu ();