summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-08 10:45:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-11-08 10:45:07 (GMT)
commitf2d49e3c2bd2d6ee9466d8cd814a5eef2a93408f (patch)
treec005142ab80bfc39314ee11c9cfe3c69e14bfb0f /xlib
parent6864f7029a8095dec62bdc53e31f4e3c30c31b0b (diff)
downloadtk-f2d49e3c2bd2d6ee9466d8cd814a5eef2a93408f.zip
tk-f2d49e3c2bd2d6ee9466d8cd814a5eef2a93408f.tar.gz
tk-f2d49e3c2bd2d6ee9466d8cd814a5eef2a93408f.tar.bz2
Add XDrawSegments/XDrawPoint/XDrawPoints to internal stub table, and fix their signature matching X11.
Diffstat (limited to 'xlib')
-rw-r--r--xlib/X11/Xutil.h4
-rw-r--r--xlib/xgc.c20
2 files changed, 14 insertions, 10 deletions
diff --git a/xlib/X11/Xutil.h b/xlib/X11/Xutil.h
index 58124b0..bf372fb 100644
--- a/xlib/X11/Xutil.h
+++ b/xlib/X11/Xutil.h
@@ -535,7 +535,7 @@ extern Status XMatchVisualInfo(
#endif
);
-extern void XOffsetRegion(
+extern int XOffsetRegion(
#if NeedFunctionPrototypes
Region /* r */,
int /* dx */,
@@ -814,7 +814,7 @@ extern void XUnionRectWithRegion(
#endif
);
-extern void XUnionRegion(
+extern int XUnionRegion(
#if NeedFunctionPrototypes
Region /* sra */,
Region /* srb */,
diff --git a/xlib/xgc.c b/xlib/xgc.c
index 8975373..b18cb9e 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -521,7 +521,7 @@ XDrawImageString(
}
#endif
-void
+int
XDrawPoint(
Display *display,
Drawable d,
@@ -529,10 +529,10 @@ XDrawPoint(
int x,
int y)
{
- XDrawLine(display, d, gc, x, y, x, y);
+ return XDrawLine(display, d, gc, x, y, x, y);
}
-void
+int
XDrawPoints(
Display *display,
Drawable d,
@@ -541,16 +541,19 @@ XDrawPoints(
int npoints,
int mode)
{
- int i;
+ int res = Success;
- for (i=0; i<npoints; i++) {
- XDrawLine(display, d, gc,
- points[i].x, points[i].y, points[i].x, points[i].y);
+ while (npoints-- > 0) {
+ res = XDrawLine(display, d, gc,
+ points[0].x, points[0].y, points[0].x, points[0].y);
+ if (res != Success) break;
+ ++points;
}
+ return res;
}
#if !defined(MAC_OSX_TK)
-void
+int
XDrawSegments(
Display *display,
Drawable d,
@@ -558,6 +561,7 @@ XDrawSegments(
XSegment *segments,
int nsegments)
{
+ return Success;
}
#endif