annotate lwlib/lwlib-utils.c @ 111418:1542066c2762

src/ChangeLog: Fix log entry for revno 102262.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 06 Nov 2010 15:49:29 +0200
parents 750db9f3e6d8
children 417b1e4d63cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 /* Defines some widget utility functions.
76177
a274050b67b1 Add FSF copyright.
Glenn Morris <rgm@gnu.org>
parents: 64083
diff changeset
2 Copyright (C) 1992 Lucid, Inc.
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 105669
diff changeset
3 Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 105669
diff changeset
4 2010 Free Software Foundation, Inc.
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 This file is part of the Lucid Widget Library.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41767
diff changeset
8 The Lucid Widget Library is free software; you can redistribute it and/or
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 modify it under the terms of the GNU General Public License as published by
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 the Free Software Foundation; either version 1, or (at your option)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 any later version.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 The Lucid Widget Library is distributed in the hope that it will be useful,
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41767
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 GNU General Public License for more details.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 along with GNU Emacs; see the file COPYING. If not, write to
64083
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 52401
diff changeset
21 Boston, MA 02110-1301, USA. */
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22
11358
cba458f0dc21 If HAVE_CONFIG_H, include config.h.
Richard M. Stallman <rms@gnu.org>
parents: 7514
diff changeset
23 #ifdef HAVE_CONFIG_H
cba458f0dc21 If HAVE_CONFIG_H, include config.h.
Richard M. Stallman <rms@gnu.org>
parents: 7514
diff changeset
24 #include <config.h>
cba458f0dc21 If HAVE_CONFIG_H, include config.h.
Richard M. Stallman <rms@gnu.org>
parents: 7514
diff changeset
25 #endif
cba458f0dc21 If HAVE_CONFIG_H, include config.h.
Richard M. Stallman <rms@gnu.org>
parents: 7514
diff changeset
26
13758
5a7e9e98add7 Add #undef for index and rindex.
Karl Heuer <kwzh@gnu.org>
parents: 11358
diff changeset
27 /* Definitions of these in config.h can cause
5a7e9e98add7 Add #undef for index and rindex.
Karl Heuer <kwzh@gnu.org>
parents: 11358
diff changeset
28 declaration conflicts later on between declarations for index
5a7e9e98add7 Add #undef for index and rindex.
Karl Heuer <kwzh@gnu.org>
parents: 11358
diff changeset
29 and declarations for strchr. This file doesn't use
5a7e9e98add7 Add #undef for index and rindex.
Karl Heuer <kwzh@gnu.org>
parents: 11358
diff changeset
30 index and rindex, so cancel them. */
5a7e9e98add7 Add #undef for index and rindex.
Karl Heuer <kwzh@gnu.org>
parents: 11358
diff changeset
31 #undef index
5a7e9e98add7 Add #undef for index and rindex.
Karl Heuer <kwzh@gnu.org>
parents: 11358
diff changeset
32 #undef rindex
5a7e9e98add7 Add #undef for index and rindex.
Karl Heuer <kwzh@gnu.org>
parents: 11358
diff changeset
33
105669
68dd71358159 * alloc.c: Do not define struct catchtag.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 100957
diff changeset
34 #include <setjmp.h>
41767
7fb1caba0f51 Include ../src/lisp.h.
Richard M. Stallman <rms@gnu.org>
parents: 30279
diff changeset
35 #include "../src/lisp.h"
7fb1caba0f51 Include ../src/lisp.h.
Richard M. Stallman <rms@gnu.org>
parents: 30279
diff changeset
36
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 #include <X11/Xatom.h>
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 #include <X11/IntrinsicP.h>
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 #include <X11/ObjectP.h>
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 #include "lwlib-utils.h"
29891
f4e5f2c2900e Include lwlib.h.
Dave Love <fx@gnu.org>
parents: 14186
diff changeset
41 #include "lwlib.h"
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 /* Redisplay the contents of the widget, without first clearing it. */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 void
109123
384b3408c143 Convert function definitions in lwlib files to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 106815
diff changeset
45 XtNoClearRefreshWidget (Widget widget)
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 XEvent event;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 event.type = Expose;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 event.xexpose.serial = 0;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 event.xexpose.send_event = 0;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 event.xexpose.display = XtDisplay (widget);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 event.xexpose.window = XtWindow (widget);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 event.xexpose.x = 0;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 event.xexpose.y = 0;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 event.xexpose.width = widget->core.width;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 event.xexpose.height = widget->core.height;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 event.xexpose.count = 0;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 (*widget->core.widget_class->core_class.expose)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 (widget, &event, (Region)NULL);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41767
diff changeset
65 /*
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 * Apply a function to all the subwidgets of a given widget recursively.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 void
109123
384b3408c143 Convert function definitions in lwlib files to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 106815
diff changeset
69 XtApplyToWidgets (Widget w, XtApplyToWidgetsProc proc, XtPointer arg)
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 if (XtIsComposite (w))
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 CompositeWidget cw = (CompositeWidget) w;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 /* We have to copy the children list before mapping over it, because
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 the procedure might add/delete elements, which would lose badly.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 int nkids = cw->composite.num_children;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 Widget *kids = (Widget *) malloc (sizeof (Widget) * nkids);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 int i;
109165
750db9f3e6d8 Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
Andreas Schwab <schwab@linux-m68k.org>
parents: 109123
diff changeset
80 memcpy ((char *) kids, (char *) cw->composite.children,
750db9f3e6d8 Replace bcopy, bzero, bcmp by memcpy, memmove, memset, memcmp
Andreas Schwab <schwab@linux-m68k.org>
parents: 109123
diff changeset
81 sizeof (Widget) * nkids);
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82 for (i = 0; i < nkids; i++)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 /* This prevent us from using gadgets, why is it here? */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 /* if (XtIsWidget (kids [i])) */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 /* do the kiddies first in case we're destroying */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 XtApplyToWidgets (kids [i], proc, arg);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 proc (kids [i], arg);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 free (kids);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 /*
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 * Apply a function to all the subwidgets of a given widget recursively.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 * Stop as soon as the function returns non NULL and returns this as a value.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 void *
109123
384b3408c143 Convert function definitions in lwlib files to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 106815
diff changeset
100 XtApplyUntilToWidgets (Widget w, XtApplyUntilToWidgetsProc proc, XtPointer arg)
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 void* result;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 if (XtIsComposite (w))
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 CompositeWidget cw = (CompositeWidget)w;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 int i;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 for (i = 0; i < cw->composite.num_children; i++)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 if (XtIsWidget (cw->composite.children [i])){
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 result = proc (cw->composite.children [i], arg);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 if (result)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 return result;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 result = XtApplyUntilToWidgets (cw->composite.children [i], proc,
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 arg);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114 if (result)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 return result;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 return NULL;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 /*
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 * Returns a copy of the list of all children of a composite widget
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 Widget *
109123
384b3408c143 Convert function definitions in lwlib files to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 106815
diff changeset
126 XtCompositeChildren (Widget widget, unsigned int *number)
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 CompositeWidget cw = (CompositeWidget)widget;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129 Widget* result;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 int n;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 int i;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 if (!XtIsComposite (widget))
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 *number = 0;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 return NULL;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 n = cw->composite.num_children;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 result = (Widget*)XtMalloc (n * sizeof (Widget));
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 *number = n;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 for (i = 0; i < n; i++)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142 result [i] = cw->composite.children [i];
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 return result;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 Boolean
109123
384b3408c143 Convert function definitions in lwlib files to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 106815
diff changeset
147 XtWidgetBeingDestroyedP (Widget widget)
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 return widget->core.being_destroyed;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 void
109123
384b3408c143 Convert function definitions in lwlib files to standard C.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 106815
diff changeset
153 XtSafelyDestroyWidget (Widget widget)
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 #if 0
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 /* this requires IntrinsicI.h (actually, InitialI.h) */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 XtAppContext app = XtWidgetToApplicationContext(widget);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 if (app->dispatch_level == 0)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 app->dispatch_level = 1;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 XtDestroyWidget (widget);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 /* generates an event so that the event loop will be called */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 XChangeProperty (XtDisplay (widget), XtWindow (widget),
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 XA_STRING, XA_STRING, 32, PropModeAppend, NULL, 0);
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 app->dispatch_level = 0;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 }
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 else
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 XtDestroyWidget (widget);
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 41767
diff changeset
172
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 #else
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 abort ();
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 #endif
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 }
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
177
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
178 /* arch-tag: f21f0a1f-2a4e-44e1-8715-7f234fe2d159
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
179 (do not change this comment) */