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