aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu.c
diff options
context:
space:
mode:
authorEli Zaretskii2012-06-02 17:57:51 +0300
committerEli Zaretskii2012-06-02 17:57:51 +0300
commitb5e9cbb6fdce4b7e8c5cd6ad1addf6e4af35da67 (patch)
treec6a1b2060e5d56677f6785c2241311527fa917fa /src/menu.c
parentf51b6486fc8b0e3fa7fd08cbf83b27ef0d5efe1a (diff)
downloademacs-b5e9cbb6fdce4b7e8c5cd6ad1addf6e4af35da67.tar.gz
emacs-b5e9cbb6fdce4b7e8c5cd6ad1addf6e4af35da67.zip
Initial incomplete version of tty menus. tty_menu_activate not done yet.
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/menu.c b/src/menu.c
index 9ccfffd768c..7a7db9f07ff 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1323,20 +1323,31 @@ no quit occurs and `x-popup-menu' returns nil. */)
1323 1323
1324 /* FIXME: Use a terminal hook! */ 1324 /* FIXME: Use a terminal hook! */
1325#if defined HAVE_NTGUI 1325#if defined HAVE_NTGUI
1326 selection = w32_menu_show (f, xpos, ypos, for_click, 1326 if (FRAME_W32_P (f))
1327 keymaps, title, &error_name); 1327 selection = w32_menu_show (f, xpos, ypos, for_click,
1328#elif defined HAVE_NS 1328 keymaps, title, &error_name);
1329 selection = ns_menu_show (f, xpos, ypos, for_click, 1329 else
1330 keymaps, title, &error_name); 1330#endif
1331#else /* MSDOS and X11 */ 1331#if defined HAVE_NS
1332 if (FRAME_NS_P (f))
1333 selection = ns_menu_show (f, xpos, ypos, for_click,
1334 keymaps, title, &error_name);
1335 else
1336#endif
1337#if (defined (HAVE_X_WINDOWS) || defined (MSDOS))
1332 /* Assume last_event_timestamp is the timestamp of the button event. 1338 /* Assume last_event_timestamp is the timestamp of the button event.
1333 Is this assumption ever violated? We can't use the timestamp 1339 Is this assumption ever violated? We can't use the timestamp
1334 stored within POSITION because there the top bits from the actual 1340 stored within POSITION because there the top bits from the actual
1335 timestamp may be truncated away (Bug#4930). */ 1341 timestamp may be truncated away (Bug#4930). */
1336 selection = xmenu_show (f, xpos, ypos, for_click, 1342 if (FRAME_X_P (f) || FRAME_MSDOS_P (f))
1337 keymaps, title, &error_name, 1343 selection = xmenu_show (f, xpos, ypos, for_click,
1338 last_event_timestamp); 1344 keymaps, title, &error_name,
1345 last_event_timestamp);
1346 else
1339#endif 1347#endif
1348 if (FRAME_TERMCAP_P (f))
1349 selection = tty_menu_show (f, xpos, ypos, for_click,
1350 keymaps, title, &error_name);
1340 1351
1341 UNBLOCK_INPUT; 1352 UNBLOCK_INPUT;
1342 1353