diff options
-rw-r--r-- | generic/tkInt.decls | 48 | ||||
-rw-r--r-- | generic/tkIntXlibDecls.h | 96 | ||||
-rw-r--r-- | macosx/tkMacOSXDraw.c | 35 | ||||
-rw-r--r-- | macosx/tkMacOSXKeyEvent.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 17 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 3 | ||||
-rw-r--r-- | macosx/tkMacOSXXStubs.c | 41 |
7 files changed, 135 insertions, 108 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 743157f..7b83861 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1556,11 +1556,11 @@ declare 16 aqua { XWindowChanges *x) } declare 17 aqua { - void XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, + int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } declare 18 aqua { - void XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, + int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul) } @@ -1572,10 +1572,10 @@ declare 20 aqua { int XDefineCursor(Display *d, Window w, Cursor c) } declare 21 aqua { - void XDestroyWindow(Display *d, Window w) + int XDestroyWindow(Display *d, Window w) } declare 22 aqua { - void XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, + int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4) } declare 23 aqua { @@ -1590,7 +1590,7 @@ declare 25 aqua { unsigned int ui1, unsigned int ui2, int i3, int i4) } declare 26 aqua { - void XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, + int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3) } declare 27 aqua { @@ -1627,7 +1627,7 @@ declare 35 aqua { KeyCode XKeysymToKeycode(Display *d, KeySym k) } declare 36 aqua { - void XMapWindow(Display *d, Window w) + int XMapWindow(Display *d, Window w) } declare 37 aqua { int XMoveResizeWindow(Display *d, Window w, int i1, int i2, @@ -1641,56 +1641,56 @@ declare 39 aqua { int *i1, int *i2, int *i3, int *i4, unsigned int *ui) } declare 40 aqua { - void XRaiseWindow(Display *d, Window w) + int XRaiseWindow(Display *d, Window w) } declare 41 aqua { - void XRefreshKeyboardMapping(XMappingEvent *x) + int XRefreshKeyboardMapping(XMappingEvent *x) } declare 42 aqua { - void XResizeWindow(Display *d, Window w, unsigned int ui1, + int XResizeWindow(Display *d, Window w, unsigned int ui1, unsigned int ui2) } declare 43 aqua { - void XSelectInput(Display *d, Window w, long l) + int XSelectInput(Display *d, Window w, long l) } declare 44 aqua { Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) } declare 45 aqua { - void XSetIconName(Display *d, Window w, _Xconst char *c) + int XSetIconName(Display *d, Window w, _Xconst char *c) } declare 46 aqua { - void XSetInputFocus(Display *d, Window w, int i, Time t) + int XSetInputFocus(Display *d, Window w, int i, Time t) } declare 47 aqua { int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) } declare 48 aqua { - void XSetWindowBackground(Display *d, Window w, unsigned long ul) + int XSetWindowBackground(Display *d, Window w, unsigned long ul) } declare 49 aqua { - void XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) + int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p) } declare 50 aqua { - void XSetWindowBorder(Display *d, Window w, unsigned long ul) + int XSetWindowBorder(Display *d, Window w, unsigned long ul) } declare 51 aqua { - void XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) + int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p) } declare 52 aqua { - void XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) + int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui) } declare 53 aqua { - void XSetWindowColormap(Display *d, Window w, Colormap c) + int XSetWindowColormap(Display *d, Window w, Colormap c) } declare 54 aqua { - void XUngrabKeyboard(Display *d, Time t) + int XUngrabKeyboard(Display *d, Time t) } declare 55 aqua { int XUngrabPointer(Display *d, Time t) } declare 56 aqua { - void XUnmapWindow(Display *d, Window w) + int XUnmapWindow(Display *d, Window w) } declare 57 aqua { int TkPutImage(unsigned long *colors, int ncolors, Display *display, @@ -1777,7 +1777,7 @@ declare 80 aqua { XSegment *segments, int nsegments) } declare 81 aqua { - void XForceScreenSaver(Display *display, int mode) + int XForceScreenSaver(Display *display, int mode) } declare 82 aqua { int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, @@ -1788,7 +1788,7 @@ declare 83 aqua { int x, int y, unsigned int width, unsigned int height) } declare 84 aqua { - void XClearWindow(Display *d, Window w) + int XClearWindow(Display *d, Window w) } declare 85 aqua { int XDrawPoint(Display *display, Drawable d, GC gc, int x, int y) @@ -1803,10 +1803,10 @@ declare 87 aqua { unsigned int src_height, int dest_x, int dest_y) } declare 88 aqua { - void XQueryColor(Display *display, Colormap colormap, XColor *def_in_out) + int XQueryColor(Display *display, Colormap colormap, XColor *def_in_out) } declare 89 aqua { - void XQueryColors(Display *display, Colormap colormap, + int XQueryColors(Display *display, Colormap colormap, XColor *defs_in_out, int ncolors) } declare 90 aqua { diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 6a6bedb..fbf3faf 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -460,11 +460,11 @@ EXTERN int XChangeWindowAttributes(Display *d, Window w, EXTERN int XConfigureWindow(Display *d, Window w, unsigned int i, XWindowChanges *x); /* 17 */ -EXTERN void XCopyArea(Display *d, Drawable dr1, Drawable dr2, +EXTERN int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 18 */ -EXTERN void XCopyPlane(Display *d, Drawable dr1, Drawable dr2, +EXTERN int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); @@ -475,9 +475,9 @@ EXTERN Pixmap XCreateBitmapFromData(Display *display, Drawable d, /* 20 */ EXTERN int XDefineCursor(Display *d, Window w, Cursor c); /* 21 */ -EXTERN void XDestroyWindow(Display *d, Window w); +EXTERN int XDestroyWindow(Display *d, Window w); /* 22 */ -EXTERN void XDrawArc(Display *d, Drawable dr, GC g, int i1, +EXTERN int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 23 */ @@ -491,7 +491,7 @@ EXTERN int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 26 */ -EXTERN void XFillPolygon(Display *d, Drawable dr, GC g, +EXTERN int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 27 */ EXTERN int XFillRectangles(Display *d, Drawable dr, GC g, @@ -523,7 +523,7 @@ EXTERN int XGrabPointer(Display *d, Window w1, Bool b, /* 35 */ EXTERN KeyCode XKeysymToKeycode(Display *d, KeySym k); /* 36 */ -EXTERN void XMapWindow(Display *d, Window w); +EXTERN int XMapWindow(Display *d, Window w); /* 37 */ EXTERN int XMoveResizeWindow(Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); @@ -534,47 +534,47 @@ EXTERN Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 40 */ -EXTERN void XRaiseWindow(Display *d, Window w); +EXTERN int XRaiseWindow(Display *d, Window w); /* 41 */ -EXTERN void XRefreshKeyboardMapping(XMappingEvent *x); +EXTERN int XRefreshKeyboardMapping(XMappingEvent *x); /* 42 */ -EXTERN void XResizeWindow(Display *d, Window w, unsigned int ui1, +EXTERN int XResizeWindow(Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 43 */ -EXTERN void XSelectInput(Display *d, Window w, long l); +EXTERN int XSelectInput(Display *d, Window w, long l); /* 44 */ EXTERN Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x); /* 45 */ -EXTERN void XSetIconName(Display *d, Window w, _Xconst char *c); +EXTERN int XSetIconName(Display *d, Window w, _Xconst char *c); /* 46 */ -EXTERN void XSetInputFocus(Display *d, Window w, int i, Time t); +EXTERN int XSetInputFocus(Display *d, Window w, int i, Time t); /* 47 */ EXTERN int XSetSelectionOwner(Display *d, Atom a, Window w, Time t); /* 48 */ -EXTERN void XSetWindowBackground(Display *d, Window w, +EXTERN int XSetWindowBackground(Display *d, Window w, unsigned long ul); /* 49 */ -EXTERN void XSetWindowBackgroundPixmap(Display *d, Window w, +EXTERN int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p); /* 50 */ -EXTERN void XSetWindowBorder(Display *d, Window w, +EXTERN int XSetWindowBorder(Display *d, Window w, unsigned long ul); /* 51 */ -EXTERN void XSetWindowBorderPixmap(Display *d, Window w, +EXTERN int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p); /* 52 */ -EXTERN void XSetWindowBorderWidth(Display *d, Window w, +EXTERN int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui); /* 53 */ -EXTERN void XSetWindowColormap(Display *d, Window w, Colormap c); +EXTERN int XSetWindowColormap(Display *d, Window w, Colormap c); /* 54 */ -EXTERN void XUngrabKeyboard(Display *d, Time t); +EXTERN int XUngrabKeyboard(Display *d, Time t); /* 55 */ EXTERN int XUngrabPointer(Display *d, Time t); /* 56 */ -EXTERN void XUnmapWindow(Display *d, Window w); +EXTERN int XUnmapWindow(Display *d, Window w); /* 57 */ EXTERN int TkPutImage(unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, @@ -644,7 +644,7 @@ EXTERN Status XStringListToTextProperty(char **list, int count, EXTERN int XDrawSegments(Display *display, Drawable d, GC gc, XSegment *segments, int nsegments); /* 81 */ -EXTERN void XForceScreenSaver(Display *display, int mode); +EXTERN int XForceScreenSaver(Display *display, int mode); /* 82 */ EXTERN int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); @@ -653,7 +653,7 @@ EXTERN int XFillRectangle(Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 84 */ -EXTERN void XClearWindow(Display *d, Window w); +EXTERN int XClearWindow(Display *d, Window w); /* 85 */ EXTERN int XDrawPoint(Display *display, Drawable d, GC gc, int x, int y); @@ -667,10 +667,10 @@ EXTERN int XWarpPointer(Display *display, Window src_w, unsigned int src_height, int dest_x, int dest_y); /* 88 */ -EXTERN void XQueryColor(Display *display, Colormap colormap, +EXTERN int XQueryColor(Display *display, Colormap colormap, XColor *def_in_out); /* 89 */ -EXTERN void XQueryColors(Display *display, Colormap colormap, +EXTERN int XQueryColors(Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 90 */ EXTERN Status XQueryTree(Display *d, Window w1, Window *w2, @@ -841,16 +841,16 @@ typedef struct TkIntXlibStubs { int (*xChangeProperty) (Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3); /* 14 */ int (*xChangeWindowAttributes) (Display *d, Window w, unsigned long ul, XSetWindowAttributes *x); /* 15 */ int (*xConfigureWindow) (Display *d, Window w, unsigned int i, XWindowChanges *x); /* 16 */ - void (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */ - void (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */ + int (*xCopyArea) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 17 */ + int (*xCopyPlane) (Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul); /* 18 */ Pixmap (*xCreateBitmapFromData) (Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height); /* 19 */ int (*xDefineCursor) (Display *d, Window w, Cursor c); /* 20 */ - void (*xDestroyWindow) (Display *d, Window w); /* 21 */ - void (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */ + int (*xDestroyWindow) (Display *d, Window w); /* 21 */ + int (*xDrawArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 22 */ int (*xDrawLines) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2); /* 23 */ int (*xDrawRectangle) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 24 */ int (*xFillArc) (Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4); /* 25 */ - void (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 26 */ + int (*xFillPolygon) (Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3); /* 26 */ int (*xFillRectangles) (Display *d, Drawable dr, GC g, XRectangle *x, int i); /* 27 */ int (*xFreeColormap) (Display *d, Colormap c); /* 28 */ int (*xFreeColors) (Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul); /* 29 */ @@ -860,27 +860,27 @@ typedef struct TkIntXlibStubs { int (*xGrabKeyboard) (Display *d, Window w, Bool b, int i1, int i2, Time t); /* 33 */ int (*xGrabPointer) (Display *d, Window w1, Bool b, unsigned int ui, int i1, int i2, Window w2, Cursor c, Time t); /* 34 */ KeyCode (*xKeysymToKeycode) (Display *d, KeySym k); /* 35 */ - void (*xMapWindow) (Display *d, Window w); /* 36 */ + int (*xMapWindow) (Display *d, Window w); /* 36 */ int (*xMoveResizeWindow) (Display *d, Window w, int i1, int i2, unsigned int ui1, unsigned int ui2); /* 37 */ int (*xMoveWindow) (Display *d, Window w, int i1, int i2); /* 38 */ Bool (*xQueryPointer) (Display *d, Window w1, Window *w2, Window *w3, int *i1, int *i2, int *i3, int *i4, unsigned int *ui); /* 39 */ - void (*xRaiseWindow) (Display *d, Window w); /* 40 */ - void (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 41 */ - void (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */ - void (*xSelectInput) (Display *d, Window w, long l); /* 43 */ + int (*xRaiseWindow) (Display *d, Window w); /* 40 */ + int (*xRefreshKeyboardMapping) (XMappingEvent *x); /* 41 */ + int (*xResizeWindow) (Display *d, Window w, unsigned int ui1, unsigned int ui2); /* 42 */ + int (*xSelectInput) (Display *d, Window w, long l); /* 43 */ Status (*xSendEvent) (Display *d, Window w, Bool b, long l, XEvent *x); /* 44 */ - void (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 45 */ - void (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 46 */ + int (*xSetIconName) (Display *d, Window w, _Xconst char *c); /* 45 */ + int (*xSetInputFocus) (Display *d, Window w, int i, Time t); /* 46 */ int (*xSetSelectionOwner) (Display *d, Atom a, Window w, Time t); /* 47 */ - void (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 48 */ - void (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 49 */ - void (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 50 */ - void (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 51 */ - void (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 52 */ - void (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 53 */ - void (*xUngrabKeyboard) (Display *d, Time t); /* 54 */ + int (*xSetWindowBackground) (Display *d, Window w, unsigned long ul); /* 48 */ + int (*xSetWindowBackgroundPixmap) (Display *d, Window w, Pixmap p); /* 49 */ + int (*xSetWindowBorder) (Display *d, Window w, unsigned long ul); /* 50 */ + int (*xSetWindowBorderPixmap) (Display *d, Window w, Pixmap p); /* 51 */ + int (*xSetWindowBorderWidth) (Display *d, Window w, unsigned int ui); /* 52 */ + int (*xSetWindowColormap) (Display *d, Window w, Colormap c); /* 53 */ + int (*xUngrabKeyboard) (Display *d, Time t); /* 54 */ int (*xUngrabPointer) (Display *d, Time t); /* 55 */ - void (*xUnmapWindow) (Display *d, Window w); /* 56 */ + int (*xUnmapWindow) (Display *d, Window w); /* 56 */ int (*tkPutImage) (unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height); /* 57 */ Status (*xParseColor) (Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr); /* 58 */ GC (*xCreateGC) (Display *display, Drawable d, unsigned long valuemask, XGCValues *values); /* 59 */ @@ -905,15 +905,15 @@ typedef struct TkIntXlibStubs { void (*xSetWMClientMachine) (Display *display, Window w, XTextProperty *text_prop); /* 78 */ Status (*xStringListToTextProperty) (char **list, int count, XTextProperty *text_prop_return); /* 79 */ int (*xDrawSegments) (Display *display, Drawable d, GC gc, XSegment *segments, int nsegments); /* 80 */ - void (*xForceScreenSaver) (Display *display, int mode); /* 81 */ + int (*xForceScreenSaver) (Display *display, int mode); /* 81 */ int (*xDrawLine) (Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2); /* 82 */ int (*xFillRectangle) (Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height); /* 83 */ - void (*xClearWindow) (Display *d, Window w); /* 84 */ + int (*xClearWindow) (Display *d, Window w); /* 84 */ int (*xDrawPoint) (Display *display, Drawable d, GC gc, int x, int y); /* 85 */ int (*xDrawPoints) (Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode); /* 86 */ int (*xWarpPointer) (Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y); /* 87 */ - void (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */ - void (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */ + int (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */ + int (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */ Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */ int (*xSync) (Display *display, Bool flag); /* 91 */ #endif /* AQUA */ diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index b0603ca..314ca35 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -222,7 +222,7 @@ TkMacOSXBitmapRepFromDrawableRect( *---------------------------------------------------------------------- */ -void +int XCopyArea( Display *display, /* Display. */ Drawable src, /* Source drawable. */ @@ -243,17 +243,17 @@ XCopyArea( display->request++; if (!width || !height) { - return; + return BadDrawable; } if (!TkMacOSXSetupDrawingContext(dst, gc, 1, &dc)) { TkMacOSXDbgMsg("Failed to setup drawing context."); - return; + return BadDrawable; } if (!dc.context) { TkMacOSXDbgMsg("Invalid destination drawable - no context."); - return; + return BadDrawable; } if (srcDraw->flags & TK_IS_PIXMAP) { @@ -280,6 +280,7 @@ XCopyArea( } TkMacOSXRestoreDrawingContext(&dc); + return Success; } /* @@ -300,7 +301,7 @@ XCopyArea( *---------------------------------------------------------------------- */ -void +int XCopyPlane( Display *display, /* Display. */ Drawable src, /* Source drawable. */ @@ -321,14 +322,14 @@ XCopyPlane( display->request++; if (!width || !height) { /* TkMacOSXDbgMsg("Drawing of empty area requested"); */ - return; + return BadDrawable; } if (plane != 1) { Tcl_Panic("Unexpected plane specified for XCopyPlane"); } if (srcDraw->flags & TK_IS_PIXMAP) { if (!TkMacOSXSetupDrawingContext(dst, gc, 1, &dc)) { - return; + return BadDrawable; } CGContextRef context = dc.context; @@ -401,12 +402,13 @@ XCopyPlane( "could not get a bitmap context."); } TkMacOSXRestoreDrawingContext(&dc); + return Success; } else { /* * Source drawable is a Window, not a Pixmap. */ - XCopyArea(display, src, dst, gc, src_x, src_y, width, height, + return XCopyArea(display, src, dst, gc, src_x, src_y, width, height, dest_x, dest_y); } } @@ -848,7 +850,7 @@ XDrawSegments( *---------------------------------------------------------------------- */ -void +int XFillPolygon( Display *display, /* Display. */ Drawable d, /* Draw on this. */ @@ -864,7 +866,7 @@ XFillPolygon( display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { - return; + return BadDrawable; } if (dc.context) { double prevx, prevy; @@ -888,6 +890,7 @@ XFillPolygon( CGContextEOFillPath(dc.context); } TkMacOSXRestoreDrawingContext(&dc); + return Success; } /* @@ -1116,7 +1119,7 @@ TkMacOSXDrawSolidBorder( *---------------------------------------------------------------------- */ -void +int XDrawArc( Display *display, /* Display. */ Drawable d, /* Draw on this. */ @@ -1132,12 +1135,12 @@ XDrawArc( int lw = gc->line_width; if (width == 0 || height == 0 || angle2 == 0) { - return; + return BadDrawable; } display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { - return; + return BadDrawable; } if (dc.context) { CGRect rect; @@ -1167,6 +1170,7 @@ XDrawArc( } } TkMacOSXRestoreDrawingContext(&dc); + return Success; } #ifdef TK_MACOSXDRAW_UNUSED @@ -1192,7 +1196,7 @@ XDrawArc( *---------------------------------------------------------------------- */ -void +int XDrawArcs( Display *display, Drawable d, @@ -1207,7 +1211,7 @@ XDrawArcs( display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { - return; + return BadDrawable; } if (dc.context) { CGRect rect; @@ -1248,6 +1252,7 @@ XDrawArcs( } } TkMacOSXRestoreDrawingContext(&dc); + return Success; } #endif diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 65b7aee..f62e07c 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -572,7 +572,7 @@ XGrabKeyboard( *---------------------------------------------------------------------- */ -void +int XUngrabKeyboard( Display* display, Time time) @@ -586,6 +586,7 @@ XUngrabKeyboard( keyboardGrabNSWindow = nil; } keyboardGrabWinPtr = NULL; + return Success; } /* diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 1c63870..e851701 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -49,7 +49,7 @@ static void NotifyVisibility(TkWindow *winPtr, XEvent *eventPtr); *---------------------------------------------------------------------- */ -void +int XDestroyWindow( Display *display, /* Display. */ Window window) /* Window. */ @@ -87,7 +87,7 @@ XDestroyWindow( ckfree(macWin->toplevel); } ckfree(macWin); - return; + return Success; } if (macWin->visRgn) { CFRelease(macWin->visRgn); @@ -111,6 +111,7 @@ XDestroyWindow( if (macWin->toplevel->referenceCount == 0) { ckfree(macWin->toplevel); } + return Success; } /* @@ -130,7 +131,7 @@ XDestroyWindow( *---------------------------------------------------------------------- */ -void +int XMapWindow( Display *display, /* Display. */ Window window) /* Window. */ @@ -226,6 +227,7 @@ XMapWindow( event.xvisibility.type = VisibilityNotify; event.xvisibility.state = VisibilityUnobscured; NotifyVisibility(winPtr, &event); + return Success; } /* @@ -279,7 +281,7 @@ NotifyVisibility( *---------------------------------------------------------------------- */ -void +int XUnmapWindow( Display *display, /* Display. */ Window window) /* Window. */ @@ -332,6 +334,7 @@ XUnmapWindow( } else { [[win contentView] setNeedsDisplay:YES]; } + return Success; } /* @@ -351,7 +354,7 @@ XUnmapWindow( *---------------------------------------------------------------------- */ -void +int XResizeWindow( Display *display, /* Display. */ Window window, /* Window. */ @@ -375,6 +378,7 @@ XResizeWindow( } else { MoveResizeWindow(macWin); } + return Success; } /* @@ -593,7 +597,7 @@ GenerateConfigureNotify( *---------------------------------------------------------------------- */ -void +int XRaiseWindow( Display *display, /* Display. */ Window window) /* Window. */ @@ -608,6 +612,7 @@ XRaiseWindow( * TODO: this should generate damage */ } + return Success; } #if 0 diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 4040302..5d96677 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -6516,7 +6516,7 @@ TkpGetMS(void) *---------------------------------------------------------------------- */ -void +int XSetInputFocus( Display* display, Window focus, @@ -6526,6 +6526,7 @@ XSetInputFocus( /* * Don't need to do a thing. Tk manages the focus for us. */ + return Success; } /* diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 9d4f7db..b474817 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -450,13 +450,14 @@ XChangeProperty( return Success; } -void +int XSelectInput( Display* display, Window w, long event_mask) { Debugger(); + return Success; } int @@ -515,11 +516,12 @@ XSendEvent( return 0; } -void +int XClearWindow( Display* display, Window w) { + return Success; } /* @@ -531,6 +533,7 @@ XDrawPoint( int x, int y) { + return Success; } int @@ -542,6 +545,7 @@ XDrawPoints( int npoints, int mode) { + return Success; } */ @@ -560,7 +564,7 @@ XWarpPointer( return Success; } -void +int XQueryColor( Display* display, Colormap colormap, @@ -579,9 +583,10 @@ XQueryColor( d->blue = (b << 8) | b; d->flags = DoRed|DoGreen|DoBlue; d->pad = 0; + return Success; } -void +int XQueryColors( Display* display, Colormap colormap, @@ -604,6 +609,7 @@ XQueryColors( d->flags = DoRed|DoGreen|DoBlue; d->pad = 0; } + return Success; } int @@ -642,15 +648,16 @@ XGetWindowProperty( return 0; } -void +int XRefreshKeyboardMapping( XMappingEvent *x) { /* used by tkXEvent.c */ Debugger(); + return Success; } -void +int XSetIconName( Display* display, Window w, @@ -660,9 +667,10 @@ XSetIconName( * This is a no-op, no icon name for Macs. */ display->request++; + return Success; } -void +int XForceScreenSaver( Display* display, int mode) @@ -674,6 +682,7 @@ XForceScreenSaver( */ display->request++; + return Success; } void @@ -787,53 +796,59 @@ XChangeWindowAttributes( return Success; } -void +int XSetWindowBackground( Display *display, Window window, unsigned long value) { + return Success; } -void +int XSetWindowBackgroundPixmap( Display *display, Window w, Pixmap background_pixmap) { + return Success; } -void +int XSetWindowBorder( Display *display, Window w, unsigned long border_pixel) { + return Success; } -void +int XSetWindowBorderPixmap( Display *display, Window w, Pixmap border_pixmap) { + return Success; } -void +int XSetWindowBorderWidth( Display *display, Window w, unsigned int width) { + return Success; } -void +int XSetWindowColormap( Display *display, Window w, Colormap colormap) { Debugger(); + return Success; } Status |