0
|
1 /* Generic GUI code. (menubars, scrollbars, toolbars, dialogs)
|
|
2 Copyright (C) 1995 Board of Trustees, University of Illinois.
|
|
3 Copyright (C) 1995, 1996 Ben Wing.
|
|
4 Copyright (C) 1995 Sun Microsystems, Inc.
|
|
5
|
|
6 This file is part of XEmacs.
|
|
7
|
|
8 XEmacs is free software; you can redistribute it and/or modify it
|
|
9 under the terms of the GNU General Public License as published by the
|
|
10 Free Software Foundation; either version 2, or (at your option) any
|
|
11 later version.
|
|
12
|
|
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
16 for more details.
|
|
17
|
|
18 You should have received a copy of the GNU General Public License
|
|
19 along with XEmacs; see the file COPYING. If not, write to
|
|
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
21 Boston, MA 02111-1307, USA. */
|
|
22
|
|
23 /* Synched up with: Not in FSF. */
|
|
24
|
|
25 #include <config.h>
|
231
|
26 #include "gui.h"
|
0
|
27 #include "lisp.h"
|
|
28
|
|
29 Lisp_Object Q_active, Q_suffix, Q_keys, Q_style, Q_selected;
|
|
30 Lisp_Object Q_filter, Q_config, Q_included;
|
175
|
31 Lisp_Object Q_accelerator;
|
0
|
32 Lisp_Object Qtoggle, Qradio;
|
|
33
|
231
|
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 */
|
|
67
|
0
|
68 void
|
|
69 syms_of_gui (void)
|
|
70 {
|
|
71 defkeyword (&Q_active, ":active");
|
|
72 defkeyword (&Q_suffix, ":suffix");
|
|
73 defkeyword (&Q_keys, ":keys");
|
|
74 defkeyword (&Q_style, ":style");
|
|
75 defkeyword (&Q_selected, ":selected");
|
|
76 defkeyword (&Q_filter, ":filter");
|
|
77 defkeyword (&Q_config, ":config");
|
|
78 defkeyword (&Q_included, ":included");
|
175
|
79 defkeyword (&Q_accelerator, ":accelerator");
|
0
|
80
|
|
81 defsymbol (&Qtoggle, "toggle");
|
|
82 defsymbol (&Qradio, "radio");
|
231
|
83
|
|
84 #ifdef HAVE_POPUPS
|
|
85 DEFSUBR (Fpopup_up_p);
|
|
86 #endif
|
0
|
87 }
|
|
88
|
|
89 void
|
|
90 vars_of_gui (void)
|
|
91 {
|
|
92 }
|