summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkInt.decls26
-rw-r--r--generic/tkIntDecls.h5
-rw-r--r--generic/tkIntXlibDecls.h103
-rw-r--r--generic/tkStubInit.c41
-rw-r--r--win/Makefile.in2
-rw-r--r--win/tkWinPort.h13
6 files changed, 170 insertions, 20 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 6f5ff57..9d0595d 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -1435,6 +1435,32 @@ declare 106 win {
int x, int y, unsigned int width, unsigned int height)
}
+# new for 8.4.20+/8.5.12+ Cygwin only
+declare 107 win {
+ int XFlush(Display *display)
+}
+declare 108 win {
+ int XGrabServer(Display *display)
+}
+declare 109 win {
+ int XUngrabServer(Display *display)
+}
+declare 110 win {
+ int XFree(void *data)
+}
+declare 111 win {
+ int XNoOp(Display *display)
+}
+declare 112 win {
+ XAfterFunction XSynchronize(Display *display, Bool onoff)
+}
+declare 113 win {
+ int XSync(Display *display, Bool discard)
+}
+declare 114 win {
+ VisualID XVisualIDFromVisual(Visual *visual)
+}
+
################################
# X functions for Mac and Aqua
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 879c964..c9b86d3 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -1274,5 +1274,10 @@ extern TkIntStubs *tkIntStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
+#if defined(__CYGWIN__) && defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)
+# undef TkBindDeadWindow
+# define TkBindDeadWindow(winPtr) /* Removed from Cygwins stub table, just do nothing */
+#endif
+
#endif /* _TKINTDECLS */
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index 30470ab..f5753c5 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -13,6 +13,12 @@
#ifndef _TKINTXLIBDECLS
#define _TKINTXLIBDECLS
+/*
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tkInt.decls script.
+ */
+
#ifdef MAC_TCL
#include "Xutil.h"
#else
@@ -24,11 +30,9 @@
#define TCL_STORAGE_CLASS DLLEXPORT
#endif
-/*
- * WARNING: This file is automatically generated by the tools/genStubs.tcl
- * script. Any modifications to the function declarations below should be made
- * in the generic/tkInt.decls script.
- */
+typedef int (*XAfterFunction) ( /* WARNING, this type not in Xlib spec */
+ Display* /* display */
+);
/* !BEGIN!: Do not edit below this line. */
@@ -363,6 +367,23 @@ EXTERN int XWarpPointer _ANSI_ARGS_((Display *d, Window s,
EXTERN int XFillRectangle _ANSI_ARGS_((Display *display,
Drawable d, GC gc, int x, int y,
unsigned int width, unsigned int height));
+/* 107 */
+EXTERN int XFlush _ANSI_ARGS_((Display *display));
+/* 108 */
+EXTERN int XGrabServer _ANSI_ARGS_((Display *display));
+/* 109 */
+EXTERN int XUngrabServer _ANSI_ARGS_((Display *display));
+/* 110 */
+EXTERN int XFree _ANSI_ARGS_((VOID *data));
+/* 111 */
+EXTERN int XNoOp _ANSI_ARGS_((Display *display));
+/* 112 */
+EXTERN XAfterFunction XSynchronize _ANSI_ARGS_((Display *display,
+ Bool onoff));
+/* 113 */
+EXTERN int XSync _ANSI_ARGS_((Display *display, Bool discard));
+/* 114 */
+EXTERN VisualID XVisualIDFromVisual _ANSI_ARGS_((Visual *visual));
#endif /* WIN */
#ifdef MAC_TCL
/* 0 */
@@ -1059,6 +1080,14 @@ typedef struct TkIntXlibStubs {
int (*xDrawLine) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 104 */
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 */
+ int (*xFlush) _ANSI_ARGS_((Display *display)); /* 107 */
+ int (*xGrabServer) _ANSI_ARGS_((Display *display)); /* 108 */
+ int (*xUngrabServer) _ANSI_ARGS_((Display *display)); /* 109 */
+ int (*xFree) _ANSI_ARGS_((VOID *data)); /* 110 */
+ int (*xNoOp) _ANSI_ARGS_((Display *display)); /* 111 */
+ XAfterFunction (*xSynchronize) _ANSI_ARGS_((Display *display, Bool onoff)); /* 112 */
+ int (*xSync) _ANSI_ARGS_((Display *display, Bool discard)); /* 113 */
+ VisualID (*xVisualIDFromVisual) _ANSI_ARGS_((Visual *visual)); /* 114 */
#endif /* WIN */
#ifdef MAC_TCL
int (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */
@@ -1689,6 +1718,38 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr;
#define XFillRectangle \
(tkIntXlibStubsPtr->xFillRectangle) /* 106 */
#endif
+#ifndef XFlush
+#define XFlush \
+ (tkIntXlibStubsPtr->xFlush) /* 107 */
+#endif
+#ifndef XGrabServer
+#define XGrabServer \
+ (tkIntXlibStubsPtr->xGrabServer) /* 108 */
+#endif
+#ifndef XUngrabServer
+#define XUngrabServer \
+ (tkIntXlibStubsPtr->xUngrabServer) /* 109 */
+#endif
+#ifndef XFree
+#define XFree \
+ (tkIntXlibStubsPtr->xFree) /* 110 */
+#endif
+#ifndef XNoOp
+#define XNoOp \
+ (tkIntXlibStubsPtr->xNoOp) /* 111 */
+#endif
+#ifndef XSynchronize
+#define XSynchronize \
+ (tkIntXlibStubsPtr->xSynchronize) /* 112 */
+#endif
+#ifndef XSync
+#define XSync \
+ (tkIntXlibStubsPtr->xSync) /* 113 */
+#endif
+#ifndef XVisualIDFromVisual
+#define XVisualIDFromVisual \
+ (tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */
+#endif
#endif /* WIN */
#ifdef MAC_TCL
#ifndef XSetDashes
@@ -2434,4 +2495,36 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
+#if defined(__WIN32__)
+
+#undef XFlush
+#undef XGrabServer
+#undef XUngrabServer
+#undef XFree
+#undef XNoOp
+#undef XSynchronize
+#undef XSync
+#undef XVisualIDFromVisual
+
+/*
+ * The following stubs implement various calls that don't do anything
+ * under Windows.
+ */
+
+#define XFlush(display)
+#define XGrabServer(display)
+#define XUngrabServer(display)
+
+/*
+ * The following functions are implemented as macros under Windows.
+ */
+
+#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));}
+#define XNoOp(display) {display->request++;}
+#define XSynchronize(display, bool) {display->request++;}
+#define XSync(display, bool) {display->request++;}
+#define XVisualIDFromVisual(visual) (visual->visualid)
+
+#endif
+
#endif /* _TKINTXLIBDECLS */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 24478e4..b9198d0 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -53,11 +53,36 @@ TkCreateXEventSource(void)
TkWinXInit(Tk_GetHINSTANCE());
}
+#undef XFree
+#define XFree TkPlatXFree
+static int
+XFree(void *data)
+{
+ if (data != NULL) {
+ ckfree((char *) data);
+ }
+ return 0;
+}
+
+#undef XVisualIDFromVisual
+#define XVisualIDFromVisual TkPlatXVisualIDFromVisual
+static VisualID
+XVisualIDFromVisual(Visual *visual)
+{
+ return visual->visualid;
+}
+
/*
* Remove macros that will interfere with the definitions below.
*/
# undef TkpCmapStressed
# undef TkpSync
+# undef XFlush
+# undef XGrabServer
+# undef XUngrabServer
+# undef XNoOp
+# undef XSynchronize
+# undef XSync
# define TkpCmapStressed (int (*) (Tk_Window, Colormap)) doNothing
# define TkpSync (void (*) (Display *)) doNothing
@@ -66,6 +91,12 @@ TkCreateXEventSource(void)
# define TkUnixSetMenubar 0
# define TkWmCleanup (void (*) (TkDisplay *)) doNothing
# define TkSendCleanup (void (*) (TkDisplay *)) doNothing
+# define XFlush (int (*) (Display *)) doNothing
+# define XGrabServer (int (*) (Display *)) doNothing
+# define XUngrabServer (int (*) (Display *)) doNothing
+# define XNoOp (int (*) (Display *)) doNothing
+# define XSynchronize (XAfterFunction (*) (Display *, Bool)) doNothing
+# define XSync (int (*) (Display *, Bool)) doNothing
#else /* !__WIN32__ */
@@ -208,6 +239,8 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c)
# define TkWinGetPlatformTheme 0
# define TkWinChildProc 0
+# define TkBindDeadWindow 0 /* On purpose not in Cygwin's stub table */
+
# elif !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* UNIX */
# undef TkClipBox
@@ -732,6 +765,14 @@ TkIntXlibStubs tkIntXlibStubs = {
XDrawLine, /* 104 */
XWarpPointer, /* 105 */
XFillRectangle, /* 106 */
+ XFlush, /* 107 */
+ XGrabServer, /* 108 */
+ XUngrabServer, /* 109 */
+ XFree, /* 110 */
+ XNoOp, /* 111 */
+ XSynchronize, /* 112 */
+ XSync, /* 113 */
+ XVisualIDFromVisual, /* 114 */
#endif /* WIN */
#ifdef MAC_TCL
XSetDashes, /* 0 */
diff --git a/win/Makefile.in b/win/Makefile.in
index 752236f..871f0af 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -562,7 +562,6 @@ $(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.$(RES) $(CAT32)
$(CC) $(CFLAGS) $(TKTEST_OBJS) $(TCL_LIB_FILE) \
$(TK_LIB_FILE) $(LIBS) \
wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW)
- @VC_MANIFEST_EMBED_EXE@
# Msys make requires this next rule for some reason.
$(TCL_SRC_DIR)/win/cat.c:
@@ -584,7 +583,6 @@ ${TK_STUB_LIB_FILE}: ${STUB_OBJS}
${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES)
@$(RM) ${TK_DLL_FILE}
@MAKE_DLL@ ${TK_OBJS} $(TK_RES) $(SHLIB_LD_LIBS)
- @VC_MANIFEST_EMBED_DLL@
${TK_LIB_FILE}: ${TK_OBJS}
@$(RM) ${TK_LIB_FILE}
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index 77408dc..d1d7b58 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -98,22 +98,9 @@
#define TkFreeWindowId(dispPtr,w)
#define TkInitXId(dispPtr)
#define TkpCmapStressed(tkwin,colormap) (0)
-#define XFlush(display)
-#define XGrabServer(display)
-#define XUngrabServer(display)
#define TkpSync(display)
/*
- * The following functions are implemented as macros under Windows.
- */
-
-#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));}
-#define XNoOp(display) {display->request++;}
-#define XSynchronize(display, bool) {display->request++;}
-#define XSync(display, bool) {display->request++;}
-#define XVisualIDFromVisual(visual) (visual->visualid)
-
-/*
* The following Tk functions are implemented as macros under Windows.
*/