Build Fix -- compatibility issue with newer autoconf
[sxemacs] / src / ui / X11 / gui-x.h
1 /* General GUI code -- X-specific header file.
2    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
3    Copyright (C) 1996, 2000 Ben Wing.
4
5 This file is part of SXEmacs
6
7 SXEmacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 SXEmacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
19
20
21 /* Synched up with: Not in FSF. */
22
23 /* This file Mule-ized by Ben Wing, 7-8-00. */
24
25 #ifndef INCLUDED_gui_x_h_
26 #define INCLUDED_gui_x_h_
27
28 #include "ui/lwlib/lwlib.h"
29
30 widget_value *xmalloc_widget_value(void);
31
32 LWLIB_ID new_lwlib_id(void);
33
34 /* Each frame has one of these, and they are also contained in
35    Vpopup_callbacks.
36    It doesn't really need to be an lrecord (it's not lisp-accessible)
37    but it makes marking slightly more modular.
38  */
39
40 struct popup_data {
41         struct lcrecord_header header;
42
43         /* lwlib ID of the tree of widgets corresponding to this popup.
44            We pass this to lw_map_widget_values() to retrieve all of our
45            Lispy call-data values that need to be GCPRO'd. */
46         LWLIB_ID id;
47
48         /* For the frame popup data, this is the last buffer for which the
49            menubar was displayed.  If the buffer has changed, we may have to
50            update things. */
51         Lisp_Object last_menubar_buffer;
52
53         /* This flag tells us if the menubar contents are up-to-date with respect
54            to the current menubar structure.  If we want to actually pull down a
55            menu and this is false, then we need to update things. */
56         char menubar_contents_up_to_date;
57 };
58
59 DECLARE_LRECORD(popup_data, struct popup_data);
60 #define XPOPUP_DATA(x) XRECORD (x, popup_data, struct popup_data)
61 #define XSETPOPUP_DATA(x, p) XSETRECORD (x, p, popup_data)
62 #define POPUP_DATAP(x) RECORDP (x, popup_data)
63 #define CHECK_POPUP_DATA(x) CHECK_RECORD (x, popup_data)
64
65 void gcpro_popup_callbacks(LWLIB_ID id);
66 void ungcpro_popup_callbacks(LWLIB_ID id);
67 int popup_handled_p(LWLIB_ID id);
68 void free_popup_widget_value_tree(widget_value * wv);
69 void popup_selection_callback(Widget widget, LWLIB_ID ignored_id,
70                               XtPointer client_data);
71 Extbyte *add_accel_and_to_external(Lisp_Object string);
72 int button_item_to_widget_value(Lisp_Object gui_object_instance,
73                                 Lisp_Object gui_item, widget_value * wv,
74                                 int allow_text_field_p, int no_keys_p,
75                                 int menu_entry_p, int accel_p);
76 widget_value *gui_items_to_widget_values(Lisp_Object gui_object_instance,
77                                          Lisp_Object items, int accel_p);
78 Extbyte *menu_separator_style_and_to_external(const Bufbyte * s);
79 Lisp_Object widget_value_unwind(Lisp_Object closure);
80
81 #endif                          /* INCLUDED_gui_x_h_ */