summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-01-13 23:08:06 (GMT)
committernijtmans <nijtmans>2010-01-13 23:08:06 (GMT)
commit353d7693729fb7a45a35be7158fc4b94db079735 (patch)
tree1f472912658d183c50de332bc66a33540b44f060 /generic
parent15e42ed5b2cbc9b9a5802d75268d97f302ac23c0 (diff)
downloadtk-353d7693729fb7a45a35be7158fc4b94db079735.zip
tk-353d7693729fb7a45a35be7158fc4b94db079735.tar.gz
tk-353d7693729fb7a45a35be7158fc4b94db079735.tar.bz2
Eliminate tkpMenubuttonClass
make tkpButtonProcs CONST fix gcc warnings: missing initializer
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBusy.c4
-rw-r--r--generic/tkButton.c4
-rw-r--r--generic/tkButton.h4
-rw-r--r--generic/tkCanvas.c6
-rw-r--r--generic/tkConsole.c5
-rw-r--r--generic/tkEntry.c6
-rw-r--r--generic/tkFrame.c8
-rw-r--r--generic/tkListbox.c6
-rw-r--r--generic/tkMenu.c8
-rw-r--r--generic/tkMenubutton.c16
-rw-r--r--generic/tkMenubutton.h8
-rw-r--r--generic/tkMessage.c6
-rw-r--r--generic/tkScale.c6
-rw-r--r--generic/tkScrollbar.h4
-rw-r--r--generic/tkText.c6
-rw-r--r--generic/ttk/ttkWidget.c10
16 files changed, 66 insertions, 41 deletions
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 4a6c5cb..6f200c3 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.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: tkBusy.c,v 1.6 2008/12/10 00:34:51 das Exp $
+ * RCS: @(#) $Id: tkBusy.c,v 1.7 2010/01/13 23:08:09 nijtmans Exp $
*/
#include "tkInt.h"
@@ -29,7 +29,7 @@ static Tk_OptionSpec busyOptionSpecs[] = {
DEF_BUSY_CURSOR, -1, Tk_Offset(Busy, cursor),
TK_OPTION_NULL_OK, 0, 0},
#endif
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
/*
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 70b77d0..38b374d 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.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: tkButton.c,v 1.36 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkButton.c,v 1.37 2010/01/13 23:08:07 nijtmans Exp $
*/
#include "tkInt.h"
@@ -144,7 +144,7 @@ static Tk_OptionSpec labelOptionSpecs[] = {
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
DEF_BUTTON_WRAP_LENGTH, Tk_Offset(TkButton, wrapLengthPtr),
Tk_Offset(TkButton, wrapLength), 0, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
static Tk_OptionSpec buttonOptionSpecs[] = {
diff --git a/generic/tkButton.h b/generic/tkButton.h
index 738626c..6eb1ce5 100644
--- a/generic/tkButton.h
+++ b/generic/tkButton.h
@@ -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: tkButton.h,v 1.16 2007/12/13 15:24:13 dgp Exp $
+ * RCS: @(#) $Id: tkButton.h,v 1.17 2010/01/13 23:08:07 nijtmans Exp $
*/
#ifndef _TKBUTTON
@@ -298,7 +298,7 @@ typedef struct {
* Declaration of variables shared between the files in the button module.
*/
-MODULE_SCOPE Tk_ClassProcs tkpButtonProcs;
+MODULE_SCOPE const Tk_ClassProcs tkpButtonProcs;
/*
* Declaration of functions used in the implementation of the button widget.
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index f14d2d0..d49297a 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.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: tkCanvas.c,v 1.61 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.62 2010/01/13 23:08:08 nijtmans Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -323,9 +323,11 @@ static Tk_Item * TagSearchNext(TagSearch *searchPtr);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs canvasClass = {
+static const Tk_ClassProcs canvasClass = {
sizeof(Tk_ClassProcs), /* size */
CanvasWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index a2d348d..7f496fb 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.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: tkConsole.c,v 1.40 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.41 2010/01/13 23:08:09 nijtmans Exp $
*/
#include "tkInt.h"
@@ -66,7 +66,7 @@ static int InterpreterObjCmd(ClientData clientData, Tcl_Interp *interp,
* This structure describes the channel type structure for file based IO:
*/
-static Tcl_ChannelType consoleChannelType = {
+static const Tcl_ChannelType consoleChannelType = {
"console", /* Type name. */
TCL_CHANNEL_VERSION_4, /* v4 channel */
ConsoleClose, /* Close proc. */
@@ -83,6 +83,7 @@ static Tcl_ChannelType consoleChannelType = {
NULL, /* handler proc. */
NULL, /* wide seek proc */
NULL, /* thread action proc */
+ NULL
};
#ifdef __WIN32__
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index c5181f8..93f14a2 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.59 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.60 2010/01/13 23:08:10 nijtmans Exp $
*/
#include "tkInt.h"
@@ -448,9 +448,11 @@ static int ComputeFormat(Spinbox *sbPtr);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs entryClass = {
+static const Tk_ClassProcs entryClass = {
sizeof(Tk_ClassProcs), /* size */
EntryWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index c204742..eea7e9d 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.39 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.40 2010/01/13 23:08:08 nijtmans Exp $
*/
#include "default.h"
@@ -329,9 +329,11 @@ static void MapFrame(ClientData clientData);
* can be invoked from generic window code.
*/
-static Tk_ClassProcs frameClass = {
+static const Tk_ClassProcs frameClass = {
sizeof(Tk_ClassProcs), /* size */
- FrameWorldChanged /* worldChangedProc */
+ FrameWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 1f23531..e651f97 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.57 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.58 2010/01/13 23:08:06 nijtmans Exp $
*/
#include "default.h"
@@ -436,9 +436,11 @@ static void MigrateHashEntries(Tcl_HashTable *table,
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs listboxClass = {
+static const Tk_ClassProcs listboxClass = {
sizeof(Tk_ClassProcs), /* size */
ListboxWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 4f97eb9..a8119d6 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.56 2010/01/05 09:40:46 dkf Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.57 2010/01/13 23:08:09 nijtmans Exp $
*/
/*
@@ -373,9 +373,11 @@ static void TkMenuCleanup(ClientData unused);
* geometry proc to be called.
*/
-static Tk_ClassProcs menuClass = {
+static const Tk_ClassProcs menuClass = {
sizeof(Tk_ClassProcs), /* size */
- MenuWorldChanged /* worldChangedProc */
+ MenuWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index e94fdd1..a4c42ed 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.26 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkMenubutton.c,v 1.27 2010/01/13 23:08:07 nijtmans Exp $
*/
#include "tkInt.h"
@@ -18,6 +18,18 @@
#include "default.h"
/*
+ * The structure below defines menubutton class behavior by means of
+ * procedures that can be invoked from generic window code.
+ */
+
+static const Tk_ClassProcs menubuttonClass = {
+ sizeof(Tk_ClassProcs), /* size */
+ TkMenuButtonWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
+};
+
+/*
* The following table defines the legal values for the -direction option. It
* is used together with the "enum direction" declaration in tkMenubutton.h.
*/
@@ -236,7 +248,7 @@ Tk_MenubuttonObjCmd(
Tk_SetClass(tkwin, "Menubutton");
mbPtr = TkpCreateMenuButton(tkwin);
- Tk_SetClassProcs(tkwin, &tkpMenubuttonClass, mbPtr);
+ Tk_SetClassProcs(tkwin, &menubuttonClass, mbPtr);
/*
* Initialize the data structure for the button.
diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h
index 84c119d..ded69a1 100644
--- a/generic/tkMenubutton.h
+++ b/generic/tkMenubutton.h
@@ -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: tkMenubutton.h,v 1.14 2007/12/13 15:24:16 dgp Exp $
+ * RCS: @(#) $Id: tkMenubutton.h,v 1.15 2010/01/13 23:08:07 nijtmans Exp $
*/
#ifndef _TKMENUBUTTON
@@ -211,12 +211,6 @@ typedef struct {
#define INDICATOR_HEIGHT 17
/*
- * Declaration of variables shared between the files in the button module.
- */
-
-MODULE_SCOPE Tk_ClassProcs tkpMenubuttonClass;
-
-/*
* Declaration of procedures used in the implementation of the button widget.
*/
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index e4ee15b..78238c1 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.23 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkMessage.c,v 1.24 2010/01/13 23:08:09 nijtmans Exp $
*/
#include "default.h"
@@ -190,9 +190,11 @@ static void DisplayMessage(ClientData clientData);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs messageClass = {
+static const Tk_ClassProcs messageClass = {
sizeof(Tk_ClassProcs), /* size */
MessageWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 816bf54..d99a8dd 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.34 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkScale.c,v 1.35 2010/01/13 23:08:10 nijtmans Exp $
*/
#include "default.h"
@@ -177,9 +177,11 @@ static void ScaleSetVariable(TkScale *scalePtr);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs scaleClass = {
+static const Tk_ClassProcs scaleClass = {
sizeof(Tk_ClassProcs), /* size */
ScaleWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index 70acab2..11ea5c6 100644
--- a/generic/tkScrollbar.h
+++ b/generic/tkScrollbar.h
@@ -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: tkScrollbar.h,v 1.8 2005/11/27 02:36:14 das Exp $
+ * RCS: @(#) $Id: tkScrollbar.h,v 1.9 2010/01/13 23:08:08 nijtmans Exp $
*/
#ifndef _TKSCROLLBAR
@@ -167,7 +167,7 @@ typedef struct TkScrollbar {
* Declaration of scrollbar class functions structure.
*/
-MODULE_SCOPE Tk_ClassProcs tkpScrollbarProcs;
+MODULE_SCOPE const Tk_ClassProcs tkpScrollbarProcs;
/*
* Declaration of scrollbar configuration options.
diff --git a/generic/tkText.c b/generic/tkText.c
index a7d966a..e36a2a1 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.93 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.94 2010/01/13 23:08:08 nijtmans Exp $
*/
#include "default.h"
@@ -428,9 +428,11 @@ static SearchLineIndexProc TextSearchGetLineIndex;
* can be invoked from generic window code.
*/
-static Tk_ClassProcs textClass = {
+static const Tk_ClassProcs textClass = {
sizeof(Tk_ClassProcs), /* size */
TextWorldChangedCallback, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index e64f1f1..de29d35 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -1,4 +1,4 @@
-/* $Id: ttkWidget.c,v 1.22 2009/11/01 18:12:44 jenglish Exp $
+/* $Id: ttkWidget.c,v 1.23 2010/01/13 23:08:13 nijtmans Exp $
* Copyright (c) 2003, Joe English
*
* Core widget utilities.
@@ -359,9 +359,11 @@ static void WidgetWorldChanged(ClientData clientData)
TtkRedisplayWidget(corePtr);
}
-static struct Tk_ClassProcs widgetClassProcs = {
- sizeof(Tk_ClassProcs),
- WidgetWorldChanged
+static Tk_ClassProcs widgetClassProcs = {
+ sizeof(Tk_ClassProcs), /* size */
+ WidgetWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*