summaryrefslogtreecommitdiffstats
path: root/win/tkWinDraw.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-08 22:47:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-08 22:47:55 (GMT)
commit8409ff09f08fd2b2ef22585bb9559ee6930d4d5f (patch)
tree8085e4e968c883798ec985c45f94065fe230ee15 /win/tkWinDraw.c
parent676eb78eadce63bc5b6a98b6c1f2d077b49a9869 (diff)
parent79fa64792bbab42e97785552b9a9cf75fa126695 (diff)
downloadtk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.zip
tk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.tar.gz
tk-8409ff09f08fd2b2ef22585bb9559ee6930d4d5f.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.c46
1 files changed, 27 insertions, 19 deletions
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index dd482bd..ba4176c 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -115,7 +115,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);
@@ -296,7 +296,7 @@ ConvertPoints(
*----------------------------------------------------------------------
*/
-void
+int
XCopyArea(
Display *display,
Drawable src,
@@ -332,6 +332,7 @@ XCopyArea(
TkWinReleaseDrawableDC(dest, destDC, &destState);
}
TkWinReleaseDrawableDC(src, srcDC, &srcState);
+ return Success;
}
/*
@@ -352,7 +353,7 @@ XCopyArea(
*----------------------------------------------------------------------
*/
-void
+int
XCopyPlane(
Display *display,
Drawable src,
@@ -479,6 +480,7 @@ XCopyPlane(
TkWinReleaseDrawableDC(dest, destDC, &destState);
}
TkWinReleaseDrawableDC(src, srcDC, &srcState);
+ return Success;
}
/*
@@ -498,7 +500,7 @@ XCopyPlane(
*----------------------------------------------------------------------
*/
-void
+int
TkPutImage(
unsigned long *colors, /* Array of pixel values used by this image.
* May be NULL. */
@@ -587,7 +589,7 @@ TkPutImage(
Tcl_Panic("Fail to allocate bitmap");
DeleteDC(dcMem);
TkWinReleaseDrawableDC(d, dc, &state);
- return;
+ return BadValue;
}
bitmap = SelectObject(dcMem, bitmap);
BitBlt(dc, dest_x, dest_y, (int) width, (int) height, dcMem, src_x, src_y,
@@ -595,6 +597,7 @@ TkPutImage(
DeleteObject(SelectObject(dcMem, bitmap));
DeleteDC(dcMem);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -613,7 +616,7 @@ TkPutImage(
*----------------------------------------------------------------------
*/
-void
+int
XFillRectangles(
Display *display,
Drawable d,
@@ -628,7 +631,7 @@ XFillRectangles(
HBRUSH brush, oldBrush;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -715,6 +718,7 @@ XFillRectangles(
}
DeleteObject(brush);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -862,7 +866,7 @@ RenderObject(
*----------------------------------------------------------------------
*/
-void
+int
XDrawLines(
Display *display,
Drawable d,
@@ -876,7 +880,7 @@ XDrawLines(
HDC dc;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -887,6 +891,7 @@ XDrawLines(
DeleteObject(pen);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -905,7 +910,7 @@ XDrawLines(
*----------------------------------------------------------------------
*/
-void
+int
XFillPolygon(
Display *display,
Drawable d,
@@ -920,7 +925,7 @@ XFillPolygon(
HDC dc;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -929,6 +934,7 @@ XFillPolygon(
RenderObject(dc, gc, points, npoints, mode, pen, Polygon);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -947,7 +953,7 @@ XFillPolygon(
*----------------------------------------------------------------------
*/
-void
+int
XDrawRectangle(
Display *display,
Drawable d,
@@ -961,7 +967,7 @@ XDrawRectangle(
HDC dc;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -977,6 +983,7 @@ XDrawRectangle(
DeleteObject(SelectObject(dc, oldPen));
SelectObject(dc, oldBrush);
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*
@@ -995,7 +1002,7 @@ XDrawRectangle(
*----------------------------------------------------------------------
*/
-void
+int
XDrawArc(
Display *display,
Drawable d,
@@ -1006,7 +1013,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);
}
/*
@@ -1025,7 +1032,7 @@ XDrawArc(
*----------------------------------------------------------------------
*/
-void
+int
XFillArc(
Display *display,
Drawable d,
@@ -1036,7 +1043,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);
}
/*
@@ -1056,7 +1063,7 @@ XFillArc(
*----------------------------------------------------------------------
*/
-static void
+static int
DrawOrFillArc(
Display *display,
Drawable d,
@@ -1076,7 +1083,7 @@ DrawOrFillArc(
double radian_start, radian_end, xr, yr;
if (d == None) {
- return;
+ return BadDrawable;
}
dc = TkWinGetDrawableDC(display, d, &state);
@@ -1149,6 +1156,7 @@ DrawOrFillArc(
}
DeleteObject(SelectObject(dc, oldPen));
TkWinReleaseDrawableDC(d, dc, &state);
+ return Success;
}
/*