summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-05 04:46:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-05 04:46:39 (GMT)
commitbffdf13f31774677807ea594324f7a8964a1ee10 (patch)
tree4b1b6848a2a8f1b3f66d319e784c6d08ddc042ab /macosx/tkMacOSXDraw.c
parent91ae12c773a03fe4533d19a6d115deb6a4c95351 (diff)
parente35d614587b25a1a03ededdf2d04bcbfca86be70 (diff)
downloadtk-bffdf13f31774677807ea594324f7a8964a1ee10.zip
tk-bffdf13f31774677807ea594324f7a8964a1ee10.tar.gz
tk-bffdf13f31774677807ea594324f7a8964a1ee10.tar.bz2
Change XSetDashes signature and many others to match Xorg, needed for Cygwin
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index db498f9..f17bcee 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -338,7 +338,7 @@ end:
*----------------------------------------------------------------------
*/
-void
+int
TkPutImage(
unsigned long *colors, /* Unused on Macintosh. */
int ncolors, /* Unused on Macintosh. */
@@ -358,7 +358,7 @@ TkPutImage(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 0, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
TkMacOSXDbgMsg("Ignored CG drawing of XImage");
@@ -530,6 +530,7 @@ TkPutImage(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
/*
@@ -548,7 +549,7 @@ TkPutImage(
*----------------------------------------------------------------------
*/
-void
+int
XDrawLines(
Display *display, /* Display. */
Drawable d, /* Draw on this. */
@@ -562,16 +563,12 @@ XDrawLines(
int i, lw = gc->line_width;
if (npoints < 2) {
- /*
- * TODO: generate BadValue error.
- */
-
- return;
+ return BadValue;
}
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, tkMacOSXUseCGDrawing, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
double prevx, prevy;
@@ -612,6 +609,7 @@ XDrawLines(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
/*
@@ -900,7 +898,7 @@ XDrawRectangles(
*----------------------------------------------------------------------
*/
-void
+int
XFillRectangles(
Display* display, /* Display. */
Drawable d, /* Draw on this. */
@@ -915,7 +913,7 @@ XFillRectangles(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, tkMacOSXUseCGDrawing, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
CGRect rect;
@@ -942,6 +940,7 @@ XFillRectangles(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
/*