aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2014-06-03 12:59:55 -0700
committerPaul Eggert2014-06-03 12:59:55 -0700
commit181f08a7d8378c5d3cb290b58c7618396413d28c (patch)
treed36524ab6287a64f552897cfe3f1c8e2bce14213 /src
parent5897da1d746561c63719b21c5984b49a194f8209 (diff)
downloademacs-181f08a7d8378c5d3cb290b58c7618396413d28c.tar.gz
emacs-181f08a7d8378c5d3cb290b58c7618396413d28c.zip
Do not require libXt-devel when building with gtk.
* lwlib/lwlib-widget.h: New file, with contents taken from lwlib.h. (widget_value) [HAVE_NTGUI]: New member 'title'. * lwlib/lwlib.h: Include lwlib-widget.h. (change_type, enum button_type, widget_value): Move to lwlib-widget.h. * src/gtkutil.h, src/menu.h: Include lwlib-widget.h, not lwlib-h, to avoid dependency on libXt-devel. * src/menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too. (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as lwlib-widget.h now does this. * src/nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/gtkutil.h2
-rw-r--r--src/menu.h45
-rw-r--r--src/nsmenu.m2
4 files changed, 13 insertions, 46 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 39dde84f645..a6cbac808c2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12014-06-03 Paul Eggert <eggert@cs.ucla.edu>
2
3 Do not require libXt-devel when building with gtk.
4 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
5 dependency on libXt-devel.
6 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
7 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
8 lwlib-widget.h now does this.
9 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
10
12014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu> 112014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
2 12
3 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET. 13 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 345b3283e6d..a69932cc25c 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -24,7 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#ifdef USE_GTK 24#ifdef USE_GTK
25 25
26#include <gtk/gtk.h> 26#include <gtk/gtk.h>
27#include "../lwlib/lwlib.h" 27#include "../lwlib/lwlib-widget.h"
28#include "frame.h" 28#include "frame.h"
29#include "xterm.h" 29#include "xterm.h"
30 30
diff --git a/src/menu.h b/src/menu.h
index d71989ea1ef..266a471bc38 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -20,52 +20,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#define MENU_H 20#define MENU_H
21 21
22#include "systime.h" /* for Time */ 22#include "systime.h" /* for Time */
23#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) 23#include "../lwlib/lwlib-widget.h"
24#include "../lwlib/lwlib.h" /* for widget_value */
25#endif
26 24
27#ifdef HAVE_NTGUI 25#ifdef HAVE_NTGUI
28/* This is based on the one in ../lwlib/lwlib.h, with unused portions
29 removed. HAVE_NTGUI cannot include lwlib.h, as that pulls in X11
30 headers. */
31
32enum button_type
33{
34 BUTTON_TYPE_NONE,
35 BUTTON_TYPE_TOGGLE,
36 BUTTON_TYPE_RADIO
37};
38
39typedef struct _widget_value
40{
41 /* name of widget */
42 Lisp_Object lname;
43 const char* name;
44 /* value (meaning depend on widget type) */
45 const char* value;
46 /* keyboard equivalent. no implications for XtTranslations */
47 Lisp_Object lkey;
48 const char* key;
49 /* Help string or nil if none.
50 GC finds this string through the frame's menu_bar_vector
51 or through menu_items. */
52 Lisp_Object help;
53 /* true if enabled */
54 unsigned char enabled;
55 /* true if selected */
56 unsigned char selected;
57 /* The type of a button. */
58 enum button_type button_type;
59 /* true if menu title */
60 unsigned char title;
61 /* Contents of the sub-widgets, also selected slot for checkbox */
62 struct _widget_value* contents;
63 /* data passed to callback */
64 void *call_data;
65 /* next one in the list */
66 struct _widget_value* next;
67} widget_value;
68
69extern Lisp_Object Qunsupported__w32_dialog; 26extern Lisp_Object Qunsupported__w32_dialog;
70#endif 27#endif
71 28
diff --git a/src/nsmenu.m b/src/nsmenu.m
index e5f0b7668bc..46b7400b2e4 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -943,7 +943,7 @@ ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
943 } 943 }
944#endif /* not HAVE_MULTILINGUAL_MENU */ 944#endif /* not HAVE_MULTILINGUAL_MENU */
945 945
946 wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enabled), 946 wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enable),
947 STRINGP (help) ? help : Qnil); 947 STRINGP (help) ? help : Qnil);
948 if (prev_wv) 948 if (prev_wv)
949 prev_wv->next = wv; 949 prev_wv->next = wv;