summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 6805f28..5c36967 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -340,7 +340,7 @@ end:
*----------------------------------------------------------------------
*/
-void
+int
TkPutImage(
unsigned long *colors, /* Unused on Macintosh. */
int ncolors, /* Unused on Macintosh. */
@@ -360,7 +360,7 @@ TkPutImage(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 0, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
TkMacOSXDbgMsg("Ignored CG drawing of XImage");
@@ -532,6 +532,7 @@ TkPutImage(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
/*
@@ -564,16 +565,12 @@ XDrawLines(
int i, lw = gc->line_width;
if (npoints < 2) {
- /*
- * TODO: generate BadValue error.
- */
-
- return 0;
+ return BadValue;
}
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, tkMacOSXUseCGDrawing, &dc)) {
- return 0;
+ return BadDrawable;
}
if (dc.context) {
double prevx, prevy;
@@ -614,7 +611,7 @@ XDrawLines(
}
}
TkMacOSXRestoreDrawingContext(&dc);
- return 1;
+ return Success;
}
/*
@@ -918,7 +915,7 @@ XFillRectangles(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, tkMacOSXUseCGDrawing, &dc)) {
- return 0;
+ return BadDrawable;
}
if (dc.context) {
CGRect rect;
@@ -945,7 +942,7 @@ XFillRectangles(
}
}
TkMacOSXRestoreDrawingContext(&dc);
- return 1;
+ return Success;
}
/*