comparison src/ExternalShell.c @ 2108:8de911beca70

[xemacs-hg @ 2004-06-02 09:16:14 by didierv] C++ related fixes
author didierv
date Wed, 02 Jun 2004 09:16:21 +0000
parents e54d47b2d736
children 04bc9d2f42c7
comparison
equal deleted inserted replaced
2107:91e93aba4aae 2108:8de911beca70
156 Cardinal *num_args); 156 Cardinal *num_args);
157 static void ExternalShellRealize (Widget wid, Mask *vmask, XSetWindowAttributes 157 static void ExternalShellRealize (Widget wid, Mask *vmask, XSetWindowAttributes
158 *attr); 158 *attr);
159 static void ExternalShellDestroy (Widget w); 159 static void ExternalShellDestroy (Widget w);
160 static void ChangeManaged (Widget wid); 160 static void ChangeManaged (Widget wid);
161 static XtGeometryResult ExternalShellRootGeometryManager (Widget gw, 161 static XtGeometryResult
162 XtWidgetGeometry *request, XtWidgetGeometry *reply); 162 ExternalShellRootGeometryManager (Widget gw, XtWidgetGeometry *request,
163 XtWidgetGeometry *reply);
163 static void EventHandler (Widget wid, XtPointer closure, XEvent *event, 164 static void EventHandler (Widget wid, XtPointer closure, XEvent *event,
164 Boolean *continue_to_dispatch); 165 Boolean *continue_to_dispatch);
165 166
166 #ifndef DEFAULT_WM_TIMEOUT 167 #ifndef DEFAULT_WM_TIMEOUT
167 # define DEFAULT_WM_TIMEOUT 5000 168 # define DEFAULT_WM_TIMEOUT 5000
273 274
274 #ifndef XtCXtToolkitError 275 #ifndef XtCXtToolkitError
275 # define XtCXtToolkitError "XtToolkitError" 276 # define XtCXtToolkitError "XtToolkitError"
276 #endif 277 #endif
277 278
278 static void EventHandler(wid, closure, event, continue_to_dispatch) 279 static void EventHandler (Widget wid, XtPointer closure /* unused */,
279 Widget wid; 280 XEvent *event,
280 XtPointer closure; /* unused */ 281 Boolean *continue_to_dispatch /* unused */)
281 XEvent *event;
282 Boolean *continue_to_dispatch; /* unused */
283 { 282 {
284 ExternalShellWidget w = (ExternalShellWidget) wid; 283 ExternalShellWidget w = (ExternalShellWidget) wid;
285 284
286 if(w->core.window != event->xany.window) { 285 if(w->core.window != event->xany.window) {
287 XtAppErrorMsg(XtWidgetToApplicationContext(wid), 286 XtAppErrorMsg(XtWidgetToApplicationContext(wid),
496 XChangeWindowAttributes(XtDisplay(wid), wid->core.window, 495 XChangeWindowAttributes(XtDisplay(wid), wid->core.window,
497 mask, attr); 496 mask, attr);
498 497
499 } 498 }
500 499
501 static void ExternalShellDestroy(wid) 500 static void ExternalShellDestroy (Widget wid)
502 Widget wid;
503 { 501 {
504 ExternalShellWidget w = (ExternalShellWidget)wid; 502 ExternalShellWidget w = (ExternalShellWidget)wid;
505 503
506 if (XtIsRealized(wid)) 504 if (XtIsRealized(wid))
507 ExternalShellUnrealize(wid); 505 ExternalShellUnrealize(wid);
510 } 508 }
511 509
512 /* Invoke matching routine from superclass, but first override its 510 /* Invoke matching routine from superclass, but first override its
513 geometry opinions with our own routine */ 511 geometry opinions with our own routine */
514 512
515 static void ChangeManaged(wid) 513 static void ChangeManaged (Widget wid)
516 Widget wid;
517 { 514 {
518 if (!XtIsRealized (wid)) 515 if (!XtIsRealized (wid))
519 GetGeometry(wid, (Widget)NULL); 516 GetGeometry(wid, (Widget)NULL);
520 (*((ShellClassRec*)externalShellClassRec.core_class.superclass)-> 517 (*((ShellClassRec*)externalShellClassRec.core_class.superclass)->
521 composite_class.change_managed)(wid); 518 composite_class.change_managed)(wid);
522 } 519 }
523 520
524 /* Based on RootGeometryManager() in Shell.c */ 521 /* Based on RootGeometryManager() in Shell.c */
525 522
526 static XtGeometryResult ExternalShellRootGeometryManager(gw, request, reply) 523 static XtGeometryResult
527 Widget gw; 524 ExternalShellRootGeometryManager (Widget gw, XtWidgetGeometry *request,
528 XtWidgetGeometry *request, *reply; 525 XtWidgetGeometry *reply)
529 { 526 {
530 ExternalShellWidget w = (ExternalShellWidget)gw; 527 ExternalShellWidget w = (ExternalShellWidget)gw;
531 unsigned int mask = request->request_mode; 528 unsigned int mask = request->request_mode;
532 XEvent event; 529 XEvent event;
533 int oldx, oldy, oldwidth, oldheight, oldborder_width; 530 int oldx, oldy, oldwidth, oldheight, oldborder_width;