From 897b49ab9d4dee6d1c2b452063477c6d79b0c181 Mon Sep 17 00:00:00 2001 From: "nijtmans@users.sourceforge.net" Date: Thu, 24 May 2012 20:59:46 +0000 Subject: Change XSetCommand signature to match Xorg, needed for Cygwin --- ChangeLog | 9 ++++++++- generic/tkInt.decls | 2 +- generic/tkIntDecls.h | 48 ++++++++++++++++++++++++------------------------ generic/tkIntPlatDecls.h | 24 ++++++++++++------------ generic/tkIntXlibDecls.h | 28 ++++++++++++++-------------- generic/tkPlatDecls.h | 24 ++++++++++++------------ generic/tkStubInit.c | 48 ++++++++++++++++++++++++------------------------ win/stubs.c | 2 +- win/tkWinWm.c | 2 +- 9 files changed, 97 insertions(+), 90 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38e1af5..75cbd42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ +2012-05-24 Jan Nijtmans + + * win/stubs.c: Change XSetCommand signature to match Xorg, + * win/tkWinWm.c: needed for Cygwin. + * generic/tkInt.decls + * generic/tk*Decls.h: re-generated + 2012-05-09 Jan Nijtmans - * win/tkWinWm.c: Change TkpWmSetState signature to match UNIX, + * win/tkWinWm.c: Change TkpWmSetState signature to match Xorg, * generic/tkInt.decls: needed for Cygwin. (not needed for Mac) * generic/tkIntPlatDeclsDecls.h: * generic/tkWindow.c: Don't check for cygwin in win32 static build. diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 5338578..61d5775 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1290,7 +1290,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, const char **c, int i) + void XSetCommand(Display *d, Window w, char **c, int i) } declare 63 win { void XSetIconName(Display *d, Window w, _Xconst char *c) diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 23dcda4..879c964 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -388,30 +388,30 @@ EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle *rect, EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display *display, CONST char *source)); #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ /* 121 */ EXTERN Pixmap TkpCreateNativeBitmap _ANSI_ARGS_((Display *display, CONST char *source)); -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #ifdef MAC_TCL /* 122 */ EXTERN void TkpDefineNativeBitmaps _ANSI_ARGS_((void)); #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ /* 122 */ EXTERN void TkpDefineNativeBitmaps _ANSI_ARGS_((void)); -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ /* Slot 123 is reserved */ #ifdef MAC_TCL /* 124 */ EXTERN Pixmap TkpGetNativeAppBitmap _ANSI_ARGS_((Display *display, CONST char *name, int *width, int *height)); #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ /* 124 */ EXTERN Pixmap TkpGetNativeAppBitmap _ANSI_ARGS_((Display *display, CONST char *name, int *width, int *height)); -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ /* Slot 125 is reserved */ /* Slot 126 is reserved */ /* Slot 127 is reserved */ @@ -597,40 +597,40 @@ typedef struct TkIntStubs { #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ VOID *reserved121; #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ VOID *reserved121; -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display *display, CONST char *source)); /* 121 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ Pixmap (*tkpCreateNativeBitmap) _ANSI_ARGS_((Display *display, CONST char *source)); /* 121 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ VOID *reserved122; #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ VOID *reserved122; -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL void (*tkpDefineNativeBitmaps) _ANSI_ARGS_((void)); /* 122 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ void (*tkpDefineNativeBitmaps) _ANSI_ARGS_((void)); /* 122 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ VOID *reserved123; #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ VOID *reserved124; #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ VOID *reserved124; -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL Pixmap (*tkpGetNativeAppBitmap) _ANSI_ARGS_((Display *display, CONST char *name, int *width, int *height)); /* 124 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ Pixmap (*tkpGetNativeAppBitmap) _ANSI_ARGS_((Display *display, CONST char *name, int *width, int *height)); /* 124 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ VOID *reserved125; VOID *reserved126; VOID *reserved127; @@ -1159,24 +1159,24 @@ extern TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */ #endif #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkpCreateNativeBitmap #define TkpCreateNativeBitmap \ (tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */ #endif -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #ifdef MAC_TCL #ifndef TkpDefineNativeBitmaps #define TkpDefineNativeBitmaps \ (tkIntStubsPtr->tkpDefineNativeBitmaps) /* 122 */ #endif #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkpDefineNativeBitmaps #define TkpDefineNativeBitmaps \ (tkIntStubsPtr->tkpDefineNativeBitmaps) /* 122 */ #endif -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ /* Slot 123 is reserved */ #ifdef MAC_TCL #ifndef TkpGetNativeAppBitmap @@ -1184,12 +1184,12 @@ extern TkIntStubs *tkIntStubsPtr; (tkIntStubsPtr->tkpGetNativeAppBitmap) /* 124 */ #endif #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkpGetNativeAppBitmap #define TkpGetNativeAppBitmap \ (tkIntStubsPtr->tkpGetNativeAppBitmap) /* 124 */ #endif -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ /* Slot 125 is reserved */ /* Slot 126 is reserved */ /* Slot 127 is reserved */ diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index a2006d9..14a1f7d 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -30,7 +30,7 @@ * Exported function declarations: */ -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ /* 0 */ EXTERN char * TkAlignImageData _ANSI_ARGS_((XImage *image, int alignment, int bitOrder)); @@ -151,7 +151,7 @@ EXTERN void TkWmCleanup _ANSI_ARGS_((TkDisplay *dispPtr)); EXTERN void TkSendCleanup _ANSI_ARGS_((TkDisplay *dispPtr)); /* 47 */ EXTERN void TkFreeXId _ANSI_ARGS_((TkDisplay *dispPtr)); -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL /* 0 */ EXTERN void TkGenerateActivateEvents _ANSI_ARGS_(( @@ -288,7 +288,7 @@ EXTERN void TkMacPreprocessMenu _ANSI_ARGS_((void)); /* 66 */ EXTERN int TkpIsWindowFloating _ANSI_ARGS_((WindowRef window)); #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ /* 0 */ EXTERN void TkGenerateActivateEvents _ANSI_ARGS_(( TkWindow *winPtr, int active)); @@ -412,7 +412,7 @@ EXTERN void TkGenWMDestroyEvent _ANSI_ARGS_((Tk_Window tkwin)); /* Slot 52 is reserved */ /* 53 */ EXTERN unsigned long TkpGetMS _ANSI_ARGS_((void)); -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */ /* 0 */ EXTERN void TkCreateXEventSource _ANSI_ARGS_((void)); @@ -451,7 +451,7 @@ typedef struct TkIntPlatStubs { int magic; struct TkIntPlatStubHooks *hooks; -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ char * (*tkAlignImageData) _ANSI_ARGS_((XImage *image, int alignment, int bitOrder)); /* 0 */ VOID *reserved1; void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow *winPtr, int active)); /* 2 */ @@ -500,7 +500,7 @@ typedef struct TkIntPlatStubs { void (*tkWmCleanup) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 45 */ void (*tkSendCleanup) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 46 */ void (*tkFreeXId) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 47 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow *winPtr, int active)); /* 0 */ VOID *reserved1; @@ -570,7 +570,7 @@ typedef struct TkIntPlatStubs { void (*tkMacPreprocessMenu) _ANSI_ARGS_((void)); /* 65 */ int (*tkpIsWindowFloating) _ANSI_ARGS_((WindowRef window)); /* 66 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow *winPtr, int active)); /* 0 */ VOID *reserved1; VOID *reserved2; @@ -625,7 +625,7 @@ typedef struct TkIntPlatStubs { void (*tkGenWMDestroyEvent) _ANSI_ARGS_((Tk_Window tkwin)); /* 51 */ VOID *reserved52; unsigned long (*tkpGetMS) _ANSI_ARGS_((void)); /* 53 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */ void (*tkCreateXEventSource) _ANSI_ARGS_((void)); /* 0 */ void (*tkFreeWindowId) _ANSI_ARGS_((TkDisplay *dispPtr, Window w)); /* 1 */ @@ -657,7 +657,7 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr; * Inline function declarations: */ -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ #ifndef TkAlignImageData #define TkAlignImageData \ (tkIntPlatStubsPtr->tkAlignImageData) /* 0 */ @@ -847,7 +847,7 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr; #define TkFreeXId \ (tkIntPlatStubsPtr->tkFreeXId) /* 47 */ #endif -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL #ifndef TkGenerateActivateEvents #define TkGenerateActivateEvents \ @@ -1058,7 +1058,7 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkpIsWindowFloating) /* 66 */ #endif #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ #ifndef TkGenerateActivateEvents #define TkGenerateActivateEvents \ (tkIntPlatStubsPtr->tkGenerateActivateEvents) /* 0 */ @@ -1251,7 +1251,7 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr; #define TkpGetMS \ (tkIntPlatStubsPtr->tkpGetMS) /* 53 */ #endif -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */ #ifndef TkCreateXEventSource #define TkCreateXEventSource \ diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 77f6b4d..0ca0da4 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -36,7 +36,7 @@ * Exported function declarations: */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ /* 0 */ EXTERN void XSetDashes _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, @@ -229,7 +229,7 @@ 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, - CONST char **c, int i)); + char **c, int i)); /* 63 */ EXTERN void XSetIconName _ANSI_ARGS_((Display *d, Window w, _Xconst char *c)); @@ -363,7 +363,7 @@ EXTERN void XWarpPointer _ANSI_ARGS_((Display *d, Window s, EXTERN void XFillRectangle _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL /* 0 */ EXTERN void XSetDashes _ANSI_ARGS_((Display *display, GC gc, @@ -654,7 +654,7 @@ EXTERN Status XQueryTree _ANSI_ARGS_((Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui)); #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ /* 0 */ EXTERN void XSetDashes _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, @@ -945,13 +945,13 @@ EXTERN Status XQueryTree _ANSI_ARGS_((Display *d, Window w1, unsigned int *ui)); /* 91 */ EXTERN int XSync _ANSI_ARGS_((Display *display, Bool flag)); -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ typedef struct TkIntXlibStubs { int magic; struct TkIntXlibStubHooks *hooks; -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ void (*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 */ @@ -1014,7 +1014,7 @@ 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, CONST char **c, int i)); /* 62 */ + void (*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 */ @@ -1059,7 +1059,7 @@ typedef struct TkIntXlibStubs { void (*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 */ void (*xFillRectangle) _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); /* 106 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL void (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ XModifierKeymap * (*xGetModifierMapping) _ANSI_ARGS_((Display *d)); /* 1 */ @@ -1153,7 +1153,7 @@ typedef struct TkIntXlibStubs { 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 +#ifdef MAC_OSX_TK /* AQUA */ void (*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 */ @@ -1246,7 +1246,7 @@ typedef struct TkIntXlibStubs { 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 */ int (*xSync) _ANSI_ARGS_((Display *display, Bool flag)); /* 91 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ } TkIntXlibStubs; #ifdef __cplusplus @@ -1263,7 +1263,7 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; * Inline function declarations: */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ #ifndef XSetDashes #define XSetDashes \ (tkIntXlibStubsPtr->xSetDashes) /* 0 */ @@ -1689,7 +1689,7 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XFillRectangle \ (tkIntXlibStubsPtr->xFillRectangle) /* 106 */ #endif -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL #ifndef XSetDashes #define XSetDashes \ @@ -2056,7 +2056,7 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; (tkIntXlibStubsPtr->xQueryTree) /* 90 */ #endif #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ #ifndef XSetDashes #define XSetDashes \ (tkIntXlibStubsPtr->xSetDashes) /* 0 */ @@ -2425,7 +2425,7 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XSync \ (tkIntXlibStubsPtr->xSync) /* 91 */ #endif -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index cf1ec21..3d08790 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -29,7 +29,7 @@ * Exported function declarations: */ -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ /* 0 */ EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin, HWND hwnd)); @@ -45,7 +45,7 @@ EXTERN void Tk_PointerEvent _ANSI_ARGS_((HWND hwnd, int x, int y)); EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result)); -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL /* 0 */ EXTERN void Tk_MacSetEmbedHandler _ANSI_ARGS_(( @@ -78,7 +78,7 @@ EXTERN int TkMacHaveAppearance _ANSI_ARGS_((void)); /* 10 */ EXTERN GWorldPtr TkMacGetDrawablePort _ANSI_ARGS_((Drawable drawable)); #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ /* 0 */ EXTERN void Tk_MacOSXSetEmbedHandler _ANSI_ARGS_(( Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, @@ -111,20 +111,20 @@ EXTERN ControlRef TkMacOSXGetRootControl _ANSI_ARGS_(( EXTERN void Tk_MacOSXSetupTkNotifier _ANSI_ARGS_((void)); /* 10 */ EXTERN int Tk_MacOSXIsAppInFront _ANSI_ARGS_((void)); -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ typedef struct TkPlatStubs { int magic; struct TkPlatStubHooks *hooks; -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ Window (*tk_AttachHWND) _ANSI_ARGS_((Tk_Window tkwin, HWND hwnd)); /* 0 */ HINSTANCE (*tk_GetHINSTANCE) _ANSI_ARGS_((void)); /* 1 */ HWND (*tk_GetHWND) _ANSI_ARGS_((Window window)); /* 2 */ Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((HWND hwnd)); /* 3 */ void (*tk_PointerEvent) _ANSI_ARGS_((HWND hwnd, int x, int y)); /* 4 */ int (*tk_TranslateWinEvent) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result)); /* 5 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL void (*tk_MacSetEmbedHandler) _ANSI_ARGS_((Tk_MacEmbedRegisterWinProc *registerWinProcPtr, Tk_MacEmbedGetGrafPortProc *getPortProcPtr, Tk_MacEmbedMakeContainerExistProc *containerExistProcPtr, Tk_MacEmbedGetClipProc *getClipProc, Tk_MacEmbedGetOffsetInParentProc *getOffsetProc)); /* 0 */ void (*tk_MacTurnOffMenus) _ANSI_ARGS_((void)); /* 1 */ @@ -138,7 +138,7 @@ typedef struct TkPlatStubs { int (*tkMacHaveAppearance) _ANSI_ARGS_((void)); /* 9 */ GWorldPtr (*tkMacGetDrawablePort) _ANSI_ARGS_((Drawable drawable)); /* 10 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ void (*tk_MacOSXSetEmbedHandler) _ANSI_ARGS_((Tk_MacOSXEmbedRegisterWinProc *registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc *getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc *containerExistProcPtr, Tk_MacOSXEmbedGetClipProc *getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc)); /* 0 */ void (*tk_MacOSXTurnOffMenus) _ANSI_ARGS_((void)); /* 1 */ void (*tk_MacOSXTkOwnsCursor) _ANSI_ARGS_((int tkOwnsIt)); /* 2 */ @@ -150,7 +150,7 @@ typedef struct TkPlatStubs { ControlRef (*tkMacOSXGetRootControl) _ANSI_ARGS_((Drawable drawable)); /* 8 */ void (*tk_MacOSXSetupTkNotifier) _ANSI_ARGS_((void)); /* 9 */ int (*tk_MacOSXIsAppInFront) _ANSI_ARGS_((void)); /* 10 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ } TkPlatStubs; #ifdef __cplusplus @@ -167,7 +167,7 @@ extern TkPlatStubs *tkPlatStubsPtr; * Inline function declarations: */ -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ #ifndef Tk_AttachHWND #define Tk_AttachHWND \ (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ @@ -192,7 +192,7 @@ extern TkPlatStubs *tkPlatStubsPtr; #define Tk_TranslateWinEvent \ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL #ifndef Tk_MacSetEmbedHandler #define Tk_MacSetEmbedHandler \ @@ -239,7 +239,7 @@ extern TkPlatStubs *tkPlatStubsPtr; (tkPlatStubsPtr->tkMacGetDrawablePort) /* 10 */ #endif #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ #ifndef Tk_MacOSXSetEmbedHandler #define Tk_MacOSXSetEmbedHandler \ (tkPlatStubsPtr->tk_MacOSXSetEmbedHandler) /* 0 */ @@ -284,7 +284,7 @@ extern TkPlatStubs *tkPlatStubsPtr; #define Tk_MacOSXIsAppInFront \ (tkPlatStubsPtr->tk_MacOSXIsAppInFront) /* 10 */ #endif -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index ffa8c2b..e175a99 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -325,40 +325,40 @@ TkIntStubs tkIntStubs = { #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 121 */ #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ NULL, /* 121 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL TkpCreateNativeBitmap, /* 121 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ TkpCreateNativeBitmap, /* 121 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 122 */ #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ NULL, /* 122 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL TkpDefineNativeBitmaps, /* 122 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ TkpDefineNativeBitmaps, /* 122 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ NULL, /* 123 */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 124 */ #endif /* UNIX */ -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ NULL, /* 124 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL TkpGetNativeAppBitmap, /* 124 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ TkpGetNativeAppBitmap, /* 124 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ NULL, /* 125 */ NULL, /* 126 */ NULL, /* 127 */ @@ -392,7 +392,7 @@ TkIntStubs tkIntStubs = { TkIntPlatStubs tkIntPlatStubs = { TCL_STUB_MAGIC, NULL, -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ TkAlignImageData, /* 0 */ NULL, /* 1 */ TkGenerateActivateEvents, /* 2 */ @@ -441,7 +441,7 @@ TkIntPlatStubs tkIntPlatStubs = { TkWmCleanup, /* 45 */ TkSendCleanup, /* 46 */ TkFreeXId, /* 47 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL TkGenerateActivateEvents, /* 0 */ NULL, /* 1 */ @@ -511,7 +511,7 @@ TkIntPlatStubs tkIntPlatStubs = { TkMacPreprocessMenu, /* 65 */ TkpIsWindowFloating, /* 66 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ TkGenerateActivateEvents, /* 0 */ NULL, /* 1 */ NULL, /* 2 */ @@ -566,7 +566,7 @@ TkIntPlatStubs tkIntPlatStubs = { TkGenWMDestroyEvent, /* 51 */ NULL, /* 52 */ TkpGetMS, /* 53 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ #if !(defined(__WIN32__) || defined(__CYGWIN__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) /* X11 */ TkCreateXEventSource, /* 0 */ TkFreeWindowId, /* 1 */ @@ -587,7 +587,7 @@ TkIntPlatStubs tkIntPlatStubs = { TkIntXlibStubs tkIntXlibStubs = { TCL_STUB_MAGIC, NULL, -#ifdef __WIN32__ +#if defined(__WIN32__) /* WIN */ XSetDashes, /* 0 */ XGetModifierMapping, /* 1 */ XCreateImage, /* 2 */ @@ -695,7 +695,7 @@ TkIntXlibStubs tkIntXlibStubs = { XDrawLine, /* 104 */ XWarpPointer, /* 105 */ XFillRectangle, /* 106 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL XSetDashes, /* 0 */ XGetModifierMapping, /* 1 */ @@ -789,7 +789,7 @@ TkIntXlibStubs tkIntXlibStubs = { XQueryColors, /* 89 */ XQueryTree, /* 90 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ XSetDashes, /* 0 */ XGetModifierMapping, /* 1 */ XCreateImage, /* 2 */ @@ -882,20 +882,20 @@ TkIntXlibStubs tkIntXlibStubs = { XQueryColors, /* 89 */ XQueryTree, /* 90 */ XSync, /* 91 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ }; TkPlatStubs tkPlatStubs = { TCL_STUB_MAGIC, NULL, -#if defined(__WIN32__) || defined(__CYGWIN__) +#if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */ Tk_AttachHWND, /* 0 */ Tk_GetHINSTANCE, /* 1 */ Tk_GetHWND, /* 2 */ Tk_HWNDToWindow, /* 3 */ Tk_PointerEvent, /* 4 */ Tk_TranslateWinEvent, /* 5 */ -#endif /* __WIN32__ */ +#endif /* WIN */ #ifdef MAC_TCL Tk_MacSetEmbedHandler, /* 0 */ Tk_MacTurnOffMenus, /* 1 */ @@ -909,7 +909,7 @@ TkPlatStubs tkPlatStubs = { TkMacHaveAppearance, /* 9 */ TkMacGetDrawablePort, /* 10 */ #endif /* MAC_TCL */ -#ifdef MAC_OSX_TK +#ifdef MAC_OSX_TK /* AQUA */ Tk_MacOSXSetEmbedHandler, /* 0 */ Tk_MacOSXTurnOffMenus, /* 1 */ Tk_MacOSXTkOwnsCursor, /* 2 */ @@ -921,7 +921,7 @@ TkPlatStubs tkPlatStubs = { TkMacOSXGetRootControl, /* 8 */ Tk_MacOSXSetupTkNotifier, /* 9 */ Tk_MacOSXIsAppInFront, /* 10 */ -#endif /* MAC_OSX_TK */ +#endif /* AQUA */ }; static TkStubHooks tkStubHooks = { diff --git a/win/stubs.c b/win/stubs.c index 5fbc8d1..60d2dc8 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -253,7 +253,7 @@ void XSetCommand(display, w, argv, argc) Display* display; Window w; - CONST char** argv; + char** argv; int argc; { } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index ac4ea34..32768cf 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3284,7 +3284,7 @@ WmCommandCmd(tkwin, winPtr, interp, objc, objv) wmPtr->cmdArgc = cmdArgc; wmPtr->cmdArgv = cmdArgv; if (!(wmPtr->flags & WM_NEVER_MAPPED)) { - XSetCommand(winPtr->display, winPtr->window, cmdArgv, cmdArgc); + XSetCommand(winPtr->display, winPtr->window, (char **) cmdArgv, cmdArgc); } return TCL_OK; } -- cgit v0.12