110 |
extern Lisp_Object Qmenu_bar_update_hook; |
extern Lisp_Object Qmenu_bar_update_hook; |
111 |
|
|
112 |
#ifdef USE_X_TOOLKIT |
#ifdef USE_X_TOOLKIT |
113 |
extern void set_frame_menubar (); |
extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); |
114 |
extern XtAppContext Xt_app_con; |
extern XtAppContext Xt_app_con; |
115 |
|
|
116 |
static Lisp_Object xdialog_show (); |
static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); |
117 |
static void popup_get_selection (); |
static void popup_get_selection P_ ((XEvent *, struct x_display_info *, |
118 |
|
LWLIB_ID, int)); |
119 |
|
|
120 |
/* Define HAVE_BOXES if menus can handle radio and toggle buttons. */ |
/* Define HAVE_BOXES if menus can handle radio and toggle buttons. */ |
121 |
|
|
125 |
#ifdef USE_GTK |
#ifdef USE_GTK |
126 |
#include "gtkutil.h" |
#include "gtkutil.h" |
127 |
#define HAVE_BOXES 1 |
#define HAVE_BOXES 1 |
128 |
extern void set_frame_menubar (); |
extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); |
129 |
static Lisp_Object xdialog_show (); |
static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); |
130 |
#endif |
#endif |
131 |
|
|
132 |
/* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU |
/* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU |
157 |
static void list_of_panes P_ ((Lisp_Object)); |
static void list_of_panes P_ ((Lisp_Object)); |
158 |
static void list_of_items P_ ((Lisp_Object)); |
static void list_of_items P_ ((Lisp_Object)); |
159 |
|
|
|
extern EMACS_TIME timer_check P_ ((int)); |
|
160 |
|
|
161 |
/* This holds a Lisp vector that holds the results of decoding |
/* This holds a Lisp vector that holds the results of decoding |
162 |
the keymaps or alist-of-alists that specify a menu. |
the keymaps or alist-of-alists that specify a menu. |
1128 |
|
|
1129 |
#ifdef USE_X_TOOLKIT |
#ifdef USE_X_TOOLKIT |
1130 |
static void |
static void |
1131 |
popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) |
popup_get_selection (initial_event, dpyinfo, id, down_on_keypress) |
1132 |
XEvent *initial_event; |
XEvent *initial_event; |
1133 |
struct x_display_info *dpyinfo; |
struct x_display_info *dpyinfo; |
1134 |
LWLIB_ID id; |
LWLIB_ID id; |
|
int do_timers; |
|
1135 |
int down_on_keypress; |
int down_on_keypress; |
1136 |
{ |
{ |
1137 |
XEvent event; |
XEvent event; |
1138 |
|
|
1139 |
while (popup_activated_flag) |
while (popup_activated_flag) |
1140 |
{ |
{ |
|
/* If we have no events to run, consider timers. */ |
|
|
if (do_timers && !XtAppPending (Xt_app_con)) |
|
|
timer_check (1); |
|
|
|
|
1141 |
if (initial_event) |
if (initial_event) |
1142 |
{ |
{ |
1143 |
event = *initial_event; |
event = *initial_event; |
2484 |
popup_activated_flag = 1; |
popup_activated_flag = 1; |
2485 |
|
|
2486 |
/* Process events that apply to the menu. */ |
/* Process events that apply to the menu. */ |
2487 |
popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0, 0); |
popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0); |
2488 |
|
|
2489 |
/* fp turned off the following statement and wrote a comment |
/* fp turned off the following statement and wrote a comment |
2490 |
that it is unnecessary--that the menu has already disappeared. |
that it is unnecessary--that the menu has already disappeared. |
2878 |
Fcons (make_number (dialog_id >> (fact)), |
Fcons (make_number (dialog_id >> (fact)), |
2879 |
make_number (dialog_id & ~(-1 << (fact))))); |
make_number (dialog_id & ~(-1 << (fact))))); |
2880 |
|
|
2881 |
popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), |
popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1); |
|
dialog_id, 1, 1); |
|
2882 |
|
|
2883 |
unbind_to (count, Qnil); |
unbind_to (count, Qnil); |
2884 |
} |
} |