summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkInt.decls24
-rw-r--r--generic/tkIntXlibDecls.h60
-rw-r--r--generic/tkPointer.c4
-rw-r--r--generic/tkStubInit.c145
4 files changed, 144 insertions, 89 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index f88186a..091bb50 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -1337,7 +1337,7 @@ declare 79 win {
KeySym *k, Status *s)
}
declare 80 win {
- void TkPutImage(unsigned long *colors, int ncolors, Display *display,
+ int TkPutImage(unsigned long *colors, int ncolors, Display *display,
Drawable d, GC gc, XImage *image, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width, unsigned int height)
}
@@ -1426,14 +1426,14 @@ declare 104 win {
int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1,
int x2, int y2)
}
-declare 106 win {
- int XFillRectangle(Display *display, Drawable d, GC gc,
- int x, int y, unsigned int width, unsigned int height)
-}
declare 105 win {
int XWarpPointer(Display *d, Window s, Window dw, int sx, int sy,
unsigned int sw, unsigned int sh, int dx, int dy)
}
+declare 106 win {
+ int XFillRectangle(Display *display, Drawable d, GC gc,
+ int x, int y, unsigned int width, unsigned int height)
+}
################################
# X functions for Mac and Aqua
@@ -1482,7 +1482,7 @@ declare 12 {mac aqua} {
Status XAllocColor(Display *d, Colormap c, XColor *xp)
}
declare 13 {mac aqua} {
- void XBell(Display *d, int i)
+ int XBell(Display *d, int i)
}
declare 14 {mac aqua} {
void XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1,
@@ -1538,14 +1538,14 @@ declare 27 {mac aqua} {
int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i)
}
declare 28 {mac aqua} {
- void XFreeColormap(Display *d, Colormap c)
+ int XFreeColormap(Display *d, Colormap c)
}
declare 29 {mac aqua} {
- void XFreeColors(Display *d, Colormap c,
+ int XFreeColors(Display *d, Colormap c,
unsigned long *ulp, int i, unsigned long ul)
}
declare 30 {mac aqua} {
- void XFreeModifiermap(XModifierKeymap *x)
+ int XFreeModifiermap(XModifierKeymap *x)
}
declare 31 {mac aqua} {
Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1,
@@ -1604,7 +1604,7 @@ declare 46 {mac aqua} {
void XSetInputFocus(Display *d, Window w, int i, Time t)
}
declare 47 {mac aqua} {
- void XSetSelectionOwner(Display *d, Atom a, Window w, Time t)
+ int XSetSelectionOwner(Display *d, Atom a, Window w, Time t)
}
declare 48 {mac aqua} {
void XSetWindowBackground(Display *d, Window w, unsigned long ul)
@@ -1634,7 +1634,7 @@ declare 56 {mac aqua} {
void XUnmapWindow(Display *d, Window w)
}
declare 57 {mac aqua} {
- void TkPutImage(unsigned long *colors, int ncolors, Display *display,
+ int TkPutImage(unsigned long *colors, int ncolors, Display *display,
Drawable d, GC gc, XImage *image, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width, unsigned int height)
}
@@ -1739,7 +1739,7 @@ declare 86 {mac aqua} {
int npoints, int mode)
}
declare 87 {mac aqua} {
- void XWarpPointer(Display *display, Window src_w, Window dest_w,
+ int XWarpPointer(Display *display, Window src_w, Window dest_w,
int src_x, int src_y, unsigned int src_width,
unsigned int src_height, int dest_x, int dest_y)
}
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index 06bb0f0..fb3153d 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -279,7 +279,7 @@ EXTERN int XmbLookupString _ANSI_ARGS_((XIC xi,
XKeyPressedEvent *xk, char *c, int i,
KeySym *k, Status *s));
/* 80 */
-EXTERN void TkPutImage _ANSI_ARGS_((unsigned long *colors,
+EXTERN int TkPutImage _ANSI_ARGS_((unsigned long *colors,
int ncolors, Display *display, Drawable d,
GC gc, XImage *image, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width,
@@ -402,7 +402,7 @@ EXTERN XErrorHandler XSetErrorHandler _ANSI_ARGS_((XErrorHandler x));
EXTERN Status XAllocColor _ANSI_ARGS_((Display *d, Colormap c,
XColor *xp));
/* 13 */
-EXTERN void XBell _ANSI_ARGS_((Display *d, int i));
+EXTERN int XBell _ANSI_ARGS_((Display *d, int i));
/* 14 */
EXTERN void XChangeProperty _ANSI_ARGS_((Display *d, Window w,
Atom a1, Atom a2, int i1, int i2,
@@ -455,12 +455,12 @@ EXTERN void XFillPolygon _ANSI_ARGS_((Display *d, Drawable dr,
EXTERN int XFillRectangles _ANSI_ARGS_((Display *d, Drawable dr,
GC g, XRectangle *x, int i));
/* 28 */
-EXTERN void XFreeColormap _ANSI_ARGS_((Display *d, Colormap c));
+EXTERN int XFreeColormap _ANSI_ARGS_((Display *d, Colormap c));
/* 29 */
-EXTERN void XFreeColors _ANSI_ARGS_((Display *d, Colormap c,
+EXTERN int XFreeColors _ANSI_ARGS_((Display *d, Colormap c,
unsigned long *ulp, int i, unsigned long ul));
/* 30 */
-EXTERN void XFreeModifiermap _ANSI_ARGS_((XModifierKeymap *x));
+EXTERN int XFreeModifiermap _ANSI_ARGS_((XModifierKeymap *x));
/* 31 */
EXTERN Status XGetGeometry _ANSI_ARGS_((Display *d, Drawable dr,
Window *w, int *i1, int *i2,
@@ -514,7 +514,7 @@ EXTERN void XSetIconName _ANSI_ARGS_((Display *d, Window w,
EXTERN void XSetInputFocus _ANSI_ARGS_((Display *d, Window w,
int i, Time t));
/* 47 */
-EXTERN void XSetSelectionOwner _ANSI_ARGS_((Display *d, Atom a,
+EXTERN int XSetSelectionOwner _ANSI_ARGS_((Display *d, Atom a,
Window w, Time t));
/* 48 */
EXTERN void XSetWindowBackground _ANSI_ARGS_((Display *d,
@@ -541,7 +541,7 @@ EXTERN int XUngrabPointer _ANSI_ARGS_((Display *d, Time t));
/* 56 */
EXTERN void XUnmapWindow _ANSI_ARGS_((Display *d, Window w));
/* 57 */
-EXTERN void TkPutImage _ANSI_ARGS_((unsigned long *colors,
+EXTERN int TkPutImage _ANSI_ARGS_((unsigned long *colors,
int ncolors, Display *display, Drawable d,
GC gc, XImage *image, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width,
@@ -637,7 +637,7 @@ EXTERN void XDrawPoints _ANSI_ARGS_((Display *display,
Drawable d, GC gc, XPoint *points,
int npoints, int mode));
/* 87 */
-EXTERN void XWarpPointer _ANSI_ARGS_((Display *display,
+EXTERN int XWarpPointer _ANSI_ARGS_((Display *display,
Window src_w, Window dest_w, int src_x,
int src_y, unsigned int src_width,
unsigned int src_height, int dest_x,
@@ -692,7 +692,7 @@ EXTERN XErrorHandler XSetErrorHandler _ANSI_ARGS_((XErrorHandler x));
EXTERN Status XAllocColor _ANSI_ARGS_((Display *d, Colormap c,
XColor *xp));
/* 13 */
-EXTERN void XBell _ANSI_ARGS_((Display *d, int i));
+EXTERN int XBell _ANSI_ARGS_((Display *d, int i));
/* 14 */
EXTERN void XChangeProperty _ANSI_ARGS_((Display *d, Window w,
Atom a1, Atom a2, int i1, int i2,
@@ -745,12 +745,12 @@ EXTERN void XFillPolygon _ANSI_ARGS_((Display *d, Drawable dr,
EXTERN int XFillRectangles _ANSI_ARGS_((Display *d, Drawable dr,
GC g, XRectangle *x, int i));
/* 28 */
-EXTERN void XFreeColormap _ANSI_ARGS_((Display *d, Colormap c));
+EXTERN int XFreeColormap _ANSI_ARGS_((Display *d, Colormap c));
/* 29 */
-EXTERN void XFreeColors _ANSI_ARGS_((Display *d, Colormap c,
+EXTERN int XFreeColors _ANSI_ARGS_((Display *d, Colormap c,
unsigned long *ulp, int i, unsigned long ul));
/* 30 */
-EXTERN void XFreeModifiermap _ANSI_ARGS_((XModifierKeymap *x));
+EXTERN int XFreeModifiermap _ANSI_ARGS_((XModifierKeymap *x));
/* 31 */
EXTERN Status XGetGeometry _ANSI_ARGS_((Display *d, Drawable dr,
Window *w, int *i1, int *i2,
@@ -804,7 +804,7 @@ EXTERN void XSetIconName _ANSI_ARGS_((Display *d, Window w,
EXTERN void XSetInputFocus _ANSI_ARGS_((Display *d, Window w,
int i, Time t));
/* 47 */
-EXTERN void XSetSelectionOwner _ANSI_ARGS_((Display *d, Atom a,
+EXTERN int XSetSelectionOwner _ANSI_ARGS_((Display *d, Atom a,
Window w, Time t));
/* 48 */
EXTERN void XSetWindowBackground _ANSI_ARGS_((Display *d,
@@ -831,7 +831,7 @@ EXTERN int XUngrabPointer _ANSI_ARGS_((Display *d, Time t));
/* 56 */
EXTERN void XUnmapWindow _ANSI_ARGS_((Display *d, Window w));
/* 57 */
-EXTERN void TkPutImage _ANSI_ARGS_((unsigned long *colors,
+EXTERN int TkPutImage _ANSI_ARGS_((unsigned long *colors,
int ncolors, Display *display, Drawable d,
GC gc, XImage *image, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width,
@@ -927,7 +927,7 @@ EXTERN void XDrawPoints _ANSI_ARGS_((Display *display,
Drawable d, GC gc, XPoint *points,
int npoints, int mode));
/* 87 */
-EXTERN void XWarpPointer _ANSI_ARGS_((Display *display,
+EXTERN int XWarpPointer _ANSI_ARGS_((Display *display,
Window src_w, Window dest_w, int src_x,
int src_y, unsigned int src_width,
unsigned int src_height, int dest_x,
@@ -1032,7 +1032,7 @@ typedef struct TkIntXlibStubs {
void (*xDestroyIC) _ANSI_ARGS_((XIC x)); /* 77 */
Bool (*xFilterEvent) _ANSI_ARGS_((XEvent *x, Window w)); /* 78 */
int (*xmbLookupString) _ANSI_ARGS_((XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s)); /* 79 */
- void (*tkPutImage) _ANSI_ARGS_((unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 80 */
+ int (*tkPutImage) _ANSI_ARGS_((unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 80 */
VOID *reserved81;
Status (*xParseColor) _ANSI_ARGS_((Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr)); /* 82 */
GC (*xCreateGC) _ANSI_ARGS_((Display *display, Drawable d, unsigned long valuemask, XGCValues *values)); /* 83 */
@@ -1074,7 +1074,7 @@ typedef struct TkIntXlibStubs {
Window (*xRootWindow) _ANSI_ARGS_((Display *d, int i)); /* 10 */
XErrorHandler (*xSetErrorHandler) _ANSI_ARGS_((XErrorHandler x)); /* 11 */
Status (*xAllocColor) _ANSI_ARGS_((Display *d, Colormap c, XColor *xp)); /* 12 */
- void (*xBell) _ANSI_ARGS_((Display *d, int i)); /* 13 */
+ int (*xBell) _ANSI_ARGS_((Display *d, int i)); /* 13 */
void (*xChangeProperty) _ANSI_ARGS_((Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3)); /* 14 */
void (*xChangeWindowAttributes) _ANSI_ARGS_((Display *d, Window w, unsigned long ul, XSetWindowAttributes *x)); /* 15 */
void (*xConfigureWindow) _ANSI_ARGS_((Display *d, Window w, unsigned int i, XWindowChanges *x)); /* 16 */
@@ -1089,9 +1089,9 @@ typedef struct TkIntXlibStubs {
void (*xFillArc) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 25 */
void (*xFillPolygon) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3)); /* 26 */
int (*xFillRectangles) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XRectangle *x, int i)); /* 27 */
- void (*xFreeColormap) _ANSI_ARGS_((Display *d, Colormap c)); /* 28 */
- void (*xFreeColors) _ANSI_ARGS_((Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul)); /* 29 */
- void (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap *x)); /* 30 */
+ int (*xFreeColormap) _ANSI_ARGS_((Display *d, Colormap c)); /* 28 */
+ int (*xFreeColors) _ANSI_ARGS_((Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul)); /* 29 */
+ int (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap *x)); /* 30 */
Status (*xGetGeometry) _ANSI_ARGS_((Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4)); /* 31 */
int (*xGetWindowProperty) _ANSI_ARGS_((Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp)); /* 32 */
int (*xGrabKeyboard) _ANSI_ARGS_((Display *d, Window w, Bool b, int i1, int i2, Time t)); /* 33 */
@@ -1108,7 +1108,7 @@ typedef struct TkIntXlibStubs {
Status (*xSendEvent) _ANSI_ARGS_((Display *d, Window w, Bool b, long l, XEvent *x)); /* 44 */
void (*xSetIconName) _ANSI_ARGS_((Display *d, Window w, _Xconst char *c)); /* 45 */
void (*xSetInputFocus) _ANSI_ARGS_((Display *d, Window w, int i, Time t)); /* 46 */
- void (*xSetSelectionOwner) _ANSI_ARGS_((Display *d, Atom a, Window w, Time t)); /* 47 */
+ int (*xSetSelectionOwner) _ANSI_ARGS_((Display *d, Atom a, Window w, Time t)); /* 47 */
void (*xSetWindowBackground) _ANSI_ARGS_((Display *d, Window w, unsigned long ul)); /* 48 */
void (*xSetWindowBackgroundPixmap) _ANSI_ARGS_((Display *d, Window w, Pixmap p)); /* 49 */
void (*xSetWindowBorder) _ANSI_ARGS_((Display *d, Window w, unsigned long ul)); /* 50 */
@@ -1118,7 +1118,7 @@ typedef struct TkIntXlibStubs {
void (*xUngrabKeyboard) _ANSI_ARGS_((Display *d, Time t)); /* 54 */
int (*xUngrabPointer) _ANSI_ARGS_((Display *d, Time t)); /* 55 */
void (*xUnmapWindow) _ANSI_ARGS_((Display *d, Window w)); /* 56 */
- void (*tkPutImage) _ANSI_ARGS_((unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 57 */
+ int (*tkPutImage) _ANSI_ARGS_((unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 57 */
Status (*xParseColor) _ANSI_ARGS_((Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr)); /* 58 */
GC (*xCreateGC) _ANSI_ARGS_((Display *display, Drawable d, unsigned long valuemask, XGCValues *values)); /* 59 */
int (*xFreeGC) _ANSI_ARGS_((Display *display, GC gc)); /* 60 */
@@ -1148,7 +1148,7 @@ typedef struct TkIntXlibStubs {
void (*xClearWindow) _ANSI_ARGS_((Display *d, Window w)); /* 84 */
void (*xDrawPoint) _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y)); /* 85 */
void (*xDrawPoints) _ANSI_ARGS_((Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode)); /* 86 */
- void (*xWarpPointer) _ANSI_ARGS_((Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y)); /* 87 */
+ int (*xWarpPointer) _ANSI_ARGS_((Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y)); /* 87 */
void (*xQueryColor) _ANSI_ARGS_((Display *display, Colormap colormap, XColor *def_in_out)); /* 88 */
void (*xQueryColors) _ANSI_ARGS_((Display *display, Colormap colormap, XColor *defs_in_out, int ncolors)); /* 89 */
Status (*xQueryTree) _ANSI_ARGS_((Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui)); /* 90 */
@@ -1167,7 +1167,7 @@ typedef struct TkIntXlibStubs {
Window (*xRootWindow) _ANSI_ARGS_((Display *d, int i)); /* 10 */
XErrorHandler (*xSetErrorHandler) _ANSI_ARGS_((XErrorHandler x)); /* 11 */
Status (*xAllocColor) _ANSI_ARGS_((Display *d, Colormap c, XColor *xp)); /* 12 */
- void (*xBell) _ANSI_ARGS_((Display *d, int i)); /* 13 */
+ int (*xBell) _ANSI_ARGS_((Display *d, int i)); /* 13 */
void (*xChangeProperty) _ANSI_ARGS_((Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3)); /* 14 */
void (*xChangeWindowAttributes) _ANSI_ARGS_((Display *d, Window w, unsigned long ul, XSetWindowAttributes *x)); /* 15 */
void (*xConfigureWindow) _ANSI_ARGS_((Display *d, Window w, unsigned int i, XWindowChanges *x)); /* 16 */
@@ -1182,9 +1182,9 @@ typedef struct TkIntXlibStubs {
void (*xFillArc) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 25 */
void (*xFillPolygon) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3)); /* 26 */
int (*xFillRectangles) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XRectangle *x, int i)); /* 27 */
- void (*xFreeColormap) _ANSI_ARGS_((Display *d, Colormap c)); /* 28 */
- void (*xFreeColors) _ANSI_ARGS_((Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul)); /* 29 */
- void (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap *x)); /* 30 */
+ int (*xFreeColormap) _ANSI_ARGS_((Display *d, Colormap c)); /* 28 */
+ int (*xFreeColors) _ANSI_ARGS_((Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul)); /* 29 */
+ int (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap *x)); /* 30 */
Status (*xGetGeometry) _ANSI_ARGS_((Display *d, Drawable dr, Window *w, int *i1, int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3, unsigned int *ui4)); /* 31 */
int (*xGetWindowProperty) _ANSI_ARGS_((Display *d, Window w, Atom a1, long l1, long l2, Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1, unsigned long *ulp2, unsigned char **cpp)); /* 32 */
int (*xGrabKeyboard) _ANSI_ARGS_((Display *d, Window w, Bool b, int i1, int i2, Time t)); /* 33 */
@@ -1201,7 +1201,7 @@ typedef struct TkIntXlibStubs {
Status (*xSendEvent) _ANSI_ARGS_((Display *d, Window w, Bool b, long l, XEvent *x)); /* 44 */
void (*xSetIconName) _ANSI_ARGS_((Display *d, Window w, _Xconst char *c)); /* 45 */
void (*xSetInputFocus) _ANSI_ARGS_((Display *d, Window w, int i, Time t)); /* 46 */
- void (*xSetSelectionOwner) _ANSI_ARGS_((Display *d, Atom a, Window w, Time t)); /* 47 */
+ int (*xSetSelectionOwner) _ANSI_ARGS_((Display *d, Atom a, Window w, Time t)); /* 47 */
void (*xSetWindowBackground) _ANSI_ARGS_((Display *d, Window w, unsigned long ul)); /* 48 */
void (*xSetWindowBackgroundPixmap) _ANSI_ARGS_((Display *d, Window w, Pixmap p)); /* 49 */
void (*xSetWindowBorder) _ANSI_ARGS_((Display *d, Window w, unsigned long ul)); /* 50 */
@@ -1211,7 +1211,7 @@ typedef struct TkIntXlibStubs {
void (*xUngrabKeyboard) _ANSI_ARGS_((Display *d, Time t)); /* 54 */
int (*xUngrabPointer) _ANSI_ARGS_((Display *d, Time t)); /* 55 */
void (*xUnmapWindow) _ANSI_ARGS_((Display *d, Window w)); /* 56 */
- void (*tkPutImage) _ANSI_ARGS_((unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 57 */
+ int (*tkPutImage) _ANSI_ARGS_((unsigned long *colors, int ncolors, Display *display, Drawable d, GC gc, XImage *image, int src_x, int src_y, int dest_x, int dest_y, unsigned int width, unsigned int height)); /* 57 */
Status (*xParseColor) _ANSI_ARGS_((Display *display, Colormap map, _Xconst char *spec, XColor *colorPtr)); /* 58 */
GC (*xCreateGC) _ANSI_ARGS_((Display *display, Drawable d, unsigned long valuemask, XGCValues *values)); /* 59 */
int (*xFreeGC) _ANSI_ARGS_((Display *display, GC gc)); /* 60 */
@@ -1241,7 +1241,7 @@ typedef struct TkIntXlibStubs {
void (*xClearWindow) _ANSI_ARGS_((Display *d, Window w)); /* 84 */
void (*xDrawPoint) _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y)); /* 85 */
void (*xDrawPoints) _ANSI_ARGS_((Display *display, Drawable d, GC gc, XPoint *points, int npoints, int mode)); /* 86 */
- void (*xWarpPointer) _ANSI_ARGS_((Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y)); /* 87 */
+ int (*xWarpPointer) _ANSI_ARGS_((Display *display, Window src_w, Window dest_w, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y)); /* 87 */
void (*xQueryColor) _ANSI_ARGS_((Display *display, Colormap colormap, XColor *def_in_out)); /* 88 */
void (*xQueryColors) _ANSI_ARGS_((Display *display, Colormap colormap, XColor *defs_in_out, int ncolors)); /* 89 */
Status (*xQueryTree) _ANSI_ARGS_((Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui)); /* 90 */
diff --git a/generic/tkPointer.c b/generic/tkPointer.c
index 8a8efdc..949dcee 100644
--- a/generic/tkPointer.c
+++ b/generic/tkPointer.c
@@ -488,7 +488,7 @@ XUngrabPointer(display, time)
tsdPtr->restrictWinPtr = NULL;
TkpSetCapture(NULL);
UpdateCursor(tsdPtr->lastWinPtr);
- return 0;
+ return Success;
}
/*
@@ -605,7 +605,7 @@ XDefineCursor(display, w, cursor)
UpdateCursor(winPtr);
}
display->request++;
- return 0;
+ return Success;
}
/*
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index adaf319..24478e4 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -1,12 +1,12 @@
-/*
+/*
* tkStubInit.c --
*
* This file contains the initializers for the Tk stub vectors.
*
* Copyright (c) 1998-1999 by Scriptics Corporation.
*
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#include "tkInt.h"
@@ -46,13 +46,19 @@ doNothing(void)
return 0;
}
+#define TkCreateXEventSource TkPlatCreateXEventSource
+static void
+TkCreateXEventSource(void)
+{
+ TkWinXInit(Tk_GetHINSTANCE());
+}
+
/*
* Remove macros that will interfere with the definitions below.
*/
# undef TkpCmapStressed
# undef TkpSync
-# define TkCreateXEventSource (void (*) (void)) doNothing
# define TkpCmapStressed (int (*) (Tk_Window, Colormap)) doNothing
# define TkpSync (void (*) (Display *)) doNothing
# define TkUnixContainerId 0
@@ -63,24 +69,6 @@ doNothing(void)
#else /* !__WIN32__ */
-# undef TkClipBox
-# undef TkCreateRegion
-# undef TkDestroyRegion
-# undef TkIntersectRegion
-# undef TkRectInRegion
-# undef TkSetRegion
-# undef TkUnionRectWithRegion
-# undef TkSubtractRegion
-
-# define TkClipBox (void (*) _ANSI_ARGS_((TkRegion, XRectangle *))) XClipBox
-# define TkCreateRegion (TkRegion (*) ()) XCreateRegion
-# define TkDestroyRegion (void (*) _ANSI_ARGS_((TkRegion))) XDestroyRegion
-# define TkIntersectRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XIntersectRegion
-# define TkRectInRegion (int (*) _ANSI_ARGS_((TkRegion, int, int, unsigned int, unsigned int))) XRectInRegion
-# define TkSetRegion (void (*) _ANSI_ARGS_((Display *, GC, TkRegion))) XSetRegion
-# define TkUnionRectWithRegion (void (*) _ANSI_ARGS_((XRectangle *, TkRegion, TkRegion))) XUnionRectWithRegion
-# define TkSubtractRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XSubtractRegion
-
/*
* Make sure that extensions which call XParseColor through the stub
* table, call TkParseColor instead. [Bug 3486474]
@@ -89,25 +77,16 @@ doNothing(void)
# ifdef __CYGWIN__
- /*
- * Remove macros that will interfere with the definitions below.
- */
-# undef TkPutImage
-# undef TkSetPixmapColormap
-# undef TkpPrintWindowId
-# undef TkWinChildProc
+ TkIntStubs tkIntStubs;
+/*
+ * Trick, so we don't have to include <windows.h> here, which in any
+ * case lacks this function anyway.
+ */
- /*
- * Trick, so we don't have to include <windows.h> here, which in any
- * case lacks this function anyway.
- */
-
-# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
+#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
int __stdcall GetModuleHandleExW(unsigned int, const char *, void *);
-TkIntStubs tkIntStubs;
-
void *Tk_GetHINSTANCE()
{
void *hInstance = NULL;
@@ -118,21 +97,78 @@ void *Tk_GetHINSTANCE()
}
void
-TkSetPixmapColormap(pixmap, colormap)
- Pixmap pixmap;
- Colormap colormap;
+TkSetPixmapColormap(
+ Pixmap pixmap,
+ Colormap colormap)
{
}
void
-TkpPrintWindowId(buf, window)
- char *buf; /* Pointer to string large enough to hold
+TkpPrintWindowId(
+ char *buf, /* Pointer to string large enough to hold
* the hex representation of a pointer. */
- Window window; /* Window to be printed into buffer. */
+ Window window) /* Window to be printed into buffer. */
{
sprintf(buf, "%#08lx", (unsigned long) (window));
}
+int
+TkPutImage(
+ unsigned long *colors, /* Array of pixel values used by this image.
+ * May be NULL. */
+ int ncolors, /* Number of colors used, or 0. */
+ Display *display,
+ Drawable d, /* Destination drawable. */
+ GC gc,
+ XImage *image, /* Source image. */
+ int src_x, int src_y, /* Offset of subimage. */
+ int dest_x, int dest_y, /* Position of subimage origin in drawable. */
+ unsigned int width, unsigned int height)
+ /* Dimensions of subimage. */
+{
+ return XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y, width, height);
+}
+
+TkRegion TkCreateRegion()
+{
+ return (TkRegion) XCreateRegion();
+}
+
+void TkDestroyRegion(TkRegion r)
+{
+ XDestroyRegion((Region)r);
+}
+
+void TkSetRegion(Display *d, GC g, TkRegion r)
+{
+ XSetRegion(d, g, (Region)r);
+}
+
+void TkUnionRectWithRegion(XRectangle *a, TkRegion b, TkRegion c)
+{
+ XUnionRectWithRegion(a, (Region) b, (Region) c);
+}
+
+void TkClipBox(TkRegion a, XRectangle *b)
+{
+ XClipBox((Region) a, b);
+}
+
+void TkIntersectRegion(TkRegion a, TkRegion b, TkRegion c)
+{
+ XIntersectRegion((Region) a, (Region) b, (Region) c);
+}
+
+int TkRectInRegion (TkRegion r, int a, int b, unsigned int c, unsigned int d)
+{
+ return XRectInRegion((Region) r, a, b, c, d);
+}
+
+void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c)
+{
+ XSubtractRegion((Region) a, (Region) b, (Region) c);
+}
+
/* TODO: To be implemented for Cygwin */
# define Tk_AttachHWND 0
# define Tk_GetHWND 0
@@ -172,7 +208,26 @@ TkpPrintWindowId(buf, window)
# define TkWinGetPlatformTheme 0
# define TkWinChildProc 0
-# endif /* __CYGWIN__ */
+# elif !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* UNIX */
+
+# undef TkClipBox
+# undef TkCreateRegion
+# undef TkDestroyRegion
+# undef TkIntersectRegion
+# undef TkRectInRegion
+# undef TkSetRegion
+# undef TkUnionRectWithRegion
+# undef TkSubtractRegion
+
+# define TkClipBox (void (*) _ANSI_ARGS_((TkRegion, XRectangle *))) XClipBox
+# define TkCreateRegion (TkRegion (*) ()) XCreateRegion
+# define TkDestroyRegion (void (*) _ANSI_ARGS_((TkRegion))) XDestroyRegion
+# define TkIntersectRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XIntersectRegion
+# define TkRectInRegion (int (*) _ANSI_ARGS_((TkRegion, int, int, unsigned int, unsigned int))) XRectInRegion
+# define TkSetRegion (void (*) _ANSI_ARGS_((Display *, GC, TkRegion))) XSetRegion
+# define TkUnionRectWithRegion (void (*) _ANSI_ARGS_((XRectangle *, TkRegion, TkRegion))) XUnionRectWithRegion
+# define TkSubtractRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XSubtractRegion
+# endif
#endif /* !__WIN32__ */
/*
@@ -569,7 +624,7 @@ TkIntPlatStubs tkIntPlatStubs = {
TkIntXlibStubs tkIntXlibStubs = {
TCL_STUB_MAGIC,
NULL,
-#if defined(__WIN32__) /* WIN */
+#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */
XSetDashes, /* 0 */
XGetModifierMapping, /* 1 */
XCreateImage, /* 2 */