diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tkInt.decls | 2 | ||||
-rw-r--r-- | generic/tkIntPlatDecls.h | 4 | ||||
-rw-r--r-- | generic/tkWindow.c | 6 | ||||
-rw-r--r-- | unix/tkUnixPort.h | 15 | ||||
-rw-r--r-- | win/tkWinWm.c | 180 |
6 files changed, 120 insertions, 95 deletions
@@ -1,3 +1,11 @@ +2012-05-09 Jan Nijtmans <nijtmans@users.sf.net> + + * win/tkWinWm.c: Change TkpWmSetState signature to match UNIX, + * 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. + * unix/tkUnixPort.h: Some more useful #defines for Cygwin + 2012-05-05 Jan Nijtmans <nijtmans@users.sf.net> * xlib/xcolors.c: Single "const" addition diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 63f34f5..fc384a1 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -652,7 +652,7 @@ declare 8 win { void TkpSetCursor(TkpCursor cursor) } declare 9 win { - void TkpWmSetState(TkWindow *winPtr, int state) + int TkpWmSetState(TkWindow *winPtr, int state) } declare 10 win { void TkSetPixmapColormap(Pixmap pixmap, Colormap colormap) diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 8de3a71..cee7450 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -78,7 +78,7 @@ EXTERN void TkpSetCursor(TkpCursor cursor); #ifndef TkpWmSetState_TCL_DECLARED #define TkpWmSetState_TCL_DECLARED /* 9 */ -EXTERN void TkpWmSetState(TkWindow *winPtr, int state); +EXTERN int TkpWmSetState(TkWindow *winPtr, int state); #endif #ifndef TkSetPixmapColormap_TCL_DECLARED #define TkSetPixmapColormap_TCL_DECLARED @@ -568,7 +568,7 @@ typedef struct TkIntPlatStubs { int (*tkpScanWindowId) (Tcl_Interp *interp, CONST char *string, Window *idPtr); /* 6 */ void (*tkpSetCapture) (TkWindow *winPtr); /* 7 */ void (*tkpSetCursor) (TkpCursor cursor); /* 8 */ - void (*tkpWmSetState) (TkWindow *winPtr, int state); /* 9 */ + int (*tkpWmSetState) (TkWindow *winPtr, int state); /* 9 */ void (*tkSetPixmapColormap) (Pixmap pixmap, Colormap colormap); /* 10 */ void (*tkWinCancelMouseTimer) (void); /* 11 */ void (*tkWinClipboardRender) (TkDisplay *dispPtr, UINT format); /* 12 */ diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 7cf42ff..2dadfb7 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -858,7 +858,7 @@ TkCreateMainWindow( { Tk_Window tkwin; int dummy, isSafe; -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(STATIC_BUILD) int isWin32 = 0; #endif Tcl_HashEntry *hPtr; @@ -868,7 +868,7 @@ TkCreateMainWindow( ClientData clientData; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(STATIC_BUILD) Tcl_Obj *stringObjPtr = Tcl_GetVar2Ex(interp, "::tcl_platform", "platform", 0); if (stringObjPtr @@ -959,7 +959,7 @@ TkCreateMainWindow( if (cmdPtr->objProc == NULL) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(STATIC_BUILD) if (!isWin32 && (cmdPtr->flags & WINMACONLY)) { continue; } diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h index a70af48..76199a0 100644 --- a/unix/tkUnixPort.h +++ b/unix/tkUnixPort.h @@ -137,6 +137,21 @@ XPutImage(display, pixels, gc, image, srcx, srcy, destx, \ desty, width, height); +#ifdef __CYGWIN__ +# define UINT unsigned int +# define HWND void * +# define HDC void * +# define HINSTANCE void * +# define COLORREF void * +# define HMENU void * +# define TkWinDCState void +# define HPALETTE void * +# define WNDPROC void * +# define WPARAM void * +# define LPARAM void * +# define LRESULT void * +#endif + /* * Supply macros for seek offsets, if they're not already provided by * an include file. diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 8a9b2af..bb7f746 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -34,7 +34,7 @@ * Event structure for synthetic activation events. These events are placed on * the event queue whenever a toplevel gets a WM_MOUSEACTIVATE message or * a WM_ACTIVATE. If the window is being moved (*flagPtr will be true) - * then the handling of this event must be delayed until the operation + * then the handling of this event must be delayed until the operation * has completed to avoid a premature WM_EXITSIZEMOVE event. */ @@ -268,7 +268,7 @@ typedef struct TkWmInfo { ProtocolHandler *protPtr; /* First in list of protocol handlers for this * window (NULL means none). */ int cmdArgc; /* Number of elements in cmdArgv below. */ - CONST char **cmdArgv; /* Array of strings to store in the WM_COMMAND + const char **cmdArgv; /* Array of strings to store in the WM_COMMAND * property. NULL means nothing available. */ char *clientMachine; /* String to store in WM_CLIENT_MACHINE * property, or NULL. */ @@ -466,100 +466,100 @@ static void DecrIconRefCount(WinIconPtr titlebaricon); static int WmAspectCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmAttributesCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmClientCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmColormapwindowsCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmCommandCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmDeiconifyCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmFocusmodelCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmForgetCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmFrameCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmGeometryCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmGridCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmGroupCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmIconbitmapCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmIconifyCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmIconmaskCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmIconnameCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmIconphotoCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmIconpositionCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmIconwindowCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmManageCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmMaxsizeCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmMinsizeCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmOverrideredirectCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmPositionfromCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmProtocolCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmResizableCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmSizefromCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmStackorderCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmStateCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmTitleCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmTransientCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int WmWithdrawCmd(Tk_Window tkwin, TkWindow *winPtr, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static void WmUpdateGeom(WmInfo *wmPtr, TkWindow *winPtr); /* @@ -1292,7 +1292,7 @@ ReadIconFromFile( SHFILEINFO sfiSM; Tcl_DString ds, ds2; DWORD *res; - CONST char *file; + const char *file; file = Tcl_TranslateFileName(interp, Tcl_GetString(fileName), &ds); if (file == NULL) { @@ -2499,7 +2499,7 @@ TkWmUnmapWindow( *---------------------------------------------------------------------- */ -void +int TkpWmSetState( TkWindow *winPtr, /* Toplevel window to operate on. */ int state) /* One of IconicState, ZoomState, NormalState, @@ -2510,7 +2510,7 @@ TkpWmSetState( if (wmPtr->flags & WM_NEVER_MAPPED) { wmPtr->hints.initial_state = state; - return; + goto setStateEnd; } wmPtr->flags |= WM_SYNC_PENDING; @@ -2523,11 +2523,13 @@ TkpWmSetState( } else if (state == ZoomState) { cmd = SW_SHOWMAXIMIZED; } else { - return; + goto setStateEnd; } ShowWindow(wmPtr->wrapper, cmd); wmPtr->flags &= ~WM_SYNC_PENDING; +setStateEnd: + return 1; } /* @@ -2829,10 +2831,10 @@ Tk_WmObjCmd( ClientData clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = (Tk_Window) clientData; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "aspect", "attributes", "client", "colormapwindows", "command", "deiconify", "focusmodel", "forget", "frame", "geometry", "grid", "group", "iconbitmap", @@ -3005,7 +3007,7 @@ WmAspectCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int numer1, denom1, numer2, denom2; @@ -3072,7 +3074,7 @@ WmAttributesCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; LONG style, exStyle, styleBit, *stylePtr = NULL; @@ -3363,7 +3365,7 @@ WmClientCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; char *argv3; @@ -3433,7 +3435,7 @@ WmColormapwindowsCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; TkWindow **cmapList; @@ -3526,12 +3528,12 @@ WmCommandCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; char *argv3; int cmdArgc; - CONST char **cmdArgv; + const char **cmdArgv; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?value?"); @@ -3593,7 +3595,7 @@ WmDeiconifyCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; @@ -3641,10 +3643,10 @@ WmFocusmodelCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "active", "passive", NULL }; enum options { @@ -3697,7 +3699,7 @@ WmForgetCmd(tkwin, winPtr, interp, objc, objv) TkWindow *winPtr; /* Toplevel or Frame to work with */ Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ - Tcl_Obj *CONST objv[]; /* Argument objects. */ + Tcl_Obj *const objv[]; /* Argument objects. */ { register Tk_Window frameWin = (Tk_Window)winPtr; @@ -3738,7 +3740,7 @@ WmFrameCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; HWND hwnd; @@ -3783,7 +3785,7 @@ WmGeometryCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; char xSign, ySign; @@ -3853,7 +3855,7 @@ WmGridCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int reqWidth, reqHeight, widthInc, heightInc; @@ -3942,7 +3944,7 @@ WmGroupCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Tk_Window tkwin2; @@ -4005,7 +4007,7 @@ WmIconbitmapCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; TkWindow *useWinPtr = winPtr; /* window to apply to (NULL if -default) */ @@ -4139,7 +4141,7 @@ WmIconifyCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; if (objc != 3) { @@ -4195,7 +4197,7 @@ WmIconmaskCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Pixmap pixmap; @@ -4253,7 +4255,7 @@ WmIconnameCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; char *argv3; @@ -4305,7 +4307,7 @@ WmIconphotoCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { TkWindow *useWinPtr = winPtr; /* window to apply to (NULL if -default) */ Tk_PhotoHandle photo; @@ -4373,7 +4375,7 @@ WmIconphotoCmd( * CreateIconIndirect which takes device-independent bitmaps * and converts them as required. Initialise icon info structure. */ - + ZeroMemory( &iconInfo, sizeof iconInfo ); iconInfo.fIcon = TRUE; @@ -4394,7 +4396,7 @@ WmIconphotoCmd( ckfree((char *) lpIR); Tcl_AppendResult(interp, "failed to create color bitmap for \"", Tcl_GetString(objv[i]), "\"", NULL); - return TCL_ERROR; + return TCL_ERROR; } /* @@ -4422,11 +4424,11 @@ WmIconphotoCmd( ckfree((char *) lpIR); Tcl_AppendResult(interp, "failed to create mask bitmap for \"", Tcl_GetString(objv[i]), "\"", NULL); - return TCL_ERROR; + return TCL_ERROR; } - + ZeroMemory( bgraMaskPtr, width*height/8 ); - + /* * Create an icon from the bitmaps. */ @@ -4486,7 +4488,7 @@ WmIconpositionCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int x, y; @@ -4542,7 +4544,7 @@ WmIconwindowCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; Tk_Window tkwin2; @@ -4649,7 +4651,7 @@ WmManageCmd(tkwin, winPtr, interp, objc, objv) TkWindow *winPtr; /* Toplevel or Frame to work with */ Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ - Tcl_Obj *CONST objv[]; /* Argument objects. */ + Tcl_Obj *const objv[]; /* Argument objects. */ { register Tk_Window frameWin = (Tk_Window)winPtr; register WmInfo *wmPtr = winPtr->wmInfoPtr; @@ -4702,7 +4704,7 @@ WmMaxsizeCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; @@ -4752,7 +4754,7 @@ WmMinsizeCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; @@ -4802,7 +4804,7 @@ WmOverrideredirectCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int boolean, curValue; @@ -4873,10 +4875,10 @@ WmPositionfromCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "program", "user", NULL }; enum options { @@ -4938,7 +4940,7 @@ WmProtocolCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; register ProtocolHandler *protPtr, *prevPtr; @@ -5030,7 +5032,7 @@ WmResizableCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; @@ -5093,10 +5095,10 @@ WmSizefromCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "program", "user", NULL }; enum options { @@ -5159,10 +5161,10 @@ WmStackorderCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { TkWindow **windows, **window_ptr; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "isabove", "isbelow", NULL }; enum options { @@ -5280,10 +5282,10 @@ WmStateCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "normal", "iconic", "withdrawn", "zoomed", NULL }; enum options { @@ -5422,7 +5424,7 @@ WmTitleCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; char *argv3; @@ -5496,7 +5498,7 @@ WmTransientCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; TkWindow *masterPtr = wmPtr->masterPtr, **masterPtrPtr = &masterPtr; @@ -5617,7 +5619,7 @@ WmWithdrawCmd( TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register WmInfo *wmPtr = winPtr->wmInfoPtr; @@ -6583,7 +6585,7 @@ TkWmProtocolEventProc( * the eval. */ - CONST char *name = Tk_GetAtomName((Tk_Window) winPtr, protocol); + const char *name = Tk_GetAtomName((Tk_Window) winPtr, protocol); Tcl_Preserve((ClientData) protPtr); interp = protPtr->interp; @@ -7861,7 +7863,7 @@ WmProc( } } /* fall through */ - + case WM_EXITSIZEMOVE: if (inMoveSize) { inMoveSize = 0; @@ -8030,13 +8032,13 @@ WmProc( && (winPtr != winPtr->mainPtr->winPtr)) { goto done; } - if (grab == TK_GRAB_EXCLUDED + if (grab == TK_GRAB_EXCLUDED && !(SC_MOVE == cmd || SC_SIZE == cmd)) { goto done; } } /* fall through */ - + case WM_INITMENU: case WM_COMMAND: case WM_MENUCHAR: @@ -8047,7 +8049,7 @@ WmProc( case WM_INITMENUPOPUP: if (winPtr) { HWND hMenuHWnd = Tk_GetEmbeddedMenuHWND((Tk_Window)winPtr); - + if (hMenuHWnd) { if (SendMessage(hMenuHWnd, message, wParam, lParam)) { goto done; @@ -8616,7 +8618,7 @@ TkpWinToplevelDetachWindow( *---------------------------------------------------------------------- */ -static void +static void RemapWindows(winPtr, parentHWND) TkWindow *winPtr; HWND parentHWND; |