use guile subrs
[bpt/emacs.git] / src / menu.h
CommitLineData
e7c9048f 1/* Functions to manipulate menus.
ba318903 2 Copyright (C) 2008-2014 Free Software Foundation, Inc.
e7c9048f
AS
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18
19#ifndef MENU_H
20#define MENU_H
21
08dc5ae6 22#include "systime.h" /* for Time */
181f08a7 23#include "../lwlib/lwlib-widget.h"
08dc5ae6 24
e139a33c
EZ
25#ifdef HAVE_NTGUI
26extern Lisp_Object Qunsupported__w32_dialog;
27#endif
28
cfd794af
DA
29/* Bit fields used by terminal-specific menu_show_hook. */
30
31enum {
5dda54d6 32 MENU_KEYMAPS = 0x1,
cfd794af
DA
33 MENU_FOR_CLICK = 0x2,
34 MENU_KBD_NAVIGATION = 0x4
35};
36
3d608a86
J
37extern void x_set_menu_bar_lines (struct frame *f,
38 Lisp_Object value,
39 Lisp_Object oldval);
40
383e0970 41extern void init_menu_items (void);
5994c183 42extern void finish_menu_items (void) ATTRIBUTE_CONST;
383e0970
J
43extern void discard_menu_items (void);
44extern void save_menu_items (void);
7cded46f 45extern bool parse_single_submenu (Lisp_Object, Lisp_Object, Lisp_Object);
383e0970 46extern void list_of_panes (Lisp_Object);
3d608a86
J
47#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI) \
48 || defined (HAVE_NS)
383e0970
J
49extern void free_menubar_widget_value_tree (widget_value *);
50extern void update_submenu_strings (widget_value *);
a10c8269 51extern void find_and_call_menu_selection (struct frame *, int,
383e0970 52 Lisp_Object, void *);
5668fb88 53extern widget_value *make_widget_value (const char *, char *, bool, Lisp_Object);
7cded46f 54extern widget_value *digest_single_submenu (int, int, bool);
e7c9048f
AS
55#endif
56
cfd794af
DA
57#if defined (HAVE_X_WINDOWS) || defined (MSDOS)
58extern Lisp_Object x_menu_show (struct frame *, int, int, int,
59 Lisp_Object, const char **);
60#endif
61#ifdef HAVE_NTGUI
62extern Lisp_Object w32_menu_show (struct frame *, int, int, int,
42ca4633 63 Lisp_Object, const char **);
3f2f9b6a 64#endif
cfd794af
DA
65#ifdef HAVE_NS
66extern Lisp_Object ns_menu_show (struct frame *, int, int, int,
42ca4633 67 Lisp_Object, const char **);
cfd794af 68#endif
ff2d0e83
PE
69extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
70 Lisp_Object, const char **);
3b158d11 71extern ptrdiff_t menu_item_width (const unsigned char *);
e7c9048f 72#endif /* MENU_H */