diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-07 04:30:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-07 04:30:52 (GMT) |
commit | e05c1d71ec11cc892731a999a9d521781ea8567e (patch) | |
tree | 9e4ba40f867e41451c5cf5bc10bd1871191d2cad /win/tkWinDraw.c | |
parent | e35d614587b25a1a03ededdf2d04bcbfca86be70 (diff) | |
parent | 0f3a2fcdd9d1f4c2d5659ae50ce1a5cba322f62c (diff) | |
download | tk-e05c1d71ec11cc892731a999a9d521781ea8567e.zip tk-e05c1d71ec11cc892731a999a9d521781ea8567e.tar.gz tk-e05c1d71ec11cc892731a999a9d521781ea8567e.tar.bz2 |
Change XChangeWindowAttributes signature and many others to match Xorg, needed for Cygwin
Diffstat (limited to 'win/tkWinDraw.c')
-rwxr-xr-x | win/tkWinDraw.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 26d73e8..04a27c4 100755 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -117,7 +117,7 @@ static Tcl_ThreadDataKey dataKey; static POINT * ConvertPoints _ANSI_ARGS_((XPoint *points, int npoints, int mode, RECT *bbox)); -static void DrawOrFillArc _ANSI_ARGS_((Display *display, +static int DrawOrFillArc _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height, int start, int extent, int fill)); @@ -299,7 +299,7 @@ ConvertPoints(points, npoints, mode, bbox) *---------------------------------------------------------------------- */ -void +int XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y) Display* display; Drawable src; @@ -335,6 +335,7 @@ XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y) TkWinReleaseDrawableDC(dest, destDC, &destState); } TkWinReleaseDrawableDC(src, srcDC, &srcState); + return Success; } /* @@ -356,7 +357,7 @@ XCopyArea(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y) *---------------------------------------------------------------------- */ -void +int XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y, plane) Display* display; @@ -486,6 +487,7 @@ XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x, TkWinReleaseDrawableDC(dest, destDC, &destState); } TkWinReleaseDrawableDC(src, srcDC, &srcState); + return Success; } /* @@ -917,7 +919,7 @@ XDrawLines(display, d, gc, points, npoints, mode) *---------------------------------------------------------------------- */ -void +int XFillPolygon(display, d, gc, points, npoints, shape, mode) Display* display; Drawable d; @@ -932,7 +934,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode) HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -941,6 +943,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode) RenderObject(dc, gc, points, npoints, mode, pen, Polygon); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -959,7 +962,7 @@ XFillPolygon(display, d, gc, points, npoints, shape, mode) *---------------------------------------------------------------------- */ -void +int XDrawRectangle(display, d, gc, x, y, width, height) Display* display; Drawable d; @@ -975,7 +978,7 @@ XDrawRectangle(display, d, gc, x, y, width, height) HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -991,6 +994,7 @@ XDrawRectangle(display, d, gc, x, y, width, height) DeleteObject(SelectObject(dc, oldPen)); SelectObject(dc, oldBrush); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -1009,7 +1013,7 @@ XDrawRectangle(display, d, gc, x, y, width, height) *---------------------------------------------------------------------- */ -void +int XDrawArc(display, d, gc, x, y, width, height, start, extent) Display* display; Drawable d; @@ -1023,7 +1027,7 @@ XDrawArc(display, d, gc, x, y, width, height, start, extent) { display->request++; - DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0); + return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 0); } /* @@ -1042,7 +1046,7 @@ XDrawArc(display, d, gc, x, y, width, height, start, extent) *---------------------------------------------------------------------- */ -void +int XFillArc(display, d, gc, x, y, width, height, start, extent) Display* display; Drawable d; @@ -1056,7 +1060,7 @@ XFillArc(display, d, gc, x, y, width, height, start, extent) { display->request++; - DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1); + return DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, 1); } /* @@ -1076,7 +1080,7 @@ XFillArc(display, d, gc, x, y, width, height, start, extent) *---------------------------------------------------------------------- */ -static void +static int DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill) Display *display; Drawable d; @@ -1096,7 +1100,7 @@ DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill) double radian_start, radian_end, xr, yr; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -1166,6 +1170,7 @@ DrawOrFillArc(display, d, gc, x, y, width, height, start, extent, fill) } DeleteObject(SelectObject(dc, oldPen)); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* |