comparison src/gui.c @ 231:557eaa0339bf r20-5b14

Import from CVS: tag r20-5b14
author cvs
date Mon, 13 Aug 2007 10:13:48 +0200
parents 2d532a89d707
children 677f6a0ee643
comparison
equal deleted inserted replaced
230:39ed1d2bdd9d 231:557eaa0339bf
21 Boston, MA 02111-1307, USA. */ 21 Boston, MA 02111-1307, USA. */
22 22
23 /* Synched up with: Not in FSF. */ 23 /* Synched up with: Not in FSF. */
24 24
25 #include <config.h> 25 #include <config.h>
26 #include "gui.h"
26 #include "lisp.h" 27 #include "lisp.h"
27 28
28 Lisp_Object Q_active, Q_suffix, Q_keys, Q_style, Q_selected; 29 Lisp_Object Q_active, Q_suffix, Q_keys, Q_style, Q_selected;
29 Lisp_Object Q_filter, Q_config, Q_included; 30 Lisp_Object Q_filter, Q_config, Q_included;
30 Lisp_Object Q_accelerator; 31 Lisp_Object Q_accelerator;
31 Lisp_Object Qtoggle, Qradio; 32 Lisp_Object Qtoggle, Qradio;
33
34 #ifdef HAVE_POPUPS
35
36 /* count of menus/dboxes currently up */
37 int popup_up_p;
38
39 DEFUN ("popup-up-p", Fpopup_up_p, 0, 0, 0, /*
40 Return t if a popup menu or dialog box is up, nil otherwise.
41 See `popup-menu' and `popup-dialog-box'.
42 */
43 ())
44 {
45 return popup_up_p ? Qt : Qnil;
46 }
47
48 int
49 separator_string_p (CONST char *s)
50 {
51 CONST char *p;
52 char first;
53
54 if (!s || s[0] == '\0')
55 return 0;
56 first = s[0];
57 if (first != '-' && first != '=')
58 return 0;
59 for (p = s; *p == first; p++);
60
61 if (*p == '!' || *p == ':' || *p == '\0')
62 return 1;
63 return 0;
64 }
65
66 #endif /* HAVE_POPUPS */
32 67
33 void 68 void
34 syms_of_gui (void) 69 syms_of_gui (void)
35 { 70 {
36 defkeyword (&Q_active, ":active"); 71 defkeyword (&Q_active, ":active");
43 defkeyword (&Q_included, ":included"); 78 defkeyword (&Q_included, ":included");
44 defkeyword (&Q_accelerator, ":accelerator"); 79 defkeyword (&Q_accelerator, ":accelerator");
45 80
46 defsymbol (&Qtoggle, "toggle"); 81 defsymbol (&Qtoggle, "toggle");
47 defsymbol (&Qradio, "radio"); 82 defsymbol (&Qradio, "radio");
83
84 #ifdef HAVE_POPUPS
85 DEFSUBR (Fpopup_up_p);
86 #endif
48 } 87 }
49 88
50 void 89 void
51 vars_of_gui (void) 90 vars_of_gui (void)
52 { 91 {