diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-07 08:08:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-07 08:08:30 (GMT) |
commit | edb4cc7ce4e75ee2bd46f965f0724c54c134a1fd (patch) | |
tree | 7981088cb257579d4bcf74b7735557ca697528c7 /win/tkWinDraw.c | |
parent | 30a0f07209b1340b0060d238a1ec0bd3365f5692 (diff) | |
parent | e05c1d71ec11cc892731a999a9d521781ea8567e (diff) | |
download | tk-edb4cc7ce4e75ee2bd46f965f0724c54c134a1fd.zip tk-edb4cc7ce4e75ee2bd46f965f0724c54c134a1fd.tar.gz tk-edb4cc7ce4e75ee2bd46f965f0724c54c134a1fd.tar.bz2 |
Change XChangeWindowAttributes signature and many others to match Xorg, needed for Cygwin
Diffstat (limited to 'win/tkWinDraw.c')
-rw-r--r-- | win/tkWinDraw.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 388fd14..1897bc8 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -116,7 +116,7 @@ static Tcl_ThreadDataKey dataKey; static POINT * ConvertPoints(XPoint *points, int npoints, int mode, RECT *bbox); -static void DrawOrFillArc(Display *display, Drawable d, GC gc, +static int DrawOrFillArc(Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height, int start, int extent, int fill); @@ -297,7 +297,7 @@ ConvertPoints( *---------------------------------------------------------------------- */ -void +int XCopyArea( Display *display, Drawable src, @@ -333,6 +333,7 @@ XCopyArea( TkWinReleaseDrawableDC(dest, destDC, &destState); } TkWinReleaseDrawableDC(src, srcDC, &srcState); + return Success; } /* @@ -353,7 +354,7 @@ XCopyArea( *---------------------------------------------------------------------- */ -void +int XCopyPlane( Display *display, Drawable src, @@ -480,6 +481,7 @@ XCopyPlane( TkWinReleaseDrawableDC(dest, destDC, &destState); } TkWinReleaseDrawableDC(src, srcDC, &srcState); + return Success; } /* @@ -911,7 +913,7 @@ XDrawLines( *---------------------------------------------------------------------- */ -void +int XFillPolygon( Display *display, Drawable d, @@ -926,7 +928,7 @@ XFillPolygon( HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -935,6 +937,7 @@ XFillPolygon( RenderObject(dc, gc, points, npoints, mode, pen, Polygon); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -953,7 +956,7 @@ XFillPolygon( *---------------------------------------------------------------------- */ -void +int XDrawRectangle( Display *display, Drawable d, @@ -967,7 +970,7 @@ XDrawRectangle( HDC dc; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -983,6 +986,7 @@ XDrawRectangle( DeleteObject(SelectObject(dc, oldPen)); SelectObject(dc, oldBrush); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* @@ -1001,7 +1005,7 @@ XDrawRectangle( *---------------------------------------------------------------------- */ -void +int XDrawArc( Display *display, Drawable d, @@ -1012,7 +1016,7 @@ XDrawArc( { 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); } /* @@ -1031,7 +1035,7 @@ XDrawArc( *---------------------------------------------------------------------- */ -void +int XFillArc( Display *display, Drawable d, @@ -1042,7 +1046,7 @@ XFillArc( { 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); } /* @@ -1062,7 +1066,7 @@ XFillArc( *---------------------------------------------------------------------- */ -static void +static int DrawOrFillArc( Display *display, Drawable d, @@ -1082,7 +1086,7 @@ DrawOrFillArc( double radian_start, radian_end, xr, yr; if (d == None) { - return; + return BadDrawable; } dc = TkWinGetDrawableDC(display, d, &state); @@ -1155,6 +1159,7 @@ DrawOrFillArc( } DeleteObject(SelectObject(dc, oldPen)); TkWinReleaseDrawableDC(d, dc, &state); + return Success; } /* |