summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkButton.c2
-rw-r--r--generic/tkCmds.c2
-rw-r--r--generic/tkImgPhInstance.c2
-rw-r--r--generic/tkInt.decls23
-rw-r--r--generic/tkIntXlibDecls.h60
-rw-r--r--generic/tkStubInit.c14
-rw-r--r--generic/tkWindow.c2
-rw-r--r--macosx/tkMacOSXHLEvents.c10
-rw-r--r--macosx/tkMacOSXPort.h13
-rw-r--r--macosx/tkMacOSXXStubs.c57
-rw-r--r--win/stubs.c10
11 files changed, 136 insertions, 59 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 2f43f13..c43fe9b 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -878,7 +878,7 @@ ButtonWidgetObjCmd(
*/
Tcl_CancelIdleCall(TkpDisplayButton, butPtr);
- XFlush(butPtr->display);
+ (void)XFlush(butPtr->display);
#ifndef MAC_OSX_TK
/*
* On the mac you can not sleep in a display proc, and the
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 3de0078..cdcea7e 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -134,7 +134,7 @@ Tk_BellObjCmd(
if (!nice) {
XForceScreenSaver(Tk_Display(tkwin), ScreenSaverReset);
}
- XFlush(Tk_Display(tkwin));
+ (void)XFlush(Tk_Display(tkwin));
Tk_DeleteErrorHandler(handler);
return TCL_OK;
}
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index edb6cd5..fde868b 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -700,7 +700,7 @@ TkImgPhotoDisplay(
XSetClipMask(display, instancePtr->gc, None);
XSetClipOrigin(display, instancePtr->gc, 0, 0);
}
- XFlush(display);
+ (void)XFlush(display);
#endif
}
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index a6677ab..0e34821 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -1830,7 +1830,28 @@ declare 90 aqua {
Window **w4, unsigned int *ui)
}
declare 91 aqua {
- int XSync(Display *display, Bool flag)
+ int XSync(Display *display, Bool discard)
+}
+declare 107 aqua {
+ int XFlush(Display *display)
+}
+declare 108 aqua {
+ int XGrabServer(Display *display)
+}
+declare 109 aqua {
+ int XUngrabServer(Display *display)
+}
+declare 110 aqua {
+ int XFree(void *data)
+}
+declare 111 aqua {
+ int XNoOp(Display *display)
+}
+declare 112 aqua {
+ XAfterFunction XSynchronize(Display *display, Bool onoff)
+}
+declare 114 aqua {
+ VisualID XVisualIDFromVisual(Visual *visual)
}
declare 120 aqua {
int XOffsetRegion(Region rgn, int dx, int dy)
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index e71b611..ad58e21 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -693,7 +693,7 @@ EXTERN int XQueryColors(Display *display, Colormap colormap,
EXTERN Status XQueryTree(Display *d, Window w1, Window *w2,
Window *w3, Window **w4, unsigned int *ui);
/* 91 */
-EXTERN int XSync(Display *display, Bool flag);
+EXTERN int XSync(Display *display, Bool discard);
/* Slot 92 is reserved */
/* Slot 93 is reserved */
/* Slot 94 is reserved */
@@ -709,14 +709,21 @@ EXTERN int XSync(Display *display, Bool flag);
/* Slot 104 is reserved */
/* Slot 105 is reserved */
/* Slot 106 is reserved */
-/* Slot 107 is reserved */
-/* Slot 108 is reserved */
-/* Slot 109 is reserved */
-/* Slot 110 is reserved */
-/* Slot 111 is reserved */
-/* Slot 112 is reserved */
+/* 107 */
+EXTERN int XFlush(Display *display);
+/* 108 */
+EXTERN int XGrabServer(Display *display);
+/* 109 */
+EXTERN int XUngrabServer(Display *display);
+/* 110 */
+EXTERN int XFree(void *data);
+/* 111 */
+EXTERN int XNoOp(Display *display);
+/* 112 */
+EXTERN XAfterFunction XSynchronize(Display *display, Bool onoff);
/* Slot 113 is reserved */
-/* Slot 114 is reserved */
+/* 114 */
+EXTERN VisualID XVisualIDFromVisual(Visual *visual);
/* Slot 115 is reserved */
/* Slot 116 is reserved */
/* Slot 117 is reserved */
@@ -1005,7 +1012,7 @@ typedef struct TkIntXlibStubs {
int (*xQueryColor) (Display *display, Colormap colormap, XColor *def_in_out); /* 88 */
int (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */
Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */
- int (*xSync) (Display *display, Bool flag); /* 91 */
+ int (*xSync) (Display *display, Bool discard); /* 91 */
void (*reserved92)(void);
void (*reserved93)(void);
void (*reserved94)(void);
@@ -1021,14 +1028,14 @@ typedef struct TkIntXlibStubs {
void (*reserved104)(void);
void (*reserved105)(void);
void (*reserved106)(void);
- void (*reserved107)(void);
- void (*reserved108)(void);
- void (*reserved109)(void);
- void (*reserved110)(void);
- void (*reserved111)(void);
- void (*reserved112)(void);
+ int (*xFlush) (Display *display); /* 107 */
+ int (*xGrabServer) (Display *display); /* 108 */
+ int (*xUngrabServer) (Display *display); /* 109 */
+ int (*xFree) (void *data); /* 110 */
+ int (*xNoOp) (Display *display); /* 111 */
+ XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */
void (*reserved113)(void);
- void (*reserved114)(void);
+ VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */
void (*reserved115)(void);
void (*reserved116)(void);
void (*reserved117)(void);
@@ -1539,14 +1546,21 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
/* Slot 104 is reserved */
/* Slot 105 is reserved */
/* Slot 106 is reserved */
-/* Slot 107 is reserved */
-/* Slot 108 is reserved */
-/* Slot 109 is reserved */
-/* Slot 110 is reserved */
-/* Slot 111 is reserved */
-/* Slot 112 is reserved */
+#define XFlush \
+ (tkIntXlibStubsPtr->xFlush) /* 107 */
+#define XGrabServer \
+ (tkIntXlibStubsPtr->xGrabServer) /* 108 */
+#define XUngrabServer \
+ (tkIntXlibStubsPtr->xUngrabServer) /* 109 */
+#define XFree \
+ (tkIntXlibStubsPtr->xFree) /* 110 */
+#define XNoOp \
+ (tkIntXlibStubsPtr->xNoOp) /* 111 */
+#define XSynchronize \
+ (tkIntXlibStubsPtr->xSynchronize) /* 112 */
/* Slot 113 is reserved */
-/* Slot 114 is reserved */
+#define XVisualIDFromVisual \
+ (tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */
/* Slot 115 is reserved */
/* Slot 116 is reserved */
/* Slot 117 is reserved */
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index cf60cfb..445cec5 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -880,14 +880,14 @@ static const TkIntXlibStubs tkIntXlibStubs = {
0, /* 104 */
0, /* 105 */
0, /* 106 */
- 0, /* 107 */
- 0, /* 108 */
- 0, /* 109 */
- 0, /* 110 */
- 0, /* 111 */
- 0, /* 112 */
+ XFlush, /* 107 */
+ XGrabServer, /* 108 */
+ XUngrabServer, /* 109 */
+ XFree, /* 110 */
+ XNoOp, /* 111 */
+ XSynchronize, /* 112 */
0, /* 113 */
- 0, /* 114 */
+ XVisualIDFromVisual, /* 114 */
0, /* 115 */
0, /* 116 */
0, /* 117 */
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 242dd46..99309a1 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3269,7 +3269,7 @@ Initialize(
}
Tcl_ResetResult(interp);
if (sync) {
- XSynchronize(Tk_Display(Tk_MainWindow(interp)), True);
+ (void)XSynchronize(Tk_Display(Tk_MainWindow(interp)), True);
}
/*
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index 0c7eb67..f9c26c6 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -53,11 +53,11 @@ static void ProcessAppleEvent(ClientData clientData);
* Names of the procedures which can be used to process AppleEvents.
*/
-static char* openDocumentProc = "::tk::mac::OpenDocument";
-static char* launchURLProc = "::tk::mac::LaunchURL";
-static char* printDocProc = "::tk::mac::PrintDocument";
-static char* scriptFileProc = "::tk::mac::DoScriptFile";
-static char* scriptTextProc = "::tk::mac::DoScriptText";
+static const char* openDocumentProc = "::tk::mac::OpenDocument";
+static const char* launchURLProc = "::tk::mac::LaunchURL";
+static const char* printDocProc = "::tk::mac::PrintDocument";
+static const char* scriptFileProc = "::tk::mac::DoScriptFile";
+static const char* scriptTextProc = "::tk::mac::DoScriptText";
#pragma mark TKApplication(TKHLEvents)
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h
index e26328a..96b06da 100644
--- a/macosx/tkMacOSXPort.h
+++ b/macosx/tkMacOSXPort.h
@@ -107,19 +107,6 @@
#define REDO_KEYSYM_LOOKUP
/*
- * Defines for X functions that are used by Tk but are treated as
- * no-op functions on the Macintosh.
- */
-
-#define XFlush(display)
-#define XFree(data) {if ((data) != NULL) ckfree(data);}
-#define XGrabServer(display)
-#define XNoOp(display) {display->request++;}
-#define XUngrabServer(display)
-#define XSynchronize(display, bool) {display->request++;}
-#define XVisualIDFromVisual(visual) (visual->visualid)
-
-/*
* The following functions are not used on the Mac, so we stub them out.
*/
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 9745bfb..ca09e10 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -688,7 +688,7 @@ XForceScreenSaver(
int
XSync(
Display *display,
- Bool flag)
+ Bool discard)
{
TkMacOSXFlushWindows();
display->request++;
@@ -869,6 +869,61 @@ XCreateIC(XIM xim, ...)
return (XIC) 0;
}
+VisualID
+XVisualIDFromVisual(
+ Visual *visual)
+{
+ return visual->visualid;
+}
+
+XAfterFunction
+XSynchronize(
+ Display *display,
+ Bool onoff)
+{
+ display->request++;
+ return NULL;
+}
+
+int
+XUngrabServer(
+ Display *display)
+{
+ return 0;
+}
+
+int
+XNoOp(
+ Display *display)
+{
+ display->request++;
+ return 0;
+}
+
+int
+XGrabServer(
+ Display *display)
+{
+ return 0;
+}
+
+int
+XFree(
+ void *data)
+{
+ if ((data) != NULL) {
+ ckfree(data);
+ }
+ return 0;
+}
+
+int
+XFlush(
+ Display *display)
+{
+ return 0;
+}
+
/*
*----------------------------------------------------------------------
*
diff --git a/win/stubs.c b/win/stubs.c
index c3e853e..79a0b61 100644
--- a/win/stubs.c
+++ b/win/stubs.c
@@ -444,25 +444,25 @@ int
XNoOp(
Display *display)
{
- display->request++;
+ display->request++;
return 0;
}
XAfterFunction
XSynchronize(
Display *display,
- Bool bool)
+ Bool onoff)
{
- display->request++;
+ display->request++;
return NULL;
}
int
XSync(
Display *display,
- Bool bool)
+ Bool discard)
{
- display->request++;
+ display->request++;
return 0;
}