summaryrefslogtreecommitdiffstats
path: root/carbon/tkMacOSXDraw.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-11 18:55:32 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-11 18:55:32 (GMT)
commit57e25a04aef40def9f523ec04b6fd04a60d2147b (patch)
treecfe623294ef7fc33d630552701c1b56b5ab42bdf /carbon/tkMacOSXDraw.c
parentd9ac48147c4cc07f47d581b94c2fd05cfff767a7 (diff)
parent94bf2a20e147c3a37f07c2a51348e3a072c4c248 (diff)
downloadtk-57e25a04aef40def9f523ec04b6fd04a60d2147b.zip
tk-57e25a04aef40def9f523ec04b6fd04a60d2147b.tar.gz
tk-57e25a04aef40def9f523ec04b6fd04a60d2147b.tar.bz2
merge trunk
Diffstat (limited to 'carbon/tkMacOSXDraw.c')
-rw-r--r--carbon/tkMacOSXDraw.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/carbon/tkMacOSXDraw.c b/carbon/tkMacOSXDraw.c
index e028e45..6f40e5d 100644
--- a/carbon/tkMacOSXDraw.c
+++ b/carbon/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;
}
/*