From 181f08a7d8378c5d3cb290b58c7618396413d28c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 3 Jun 2014 12:59:55 -0700 Subject: 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. --- src/menu.h | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'src/menu.h') 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 . */ #define MENU_H #include "systime.h" /* for Time */ -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) -#include "../lwlib/lwlib.h" /* for widget_value */ -#endif +#include "../lwlib/lwlib-widget.h" #ifdef HAVE_NTGUI -/* This is based on the one in ../lwlib/lwlib.h, with unused portions - removed. HAVE_NTGUI cannot include lwlib.h, as that pulls in X11 - headers. */ - -enum button_type -{ - BUTTON_TYPE_NONE, - BUTTON_TYPE_TOGGLE, - BUTTON_TYPE_RADIO -}; - -typedef struct _widget_value -{ - /* name of widget */ - Lisp_Object lname; - const char* name; - /* value (meaning depend on widget type) */ - const char* value; - /* keyboard equivalent. no implications for XtTranslations */ - Lisp_Object lkey; - const char* key; - /* Help string or nil if none. - GC finds this string through the frame's menu_bar_vector - or through menu_items. */ - Lisp_Object help; - /* true if enabled */ - unsigned char enabled; - /* true if selected */ - unsigned char selected; - /* The type of a button. */ - enum button_type button_type; - /* true if menu title */ - unsigned char title; - /* Contents of the sub-widgets, also selected slot for checkbox */ - struct _widget_value* contents; - /* data passed to callback */ - void *call_data; - /* next one in the list */ - struct _widget_value* next; -} widget_value; - extern Lisp_Object Qunsupported__w32_dialog; #endif -- cgit v1.2.1