comparison src/ExternalShell.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 74fd4e045ea6
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
169 169
170 void ExternalShellUnrealize (Widget w); 170 void ExternalShellUnrealize (Widget w);
171 171
172 static XtResource resources[] = { 172 static XtResource resources[] = {
173 #define offset(field) XtOffset(ExternalShellWidget, externalShell.field) 173 #define offset(field) XtOffset(ExternalShellWidget, externalShell.field)
174 { XtNwindow, XtCWindow, 174 { XtNwindow, XtCWindow, XtRWindow, sizeof (Window),
175 XtRWindow, sizeof (Window), 175 offset (external_window), XtRImmediate, (XtPointer)0},
176 offset (external_window), XtRImmediate, (XtPointer)0 }, 176 { XtNclientTimeout, XtCClientTimeout, XtRInt, sizeof(int),
177 { XtNclientTimeout, XtCClientTimeout, 177 offset(client_timeout), XtRImmediate,(XtPointer)DEFAULT_WM_TIMEOUT},
178 XtRInt, sizeof (int), 178 { XtNdeadClient, XtCDeadClient, XtRBoolean, sizeof(Boolean),
179 offset(client_timeout), XtRImmediate,(XtPointer)DEFAULT_WM_TIMEOUT }, 179 offset(dead_client), XtRImmediate, (XtPointer)False},
180 { XtNdeadClient, XtCDeadClient,
181 XtRBoolean, sizeof (Boolean),
182 offset(dead_client), XtRImmediate, (XtPointer)False },
183 }; 180 };
184 181
185 static CompositeClassExtensionRec compositeClassExtRec = { 182 static CompositeClassExtensionRec compositeClassExtRec = {
186 NULL, 183 NULL,
187 NULLQUARK, 184 NULLQUARK,
188 XtCompositeExtensionVersion, 185 XtCompositeExtensionVersion,
189 sizeof (CompositeClassExtensionRec), 186 sizeof(CompositeClassExtensionRec),
190 TRUE, 187 TRUE,
191 }; 188 };
192 189
193 static ShellClassExtensionRec shellClassExtRec = { 190 static ShellClassExtensionRec shellClassExtRec = {
194 NULL, 191 NULL,
195 NULLQUARK, 192 NULLQUARK,
196 XtShellExtensionVersion, 193 XtShellExtensionVersion,
197 sizeof (ShellClassExtensionRec), 194 sizeof(ShellClassExtensionRec),
198 ExternalShellRootGeometryManager 195 ExternalShellRootGeometryManager
199 }; 196 };
200 197
201 ExternalShellClassRec externalShellClassRec = { 198 ExternalShellClassRec externalShellClassRec = {
202 { /* 199 { /*
203 * core_class fields 200 * core_class fields
204 */ 201 */
205 /* superclass */ (WidgetClass) &shellClassRec, 202 /* superclass */ (WidgetClass) &shellClassRec,
206 /* class_name */ "ExternalShell", 203 /* class_name */ "ExternalShell",
207 /* size */ sizeof (ExternalShellRec), 204 /* size */ sizeof(ExternalShellRec),
208 /* Class Initializer */ NULL, 205 /* Class Initializer */ NULL,
209 /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */ 206 /* class_part_initialize*/ NULL, /* XtInheritClassPartInitialize, */
210 /* Class init'ed ? */ FALSE, 207 /* Class init'ed ? */ FALSE,
211 /* initialize */ ExternalShellInitialize, 208 /* initialize */ ExternalShellInitialize,
212 /* initialize_notify */ NULL, 209 /* initialize_notify */ NULL,
222 /* visible_interest */ TRUE, 219 /* visible_interest */ TRUE,
223 /* destroy */ ExternalShellDestroy, /* XtInheritDestroy, */ 220 /* destroy */ ExternalShellDestroy, /* XtInheritDestroy, */
224 /* resize */ XtInheritResize, 221 /* resize */ XtInheritResize,
225 /* expose */ NULL, 222 /* expose */ NULL,
226 /* set_values */ NULL, /* XtInheritSetValues, */ 223 /* set_values */ NULL, /* XtInheritSetValues, */
227 /* set_values_hook */ NULL, 224 /* set_values_hook */ NULL,
228 /* set_values_almost */ XtInheritSetValuesAlmost, 225 /* set_values_almost */ XtInheritSetValuesAlmost,
229 /* get_values_hook */ NULL, 226 /* get_values_hook */ NULL,
230 /* accept_focus */ NULL, 227 /* accept_focus */ NULL,
231 /* intrinsics version */ XtVersion, 228 /* intrinsics version */ XtVersion,
232 /* callback offsets */ NULL, 229 /* callback offsets */ NULL,
233 /* tm_table */ NULL, 230 /* tm_table */ NULL,
234 /* query_geometry */ NULL, 231 /* query_geometry */ NULL,
320 break; 317 break;
321 } 318 }
322 319
323 case extw_notify_focus_in: { 320 case extw_notify_focus_in: {
324 XFocusChangeEvent evnt; 321 XFocusChangeEvent evnt;
325 322
326 evnt.type = FocusIn; 323 evnt.type = FocusIn;
327 evnt.serial = LastKnownRequestProcessed (XtDisplay (wid)); 324 evnt.serial = LastKnownRequestProcessed (XtDisplay (wid));
328 evnt.send_event = True; 325 evnt.send_event = True;
329 evnt.display = XtDisplay (wid); 326 evnt.display = XtDisplay (wid);
330 evnt.window = XtWindow (wid); 327 evnt.window = XtWindow (wid);
335 #else 332 #else
336 XtDispatchEvent ((XEvent *) &evnt); 333 XtDispatchEvent ((XEvent *) &evnt);
337 #endif 334 #endif
338 break; 335 break;
339 } 336 }
340 337
341 case extw_notify_focus_out: { 338 case extw_notify_focus_out: {
342 XFocusChangeEvent evnt; 339 XFocusChangeEvent evnt;
343 340
344 evnt.type = FocusOut; 341 evnt.type = FocusOut;
345 evnt.serial = LastKnownRequestProcessed (XtDisplay (wid)); 342 evnt.serial = LastKnownRequestProcessed (XtDisplay (wid));
346 evnt.send_event = True; 343 evnt.send_event = True;
347 evnt.display = XtDisplay (wid); 344 evnt.display = XtDisplay (wid);
348 evnt.window = XtWindow (wid); 345 evnt.window = XtWindow (wid);
369 { 366 {
370 ExternalShellWidget w = (ExternalShellWidget)W; 367 ExternalShellWidget w = (ExternalShellWidget)W;
371 int x, y, win_gravity = -1, flag; 368 int x, y, win_gravity = -1, flag;
372 XSizeHints hints; 369 XSizeHints hints;
373 Window win = w->externalShell.external_window; 370 Window win = w->externalShell.external_window;
374 371
375 { 372 {
376 Window dummy_root; 373 Window dummy_root;
377 unsigned int dummy_bd_width, dummy_depth, width, height; 374 unsigned int dummy_bd_width, dummy_depth, width, height;
378 375
379 /* determine the existing size of the window. */ 376 /* determine the existing size of the window. */
380 XGetGeometry(XtDisplay(W), win, &dummy_root, &x, &y, &width, 377 XGetGeometry(XtDisplay(W), win, &dummy_root, &x, &y, &width,
381 &height, &dummy_bd_width, &dummy_depth); 378 &height, &dummy_bd_width, &dummy_depth);
382 w->core.width = width; 379 w->core.width = width;
383 w->core.height = height; 380 w->core.height = height;
467 mask |= CWBackPixmap; 464 mask |= CWBackPixmap;
468 attr->background_pixmap = 465 attr->background_pixmap =
469 w->core.background_pixmap = 466 w->core.background_pixmap =
470 (*childP)->core.background_pixmap; 467 (*childP)->core.background_pixmap;
471 } else { 468 } else {
472 attr->background_pixel = 469 attr->background_pixel =
473 w->core.background_pixel = 470 w->core.background_pixel =
474 (*childP)->core.background_pixel; 471 (*childP)->core.background_pixel;
475 } 472 }
476 break; 473 break;
477 } 474 }
478 } 475 }