comparison src/xmenu.c @ 90180:62afea0771d8

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-51 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 289-301) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 68) - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 12 May 2005 03:41:19 +0000
parents 08185296b491 0c2ce5566afa
children 5b029ff3b08d
comparison
equal deleted inserted replaced
90179:b745036dab36 90180:62afea0771d8
31 31
32 /* Rewritten for clarity and GC protection by rms in Feb 94. */ 32 /* Rewritten for clarity and GC protection by rms in Feb 94. */
33 33
34 #include <config.h> 34 #include <config.h>
35 35
36 #if 0 /* Why was this included? And without syssignal.h? */
36 /* On 4.3 this loses if it comes after xterm.h. */ 37 /* On 4.3 this loses if it comes after xterm.h. */
37 #include <signal.h> 38 #include <signal.h>
39 #endif
38 40
39 #include <stdio.h> 41 #include <stdio.h>
40 42
41 #include "lisp.h" 43 #include "lisp.h"
42 #include "termhooks.h" 44 #include "termhooks.h"
765 but a string can appear as an item--that makes a nonselectable line 767 but a string can appear as an item--that makes a nonselectable line
766 in the menu. 768 in the menu.
767 With this form of menu, the return value is VALUE from the chosen item. 769 With this form of menu, the return value is VALUE from the chosen item.
768 770
769 If POSITION is nil, don't display the menu at all, just precalculate the 771 If POSITION is nil, don't display the menu at all, just precalculate the
770 cached information about equivalent key sequences. */) 772 cached information about equivalent key sequences.
773
774 If the user gets rid of the menu without making a valid choice, for
775 instance by clicking the mouse away from a valid choice or by typing
776 keyboard input, then this normally results in a quit and
777 `x-popup-menu' does not return. But if POSITION is a mouse button
778 event (indicating that the user invoked the menu with the mouse) then
779 no quit occurs and `x-popup-menu' returns nil. */)
771 (position, menu) 780 (position, menu)
772 Lisp_Object position, menu; 781 Lisp_Object position, menu;
773 { 782 {
774 Lisp_Object keymap, tem; 783 Lisp_Object keymap, tem;
775 int xpos = 0, ypos = 0; 784 int xpos = 0, ypos = 0;
1003 The return value is VALUE from the chosen item. 1012 The return value is VALUE from the chosen item.
1004 1013
1005 An ITEM may also be just a string--that makes a nonselectable item. 1014 An ITEM may also be just a string--that makes a nonselectable item.
1006 An ITEM may also be nil--that means to put all preceding items 1015 An ITEM may also be nil--that means to put all preceding items
1007 on the left of the dialog box and all following items on the right. 1016 on the left of the dialog box and all following items on the right.
1008 \(By default, approximately half appear on each side.) */) 1017 \(By default, approximately half appear on each side.)
1018
1019 If the user gets rid of the dialog box without making a valid choice,
1020 for instance using the window manager, then this produces a quit and
1021 `x-popup-dialog' does not return. */)
1009 (position, contents) 1022 (position, contents)
1010 Lisp_Object position, contents; 1023 Lisp_Object position, contents;
1011 { 1024 {
1012 FRAME_PTR f = NULL; 1025 FRAME_PTR f = NULL;
1013 Lisp_Object window; 1026 Lisp_Object window;