summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c202
1 files changed, 101 insertions, 101 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 0e3544d..5e4c9b3 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXWm.c,v 1.69 2008/10/08 15:39:13 dgp Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.70 2008/10/17 23:18:38 nijtmans Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -37,7 +37,7 @@ typedef enum {
_WMATT_LAST_ATTRIBUTE
} WmAttribute;
-static const char *WmAttributeNames[] = {
+static const char *const WmAttributeNames[] = {
"-alpha", "-fullscreen", "-modified", "-notify",
"-titlepath", "-topmost", "-transparent",
NULL
@@ -211,7 +211,7 @@ static void GetMaxSize(TkWindow *winPtr, int *maxWidthPtr,
int *maxHeightPtr);
static void RemapWindows(TkWindow *winPtr,
MacDrawable *parentWin);
-
+
/*
*----------------------------------------------------------------------
*
@@ -307,7 +307,7 @@ TkWmNewWindow(
Tk_ManageGeometry((Tk_Window) winPtr, &wmMgrType, (ClientData) 0);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -406,7 +406,7 @@ TkWmMapWindow(
XMapWindow(winPtr->display, winPtr->window);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -431,7 +431,7 @@ TkWmUnmapWindow(
{
XUnmapWindow(winPtr->display, winPtr->window);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -499,7 +499,7 @@ TkWmDeadWindow(
ckfree((char *) wmPtr);
winPtr->wmInfoPtr = NULL;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -525,7 +525,7 @@ TkWmSetClass(
{
return;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -552,7 +552,7 @@ Tk_WmObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window) clientData;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"aspect", "attributes", "client", "colormapwindows",
"command", "deiconify", "focusmodel", "forget",
"frame", "geometry", "grid", "group",
@@ -686,7 +686,7 @@ Tk_WmObjCmd(
/* This should not happen */
return TCL_ERROR;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -755,7 +755,7 @@ WmAspectCmd(
WmUpdateGeom(wmPtr, winPtr);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -931,7 +931,7 @@ WmSetAttribute(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1006,7 +1006,7 @@ WmGetAttribute(
}
return result;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1078,7 +1078,7 @@ WmAttributesCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1133,7 +1133,7 @@ WmClientCmd(
strcpy(wmPtr->clientMachine, argv3);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1221,7 +1221,7 @@ WmColormapwindowsCmd(
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1281,7 +1281,7 @@ WmCommandCmd(
wmPtr->cmdArgv = cmdArgv;
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1327,7 +1327,7 @@ WmDeiconifyCmd(
ZoomState : NormalState);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1354,7 +1354,7 @@ WmFocusmodelCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"active", "passive", NULL };
enum options {
OPT_ACTIVE, OPT_PASSIVE };
@@ -1381,7 +1381,7 @@ WmFocusmodelCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1443,7 +1443,7 @@ WmForgetCmd(
return TCL_OK;
#endif
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1485,7 +1485,7 @@ WmFrameCmd(
Tcl_SetResult(interp, buf, TCL_VOLATILE);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1548,7 +1548,7 @@ WmGeometryCmd(
}
return ParseGeometry(interp, argv3, winPtr);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1638,7 +1638,7 @@ WmGridCmd(
WmUpdateGeom(wmPtr, winPtr);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1701,7 +1701,7 @@ WmGroupCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1769,7 +1769,7 @@ WmIconbitmapCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1823,7 +1823,7 @@ WmIconifyCmd(
TkpWmSetState(winPtr, IconicState);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1880,7 +1880,7 @@ WmIconmaskCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1932,7 +1932,7 @@ WmIconnameCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1998,7 +1998,7 @@ WmIconphotoCmd(
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2054,7 +2054,7 @@ WmIconpositionCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2137,7 +2137,7 @@ WmIconwindowCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2199,7 +2199,7 @@ WmManageCmd(
return TCL_OK;
#endif
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2250,7 +2250,7 @@ WmMaxsizeCmd(
WmUpdateGeom(wmPtr, winPtr);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2301,7 +2301,7 @@ WmMinsizeCmd(
WmUpdateGeom(wmPtr, winPtr);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2347,7 +2347,7 @@ WmOverrideredirectCmd(
ApplyMasterOverrideChanges(winPtr, NULL);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2374,7 +2374,7 @@ WmPositionfromCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
OPT_PROGRAM, OPT_USER };
@@ -2411,7 +2411,7 @@ WmPositionfromCmd(
WmUpdateGeom(wmPtr, winPtr);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2503,7 +2503,7 @@ WmProtocolCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2579,7 +2579,7 @@ WmResizableCmd(
oldAttributes, 1);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2606,7 +2606,7 @@ WmSizefromCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
OPT_PROGRAM, OPT_USER };
@@ -2644,7 +2644,7 @@ WmSizefromCmd(
WmUpdateGeom(wmPtr, winPtr);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2671,7 +2671,7 @@ WmStackorderCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
TkWindow **windows, **window_ptr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"isabove", "isbelow", NULL };
enum options {
OPT_ISABOVE, OPT_ISBELOW };
@@ -2762,7 +2762,7 @@ WmStackorderCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2789,7 +2789,7 @@ WmStateCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"normal", "iconic", "withdrawn", "zoomed", NULL };
enum options {
OPT_NORMAL, OPT_ICONIC, OPT_WITHDRAWN, OPT_ZOOMED };
@@ -2866,7 +2866,7 @@ WmStateCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2912,7 +2912,7 @@ WmTitleCmd(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -2997,7 +2997,7 @@ WmTransientCmd(
ApplyMasterOverrideChanges(winPtr, NULL);
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3053,7 +3053,7 @@ WmUpdateGeom(
wmPtr->flags |= WM_UPDATE_PENDING;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3159,7 +3159,7 @@ Tk_SetGrid(
wmPtr->flags |= WM_UPDATE_PENDING;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3216,7 +3216,7 @@ Tk_UnsetGrid(
wmPtr->flags |= WM_UPDATE_PENDING;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3266,7 +3266,7 @@ TopLevelEventProc(
Tcl_Panic("recieved unwanted reparent event");
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3301,7 +3301,7 @@ TopLevelReqProc(
wmPtr->flags |= WM_UPDATE_PENDING;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3520,7 +3520,7 @@ UpdateGeometryInfo(
wmPtr->flags &= ~WM_SYNC_PENDING;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3546,7 +3546,7 @@ UpdateSizeHints(
wmPtr->flags &= ~WM_UPDATE_SIZE_HINTS;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3687,7 +3687,7 @@ ParseGeometry(
Tcl_AppendResult(interp, "bad geometry specifier \"", string, "\"", NULL);
return TCL_ERROR;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3783,7 +3783,7 @@ Tk_GetRootCoords(
*xPtr = x;
*yPtr = y;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3903,7 +3903,7 @@ Tk_CoordsToWindow(
}
return (Tk_Window) winPtr;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -3996,7 +3996,7 @@ Tk_TopCoordsToWindow(
*newY = y;
return (Tk_Window) winPtr;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4063,7 +4063,7 @@ UpdateVRootGeometry(
goto noVRoot;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4120,7 +4120,7 @@ Tk_GetVRootGeometry(
*widthPtr = wmPtr->vRootWidth;
*heightPtr = wmPtr->vRootHeight;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4174,7 +4174,7 @@ Tk_MoveToplevelWindow(
UpdateGeometryInfo(winPtr);
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4288,7 +4288,7 @@ TkWmRestackToplevel(
SendBehind(macWindow, otherMacWindow);
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4379,7 +4379,7 @@ TkWmAddToColormapWindows(
* we don't support colormaps. If we did they would be installed here.
*/
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4448,7 +4448,7 @@ TkWmRemoveFromColormapWindows(
}
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4476,7 +4476,7 @@ TkGetPointerCoords(
{
XQueryPointer(NULL, None, NULL, NULL, xPtr, yPtr, NULL, NULL, NULL);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4535,7 +4535,7 @@ InitialWindowBounds(
geometry->right = wmPtr->x + winPtr->changes.width;
geometry->bottom = wmPtr->y + winPtr->changes.height;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4575,7 +4575,7 @@ TkMacOSXResizable(
return true;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4697,7 +4697,7 @@ TkMacOSXGrowToplevel(
}
return false;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4735,7 +4735,7 @@ TkSetWMName(
CFRelease(title);
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4762,7 +4762,7 @@ TkGetTransientMaster(
}
return None;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4794,7 +4794,7 @@ TkMacOSXGetXWindow(
}
return (Window) Tcl_GetHashValue(hPtr);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4853,7 +4853,7 @@ TkMacOSXIsWindowZoomed(
return IsWindowInStandardState(TkMacOSXDrawableWindow(winPtr->window),
&idealSize, NULL);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4937,7 +4937,7 @@ TkMacOSXZoomToplevel(
(zoomPart == inZoomIn ? NormalState : ZoomState);
return true;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -4964,7 +4964,7 @@ TkUnsupported1ObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- static const char *subcmds[] = {
+ static const char *const subcmds[] = {
"style", NULL
};
enum SubCmds {
@@ -5005,7 +5005,7 @@ TkUnsupported1ObjCmd(
/* won't be reached */
return TCL_ERROR;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5207,7 +5207,7 @@ WmWinStyle(
}
return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5245,7 +5245,7 @@ TkpMakeMenuWindow(
winPtr->wmInfoPtr->flags |= WM_HEIGHT_NOT_RESIZABLE;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5396,7 +5396,7 @@ TkMacOSXMakeRealWindowExist(
}
#endif /* TK_MAC_DEBUG_WINDOWS */
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5432,7 +5432,7 @@ TkMacOSXRegisterOffScreenWindow(
}
Tcl_SetHashValue(valueHashPtr, window);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5466,7 +5466,7 @@ TkMacOSXUnregisterMacWindow(
Tcl_DeleteHashEntry(entryPtr);
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5498,7 +5498,7 @@ TkMacOSXSetScrollbarGrow(
winPtr->privatePtr->toplevel->winPtr->wmInfoPtr->scrollWinPtr = NULL;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5531,7 +5531,7 @@ TkWmFocusToplevel(
}
return winPtr;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5561,7 +5561,7 @@ TkpGetWrapperWindow(
}
return winPtr;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5621,7 +5621,7 @@ TkpWmSetState(
TkMacOSXZoomToplevel(macWin, inZoomOut);
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5651,7 +5651,7 @@ TkpIsWindowFloating(
GetWindowClass(wRef, &class);
return (class == kFloatingWindowClass);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5674,7 +5674,7 @@ TkMacOSXWindowClass(
{
return winPtr->wmInfoPtr->macClass;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -5709,7 +5709,7 @@ TkMacOSXWindowOffset(
*xOffset = winPtr->wmInfoPtr->xInParent;
*yOffset = winPtr->wmInfoPtr->yInParent;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5735,7 +5735,7 @@ TkpGetMS(void)
Tcl_GetTime(&now);
return (long) now.sec * 1000 + now.usec / 1000;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5763,7 +5763,7 @@ XSetInputFocus(
* Don't need to do a thing. Tk manages the focus for us.
*/
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5809,7 +5809,7 @@ TkpChangeFocus(
return NextRequest(winPtr->display);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5856,7 +5856,7 @@ WmStackorderToplevelWrapperMap(
WmStackorderToplevelWrapperMap(childPtr, display, table);
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -5935,7 +5935,7 @@ TkWmStackorderToplevel(
Tcl_DeleteHashTable(&table);
return windows;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6026,7 +6026,7 @@ ApplyWindowClassAttributeChanges(
+ strWidths.bottom;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6092,7 +6092,7 @@ ApplyMasterOverrideChanges(
}
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6146,7 +6146,7 @@ WmGetWindowGroup(
}
return group;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6231,7 +6231,7 @@ TkMacOSXMakeFullscreen(
TkMacOSXEnterExitFullscreen(winPtr, IsWindowActive(window));
return result;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6279,7 +6279,7 @@ TkMacOSXEnterExitFullscreen(
}
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6376,7 +6376,7 @@ GetMinSize(
*minWidthPtr = minWidth;
*minHeightPtr = minHeight;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6432,7 +6432,7 @@ GetMaxSize(
*maxHeightPtr = maxHeight;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -6478,7 +6478,7 @@ RemapWindows(
RemapWindows(childPtr, (MacDrawable *) winPtr->window);
}
}
-
+
/*
* Local Variables:
* fill-column: 78