summaryrefslogtreecommitdiffstats
path: root/win/stubs.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-31 09:30:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-31 09:30:22 (GMT)
commit0ad4cbd7bd60324dc875c7d8f472096589c2b024 (patch)
tree3ab0f8a9d922f9c36c5579ff2ee94478091498c8 /win/stubs.c
parenta2b7afd83359a8b5149462e93b174ca5784d1e1a (diff)
downloadtk-0ad4cbd7bd60324dc875c7d8f472096589c2b024.zip
tk-0ad4cbd7bd60324dc875c7d8f472096589c2b024.tar.gz
tk-0ad4cbd7bd60324dc875c7d8f472096589c2b024.tar.bz2
Implement XFlush and various others for win32 as stubs, so win32 extensions using those can run under CYGWIN as well.
Allow tk86.dll to cooperate with the cygwin console.
Diffstat (limited to 'win/stubs.c')
-rw-r--r--win/stubs.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/win/stubs.c b/win/stubs.c
index 00030d1..3cd8327 100644
--- a/win/stubs.c
+++ b/win/stubs.c
@@ -386,3 +386,71 @@ XGetWindowProperty(
*prop_return = NULL;
return BadValue;
}
+
+/*
+ * The following functions were implemented as macros under Windows.
+ */
+
+int
+XFlush(
+ Display *display)
+{
+ return 0;
+}
+
+int
+XGrabServer(
+ Display *display)
+{
+ return 0;
+}
+
+int
+XUngrabServer(
+ Display *display)
+{
+ return 0;
+}
+
+int
+XFree(
+ void *data)
+{
+ if ((data) != NULL) {
+ ckfree(data);
+ }
+ return 0;
+}
+
+int
+XNoOp(
+ Display *display)
+{
+ display->request++;
+ return 0;
+}
+
+int
+XSynchronize(
+ Display *display,
+ Bool bool)
+{
+ display->request++;
+ return 0;
+}
+
+int
+XSync(
+ Display *display,
+ Bool bool)
+{
+ display->request++;
+ return 0;
+}
+
+VisualID
+XVisualIDFromVisual(
+ Visual *visual)
+{
+ return visual->visualid;
+}