annotate lwlib/lwlib-Xaw.c @ 163:0132846995bd r20-3b8

Import from CVS: tag r20-3b8
author cvs
date Mon, 13 Aug 2007 09:43:35 +0200
parents 6b37e6ddd302
children 5a88923fcbfe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* The lwlib interface to Athena widgets.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 This file is part of the Lucid Widget Library.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 The Lucid Widget Library is free software; you can redistribute it and/or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 modify it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 1, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 The Lucid Widget Library is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
78
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
19 Boston, MA 02111-1307, USA. */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
157
6b37e6ddd302 Import from CVS: tag r20-3b5
cvs
parents: 82
diff changeset
21 #include <config.h>
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 #include <stdio.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
24 #ifdef STDC_HEADERS
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
25 #include <stdlib.h>
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
26 #endif
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
27
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 #include "lwlib-Xaw.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 #include <X11/StringDefs.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #include <X11/IntrinsicP.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 #include <X11/CoreP.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #include <X11/Shell.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 #ifdef SCROLLBARS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #include <X11/Xaw/Scrollbar.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 #include <X11/Xaw/Dialog.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 #include <X11/Xaw/Form.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #include <X11/Xaw/Command.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 #include <X11/Xaw/Label.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 #include <X11/Xatom.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 static void xaw_generic_callback (Widget, XtPointer, XtPointer);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 Boolean
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 lw_xaw_widget_p (Widget widget)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 return (0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 #ifdef SCROLLBARS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 || XtIsSubclass (widget, scrollbarWidgetClass)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 || XtIsSubclass (widget, dialogWidgetClass)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 );
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 #ifdef SCROLLBARS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 xaw_update_scrollbar (widget_instance *instance, Widget widget,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 widget_value *val)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 if (val->scrollbar_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 scrollbar_values *data = val->scrollbar_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 float widget_shown, widget_topOfThumb;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 float new_shown, new_topOfThumb;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 * First size and position the scrollbar widget.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 XtVaSetValues (widget,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 XtNx, data->scrollbar_x,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 XtNy, data->scrollbar_y,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 XtNwidth, data->scrollbar_width,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 XtNheight, data->scrollbar_height,
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
82 NULL);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 * Now the size the scrollbar's slider.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 XtVaGetValues (widget,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 XtNtopOfThumb, &widget_topOfThumb,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 XtNshown, &widget_shown,
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
91 NULL);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 new_shown = (double) data->slider_size /
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 (double) (data->maximum - data->minimum);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 new_topOfThumb = (double) (data->slider_position - data->minimum) /
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (double) (data->maximum - data->minimum);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 if (new_shown > 1.0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 new_shown = 1.0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 if (new_shown < 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 new_shown = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 if (new_topOfThumb > 1.0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 new_topOfThumb = 1.0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 if (new_topOfThumb < 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 new_topOfThumb = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 if (new_shown != widget_shown || new_topOfThumb != widget_topOfThumb)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 XawScrollbarSetThumb (widget, new_topOfThumb, new_shown);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 #endif /* SCROLLBARS_ATHENA */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 xaw_update_one_widget (widget_instance *instance, Widget widget,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 widget_value *val, Boolean deep_p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 if (0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 #ifdef SCROLLBARS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 else if (XtIsSubclass (widget, scrollbarWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 xaw_update_scrollbar (instance, widget, val);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 else if (XtIsSubclass (widget, dialogWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 {
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
130 XtVaSetValues (widget, XtNlabel, val->contents->value, NULL);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 else if (XtIsSubclass (widget, commandWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 Dimension bw = 0;
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
135 XtVaGetValues (widget, XtNborderWidth, &bw, NULL);
82
6a378aca36af Import from CVS: tag r20-0b91
cvs
parents: 80
diff changeset
136
6a378aca36af Import from CVS: tag r20-0b91
cvs
parents: 80
diff changeset
137 #ifndef LWLIB_DIALOGS_ATHENA3D
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 if (bw == 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 /* Don't let buttons end up with 0 borderwidth, that's ugly...
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 Yeah, all this should really be done through app-defaults files
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 or fallback resources, but that's a whole different can of worms
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 that I don't feel like opening right now. Making Athena widgets
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 not look like shit is just entirely too much work.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 */
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
145 XtVaSetValues (widget, XtNborderWidth, 1, NULL);
82
6a378aca36af Import from CVS: tag r20-0b91
cvs
parents: 80
diff changeset
146 #endif
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 XtVaSetValues (widget,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 XtNlabel, val->value,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 XtNsensitive, val->enabled,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 /* Force centered button text. Se above. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 XtNjustify, XtJustifyCenter,
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
153 NULL);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 XtRemoveAllCallbacks (widget, XtNcallback);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 XtAddCallback (widget, XtNcallback, xaw_generic_callback, instance);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 xaw_update_one_value (widget_instance *instance, Widget widget,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 widget_value *val)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 /* This function is not used by the scrollbars and those are the only
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 Athena widget implemented at the moment so do nothing. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 xaw_destroy_instance (widget_instance *instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 if (XtIsSubclass (instance->widget, dialogWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 /* Need to destroy the Shell too. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 XtDestroyWidget (XtParent (instance->widget));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 XtDestroyWidget (instance->widget);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 xaw_popup_menu (Widget widget, XEvent *event)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 /* An Athena menubar has not been implemented. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 xaw_pop_instance (widget_instance *instance, Boolean up)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 Widget widget = instance->widget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 if (up)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 if (XtIsSubclass (widget, dialogWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 /* For dialogs, we need to call XtPopup on the parent instead
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 of calling XtManageChild on the widget.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 Also we need to hack the shell's WM_PROTOCOLS to get it to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 understand what the close box is supposed to do!!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 Display *dpy = XtDisplay (widget);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 Widget shell = XtParent (widget);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 Atom props [2];
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 int i = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 props [i++] = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 XChangeProperty (dpy, XtWindow (shell),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 XInternAtom (dpy, "WM_PROTOCOLS", False),
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 XA_ATOM, 32, PropModeAppend,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 (unsigned char *) props, i);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 /* Center the widget in its parent. Why isn't this kind of crap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 done automatically? I thought toolkits were supposed to make
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 life easier?
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 unsigned int x, y, w, h;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 Widget topmost = instance->parent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 w = shell->core.width;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 h = shell->core.height;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 while (topmost->core.parent && XtIsRealized (topmost->core.parent))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 topmost = topmost->core.parent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 if (topmost->core.width < w) x = topmost->core.x;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 else x = topmost->core.x + ((topmost->core.width - w) / 2);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 if (topmost->core.height < h) y = topmost->core.y;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 else y = topmost->core.y + ((topmost->core.height - h) / 2);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 XtMoveWidget (shell, x, y);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 /* Finally, pop it up. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 XtPopup (shell, XtGrabNonexclusive);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 #endif /* DIALOGS_ATHENA */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 XtManageChild (widget);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 if (XtIsSubclass (widget, dialogWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 XtUnmanageChild (XtParent (widget));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 XtUnmanageChild (widget);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 /* Dialog boxes */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 static char overrideTrans[] =
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 "<Message>WM_PROTOCOLS: lwlib_delete_dialog()";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 static XtActionProc wm_delete_window (Widget shell, XtPointer closure,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 XtPointer call_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 static XtActionsRec xaw_actions [] = {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 {"lwlib_delete_dialog", (XtActionProc) wm_delete_window}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 };
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 static Boolean actions_initted = False;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 static Widget
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264 make_dialog (CONST char* name, Widget parent, Boolean pop_up_p,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 CONST char* shell_title, CONST char* icon_name,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 Boolean text_input_slot,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 Boolean radio_box, Boolean list,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 int left_buttons, int right_buttons)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 Arg av [20];
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 int ac = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 int i, bc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 char button_name [255];
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 Widget shell;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 Widget dialog;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 Widget button;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 XtTranslations override;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 if (! pop_up_p) abort (); /* not implemented */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 if (text_input_slot) abort (); /* not implemented */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281 if (radio_box) abort (); /* not implemented */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 if (list) abort (); /* not implemented */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284 if (! actions_initted)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 XtAppContext app = XtWidgetToApplicationContext (parent);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 XtAppAddActions (app, xaw_actions,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
288 sizeof (xaw_actions) / sizeof (xaw_actions[0]));
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289 actions_initted = True;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
290 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
291
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
292 override = XtParseTranslationTable (overrideTrans);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
293
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
294 ac = 0;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
295 XtSetArg (av[ac], XtNtitle, shell_title); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
296 XtSetArg (av[ac], XtNallowShellResize, True); ac++;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
297 XtSetArg (av[ac], XtNtransientFor, parent); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
298 shell = XtCreatePopupShell ("dialog", transientShellWidgetClass,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299 parent, av, ac);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 XtOverrideTranslations (shell, override);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 ac = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 dialog = XtCreateManagedWidget (name, dialogWidgetClass, shell, av, ac);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 bc = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 button = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 for (i = 0; i < left_buttons; i++)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
308 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
309 ac = 0;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
310 XtSetArg (av [ac], XtNfromHoriz, button); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
311 XtSetArg (av [ac], XtNleft, XtChainLeft); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
312 XtSetArg (av [ac], XtNright, XtChainLeft); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
313 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
314 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
315 XtSetArg (av [ac], XtNresizable, True); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
316 sprintf (button_name, "button%d", ++bc);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
317 button = XtCreateManagedWidget (button_name, commandWidgetClass,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
318 dialog, av, ac);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
319 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
320 if (right_buttons)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
321 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
322 /* Create a separator
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
323
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
324 I want the separator to take up the slack between the buttons on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
325 the right and the buttons on the left (that is I want the buttons
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
326 after the separator to be packed against the right edge of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
327 window) but I can't seem to make it do it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
328 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
329 ac = 0;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
330 XtSetArg (av [ac], XtNfromHoriz, button); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
331 /* XtSetArg (av [ac], XtNfromVert, XtNameToWidget (dialog, "label")); ac++; */
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
332 XtSetArg (av [ac], XtNleft, XtChainLeft); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
333 XtSetArg (av [ac], XtNright, XtChainRight); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
334 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
335 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
336 XtSetArg (av [ac], XtNlabel, ""); ac++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
337 XtSetArg (av [ac], XtNwidth, 30); ac++; /* #### aaack!! */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
338 XtSetArg (av [ac], XtNborderWidth, 0); ac++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
339 XtSetArg (av [ac], XtNshapeStyle, XmuShapeRectangle); ac++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
340 XtSetArg (av [ac], XtNresizable, False); ac++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
341 XtSetArg (av [ac], XtNsensitive, False); ac++;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
342 button = XtCreateManagedWidget ("separator",
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
343 /* labelWidgetClass, */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
344 /* This has to be Command to fake out
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
345 the Dialog widget... */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
346 commandWidgetClass,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
347 dialog, av, ac);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
348 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
349 for (i = 0; i < right_buttons; i++)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
350 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
351 ac = 0;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
352 XtSetArg (av [ac], XtNfromHoriz, button); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
353 XtSetArg (av [ac], XtNleft, XtChainRight); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
354 XtSetArg (av [ac], XtNright, XtChainRight); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
355 XtSetArg (av [ac], XtNtop, XtChainBottom); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
356 XtSetArg (av [ac], XtNbottom, XtChainBottom); ac++;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
357 XtSetArg (av [ac], XtNresizable, True); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
358 sprintf (button_name, "button%d", ++bc);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
359 button = XtCreateManagedWidget (button_name, commandWidgetClass,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
360 dialog, av, ac);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
361 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
362
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
363 return dialog;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
364 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
365
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
366 Widget
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
367 xaw_create_dialog (widget_instance* instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
368 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
369 char *name = instance->info->type;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
370 Widget parent = instance->parent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
371 Widget widget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
372 Boolean pop_up_p = instance->pop_up_p;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373 CONST char *shell_name = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
374 CONST char *icon_name = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
375 Boolean text_input_slot = False;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376 Boolean radio_box = False;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 Boolean list = False;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 int total_buttons;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 int left_buttons = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 int right_buttons = 1;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 switch (name [0]) {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
383 case 'E': case 'e':
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
384 icon_name = "dbox-error";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
385 shell_name = "Error";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
386 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
387
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
388 case 'I': case 'i':
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
389 icon_name = "dbox-info";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
390 shell_name = "Information";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
391 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
392
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
393 case 'L': case 'l':
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
394 list = True;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
395 icon_name = "dbox-question";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
396 shell_name = "Prompt";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
397 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
398
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
399 case 'P': case 'p':
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
400 text_input_slot = True;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
401 icon_name = "dbox-question";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
402 shell_name = "Prompt";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
403 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
404
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
405 case 'Q': case 'q':
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
406 icon_name = "dbox-question";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
407 shell_name = "Question";
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
408 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
409 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
410
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
411 total_buttons = name [1] - '0';
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
412
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
413 if (name [3] == 'T' || name [3] == 't')
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
414 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
415 text_input_slot = False;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
416 radio_box = True;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
417 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
418 else if (name [3])
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
419 right_buttons = name [4] - '0';
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
420
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
421 left_buttons = total_buttons - right_buttons;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
422
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
423 widget = make_dialog (name, parent, pop_up_p,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
424 shell_name, icon_name, text_input_slot, radio_box,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
425 list, left_buttons, right_buttons);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
426
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
427 return widget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
428 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
429 #endif /* DIALOGS_ATHENA */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
430
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
431
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
432 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
433 xaw_generic_callback (Widget widget, XtPointer closure, XtPointer call_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
434 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
435 widget_instance *instance = (widget_instance *) closure;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
436 Widget instance_widget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
437 LWLIB_ID id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
438 XtPointer user_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
439
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
440 lw_internal_update_other_instances (widget, closure, call_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
441
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
442 if (! instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
443 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
444 if (widget->core.being_destroyed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
445 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
446
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
447 instance_widget = instance->widget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
448 if (!instance_widget)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
449 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
450
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
451 id = instance->info->id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
452
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
453 #if 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
454 user_data = NULL;
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
455 XtVaGetValues (widget, XtNuserData, &user_data, NULL);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
456 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
457 /* Damn! Athena doesn't give us a way to hang our own data on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
458 buttons, so we have to go find it... I guess this assumes that
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
459 all instances of a button have the same call data. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
460 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
461 widget_value *val = instance->info->val->contents;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
462 char *name = XtName (widget);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
463 while (val)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
464 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
465 if (val->name && !strcmp (val->name, name))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
466 break;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
467 val = val->next;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
468 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
469 if (! val) abort ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
470 user_data = val->call_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
471 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
472 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
473
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
474 if (instance->info->selection_cb)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
475 instance->info->selection_cb (widget, id, user_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
476 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
477
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
478 #ifdef DIALOGS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
479
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
480 static XtActionProc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
481 wm_delete_window (Widget shell, XtPointer closure, XtPointer call_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
482 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
483 LWLIB_ID id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
484 Widget *kids = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
485 Widget widget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
486 if (! XtIsSubclass (shell, shellWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
487 abort ();
163
0132846995bd Import from CVS: tag r20-3b8
cvs
parents: 157
diff changeset
488 XtVaGetValues (shell, XtNchildren, &kids, NULL);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
489 if (!kids || !*kids)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
490 abort ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
491 widget = kids [0];
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
492 if (! XtIsSubclass (widget, dialogWidgetClass))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
493 abort ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
494 id = lw_get_widget_id (widget);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
495 if (! id) abort ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
496
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
497 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
498 widget_info *info = lw_get_widget_info (id);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
499 if (! info) abort ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
500 if (info->selection_cb)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
501 info->selection_cb (widget, id, (XtPointer) -1);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
502 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
503
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
504 lw_destroy_all_widgets (id);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
505 return NULL;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
506 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
507
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
508 #endif /* DIALOGS_ATHENA */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
509
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
510
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
511 /* Scrollbars */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
512
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
513 #ifdef SCROLLBARS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
514 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
515 xaw_scrollbar_scroll (Widget widget, XtPointer closure, XtPointer call_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
516 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
517 widget_instance *instance = (widget_instance *) closure;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
518 LWLIB_ID id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
519 scroll_event event_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
520
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
521 if (!instance || widget->core.being_destroyed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
522 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
523
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
524 id = instance->info->id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
525 event_data.slider_value = (int) call_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
526 event_data.time = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
527
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
528 if ((int) call_data > 0)
82
6a378aca36af Import from CVS: tag r20-0b91
cvs
parents: 80
diff changeset
529 /* event_data.action = SCROLLBAR_PAGE_DOWN;*/
6a378aca36af Import from CVS: tag r20-0b91
cvs
parents: 80
diff changeset
530 event_data.action = SCROLLBAR_LINE_DOWN;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
531 else
82
6a378aca36af Import from CVS: tag r20-0b91
cvs
parents: 80
diff changeset
532 /* event_data.action = SCROLLBAR_PAGE_UP;*/
6a378aca36af Import from CVS: tag r20-0b91
cvs
parents: 80
diff changeset
533 event_data.action = SCROLLBAR_LINE_UP;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
534
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
535 if (instance->info->pre_activate_cb)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
536 instance->info->pre_activate_cb (widget, id, (XtPointer) &event_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
537 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
538
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
539 static void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
540 xaw_scrollbar_jump (Widget widget, XtPointer closure, XtPointer call_data)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
541 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
542 widget_instance *instance = (widget_instance *) closure;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
543 LWLIB_ID id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
544 scroll_event event_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
545 scrollbar_values *val =
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
546 (scrollbar_values *) instance->info->val->scrollbar_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
547 float percent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
548
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
549 if (!instance || widget->core.being_destroyed)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
550 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
551
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
552 id = instance->info->id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
553
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
554 percent = * (float *) call_data;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
555 event_data.slider_value =
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
556 (int) (percent * (float) (val->maximum - val->minimum)) + val->minimum;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
557
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
558 event_data.time = 0;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
559 event_data.action = SCROLLBAR_DRAG;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
560
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
561 if (instance->info->pre_activate_cb)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
562 instance->info->pre_activate_cb (widget, id, (XtPointer) &event_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
563 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
564
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
565 static Widget
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
566 xaw_create_scrollbar (widget_instance *instance, int vertical)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
567 {
78
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
568 Arg av[10];
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
569 int ac = 0;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
570
78
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
571 static XtCallbackRec jumpCallbacks[2] =
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
572 { {xaw_scrollbar_jump, NULL}, {NULL, NULL} };
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
573
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
574 static XtCallbackRec scrollCallbacks[2] =
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
575 { {xaw_scrollbar_scroll, NULL}, {NULL, NULL} };
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
576
c7528f8e288d Import from CVS: tag r20-0b34
cvs
parents: 70
diff changeset
577 jumpCallbacks[0].closure = scrollCallbacks[0].closure = (XtPointer) instance;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
578
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
579 /* #### This is tacked onto the with and height and completely
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
580 screws our geometry management. We should probably make the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
581 top-level aware of this so that people could have a border but so
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
582 few people use the Athena scrollbar now that it really isn't
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
583 worth the effort, at least not at the moment. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
584 XtSetArg (av [ac], XtNborderWidth, 0); ac++;
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
585 XtSetArg (av [ac], XtNorientation,
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
586 vertical ? XtorientVertical : XtorientHorizontal); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
587 XtSetArg (av [ac], "jumpProc", jumpCallbacks); ac++;
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
588 XtSetArg (av [ac], "scrollProc", scrollCallbacks); ac++;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
589
80
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
590 return XtCreateWidget (instance->info->name, scrollbarWidgetClass,
1ce6082ce73f Import from CVS: tag r20-0b90
cvs
parents: 78
diff changeset
591 instance->parent, av, ac);
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
592 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
593
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
594 static Widget
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
595 xaw_create_vertical_scrollbar (widget_instance *instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
596 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
597 return xaw_create_scrollbar (instance, 1);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
598 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
599
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
600 static Widget
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
601 xaw_create_horizontal_scrollbar (widget_instance *instance)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
602 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
603 return xaw_create_scrollbar (instance, 0);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
604 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
605 #endif /* SCROLLBARS_ATHENA */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
606
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
607 widget_creation_entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
608 xaw_creation_table [] =
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
609 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
610 #ifdef SCROLLBARS_ATHENA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
611 {"vertical-scrollbar", xaw_create_vertical_scrollbar},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
612 {"horizontal-scrollbar", xaw_create_horizontal_scrollbar},
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
613 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
614 {NULL, NULL}
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
615 };