summaryrefslogtreecommitdiffstats
path: root/xlib/xgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlib/xgc.c')
-rw-r--r--xlib/xgc.c52
1 files changed, 33 insertions, 19 deletions
diff --git a/xlib/xgc.c b/xlib/xgc.c
index bbc5746..0cebbc8 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -10,8 +10,6 @@
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: xgc.c,v 1.18 2010/04/20 15:14:30 nijtmans Exp $
*/
#include "tkInt.h"
@@ -31,6 +29,7 @@
# define gcCacheSize sizeof(TkpGCCache)
#endif
+#undef TkSetRegion
/*
*----------------------------------------------------------------------
@@ -50,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;
@@ -161,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;
}
@@ -208,7 +207,7 @@ TkpGetGCCache(GC gc) {
*----------------------------------------------------------------------
*/
-void
+int
XChangeGC(
Display *d,
GC gc,
@@ -246,6 +245,7 @@ XChangeGC(
gc->dashes = values->dashes;
(&(gc->dashes))[1] = 0;
}
+ return Success;
}
/*
@@ -264,7 +264,7 @@ XChangeGC(
*----------------------------------------------------------------------
*/
-void XFreeGC(
+int XFreeGC(
Display *d,
GC gc)
{
@@ -273,6 +273,7 @@ void XFreeGC(
TkpFreeGCCache(gc);
ckfree(gc);
}
+ return Success;
}
/*
@@ -292,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,
@@ -332,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,
@@ -369,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,
@@ -411,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,
@@ -422,6 +434,7 @@ XSetClipOrigin(
{
gc->clip_x_origin = clip_x_origin;
gc->clip_y_origin = clip_y_origin;
+ return Success;
}
/*
@@ -464,7 +477,7 @@ TkSetRegion(
}
}
-void
+int
XSetClipMask(
Display *display,
GC gc,
@@ -478,6 +491,7 @@ XSetClipMask(
clip_mask->type = TKP_CLIP_PIXMAP;
clip_mask->value.pixmap = pixmap;
}
+ return Success;
}
/*