diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-01 22:29:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-01 22:29:19 (GMT) |
commit | e35d614587b25a1a03ededdf2d04bcbfca86be70 (patch) | |
tree | 5bc13e4395b89309cb5eb55ee6a0b1d763975de7 /generic | |
parent | c985425b2f03e2e14bf3f7ee9884cd74c184373e (diff) | |
download | tk-e35d614587b25a1a03ededdf2d04bcbfca86be70.zip tk-e35d614587b25a1a03ededdf2d04bcbfca86be70.tar.gz tk-e35d614587b25a1a03ededdf2d04bcbfca86be70.tar.bz2 |
Change XSetDashes signature and many others to match Xorg, needed for Cygwin.
Add .PHONY targets, and various quoting issues (Makefile.in)
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkInt.decls | 51 | ||||
-rw-r--r-- | generic/tkIntXlibDecls.h | 128 | ||||
-rw-r--r-- | generic/tkPointer.c | 6 | ||||
-rw-r--r-- | generic/tkStubInit.c | 143 |
4 files changed, 193 insertions, 135 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 3084743..b20a46e 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1065,7 +1065,7 @@ interface tkIntXlib # X functions for Windows declare 0 win { - void XSetDashes(Display *display, GC gc, int dash_offset, + int XSetDashes(Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n) } declare 1 win { @@ -1095,7 +1095,8 @@ declare 7 win { } declare 8 win { Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2, - unsigned int ui1, unsigned int ui2, XColor *x1, XColor *x2) + unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, + XColor _Xconst *x2) } declare 9 win { GContext XGContextFromGC(GC g) @@ -1129,7 +1130,7 @@ declare 18 win { Status XAllocColor(Display *d, Colormap c, XColor *xp) } declare 19 win { - void XBell(Display *d, int i) + int XBell(Display *d, int i) } declare 20 win { void XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1, @@ -1160,7 +1161,7 @@ declare 26 win { _Xconst char *data, unsigned int width, unsigned int height) } declare 27 win { - void XDefineCursor(Display *d, Window w, Cursor c) + int XDefineCursor(Display *d, Window w, Cursor c) } declare 28 win { void XDeleteProperty(Display *d, Window w, Atom a) @@ -1194,17 +1195,17 @@ declare 36 win { void XForceScreenSaver(Display *d, int i) } declare 37 win { - void XFreeColormap(Display *d, Colormap c) + int XFreeColormap(Display *d, Colormap c) } declare 38 win { - void XFreeColors(Display *d, Colormap c, + int XFreeColors(Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul) } declare 39 win { void XFreeCursor(Display *d, Cursor c) } declare 40 win { - void XFreeModifiermap(XModifierKeymap *x) + int XFreeModifiermap(XModifierKeymap *x) } declare 41 win { Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1, @@ -1280,7 +1281,7 @@ declare 61 win { Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x) } declare 62 win { - void XSetCommand(Display *d, Window w, char **c, int i) + int XSetCommand(Display *d, Window w, char **c, int i) } declare 63 win { void XSetIconName(Display *d, Window w, _Xconst char *c) @@ -1289,7 +1290,7 @@ declare 64 win { void XSetInputFocus(Display *d, Window w, int i, Time t) } declare 65 win { - void XSetSelectionOwner(Display *d, Atom a, Window w, Time t) + int XSetSelectionOwner(Display *d, Atom a, Window w, Time t) } declare 66 win { void XSetWindowBackground(Display *d, Window w, unsigned long ul) @@ -1317,7 +1318,7 @@ declare 73 win { void XUngrabKeyboard(Display *d, Time t) } declare 74 win { - void XUngrabPointer(Display *d, Time t) + int XUngrabPointer(Display *d, Time t) } declare 75 win { void XUnmapWindow(Display *d, Window w) @@ -1336,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) } @@ -1425,20 +1426,20 @@ declare 104 win { int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2) } +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) } -declare 105 win { - void XWarpPointer(Display *d, Window s, Window dw, int sx, int sy, - unsigned int sw, unsigned int sh, int dx, int dy) -} ################################ # X functions for Mac and Aqua declare 0 {mac aqua} { - void XSetDashes(Display *display, GC gc, int dash_offset, + int XSetDashes(Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n) } declare 1 {mac aqua} { @@ -1481,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, @@ -1509,7 +1510,7 @@ declare 19 {mac aqua} { _Xconst char *data, unsigned int width, unsigned int height) } declare 20 {mac aqua} { - void XDefineCursor(Display *d, Window w, Cursor c) + int XDefineCursor(Display *d, Window w, Cursor c) } declare 21 {mac aqua} { void XDestroyWindow(Display *d, Window w) @@ -1537,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, @@ -1603,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) @@ -1627,13 +1628,13 @@ declare 54 {mac aqua} { void XUngrabKeyboard(Display *d, Time t) } declare 55 {mac aqua} { - void XUngrabPointer(Display *d, Time t) + int XUngrabPointer(Display *d, Time t) } 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 +1740,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 c3e5d6a..cdb88f0 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -38,7 +38,7 @@ #if defined(__WIN32__) /* WIN */ /* 0 */ -EXTERN void XSetDashes _ANSI_ARGS_((Display *display, GC gc, +EXTERN int XSetDashes _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 1 */ @@ -66,7 +66,7 @@ EXTERN Cursor XCreatePixmapCursor _ANSI_ARGS_((Display *d, /* 8 */ EXTERN Cursor XCreateGlyphCursor _ANSI_ARGS_((Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, - XColor *x1, XColor *x2)); + XColor _Xconst *x1, XColor _Xconst *x2)); /* 9 */ EXTERN GContext XGContextFromGC _ANSI_ARGS_((GC g)); /* 10 */ @@ -93,7 +93,7 @@ EXTERN Status XGetWMColormapWindows _ANSI_ARGS_((Display *d, EXTERN Status XAllocColor _ANSI_ARGS_((Display *d, Colormap c, XColor *xp)); /* 19 */ -EXTERN void XBell _ANSI_ARGS_((Display *d, int i)); +EXTERN int XBell _ANSI_ARGS_((Display *d, int i)); /* 20 */ EXTERN void XChangeProperty _ANSI_ARGS_((Display *d, Window w, Atom a1, Atom a2, int i1, int i2, @@ -122,7 +122,7 @@ EXTERN Pixmap XCreateBitmapFromData _ANSI_ARGS_((Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height)); /* 27 */ -EXTERN void XDefineCursor _ANSI_ARGS_((Display *d, Window w, +EXTERN int XDefineCursor _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 28 */ EXTERN void XDeleteProperty _ANSI_ARGS_((Display *d, Window w, @@ -153,14 +153,14 @@ EXTERN int XFillRectangles _ANSI_ARGS_((Display *d, Drawable dr, /* 36 */ EXTERN void XForceScreenSaver _ANSI_ARGS_((Display *d, int i)); /* 37 */ -EXTERN void XFreeColormap _ANSI_ARGS_((Display *d, Colormap c)); +EXTERN int XFreeColormap _ANSI_ARGS_((Display *d, Colormap c)); /* 38 */ -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)); /* 39 */ EXTERN void XFreeCursor _ANSI_ARGS_((Display *d, Cursor c)); /* 40 */ -EXTERN void XFreeModifiermap _ANSI_ARGS_((XModifierKeymap *x)); +EXTERN int XFreeModifiermap _ANSI_ARGS_((XModifierKeymap *x)); /* 41 */ EXTERN Status XGetGeometry _ANSI_ARGS_((Display *d, Drawable dr, Window *w, int *i1, int *i2, @@ -228,7 +228,7 @@ EXTERN void XSelectInput _ANSI_ARGS_((Display *d, Window w, EXTERN Status XSendEvent _ANSI_ARGS_((Display *d, Window w, Bool b, long l, XEvent *x)); /* 62 */ -EXTERN void XSetCommand _ANSI_ARGS_((Display *d, Window w, +EXTERN int XSetCommand _ANSI_ARGS_((Display *d, Window w, char **c, int i)); /* 63 */ EXTERN void XSetIconName _ANSI_ARGS_((Display *d, Window w, @@ -237,7 +237,7 @@ EXTERN void XSetIconName _ANSI_ARGS_((Display *d, Window w, EXTERN void XSetInputFocus _ANSI_ARGS_((Display *d, Window w, int i, Time t)); /* 65 */ -EXTERN void XSetSelectionOwner _ANSI_ARGS_((Display *d, Atom a, +EXTERN int XSetSelectionOwner _ANSI_ARGS_((Display *d, Atom a, Window w, Time t)); /* 66 */ EXTERN void XSetWindowBackground _ANSI_ARGS_((Display *d, @@ -264,7 +264,7 @@ EXTERN Bool XTranslateCoordinates _ANSI_ARGS_((Display *d, /* 73 */ EXTERN void XUngrabKeyboard _ANSI_ARGS_((Display *d, Time t)); /* 74 */ -EXTERN void XUngrabPointer _ANSI_ARGS_((Display *d, Time t)); +EXTERN int XUngrabPointer _ANSI_ARGS_((Display *d, Time t)); /* 75 */ EXTERN void XUnmapWindow _ANSI_ARGS_((Display *d, Window w)); /* 76 */ @@ -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, @@ -356,7 +356,7 @@ EXTERN Status XStringListToTextProperty _ANSI_ARGS_((char **list, EXTERN int XDrawLine _ANSI_ARGS_((Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 105 */ -EXTERN void XWarpPointer _ANSI_ARGS_((Display *d, Window s, +EXTERN int XWarpPointer _ANSI_ARGS_((Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy)); /* 106 */ @@ -366,7 +366,7 @@ EXTERN int XFillRectangle _ANSI_ARGS_((Display *display, #endif /* WIN */ #ifdef MAC_TCL /* 0 */ -EXTERN void XSetDashes _ANSI_ARGS_((Display *display, GC gc, +EXTERN int XSetDashes _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 1 */ @@ -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, @@ -429,7 +429,7 @@ EXTERN Pixmap XCreateBitmapFromData _ANSI_ARGS_((Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height)); /* 20 */ -EXTERN void XDefineCursor _ANSI_ARGS_((Display *d, Window w, +EXTERN int XDefineCursor _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 21 */ EXTERN void XDestroyWindow _ANSI_ARGS_((Display *d, Window w)); @@ -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, @@ -537,11 +537,11 @@ EXTERN void XSetWindowColormap _ANSI_ARGS_((Display *d, Window w, /* 54 */ EXTERN void XUngrabKeyboard _ANSI_ARGS_((Display *d, Time t)); /* 55 */ -EXTERN void XUngrabPointer _ANSI_ARGS_((Display *d, Time t)); +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, @@ -656,7 +656,7 @@ EXTERN Status XQueryTree _ANSI_ARGS_((Display *d, Window w1, #endif /* MAC_TCL */ #ifdef MAC_OSX_TK /* AQUA */ /* 0 */ -EXTERN void XSetDashes _ANSI_ARGS_((Display *display, GC gc, +EXTERN int XSetDashes _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 1 */ @@ -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, @@ -719,7 +719,7 @@ EXTERN Pixmap XCreateBitmapFromData _ANSI_ARGS_((Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height)); /* 20 */ -EXTERN void XDefineCursor _ANSI_ARGS_((Display *d, Window w, +EXTERN int XDefineCursor _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 21 */ EXTERN void XDestroyWindow _ANSI_ARGS_((Display *d, Window w)); @@ -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, @@ -827,11 +827,11 @@ EXTERN void XSetWindowColormap _ANSI_ARGS_((Display *d, Window w, /* 54 */ EXTERN void XUngrabKeyboard _ANSI_ARGS_((Display *d, Time t)); /* 55 */ -EXTERN void XUngrabPointer _ANSI_ARGS_((Display *d, Time t)); +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, @@ -952,7 +952,7 @@ typedef struct TkIntXlibStubs { struct TkIntXlibStubHooks *hooks; #if defined(__WIN32__) /* WIN */ - void (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ + int (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ XModifierKeymap * (*xGetModifierMapping) _ANSI_ARGS_((Display *d)); /* 1 */ XImage * (*xCreateImage) _ANSI_ARGS_((Display *d, Visual *v, unsigned int ui1, int i1, int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3, int i4)); /* 2 */ XImage * (*xGetImage) _ANSI_ARGS_((Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3)); /* 3 */ @@ -960,7 +960,7 @@ typedef struct TkIntXlibStubs { char * (*xKeysymToString) _ANSI_ARGS_((KeySym k)); /* 5 */ Colormap (*xCreateColormap) _ANSI_ARGS_((Display *d, Window w, Visual *v, int i)); /* 6 */ Cursor (*xCreatePixmapCursor) _ANSI_ARGS_((Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2)); /* 7 */ - Cursor (*xCreateGlyphCursor) _ANSI_ARGS_((Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor *x1, XColor *x2)); /* 8 */ + Cursor (*xCreateGlyphCursor) _ANSI_ARGS_((Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2)); /* 8 */ GContext (*xGContextFromGC) _ANSI_ARGS_((GC g)); /* 9 */ XHostAddress * (*xListHosts) _ANSI_ARGS_((Display *d, int *i, Bool *b)); /* 10 */ KeySym (*xKeycodeToKeysym) _ANSI_ARGS_((Display *d, unsigned int k, int i)); /* 11 */ @@ -971,7 +971,7 @@ typedef struct TkIntXlibStubs { Status (*xWithdrawWindow) _ANSI_ARGS_((Display *d, Window w, int i)); /* 16 */ Status (*xGetWMColormapWindows) _ANSI_ARGS_((Display *d, Window w, Window **wpp, int *ip)); /* 17 */ Status (*xAllocColor) _ANSI_ARGS_((Display *d, Colormap c, XColor *xp)); /* 18 */ - void (*xBell) _ANSI_ARGS_((Display *d, int i)); /* 19 */ + int (*xBell) _ANSI_ARGS_((Display *d, int i)); /* 19 */ void (*xChangeProperty) _ANSI_ARGS_((Display *d, Window w, Atom a1, Atom a2, int i1, int i2, _Xconst unsigned char *c, int i3)); /* 20 */ void (*xChangeWindowAttributes) _ANSI_ARGS_((Display *d, Window w, unsigned long ul, XSetWindowAttributes *x)); /* 21 */ void (*xClearWindow) _ANSI_ARGS_((Display *d, Window w)); /* 22 */ @@ -979,7 +979,7 @@ typedef struct TkIntXlibStubs { void (*xCopyArea) _ANSI_ARGS_((Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 24 */ void (*xCopyPlane) _ANSI_ARGS_((Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul)); /* 25 */ Pixmap (*xCreateBitmapFromData) _ANSI_ARGS_((Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height)); /* 26 */ - void (*xDefineCursor) _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 27 */ + int (*xDefineCursor) _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 27 */ void (*xDeleteProperty) _ANSI_ARGS_((Display *d, Window w, Atom a)); /* 28 */ void (*xDestroyWindow) _ANSI_ARGS_((Display *d, Window w)); /* 29 */ void (*xDrawArc) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 30 */ @@ -989,10 +989,10 @@ typedef struct TkIntXlibStubs { void (*xFillPolygon) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2, int i3)); /* 34 */ int (*xFillRectangles) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XRectangle *x, int i)); /* 35 */ void (*xForceScreenSaver) _ANSI_ARGS_((Display *d, int i)); /* 36 */ - void (*xFreeColormap) _ANSI_ARGS_((Display *d, Colormap c)); /* 37 */ - void (*xFreeColors) _ANSI_ARGS_((Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul)); /* 38 */ + int (*xFreeColormap) _ANSI_ARGS_((Display *d, Colormap c)); /* 37 */ + int (*xFreeColors) _ANSI_ARGS_((Display *d, Colormap c, unsigned long *ulp, int i, unsigned long ul)); /* 38 */ void (*xFreeCursor) _ANSI_ARGS_((Display *d, Cursor c)); /* 39 */ - void (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap *x)); /* 40 */ + int (*xFreeModifiermap) _ANSI_ARGS_((XModifierKeymap *x)); /* 40 */ 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)); /* 41 */ void (*xGetInputFocus) _ANSI_ARGS_((Display *d, Window *w, int *i)); /* 42 */ 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)); /* 43 */ @@ -1014,10 +1014,10 @@ typedef struct TkIntXlibStubs { void (*xResizeWindow) _ANSI_ARGS_((Display *d, Window w, unsigned int ui1, unsigned int ui2)); /* 59 */ void (*xSelectInput) _ANSI_ARGS_((Display *d, Window w, long l)); /* 60 */ Status (*xSendEvent) _ANSI_ARGS_((Display *d, Window w, Bool b, long l, XEvent *x)); /* 61 */ - void (*xSetCommand) _ANSI_ARGS_((Display *d, Window w, char **c, int i)); /* 62 */ + int (*xSetCommand) _ANSI_ARGS_((Display *d, Window w, char **c, int i)); /* 62 */ void (*xSetIconName) _ANSI_ARGS_((Display *d, Window w, _Xconst char *c)); /* 63 */ void (*xSetInputFocus) _ANSI_ARGS_((Display *d, Window w, int i, Time t)); /* 64 */ - void (*xSetSelectionOwner) _ANSI_ARGS_((Display *d, Atom a, Window w, Time t)); /* 65 */ + int (*xSetSelectionOwner) _ANSI_ARGS_((Display *d, Atom a, Window w, Time t)); /* 65 */ void (*xSetWindowBackground) _ANSI_ARGS_((Display *d, Window w, unsigned long ul)); /* 66 */ void (*xSetWindowBackgroundPixmap) _ANSI_ARGS_((Display *d, Window w, Pixmap p)); /* 67 */ void (*xSetWindowBorder) _ANSI_ARGS_((Display *d, Window w, unsigned long ul)); /* 68 */ @@ -1026,13 +1026,13 @@ typedef struct TkIntXlibStubs { void (*xSetWindowColormap) _ANSI_ARGS_((Display *d, Window w, Colormap c)); /* 71 */ Bool (*xTranslateCoordinates) _ANSI_ARGS_((Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3)); /* 72 */ void (*xUngrabKeyboard) _ANSI_ARGS_((Display *d, Time t)); /* 73 */ - void (*xUngrabPointer) _ANSI_ARGS_((Display *d, Time t)); /* 74 */ + int (*xUngrabPointer) _ANSI_ARGS_((Display *d, Time t)); /* 74 */ void (*xUnmapWindow) _ANSI_ARGS_((Display *d, Window w)); /* 75 */ void (*xWindowEvent) _ANSI_ARGS_((Display *d, Window w, long l, XEvent *x)); /* 76 */ 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 */ @@ -1057,11 +1057,11 @@ typedef struct TkIntXlibStubs { void (*xSetWMClientMachine) _ANSI_ARGS_((Display *display, Window w, XTextProperty *text_prop)); /* 102 */ Status (*xStringListToTextProperty) _ANSI_ARGS_((char **list, int count, XTextProperty *text_prop_return)); /* 103 */ int (*xDrawLine) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 104 */ - void (*xWarpPointer) _ANSI_ARGS_((Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy)); /* 105 */ + int (*xWarpPointer) _ANSI_ARGS_((Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy)); /* 105 */ int (*xFillRectangle) _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); /* 106 */ #endif /* WIN */ #ifdef MAC_TCL - void (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ + int (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ XModifierKeymap * (*xGetModifierMapping) _ANSI_ARGS_((Display *d)); /* 1 */ XImage * (*xCreateImage) _ANSI_ARGS_((Display *d, Visual *v, unsigned int ui1, int i1, int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3, int i4)); /* 2 */ XImage * (*xGetImage) _ANSI_ARGS_((Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3)); /* 3 */ @@ -1074,14 +1074,14 @@ 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 */ void (*xCopyArea) _ANSI_ARGS_((Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 17 */ void (*xCopyPlane) _ANSI_ARGS_((Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul)); /* 18 */ Pixmap (*xCreateBitmapFromData) _ANSI_ARGS_((Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height)); /* 19 */ - void (*xDefineCursor) _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 20 */ + int (*xDefineCursor) _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 20 */ void (*xDestroyWindow) _ANSI_ARGS_((Display *d, Window w)); /* 21 */ void (*xDrawArc) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 22 */ int (*xDrawLines) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2)); /* 23 */ @@ -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 */ @@ -1116,9 +1116,9 @@ typedef struct TkIntXlibStubs { void (*xSetWindowBorderWidth) _ANSI_ARGS_((Display *d, Window w, unsigned int ui)); /* 52 */ void (*xSetWindowColormap) _ANSI_ARGS_((Display *d, Window w, Colormap c)); /* 53 */ void (*xUngrabKeyboard) _ANSI_ARGS_((Display *d, Time t)); /* 54 */ - void (*xUngrabPointer) _ANSI_ARGS_((Display *d, Time t)); /* 55 */ + 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 */ void (*xFreeGC) _ANSI_ARGS_((Display *display, GC gc)); /* 60 */ @@ -1148,13 +1148,13 @@ 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 */ #endif /* MAC_TCL */ #ifdef MAC_OSX_TK /* AQUA */ - void (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ + int (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ XModifierKeymap * (*xGetModifierMapping) _ANSI_ARGS_((Display *d)); /* 1 */ XImage * (*xCreateImage) _ANSI_ARGS_((Display *d, Visual *v, unsigned int ui1, int i1, int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3, int i4)); /* 2 */ XImage * (*xGetImage) _ANSI_ARGS_((Display *d, Drawable dr, int i1, int i2, unsigned int ui1, unsigned int ui2, unsigned long ul, int i3)); /* 3 */ @@ -1167,14 +1167,14 @@ 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 */ void (*xCopyArea) _ANSI_ARGS_((Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 17 */ void (*xCopyPlane) _ANSI_ARGS_((Display *d, Drawable dr1, Drawable dr2, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4, unsigned long ul)); /* 18 */ Pixmap (*xCreateBitmapFromData) _ANSI_ARGS_((Display *display, Drawable d, _Xconst char *data, unsigned int width, unsigned int height)); /* 19 */ - void (*xDefineCursor) _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 20 */ + int (*xDefineCursor) _ANSI_ARGS_((Display *d, Window w, Cursor c)); /* 20 */ void (*xDestroyWindow) _ANSI_ARGS_((Display *d, Window w)); /* 21 */ void (*xDrawArc) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int i1, int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)); /* 22 */ int (*xDrawLines) _ANSI_ARGS_((Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2)); /* 23 */ @@ -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 */ @@ -1209,9 +1209,9 @@ typedef struct TkIntXlibStubs { void (*xSetWindowBorderWidth) _ANSI_ARGS_((Display *d, Window w, unsigned int ui)); /* 52 */ void (*xSetWindowColormap) _ANSI_ARGS_((Display *d, Window w, Colormap c)); /* 53 */ void (*xUngrabKeyboard) _ANSI_ARGS_((Display *d, Time t)); /* 54 */ - void (*xUngrabPointer) _ANSI_ARGS_((Display *d, Time t)); /* 55 */ + 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 */ void (*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 17c7424..949dcee 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -475,7 +475,7 @@ XGrabPointer(display, grab_window, owner_events, event_mask, pointer_mode, *---------------------------------------------------------------------- */ -void +int XUngrabPointer(display, time) Display* display; Time time; @@ -488,6 +488,7 @@ XUngrabPointer(display, time) tsdPtr->restrictWinPtr = NULL; TkpSetCapture(NULL); UpdateCursor(tsdPtr->lastWinPtr); + return Success; } /* @@ -590,7 +591,7 @@ UpdateCursor(winPtr) *---------------------------------------------------------------------- */ -void +int XDefineCursor(display, w, cursor) Display* display; Window w; @@ -604,6 +605,7 @@ XDefineCursor(display, w, cursor) UpdateCursor(winPtr); } display->request++; + return Success; } /* diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index adaf319..02ab98b 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__ */ /* |