summaryrefslogtreecommitdiffstats
path: root/xlib
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 /xlib
parentd9ac48147c4cc07f47d581b94c2fd05cfff767a7 (diff)
parent94bf2a20e147c3a37f07c2a51348e3a072c4c248 (diff)
downloadtk-57e25a04aef40def9f523ec04b6fd04a60d2147b.zip
tk-57e25a04aef40def9f523ec04b6fd04a60d2147b.tar.gz
tk-57e25a04aef40def9f523ec04b6fd04a60d2147b.tar.bz2
merge trunk
Diffstat (limited to 'xlib')
-rw-r--r--xlib/xdraw.c8
-rw-r--r--xlib/xgc.c50
2 files changed, 37 insertions, 21 deletions
diff --git a/xlib/xdraw.c b/xlib/xdraw.c
index f8f035c..b8d7973 100644
--- a/xlib/xdraw.c
+++ b/xlib/xdraw.c
@@ -27,7 +27,7 @@
*----------------------------------------------------------------------
*/
-void
+int
XDrawLine(
Display *display,
Drawable d,
@@ -41,7 +41,7 @@ XDrawLine(
points[0].y = y1;
points[1].x = x2;
points[1].y = y2;
- XDrawLines(display, d, gc, points, 2, CoordModeOrigin);
+ return XDrawLines(display, d, gc, points, 2, CoordModeOrigin);
}
/*
@@ -61,7 +61,7 @@ XDrawLine(
*----------------------------------------------------------------------
*/
-void
+int
XFillRectangle(
Display *display,
Drawable d,
@@ -76,7 +76,7 @@ XFillRectangle(
rectangle.y = y;
rectangle.width = width;
rectangle.height = height;
- XFillRectangles(display, d, gc, &rectangle, 1);
+ return XFillRectangles(display, d, gc, &rectangle, 1);
}
/*
diff --git a/xlib/xgc.c b/xlib/xgc.c
index 61602e2..0cebbc8 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -29,6 +29,7 @@
# define gcCacheSize sizeof(TkpGCCache)
#endif
+#undef TkSetRegion
/*
*----------------------------------------------------------------------
@@ -48,7 +49,7 @@
static TkpClipMask *AllocClipMask(GC gc) {
TkpClipMask *clip_mask = (TkpClipMask*) gc->clip_mask;
-
+
if (clip_mask == None) {
clip_mask = ckalloc(sizeof(TkpClipMask));
gc->clip_mask = (Pixmap) clip_mask;
@@ -159,7 +160,7 @@ XCreateGC(
gp->clip_mask = None;
if (mask & GCClipMask) {
TkpClipMask *clip_mask = AllocClipMask(gp);
-
+
clip_mask->type = TKP_CLIP_PIXMAP;
clip_mask->value.pixmap = values->clip_mask;
}
@@ -206,7 +207,7 @@ TkpGetGCCache(GC gc) {
*----------------------------------------------------------------------
*/
-void
+int
XChangeGC(
Display *d,
GC gc,
@@ -244,6 +245,7 @@ XChangeGC(
gc->dashes = values->dashes;
(&(gc->dashes))[1] = 0;
}
+ return Success;
}
/*
@@ -262,7 +264,7 @@ XChangeGC(
*----------------------------------------------------------------------
*/
-void XFreeGC(
+int XFreeGC(
Display *d,
GC gc)
{
@@ -271,6 +273,7 @@ void XFreeGC(
TkpFreeGCCache(gc);
ckfree(gc);
}
+ return Success;
}
/*
@@ -290,25 +293,27 @@ void XFreeGC(
*----------------------------------------------------------------------
*/
-void
+int
XSetForeground(
Display *display,
GC gc,
unsigned long foreground)
{
gc->foreground = foreground;
+ return Success;
}
-void
+int
XSetBackground(
Display *display,
GC gc,
unsigned long background)
{
gc->background = background;
+ return Success;
}
-void
+int
XSetDashes(
Display *display,
GC gc,
@@ -330,36 +335,40 @@ XSetDashes(
*p++ = *dash_list++;
}
*p = 0;
+ return Success;
}
-void
+int
XSetFunction(
Display *display,
GC gc,
int function)
{
gc->function = function;
+ return Success;
}
-void
+int
XSetFillRule(
Display *display,
GC gc,
int fill_rule)
{
gc->fill_rule = fill_rule;
+ return Success;
}
-void
+int
XSetFillStyle(
Display *display,
GC gc,
int fill_style)
{
gc->fill_style = fill_style;
+ return Success;
}
-void
+int
XSetTSOrigin(
Display *display,
GC gc,
@@ -367,36 +376,40 @@ XSetTSOrigin(
{
gc->ts_x_origin = x;
gc->ts_y_origin = y;
+ return Success;
}
-void
+int
XSetFont(
Display *display,
GC gc,
Font font)
{
gc->font = font;
+ return Success;
}
-void
+int
XSetArcMode(
Display *display,
GC gc,
int arc_mode)
{
gc->arc_mode = arc_mode;
+ return Success;
}
-void
+int
XSetStipple(
Display *display,
GC gc,
Pixmap stipple)
{
gc->stipple = stipple;
+ return Success;
}
-void
+int
XSetLineAttributes(
Display *display,
GC gc,
@@ -409,9 +422,10 @@ XSetLineAttributes(
gc->line_style = line_style;
gc->cap_style = cap_style;
gc->join_style = join_style;
+ return Success;
}
-void
+int
XSetClipOrigin(
Display *display,
GC gc,
@@ -420,6 +434,7 @@ XSetClipOrigin(
{
gc->clip_x_origin = clip_x_origin;
gc->clip_y_origin = clip_y_origin;
+ return Success;
}
/*
@@ -462,7 +477,7 @@ TkSetRegion(
}
}
-void
+int
XSetClipMask(
Display *display,
GC gc,
@@ -476,6 +491,7 @@ XSetClipMask(
clip_mask->type = TKP_CLIP_PIXMAP;
clip_mask->value.pixmap = pixmap;
}
+ return Success;
}
/*