summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2007-01-03 05:06:25 (GMT)
committernijtmans <nijtmans>2007-01-03 05:06:25 (GMT)
commit04839e2ede345ab7e9e61a07baefd1c91cca56bf (patch)
treeee02b8a4aebc8b8d0adb8c18fad99e3cbea4c19a /generic
parentdf1d5b0c6b3bdf308fd86c0101f8e9110b177a6d (diff)
downloadtk-04839e2ede345ab7e9e61a07baefd1c91cca56bf.zip
tk-04839e2ede345ab7e9e61a07baefd1c91cca56bf.tar.gz
tk-04839e2ede345ab7e9e61a07baefd1c91cca56bf.tar.bz2
various "const" additions, in line with TIP #27
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.decls4
-rw-r--r--generic/tk.h4
-rw-r--r--generic/tkDecls.h7
-rw-r--r--generic/tkEntry.c6
-rw-r--r--generic/tkFrame.c12
-rw-r--r--generic/tkGeometry.c4
-rw-r--r--generic/tkInt.h4
-rw-r--r--generic/tkListbox.c6
-rw-r--r--generic/tkMenu.c20
-rw-r--r--generic/tkMenubutton.c4
-rw-r--r--generic/tkMessage.c4
-rw-r--r--generic/tkPanedWindow.c6
-rw-r--r--generic/tkPlace.c4
-rw-r--r--generic/tkScale.c4
-rw-r--r--generic/tkSquare.c4
-rw-r--r--generic/tkStyle.c6
-rw-r--r--generic/tkTest.c18
-rw-r--r--generic/tkText.c4
-rw-r--r--generic/tkTextImage.c4
-rw-r--r--generic/tkTextTag.c4
-rw-r--r--generic/tkTextWind.c4
-rw-r--r--generic/ttk/ttkButton.c14
-rw-r--r--generic/ttk/ttkEntry.c6
-rw-r--r--generic/ttk/ttkFrame.c8
-rw-r--r--generic/ttk/ttkInit.c6
-rw-r--r--generic/ttk/ttkManager.h6
-rw-r--r--generic/ttk/ttkNotebook.c8
-rw-r--r--generic/ttk/ttkPanedwindow.c6
-rw-r--r--generic/ttk/ttkProgress.c4
-rw-r--r--generic/ttk/ttkScale.c4
-rw-r--r--generic/ttk/ttkScrollbar.c4
-rw-r--r--generic/ttk/ttkSeparator.c4
-rw-r--r--generic/ttk/ttkSquare.c4
-rw-r--r--generic/ttk/ttkTreeview.c12
-rw-r--r--generic/ttk/ttkWidget.c8
-rw-r--r--generic/ttk/ttkWidget.h10
36 files changed, 119 insertions, 118 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index 74786b2..0bbec19 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tk.decls,v 1.29 2006/10/08 21:47:11 patthoyts Exp $
+# RCS: @(#) $Id: tk.decls,v 1.30 2007/01/03 05:06:26 nijtmans Exp $
library tk
@@ -622,7 +622,7 @@ declare 123 generic {
declare 124 generic {
void Tk_ManageGeometry (Tk_Window tkwin,
- Tk_GeomMgr *mgrPtr, ClientData clientData)
+ CONST Tk_GeomMgr *mgrPtr, ClientData clientData)
}
declare 125 generic {
diff --git a/generic/tk.h b/generic/tk.h
index 644908c..6927370 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.91 2006/10/23 20:31:48 dgp Exp $
+ * RCS: @(#) $Id: tk.h,v 1.92 2007/01/03 05:06:26 nijtmans Exp $
*/
#ifndef _TK
@@ -601,7 +601,7 @@ typedef void (Tk_GeomLostSlaveProc) _ANSI_ARGS_((ClientData clientData,
Tk_Window tkwin));
typedef struct Tk_GeomMgr {
- char *name; /* Name of the geometry manager (command used
+ const char *name; /* Name of the geometry manager (command used
* to invoke it, or name of widget class that
* allows embedded widgets). */
Tk_GeomRequestProc *requestProc;
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 686f85d..b70cf80 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkDecls.h,v 1.28 2006/12/18 16:42:46 dgp Exp $
+ * RCS: @(#) $Id: tkDecls.h,v 1.29 2007/01/03 05:06:26 nijtmans Exp $
*/
#ifndef _TKDECLS
@@ -802,7 +802,8 @@ EXTERN void Tk_MakeWindowExist (Tk_Window tkwin);
#define Tk_ManageGeometry_TCL_DECLARED
/* 124 */
EXTERN void Tk_ManageGeometry (Tk_Window tkwin,
- Tk_GeomMgr * mgrPtr, ClientData clientData);
+ CONST Tk_GeomMgr * mgrPtr,
+ ClientData clientData);
#endif
#ifndef Tk_MapWindow_TCL_DECLARED
#define Tk_MapWindow_TCL_DECLARED
@@ -1818,7 +1819,7 @@ typedef struct TkStubs {
void (*tk_MaintainGeometry) (Tk_Window slave, Tk_Window master, int x, int y, int width, int height); /* 121 */
Tk_Window (*tk_MainWindow) (Tcl_Interp * interp); /* 122 */
void (*tk_MakeWindowExist) (Tk_Window tkwin); /* 123 */
- void (*tk_ManageGeometry) (Tk_Window tkwin, Tk_GeomMgr * mgrPtr, ClientData clientData); /* 124 */
+ void (*tk_ManageGeometry) (Tk_Window tkwin, CONST Tk_GeomMgr * mgrPtr, ClientData clientData); /* 124 */
void (*tk_MapWindow) (Tk_Window tkwin); /* 125 */
int (*tk_MeasureChars) (Tk_Font tkfont, CONST char * source, int numBytes, int maxPixels, int flags, int * lengthPtr); /* 126 */
void (*tk_MoveResizeWindow) (Tk_Window tkwin, int x, int y, int width, int height); /* 127 */
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index ff5ef12..2f19050 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEntry.c,v 1.41 2006/09/10 17:06:31 das Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.42 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkInt.h"
@@ -63,7 +63,7 @@ enum validateType {
* Information used for Entry objv parsing.
*/
-static Tk_OptionSpec entryOptSpec[] = {
+static const Tk_OptionSpec entryOptSpec[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
DEF_ENTRY_BG_COLOR, -1, Tk_Offset(Entry, normalBorder),
0, (ClientData) DEF_ENTRY_BG_MONO, 0},
@@ -180,7 +180,7 @@ static Tk_OptionSpec entryOptSpec[] = {
#define DEF_SPINBOX_VALUES ""
#define DEF_SPINBOX_WRAP "0"
-static Tk_OptionSpec sbOptSpec[] = {
+static const Tk_OptionSpec sbOptSpec[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Background",
DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(Spinbox, activeBorder),
0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0},
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index e18ff0c..b7cb2bc 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFrame.c,v 1.24 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.25 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "default.h"
@@ -175,7 +175,7 @@ static char *labelAnchorStrings[] = {
* table used by all and one table for each widget class.
*/
-static Tk_OptionSpec commonOptSpec[] = {
+static const Tk_OptionSpec commonOptSpec[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
DEF_FRAME_BG_COLOR, -1, Tk_Offset(Frame, border),
TK_OPTION_NULL_OK, (ClientData) DEF_FRAME_BG_MONO, 0},
@@ -217,7 +217,7 @@ static Tk_OptionSpec commonOptSpec[] = {
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
-static Tk_OptionSpec frameOptSpec[] = {
+static const Tk_OptionSpec frameOptSpec[] = {
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, (ClientData) "-borderwidth", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
@@ -230,7 +230,7 @@ static Tk_OptionSpec frameOptSpec[] = {
NULL, 0, 0, 0, (ClientData) commonOptSpec, 0}
};
-static Tk_OptionSpec toplevelOptSpec[] = {
+static const Tk_OptionSpec toplevelOptSpec[] = {
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, (ClientData) "-borderwidth", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
@@ -252,7 +252,7 @@ static Tk_OptionSpec toplevelOptSpec[] = {
NULL, 0, 0, 0, (ClientData) commonOptSpec, 0}
};
-static Tk_OptionSpec labelframeOptSpec[] = {
+static const Tk_OptionSpec labelframeOptSpec[] = {
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, (ClientData) "-borderwidth", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
@@ -291,7 +291,7 @@ static char *classNames[] = {"Frame", "Toplevel", "Labelframe"};
* class of widgets.
*/
-static Tk_OptionSpec *optionSpecs[] = {
+static const Tk_OptionSpec * const optionSpecs[] = {
frameOptSpec,
toplevelOptSpec,
labelframeOptSpec,
diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c
index 15c2199..5c862e5 100644
--- a/generic/tkGeometry.c
+++ b/generic/tkGeometry.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGeometry.c,v 1.7 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkGeometry.c,v 1.8 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkPort.h"
@@ -87,7 +87,7 @@ void
Tk_ManageGeometry(tkwin, mgrPtr, clientData)
Tk_Window tkwin; /* Window whose geometry is to be managed by
* proc. */
- Tk_GeomMgr *mgrPtr; /* Static structure describing the geometry
+ CONST Tk_GeomMgr *mgrPtr; /* Static structure describing the geometry
* manager. This structure must never go
* away. */
ClientData clientData; /* Arbitrary one-word argument to pass to
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 2e1679e..50af9ef 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: $Id: tkInt.h,v 1.75 2006/12/01 20:14:23 kennykb Exp $
+ * RCS: $Id: tkInt.h,v 1.76 2007/01/03 05:06:27 nijtmans Exp $
*/
#ifndef _TKINT
@@ -790,7 +790,7 @@ typedef struct TkWindow {
* Information used by tkGeometry.c for geometry management.
*/
- Tk_GeomMgr *geomMgrPtr; /* Information about geometry manager for this
+ const Tk_GeomMgr *geomMgrPtr; /* Information about geometry manager for this
* window. */
ClientData geomData; /* Argument for geometry manager functions. */
int reqWidth, reqHeight; /* Arguments from last call to
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index d5f0663..ca888a2 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkListbox.c,v 1.36 2006/12/04 20:13:21 hobbs Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.37 2007/01/03 05:06:25 nijtmans Exp $
*/
#include "tkPort.h"
@@ -230,7 +230,7 @@ static char *activeStyleStrings[] = {
* listbox widget.
*/
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle",
DEF_LISTBOX_ACTIVE_STYLE, -1, Tk_Offset(Listbox, activeStyle),
0, (ClientData) activeStyleStrings, 0},
@@ -311,7 +311,7 @@ static Tk_OptionSpec optionSpecs[] = {
* listbox items
*/
-static Tk_OptionSpec itemAttrOptionSpecs[] = {
+static const Tk_OptionSpec itemAttrOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
NULL, -1, Tk_Offset(ItemAttr, border),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 6dd2fc2..0545412 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenu.c,v 1.37 2006/12/04 15:16:30 dkf Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.38 2007/01/03 05:06:26 nijtmans Exp $
*/
/*
@@ -114,7 +114,7 @@ static char *compoundStrings[] = {
"bottom", "center", "left", "none", "right", "top", NULL
};
-static Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
+static const Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", NULL, NULL,
DEF_MENU_ENTRY_ACTIVE_BG, Tk_Offset(TkMenuEntry, activeBorderPtr), -1,
TK_OPTION_NULL_OK},
@@ -163,14 +163,14 @@ static Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
{TK_OPTION_END}
};
-static Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = {
+static const Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK},
{TK_OPTION_END}
};
-static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
+static const Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
-1, Tk_Offset(TkMenuEntry, indicatorOn)},
@@ -193,7 +193,7 @@ static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs}
};
-static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
+static const Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
-1, Tk_Offset(TkMenuEntry, indicatorOn)},
@@ -213,7 +213,7 @@ static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs}
};
-static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
+static const Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
{TK_OPTION_STRING, "-menu", NULL, NULL,
DEF_MENU_ENTRY_MENU,
Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK},
@@ -221,7 +221,7 @@ static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs}
};
-static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = {
+static const Tk_OptionSpec tkTearoffEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK},
@@ -231,7 +231,7 @@ static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = {
{TK_OPTION_END}
};
-static Tk_OptionSpec *specsArray[] = {
+static const Tk_OptionSpec *specsArray[] = {
tkCascadeEntryConfigSpecs, tkCheckButtonEntryConfigSpecs,
tkBasicMenuEntryConfigSpecs, tkRadioButtonEntryConfigSpecs,
tkSeparatorEntryConfigSpecs, tkTearoffEntryConfigSpecs
@@ -241,11 +241,11 @@ static Tk_OptionSpec *specsArray[] = {
* Menu type strings for use with Tcl_GetIndexFromObj.
*/
-static CONST char *menuTypeStrings[] = {
+static const char *menuTypeStrings[] = {
"normal", "tearoff", "menubar", NULL
};
-static Tk_OptionSpec tkMenuConfigSpecs[] = {
+static const Tk_OptionSpec tkMenuConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground",
"Foreground", DEF_MENU_ACTIVE_BG_COLOR,
Tk_Offset(TkMenu, activeBorderPtr), -1, 0,
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index c720025..9fa7c4f 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenubutton.c,v 1.14 2005/11/15 15:18:22 dkf Exp $
+ * RCS: @(#) $Id: tkMenubutton.c,v 1.15 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkMenubutton.h"
@@ -48,7 +48,7 @@ static char *compoundStrings[] = {
* Information used for parsing configuration specs:
*/
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_MENUBUTTON_ACTIVE_BG_COLOR, -1,
Tk_Offset(TkMenuButton, activeBorder), 0,
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index aeb09f4..6392d76 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMessage.c,v 1.16 2006/05/25 23:50:00 hobbs Exp $
+ * RCS: @(#) $Id: tkMessage.c,v 1.17 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkPort.h"
@@ -110,7 +110,7 @@ typedef struct {
* Information used for argv parsing.
*/
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MESSAGE_ANCHOR,
-1, Tk_Offset(Message, anchor), 0, 0, 0},
{TK_OPTION_INT, "-aspect", "aspect", "Aspect", DEF_MESSAGE_ASPECT,
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index ca1c1b6..661e513 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPanedWindow.c,v 1.25 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.26 2007/01/03 05:06:25 nijtmans Exp $
*/
#include "tkPort.h"
@@ -270,7 +270,7 @@ static Tk_ObjCustomOption stickyOption = {
0
};
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, background), 0,
(ClientData) DEF_PANEDWINDOW_BG_MONO},
@@ -322,7 +322,7 @@ static Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_END}
};
-static Tk_OptionSpec slaveOptionSpecs[] = {
+static const Tk_OptionSpec slaveOptionSpecs[] = {
{TK_OPTION_WINDOW, "-after", NULL, NULL,
DEF_PANEDWINDOW_PANE_AFTER, -1, Tk_Offset(Slave, after),
TK_OPTION_NULL_OK, 0, 0},
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index f41138a..e3ec254 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPlace.c,v 1.18 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkPlace.c,v 1.19 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkPort.h"
@@ -81,7 +81,7 @@ typedef struct Slave {
#define IN_MASK 1
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", -1,
Tk_Offset(Slave, anchor), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", -1,
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 4ff6157..2e371b6 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkScale.c,v 1.23 2006/06/14 22:17:06 dgp Exp $
+ * RCS: @(#) $Id: tkScale.c,v 1.24 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkPort.h"
@@ -42,7 +42,7 @@ static char *stateStrings[] = {
"active", "disabled", "normal", NULL
};
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_SCALE_ACTIVE_BG_COLOR, -1, Tk_Offset(TkScale, activeBorder),
0, (ClientData) DEF_SCALE_ACTIVE_BG_MONO, 0},
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index 0b984dd..d0b8836 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkSquare.c,v 1.6 2005/11/15 15:18:22 dkf Exp $
+ * RCS: @(#) $Id: tkSquare.c,v 1.7 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkPort.h"
@@ -60,7 +60,7 @@ typedef struct {
* Information used for argv parsing.
*/
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
"#d9d9d9", Tk_Offset(Square, bgBorderPtr), -1, 0,
(ClientData) "white"},
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index e38abfa..f3d9604 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkStyle.c,v 1.5 2005/11/15 15:18:22 dkf Exp $
+ * RCS: @(#) $Id: tkStyle.c,v 1.6 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkInt.h"
@@ -1493,8 +1493,8 @@ SetStyleFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
Tcl_Obj *objPtr) /* The object to convert. */
{
- Tcl_ObjType *typePtr;
- char *name;
+ const Tcl_ObjType *typePtr;
+ const char *name;
/*
* Free the old internalRep before setting the new one.
diff --git a/generic/tkTest.c b/generic/tkTest.c
index 98df284..2f16372 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.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: tkTest.c,v 1.30 2005/12/09 00:48:54 das Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.31 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tkInt.h"
@@ -653,7 +653,7 @@ TestobjconfigObjCmd(
Tcl_Obj *extension4ObjPtr;
Tcl_Obj *extension5ObjPtr;
} ExtensionWidgetRecord;
- static Tk_OptionSpec baseSpecs[] = {
+ static const Tk_OptionSpec baseSpecs[] = {
{TK_OPTION_STRING, "-one", "one", "One", "one",
Tk_Offset(ExtensionWidgetRecord, base1ObjPtr), -1},
{TK_OPTION_STRING, "-two", "two", "Two", "two",
@@ -697,7 +697,7 @@ TestobjconfigObjCmd(
static char *stringTable[] = {
"one", "two", "three", "four", NULL
};
- static Tk_OptionSpec typesSpecs[] = {
+ static const Tk_OptionSpec typesSpecs[] = {
{TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1",
Tk_Offset(TypesRecord, booleanPtr), -1, 0, 0, 0x1},
{TK_OPTION_INT, "-integer", "integer", "Integer", "7",
@@ -842,7 +842,7 @@ TestobjconfigObjCmd(
case CHAIN2: {
ExtensionWidgetRecord *recordPtr;
- static Tk_OptionSpec extensionSpecs[] = {
+ static const Tk_OptionSpec extensionSpecs[] = {
{TK_OPTION_STRING, "-three", "three", "Three", "three",
Tk_Offset(ExtensionWidgetRecord, extension3ObjPtr), -1},
{TK_OPTION_STRING, "-four", "four", "Four", "four",
@@ -899,7 +899,7 @@ TestobjconfigObjCmd(
Tcl_Obj *intPtr;
} ErrorWidgetRecord;
ErrorWidgetRecord widgetRecord;
- static Tk_OptionSpec errorSpecs[] = {
+ static const Tk_OptionSpec errorSpecs[] = {
{TK_OPTION_INT, "-int", "integer", "Integer", "bogus",
Tk_Offset(ErrorWidgetRecord, intPtr)},
{TK_OPTION_END}
@@ -970,7 +970,7 @@ TestobjconfigObjCmd(
static char *internalStringTable[] = {
"one", "two", "three", "four", NULL
};
- static Tk_OptionSpec internalSpecs[] = {
+ static const Tk_OptionSpec internalSpecs[] = {
{TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1",
-1, Tk_Offset(InternalRecord, boolean), 0, 0, 0x1},
{TK_OPTION_INT, "-integer", "integer", "Integer", "148962237",
@@ -1087,7 +1087,7 @@ TestobjconfigObjCmd(
Tcl_Obj *five;
} FiveRecord;
FiveRecord *recordPtr;
- static Tk_OptionSpec smallSpecs[] = {
+ static const Tk_OptionSpec smallSpecs[] = {
{TK_OPTION_INT, "-one", "one", "One", "1",
Tk_Offset(FiveRecord, one), -1},
{TK_OPTION_INT, "-two", "two", "Two", "2",
@@ -1141,7 +1141,7 @@ TestobjconfigObjCmd(
Tcl_Obj *fooObjPtr;
} NotEnoughRecord;
NotEnoughRecord record;
- static Tk_OptionSpec errorSpecs[] = {
+ static const Tk_OptionSpec errorSpecs[] = {
{TK_OPTION_INT, "-foo", "foo", "Foo", "0",
Tk_Offset(NotEnoughRecord, fooObjPtr)},
{TK_OPTION_END}
@@ -1172,7 +1172,7 @@ TestobjconfigObjCmd(
Tcl_Obj *windowPtr;
} SlaveRecord;
SlaveRecord *recordPtr;
- static Tk_OptionSpec slaveSpecs[] = {
+ static const Tk_OptionSpec slaveSpecs[] = {
{TK_OPTION_WINDOW, "-window", "window", "Window", ".bar",
Tk_Offset(SlaveRecord, windowPtr), -1, TK_CONFIG_NULL_OK},
{TK_OPTION_END}
diff --git a/generic/tkText.c b/generic/tkText.c
index ca1626d..77b30e5 100644
--- a/generic/tkText.c
+++ b/generic/tkText.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: tkText.c,v 1.71 2006/10/17 10:21:49 patthoyts Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.72 2007/01/03 05:06:27 nijtmans Exp $
*/
#include "default.h"
@@ -111,7 +111,7 @@ static Tk_ObjCustomOption lineOption = {
* Information used to parse text configuration options:
*/
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BOOLEAN, "-autoseparators", "autoSeparators",
"AutoSeparators", DEF_TEXT_AUTO_SEPARATORS, -1,
Tk_Offset(TkText, autoSeparators), 0, 0, 0},
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 474e941..77f3fa5 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextImage.c,v 1.17 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkTextImage.c,v 1.18 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tk.h"
@@ -84,7 +84,7 @@ typedef enum {
* Information used for parsing image configuration options:
*/
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-align", NULL, NULL,
"center", -1, Tk_Offset(TkTextEmbImage, align),
0, (ClientData) alignStrings, 0},
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index 703a271..32fa3d8 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextTag.c,v 1.23 2005/12/08 18:17:32 hobbs Exp $
+ * RCS: @(#) $Id: tkTextTag.c,v 1.24 2007/01/03 05:06:27 nijtmans Exp $
*/
#include "default.h"
@@ -41,7 +41,7 @@ static char *tabStyleStrings[] = {
"tabular", "wordprocessor", "", NULL
};
-static Tk_OptionSpec tagOptionSpecs[] = {
+static const Tk_OptionSpec tagOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
NULL, -1, Tk_Offset(TkTextTag, border), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BITMAP, "-bgstipple", NULL, NULL,
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index 0988fee..73d8973 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextWind.c,v 1.17 2005/11/17 10:57:35 dkf Exp $
+ * RCS: @(#) $Id: tkTextWind.c,v 1.18 2007/01/03 05:06:26 nijtmans Exp $
*/
#include "tk.h"
@@ -102,7 +102,7 @@ typedef enum {
* Information used for parsing window configuration options:
*/
-static Tk_OptionSpec optionSpecs[] = {
+static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-align", NULL, NULL,
"center", -1, Tk_Offset(TkTextEmbWindow, align),
0, (ClientData) alignStrings, 0},
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index b87a7db..a054931 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -1,4 +1,4 @@
-/* $Id: ttkButton.c,v 1.4 2006/12/14 19:51:02 jenglish Exp $
+/* $Id: ttkButton.c,v 1.5 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2003, Joe English
*
* label, button, checkbutton, radiobutton, and menubutton widgets.
@@ -54,7 +54,7 @@ typedef struct
BasePart base;
} Base;
-static Tk_OptionSpec BaseOptionSpecs[] =
+static const Tk_OptionSpec BaseOptionSpecs[] =
{
{TK_OPTION_STRING, "-text", "text", "Text", "",
Tk_Offset(Base,base.textObj), -1,
@@ -219,7 +219,7 @@ typedef struct
LabelPart label;
} Label;
-static Tk_OptionSpec LabelOptionSpecs[] =
+static const Tk_OptionSpec LabelOptionSpecs[] =
{
{TK_OPTION_BORDER, "-background", "frameColor", "FrameColor",
NULL, Tk_Offset(Label,label.backgroundObj), -1,
@@ -296,7 +296,7 @@ typedef struct
/*
* Option specifications:
*/
-static Tk_OptionSpec ButtonOptionSpecs[] =
+static const Tk_OptionSpec ButtonOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
@@ -401,7 +401,7 @@ typedef struct
/*
* Option specifications:
*/
-static Tk_OptionSpec CheckbuttonOptionSpecs[] =
+static const Tk_OptionSpec CheckbuttonOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
@@ -593,7 +593,7 @@ typedef struct
/*
* Option specifications:
*/
-static Tk_OptionSpec RadiobuttonOptionSpecs[] =
+static const Tk_OptionSpec RadiobuttonOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
@@ -763,7 +763,7 @@ typedef struct
static const char *directionStrings[] = {
"above", "below", "left", "right", "flush", NULL
};
-static Tk_OptionSpec MenubuttonOptionSpecs[] =
+static const Tk_OptionSpec MenubuttonOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 157962e..b2f75ad 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkEntry.c,v 1.4 2006/12/17 21:09:46 jenglish Exp $
+ * $Id: ttkEntry.c,v 1.5 2007/01/03 05:06:25 nijtmans Exp $
*
* DERIVED FROM: tk/generic/tkEntry.c r1.35.
*
@@ -158,7 +158,7 @@ typedef struct
#define DEF_ENTRY_FONT "TkTextFont"
#define DEF_LIST_HEIGHT "10"
-static Tk_OptionSpec EntryOptionSpecs[] =
+static const Tk_OptionSpec EntryOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
@@ -1690,7 +1690,7 @@ typedef struct {
ComboboxPart combobox;
} Combobox;
-static Tk_OptionSpec ComboboxOptionSpecs[] =
+static const Tk_OptionSpec ComboboxOptionSpecs[] =
{
{TK_OPTION_STRING, "-height", "height", "Height",
DEF_LIST_HEIGHT, Tk_Offset(Combobox, combobox.heightObj), -1,
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index 5ed6272..b4b8654 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -1,4 +1,4 @@
-/* $Id: ttkFrame.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkFrame.c,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2004, Joe English
*
* ttk::frame and ttk::labelframe widgets.
@@ -29,7 +29,7 @@ typedef struct
FramePart frame;
} Frame;
-static Tk_OptionSpec FrameOptionSpecs[] =
+static const Tk_OptionSpec FrameOptionSpecs[] =
{
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", NULL,
Tk_Offset(Frame,frame.borderWidthObj), -1,
@@ -250,7 +250,7 @@ typedef struct
#define LABELWIDGET_CHANGED 0x100
-static Tk_OptionSpec LabelframeOptionSpecs[] =
+static const Tk_OptionSpec LabelframeOptionSpecs[] =
{
{TK_OPTION_STRING, "-labelanchor", "labelAnchor", "LabelAnchor",
"nw", Tk_Offset(Labelframe, label.labelAnchorObj),-1,
@@ -480,7 +480,7 @@ static void LabelframeLostSlave(ClientData clientData, Tk_Window slaveWindow)
Ttk_LostSlaveProc(clientData, slaveWindow);
}
-static Tk_OptionSpec LabelOptionSpecs[] = {
+static const Tk_OptionSpec LabelOptionSpecs[] = {
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0, 0,0}
};
diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c
index 38197b2..f12a01b 100644
--- a/generic/ttk/ttkInit.c
+++ b/generic/ttk/ttkInit.c
@@ -1,4 +1,4 @@
-/* $Id: ttkInit.c,v 1.4 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkInit.c,v 1.5 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2003, Joe English
*
* Ttk package: initialization routine and miscellaneous utilities.
@@ -13,7 +13,7 @@
* Legal values for the button -default option.
* See also: enum Ttk_ButtonDefaultState.
*/
-CONST char *ttkDefaultStrings[] = {
+const char *ttkDefaultStrings[] = {
"normal", "active", "disabled", NULL
};
@@ -131,7 +131,7 @@ void TtkSendVirtualEvent(Tk_Window tgtWin, const char *eventName)
* Common factors for data accessor commands.
*/
int TtkEnumerateOptions(
- Tcl_Interp *interp, void *recordPtr, Tk_OptionSpec *specPtr,
+ Tcl_Interp *interp, void *recordPtr, const Tk_OptionSpec *specPtr,
Tk_OptionTable optionTable, Tk_Window tkwin)
{
Tcl_Obj *result = Tcl_NewListObj(0,0);
diff --git a/generic/ttk/ttkManager.h b/generic/ttk/ttkManager.h
index bf057c3..5c7fce8 100644
--- a/generic/ttk/ttkManager.h
+++ b/generic/ttk/ttkManager.h
@@ -1,4 +1,4 @@
-/* $Id: ttkManager.h,v 1.3 2006/11/03 15:42:42 patthoyts Exp $
+/* $Id: ttkManager.h,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
*
* Copyright (c) 2005, Joe English. Freely redistributable.
*
@@ -31,7 +31,7 @@ typedef struct TtkSlave_ Ttk_Slave; /* forward */
*/
typedef struct { /* Manager hooks */
Tk_GeomMgr tkGeomMgr; /* "real" Tk Geometry Manager */
- Tk_OptionSpec *slaveOptionSpecs; /* slave record options */
+ const Tk_OptionSpec *slaveOptionSpecs; /* slave record options */
size_t slaveSize; /* size of slave record */
int (*RequestedSize)(void *managerData, int *widthPtr, int *heightPtr);
@@ -59,7 +59,7 @@ struct TtkSlave_
struct TtkManager_
{
- Ttk_ManagerSpec *managerSpec;
+ const Ttk_ManagerSpec *managerSpec;
void *managerData;
Tk_Window masterWindow;
Tk_OptionTable slaveOptionTable;
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 70450af..de499ce 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -1,4 +1,4 @@
-/* $Id: ttkNotebook.c,v 1.4 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkNotebook.c,v 1.5 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2004, Joe English
*
* NOTE-ACTIVE: activeTabIndex is not always correct (it's
@@ -62,7 +62,7 @@ typedef struct
* PaneOptionSpecs includes additional options for child window placement
* and is used to configure the slave.
*/
-static Tk_OptionSpec TabOptionSpecs[] =
+static const Tk_OptionSpec TabOptionSpecs[] =
{
{TK_OPTION_STRING_TABLE, "-state", "", "",
"normal", -1,Tk_Offset(Tab,state),
@@ -79,7 +79,7 @@ static Tk_OptionSpec TabOptionSpecs[] =
{TK_OPTION_END}
};
-static Tk_OptionSpec PaneOptionSpecs[] =
+static const Tk_OptionSpec PaneOptionSpecs[] =
{
{TK_OPTION_STRING, "-padding", "padding", "Padding", "0",
Tk_Offset(Tab,paddingObj), -1, 0,0,GEOMETRY_CHANGED },
@@ -114,7 +114,7 @@ typedef struct
NotebookPart notebook;
} Notebook;
-static Tk_OptionSpec NotebookOptionSpecs[] =
+static const Tk_OptionSpec NotebookOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index cb0502a..840f160 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -1,4 +1,4 @@
-/* $Id: ttkPanedwindow.c,v 1.7 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkPanedwindow.c,v 1.8 2007/01/03 05:06:25 nijtmans Exp $
*
* Copyright (c) 2005, Joe English. Freely redistributable.
*
@@ -75,7 +75,7 @@ typedef struct {
/* @@@ NOTE: -orient is readonly 'cause dynamic oriention changes NYI
*/
-static Tk_OptionSpec PanedOptionSpecs[] = {
+static const Tk_OptionSpec PanedOptionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "vertical",
Tk_Offset(Paned,paned.orientObj), Tk_Offset(Paned,paned.orient),
0,(ClientData)ttkOrientStrings,READONLY_OPTION|STYLE_CHANGED },
@@ -92,7 +92,7 @@ typedef struct {
int weight; /* Pane -weight, for resizing */
} Pane;
-static Tk_OptionSpec PaneOptionSpecs[] = {
+static const Tk_OptionSpec PaneOptionSpecs[] = {
{TK_OPTION_INT, "-weight", "weight", "Weight", "0",
-1,Tk_Offset(Pane,weight), 0,0,GEOMETRY_CHANGED },
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index 4b442d3..1ae7b57 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -1,4 +1,4 @@
-/* $Id: ttkProgress.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkProgress.c,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
*
* Copyright (c) Joe English, Pat Thoyts, Michael Kirkham
*
@@ -45,7 +45,7 @@ typedef struct {
ProgressbarPart progress;
} Progressbar;
-static Tk_OptionSpec ProgressbarOptionSpecs[] =
+static const Tk_OptionSpec ProgressbarOptionSpecs[] =
{
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
"horizontal", Tk_Offset(Progressbar,progress.orientObj), -1,
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 6cf3cbb..9bb60ce 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScale.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkScale.c,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
*
* ttk::scale widget.
@@ -43,7 +43,7 @@ typedef struct
ScalePart scale;
} Scale;
-static Tk_OptionSpec ScaleOptionSpecs[] =
+static const Tk_OptionSpec ScaleOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index ab32208..48c62e3 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScrollbar.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkScrollbar.c,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2003, Joe English
*
* ttk::scrollbar widget.
@@ -32,7 +32,7 @@ typedef struct
ScrollbarPart scrollbar;
} Scrollbar;
-static Tk_OptionSpec ScrollbarOptionSpecs[] =
+static const Tk_OptionSpec ScrollbarOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
Tk_Offset(Scrollbar,scrollbar.commandObj), -1, 0,0,0},
diff --git a/generic/ttk/ttkSeparator.c b/generic/ttk/ttkSeparator.c
index 9781e98..614c92c 100644
--- a/generic/ttk/ttkSeparator.c
+++ b/generic/ttk/ttkSeparator.c
@@ -1,4 +1,4 @@
-/* $Id: ttkSeparator.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkSeparator.c,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
*
* Copyright (c) 2004, Joe English
*
@@ -24,7 +24,7 @@ typedef struct
SeparatorPart separator;
} Separator;
-static Tk_OptionSpec SeparatorOptionSpecs[] =
+static const Tk_OptionSpec SeparatorOptionSpecs[] =
{
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal",
Tk_Offset(Separator,separator.orientObj),
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index e9c9bcb..86e4fbf 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -2,7 +2,7 @@
*
* Minimal sample ttk widget.
*
- * $Id: ttkSquare.c,v 1.2 2006/11/03 03:06:22 das Exp $
+ * $Id: ttkSquare.c,v 1.3 2007/01/03 05:06:25 nijtmans Exp $
*/
#include <tk.h>
@@ -50,7 +50,7 @@ typedef struct
* defined for all widgets.
*/
-static Tk_OptionSpec SquareOptionSpecs[] =
+static const Tk_OptionSpec SquareOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index a7b913d..0314b87 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTreeview.c,v 1.10 2006/12/18 19:41:19 jenglish Exp $
+/* $Id: ttkTreeview.c,v 1.11 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2004, Joe English
*
* ttk::treeview widget implementation.
@@ -52,7 +52,7 @@ struct TreeItemRec
Tcl_Obj *tagsObj;
};
-static Tk_OptionSpec ItemOptionSpecs[] =
+static const Tk_OptionSpec ItemOptionSpecs[] =
{
{TK_OPTION_STRING, "-text", "text", "Text",
"", Tk_Offset(TreeItem,textObj), -1,
@@ -174,7 +174,7 @@ typedef struct {
Tcl_Obj *fontObj;
} DisplayItem;
-static Tk_OptionSpec TagOptionSpecs[] =
+static const Tk_OptionSpec TagOptionSpecs[] =
{
{TK_OPTION_STRING, "-text", "text", "Text",
NULL, Tk_Offset(DisplayItem,textObj), -1,
@@ -259,7 +259,7 @@ static void FreeColumn(TreeColumn *column)
/* Don't touch column->data, it's scratch storage */
}
-static Tk_OptionSpec ColumnOptionSpecs[] =
+static const Tk_OptionSpec ColumnOptionSpecs[] =
{
{TK_OPTION_INT, "-width", "width", "Width",
DEF_COLWIDTH, -1, Tk_Offset(TreeColumn,width),
@@ -279,7 +279,7 @@ static Tk_OptionSpec ColumnOptionSpecs[] =
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
};
-static Tk_OptionSpec HeadingOptionSpecs[] =
+static const Tk_OptionSpec HeadingOptionSpecs[] =
{
{TK_OPTION_STRING, "-text", "text", "Text",
"", Tk_Offset(TreeColumn,headingObj), -1,
@@ -425,7 +425,7 @@ typedef struct {
static const char *SelectModeStrings[] = { "none", "browse", "extended", NULL };
-static Tk_OptionSpec TreeviewOptionSpecs[] =
+static const Tk_OptionSpec TreeviewOptionSpecs[] =
{
WIDGET_TAKES_FOCUS,
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index 8dc3de6..7a9ca26 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -1,4 +1,4 @@
-/* $Id: ttkWidget.c,v 1.3 2006/11/27 06:53:55 jenglish Exp $
+/* $Id: ttkWidget.c,v 1.4 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2003, Joe English
*
* Ttk widget implementation, core widget utilities.
@@ -145,7 +145,7 @@ void TtkWidgetChangeState(WidgetCore *corePtr,
* Invoke an ensemble defined by a WidgetCommandSpec.
*/
int TtkWidgetEnsembleCommand(
- WidgetCommandSpec *commands, /* Ensemble definition */
+ const WidgetCommandSpec *commands, /* Ensemble definition */
int cmdIndex, /* Index of command word */
Tcl_Interp *interp, /* Interpreter to use */
int objc, Tcl_Obj *const objv[], /* Argument vector */
@@ -174,10 +174,10 @@ WidgetInstanceObjCmd(
ClientData clientData, /* Widget record pointer */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- Tcl_Obj * CONST objv[]) /* Argument objects. */
+ Tcl_Obj * const objv[]) /* Argument objects. */
{
WidgetCore *corePtr = (WidgetCore *)clientData;
- WidgetCommandSpec *commands = corePtr->widgetSpec->commands;
+ const WidgetCommandSpec *commands = corePtr->widgetSpec->commands;
int status = TCL_OK;
Tcl_Preserve(clientData);
diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h
index 035e464..d5ac472 100644
--- a/generic/ttk/ttkWidget.h
+++ b/generic/ttk/ttkWidget.h
@@ -1,4 +1,4 @@
-/* $Id: ttkWidget.h,v 1.4 2006/12/14 19:51:04 jenglish Exp $
+/* $Id: ttkWidget.h,v 1.5 2007/01/03 05:06:25 nijtmans Exp $
* Copyright (c) 2003, Joe English
* Helper routines for widget implementations.
*/
@@ -59,7 +59,7 @@ typedef struct {
} WidgetCommandSpec;
MODULE_SCOPE int TtkWidgetEnsembleCommand( /* Run an ensemble command */
- WidgetCommandSpec *commands, int cmdIndex,
+ const WidgetCommandSpec *commands, int cmdIndex,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr);
/*
@@ -69,8 +69,8 @@ struct WidgetSpec_
{
const char *className; /* Widget class name */
size_t recordSize; /* #bytes in widget record */
- Tk_OptionSpec *optionSpecs; /* Option specifications */
- WidgetCommandSpec *commands; /* Widget instance subcommands */
+ const Tk_OptionSpec *optionSpecs; /* Option specifications */
+ const WidgetCommandSpec *commands; /* Widget instance subcommands */
/*
* Hooks:
@@ -173,7 +173,7 @@ MODULE_SCOPE void TtkSendVirtualEvent(Tk_Window tgtWin, const char *eventName);
* Helper routines for data accessor commands:
*/
MODULE_SCOPE int TtkEnumerateOptions(
- Tcl_Interp *, void *recordPtr, Tk_OptionSpec *, Tk_OptionTable, Tk_Window);
+ Tcl_Interp *, void *recordPtr, const Tk_OptionSpec *, Tk_OptionTable, Tk_Window);
MODULE_SCOPE int TtkGetOptionValue(
Tcl_Interp *, void *recordPtr, Tcl_Obj *optName, Tk_OptionTable, Tk_Window);