Mercurial > emacs
comparison src/xmenu.c @ 73697:54a6e7ed953c
(Fmenu_or_popup_active_p): New function.
(syms_of_xmenu): Defsubr it.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sun, 05 Nov 2006 12:18:47 +0000 |
parents | ea2e12adb144 |
children | fbb020e31484 |
comparison
equal
deleted
inserted
replaced
73696:b55c133a59f9 | 73697:54a6e7ed953c |
---|---|
1489 | 1489 |
1490 int | 1490 int |
1491 popup_activated () | 1491 popup_activated () |
1492 { | 1492 { |
1493 return popup_activated_flag; | 1493 return popup_activated_flag; |
1494 } | |
1495 | |
1496 /* The following is used by delayed window autoselection. */ | |
1497 | |
1498 DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0, | |
1499 doc: /* Return t if a menu or popup dialog is active. */) | |
1500 () | |
1501 { | |
1502 return (popup_activated ()) ? Qt : Qnil; | |
1494 } | 1503 } |
1495 | 1504 |
1496 /* This callback is invoked when the user selects a menubar cascade | 1505 /* This callback is invoked when the user selects a menubar cascade |
1497 pushbutton, but before the pulldown menu is posted. */ | 1506 pushbutton, but before the pulldown menu is posted. */ |
1498 | 1507 |
3773 widget_id_tick = (1<<16); | 3782 widget_id_tick = (1<<16); |
3774 next_menubar_widget_id = 1; | 3783 next_menubar_widget_id = 1; |
3775 #endif | 3784 #endif |
3776 | 3785 |
3777 defsubr (&Sx_popup_menu); | 3786 defsubr (&Sx_popup_menu); |
3787 defsubr (&Smenu_or_popup_active_p); | |
3778 | 3788 |
3779 #if defined (USE_GTK) || defined (USE_X_TOOLKIT) | 3789 #if defined (USE_GTK) || defined (USE_X_TOOLKIT) |
3780 defsubr (&Smenu_bar_open); | 3790 defsubr (&Smenu_bar_open); |
3781 Ffset (intern ("accelerate-menu"), intern (Smenu_bar_open.symbol_name)); | 3791 Ffset (intern ("accelerate-menu"), intern (Smenu_bar_open.symbol_name)); |
3782 #endif | 3792 #endif |