summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-10 14:16:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-10 14:16:43 (GMT)
commitbb8d9aebf440076e8f77a67d821ef3d348919210 (patch)
tree177bd4c55a88ff932b7a4b17d8d40c7cc990c912
parentd470101c48044a8fdc3926a0aa2b350f2d8a30ce (diff)
parenta864407700fb5198a61456caa65624323415e744 (diff)
downloadtk-bb8d9aebf440076e8f77a67d821ef3d348919210.zip
tk-bb8d9aebf440076e8f77a67d821ef3d348919210.tar.gz
tk-bb8d9aebf440076e8f77a67d821ef3d348919210.tar.bz2
4 more usages of Tk_GetPixelsFromObj(). Remove duplicated MODULE_SCOPE definitions
-rw-r--r--generic/ttk/ttkButton.c6
-rw-r--r--generic/ttk/ttkClamTheme.c1
-rw-r--r--generic/ttk/ttkClassicTheme.c11
-rw-r--r--generic/ttk/ttkDefaultTheme.c4
-rw-r--r--generic/ttk/ttkElements.c11
-rw-r--r--generic/ttk/ttkEntry.c6
-rw-r--r--generic/ttk/ttkFrame.c7
-rw-r--r--generic/ttk/ttkImage.c7
-rw-r--r--generic/ttk/ttkLabel.c7
-rw-r--r--generic/ttk/ttkNotebook.c7
-rw-r--r--generic/ttk/ttkPanedwindow.c21
-rw-r--r--generic/ttk/ttkProgress.c7
-rw-r--r--generic/ttk/ttkScale.c6
-rw-r--r--generic/ttk/ttkScrollbar.c7
-rw-r--r--generic/ttk/ttkSeparator.c7
-rw-r--r--generic/ttk/ttkSquare.c3
-rw-r--r--generic/ttk/ttkTheme.c12
-rw-r--r--generic/ttk/ttkTreeview.c7
-rw-r--r--generic/ttk/ttkWidget.c5
-rw-r--r--macosx/ttkMacOSXTheme.c9
-rw-r--r--win/tkWinTest.c9
-rw-r--r--win/ttkWinTheme.c9
-rw-r--r--win/ttkWinXPTheme.c2
23 files changed, 60 insertions, 111 deletions
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index 8ed8bee..ce1f323 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -870,10 +870,8 @@ TTK_END_LAYOUT
* +++ Initialization.
*/
-MODULE_SCOPE void TtkButton_Init(Tcl_Interp *);
-
-MODULE_SCOPE
-void TtkButton_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkButton_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index fca1065..caa58b7 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -1195,7 +1195,6 @@ TTK_END_LAYOUT_TABLE
/*------------------------------------------------------------------------
* +++ Initialization.
*/
-MODULE_SCOPE int TtkClamTheme_Init(Tcl_Interp *);
MODULE_SCOPE int
TtkClamTheme_Init(Tcl_Interp *interp)
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index 485d03b..c40990f 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -35,7 +35,7 @@ static const Ttk_ElementOptionSpec HighlightElementOptions[] = {
static void HighlightElementSize(
TCL_UNUSED(void *), /* clientData */
void *elementRecord,
- TCL_UNUSED(Tk_Window),
+ Tk_Window tkwin,
TCL_UNUSED(int *), /* widthPtr */
TCL_UNUSED(int *), /* heightPtr */
Ttk_Padding *paddingPtr)
@@ -43,7 +43,7 @@ static void HighlightElementSize(
HighlightElement *hl = (HighlightElement *)elementRecord;
int highlightThickness = 0;
- Tcl_GetIntFromObj(NULL,hl->highlightThicknessObj,&highlightThickness);
+ Tk_GetPixelsFromObj(NULL, tkwin, hl->highlightThicknessObj, &highlightThickness);
*paddingPtr = Ttk_UniformPadding((short)highlightThickness);
}
@@ -60,7 +60,7 @@ static void HighlightElementDraw(
Ttk_ButtonDefaultState defaultState = TTK_BUTTON_DEFAULT_DISABLED;
XColor *highlightColor = Tk_GetColorFromObj(tkwin, hl->highlightColorObj);
- Tcl_GetIntFromObj(NULL,hl->highlightThicknessObj,&highlightThickness);
+ Tk_GetPixelsFromObj(NULL, tkwin, hl->highlightThicknessObj, &highlightThickness);
if (highlightColor && highlightThickness > 0) {
Ttk_GetButtonDefaultStateFromObj(NULL, hl->defaultStateObj, &defaultState);
GC gc = Tk_GCForColor(highlightColor, d);
@@ -880,9 +880,8 @@ TTK_END_LAYOUT_TABLE
* Install classic theme.
*/
-MODULE_SCOPE int TtkClassicTheme_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE int TtkClassicTheme_Init(Tcl_Interp *interp)
+MODULE_SCOPE int
+TtkClassicTheme_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_CreateTheme(interp, "classic", NULL);
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index d5d161b..3cfa8c0 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -1290,9 +1290,9 @@ static const Ttk_ElementSpec TreeitemIndicatorElementSpec = {
* TtkAltTheme_Init --
* Install alternate theme.
*/
-MODULE_SCOPE int TtkAltTheme_Init(Tcl_Interp *interp);
-MODULE_SCOPE int TtkAltTheme_Init(Tcl_Interp *interp)
+MODULE_SCOPE int
+TtkAltTheme_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_CreateTheme(interp, "alt", NULL);
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index ddbd02b..3206cc9 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -320,7 +320,7 @@ static const Ttk_ElementOptionSpec PaddingElementOptions[] = {
offsetof(PaddingElement,paddingObj), "0" },
{ "-relief", TK_OPTION_RELIEF,
offsetof(PaddingElement,reliefObj), "flat" },
- { "-shiftrelief", TK_OPTION_INT,
+ { "-shiftrelief", TK_OPTION_PIXELS,
offsetof(PaddingElement,shiftreliefObj), "0" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
};
@@ -339,7 +339,7 @@ static void PaddingElementSize(
Ttk_Padding pad;
Tk_GetReliefFromObj(NULL, padding->reliefObj, &relief);
- Tcl_GetIntFromObj(NULL, padding->shiftreliefObj, &shiftRelief);
+ Tk_GetPixelsFromObj(NULL, tkwin, padding->shiftreliefObj, &shiftRelief);
Ttk_GetPaddingFromObj(NULL,tkwin,padding->paddingObj,&pad);
*paddingPtr = Ttk_RelievePadding(pad, relief, shiftRelief);
}
@@ -1876,11 +1876,8 @@ static const Ttk_ElementSpec ClientElementSpec = {
* Register default element implementations.
*/
-MODULE_SCOPE
-void TtkElements_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkElements_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkElements_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index d59eef8..c279ed8 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -2141,11 +2141,9 @@ TTK_END_LAYOUT
/*------------------------------------------------------------------------
* +++ Initialization.
*/
-MODULE_SCOPE
-void TtkEntry_Init(Tcl_Interp *interp);
-MODULE_SCOPE
-void TtkEntry_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkEntry_Init(Tcl_Interp *interp)
{
Ttk_Theme themePtr = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index 787d494..cd877f3 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -655,11 +655,8 @@ TTK_END_LAYOUT
* +++ Initialization.
*/
-MODULE_SCOPE
-void TtkFrame_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkFrame_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkFrame_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c
index 56b15f2..35ec36f 100644
--- a/generic/ttk/ttkImage.c
+++ b/generic/ttk/ttkImage.c
@@ -466,11 +466,8 @@ error:
return TCL_ERROR;
}
-MODULE_SCOPE
-void TtkImage_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkImage_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkImage_Init(Tcl_Interp *interp)
{
Ttk_RegisterElementFactory(interp, "image", Ttk_CreateImageElement, NULL);
}
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index 1903367..f28b90f 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -762,11 +762,8 @@ static const Ttk_ElementSpec LabelElementSpec = {
* +++ Initialization.
*/
-MODULE_SCOPE
-void TtkLabel_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkLabel_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkLabel_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index c08179f..f8198cc 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -1432,11 +1432,8 @@ TTK_END_LAYOUT
* +++ Initialization.
*/
-MODULE_SCOPE
-void TtkNotebook_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkNotebook_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkNotebook_Init(Tcl_Interp *interp)
{
Ttk_Theme themePtr = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index 7cd2fd9..f0ed4de 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -733,11 +733,10 @@ static int PanedIdentifyCommand(
return TCL_ERROR;
}
- if ( Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
- || Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK
- || (objc == 5 && Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable,
- sizeof(char *), "option", 0, &what) != TCL_OK)
- ) {
+ if (Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
+ || Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK
+ || (objc == 5 && Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable,
+ sizeof(char *), "option", 0, &what) != TCL_OK)) {
return TCL_ERROR;
}
@@ -929,7 +928,7 @@ typedef struct {
} SashElement;
static const Ttk_ElementOptionSpec SashElementOptions[] = {
- { "-sashthickness", TK_OPTION_INT,
+ { "-sashthickness", TK_OPTION_PIXELS,
offsetof(SashElement,thicknessObj), "5" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
};
@@ -937,7 +936,7 @@ static const Ttk_ElementOptionSpec SashElementOptions[] = {
static void SashElementSize(
TCL_UNUSED(void *), /* clientData */
void *elementRecord,
- TCL_UNUSED(Tk_Window),
+ Tk_Window tkwin,
int *widthPtr,
int *heightPtr,
TCL_UNUSED(Ttk_Padding *))
@@ -945,7 +944,7 @@ static void SashElementSize(
SashElement *sash = (SashElement *)elementRecord;
int thickness = DEFAULT_SASH_THICKNESS;
- Tcl_GetIntFromObj(NULL, sash->thicknessObj, &thickness);
+ Tk_GetPixelsFromObj(NULL, tkwin, sash->thicknessObj, &thickness);
*widthPtr = *heightPtr = thickness;
}
@@ -972,11 +971,9 @@ TTK_END_LAYOUT
/*------------------------------------------------------------------------
* +++ Registration routine.
*/
-MODULE_SCOPE
-void TtkPanedwindow_Init(Tcl_Interp *interp);
-MODULE_SCOPE
-void TtkPanedwindow_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkPanedwindow_Init(Tcl_Interp *interp)
{
Ttk_Theme themePtr = Ttk_GetDefaultTheme(interp);
RegisterWidget(interp, "ttk::panedwindow", &PanedWidgetSpec);
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index bbc8df2..5584d9b 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -568,11 +568,8 @@ TTK_END_LAYOUT
* Initialization:
*/
-MODULE_SCOPE
-void TtkProgressbar_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkProgressbar_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkProgressbar_Init(Tcl_Interp *interp)
{
Ttk_Theme themePtr = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index fbf7482..ec2343a 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -520,11 +520,9 @@ TTK_END_LAYOUT
/*
* Initialization.
*/
-MODULE_SCOPE
-void TtkScale_Init(Tcl_Interp *interp);
-MODULE_SCOPE
-void TtkScale_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkScale_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index 9613892..03eb3d6 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -332,11 +332,8 @@ TTK_END_LAYOUT
* +++ Initialization.
*/
-MODULE_SCOPE
-void TtkScrollbar_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkScrollbar_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkScrollbar_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkSeparator.c b/generic/ttk/ttkSeparator.c
index bc26bd3..fa8c37d 100644
--- a/generic/ttk/ttkSeparator.c
+++ b/generic/ttk/ttkSeparator.c
@@ -122,11 +122,8 @@ TTK_END_LAYOUT
/* +++ Initialization:
*/
-MODULE_SCOPE
-void TtkSeparator_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkSeparator_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkSeparator_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index 0bcaa16..3022f1a 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -289,9 +289,6 @@ TTK_END_LAYOUT
* free to specify a new style using completely different elements.
*/
-MODULE_SCOPE int
-TtkSquareWidget_Init(Tcl_Interp *interp);
-
/* public */ MODULE_SCOPE int
TtkSquareWidget_Init(Tcl_Interp *interp)
{
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index a664fec..c60dd13 100644
--- a/generic/ttk/ttkTheme.c
+++ b/generic/ttk/ttkTheme.c
@@ -681,8 +681,8 @@ Ttk_GetResourceCache(Tcl_Interp *interp)
* Register a new layout specification with a style.
* @@@ TODO: Make sure layoutName is not ".", root style must not have a layout
*/
-MODULE_SCOPE
-void Ttk_RegisterLayoutTemplate(
+MODULE_SCOPE void
+Ttk_RegisterLayoutTemplate(
Ttk_Theme theme, /* Target theme */
const char *layoutName, /* Name of new layout */
Ttk_LayoutTemplate layoutTemplate) /* Template */
@@ -1145,8 +1145,8 @@ Ttk_DrawElement(
* Side effects: Sets interp's result.
*/
-MODULE_SCOPE
-int TtkEnumerateHashTable(Tcl_Interp *interp, Tcl_HashTable *ht)
+MODULE_SCOPE int
+TtkEnumerateHashTable(Tcl_Interp *interp, Tcl_HashTable *ht)
{
Tcl_HashSearch search;
Tcl_Obj *result = Tcl_NewListObj(0, NULL);
@@ -1721,8 +1721,8 @@ StyleObjCmd(
return Ttk_InvokeEnsemble(StyleEnsemble, 1, clientData,interp,objc,objv);
}
-MODULE_SCOPE
-int Ttk_InvokeEnsemble( /* Run an ensemble command */
+MODULE_SCOPE int
+Ttk_InvokeEnsemble( /* Run an ensemble command */
const Ttk_Ensemble *ensemble, Tcl_Size cmdIndex,
void *clientData, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 5880a49..9ca5d02 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -4615,11 +4615,8 @@ static const Ttk_ElementSpec RowElementSpec = {
* +++ Initialisation.
*/
-MODULE_SCOPE
-void TtkTreeview_Init(Tcl_Interp *interp);
-
-MODULE_SCOPE
-void TtkTreeview_Init(Tcl_Interp *interp)
+MODULE_SCOPE void
+TtkTreeview_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index b5d9a21..24035ca 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -768,9 +768,8 @@ int TtkWidgetIdentifyCommand(
}
}
- if ( Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
- || Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK
- ) {
+ if (Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK
+ || Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 392f742..9231f80 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -3545,9 +3545,8 @@ TTK_END_LAYOUT_TABLE
* [NSApp applicationDidFinishLaunching].
*/
-MODULE_SCOPE
-void Ttk_MacOSXInit(
- void)
+MODULE_SCOPE void
+Ttk_MacOSXInit(void)
{
if ([NSApp macOSVersion] < 101400) {
entryElementPadding = Ttk_MakePadding(7, 6, 7, 5);
@@ -3688,8 +3687,8 @@ static int AquaTheme_Init(
return TCL_OK;
}
-MODULE_SCOPE
-int Ttk_MacOSXPlatformInit(
+MODULE_SCOPE int
+Ttk_MacOSXPlatformInit(
Tcl_Interp *interp)
{
return AquaTheme_Init(interp);
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index 693d1c3..544f89c 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -383,9 +383,8 @@ TestwineventObjCmd(
Tcl_ObjPrintf("Could not find control with id %d", id));
return TCL_ERROR;
}
- Tcl_DStringInit(&ds);
- LPARAM lparam = (LPARAM)Tcl_UtfToExternalDString(NULL, Tcl_GetString(objv[4]), TCL_INDEX_NONE, &ds);
- result = SendMessageA(control, WM_SETTEXT, 0, lparam);
+ Tcl_UtfToExternalDString(NULL, Tcl_GetString(objv[4]), TCL_INDEX_NONE, &ds);
+ result = SendMessageA(control, WM_SETTEXT, 0, (LPARAM)Tcl_DStringValue(&ds));
Tcl_DStringFree(&ds);
if (result == 0) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to send text to dialog: ", TCL_INDEX_NONE));
@@ -536,7 +535,7 @@ TestgetwindowinfoObjCmd(
dictObj = Tcl_NewDictObj();
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("class", 5), classObj);
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("id", 2),
- Tcl_NewWideIntObj(GetWindowLongPtr((HWND)(size_t)hwnd, GWL_ID)));
+ Tcl_NewWideIntObj(GetWindowLongPtr((HWND)(size_t)hwnd, GWL_ID)));
cch = GetWindowTextW((HWND)INT2PTR(hwnd), buf, cchBuf);
Tcl_DStringInit(&ds);
@@ -546,7 +545,7 @@ TestgetwindowinfoObjCmd(
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("text", 4), textObj);
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("parent", 6),
- Tcl_NewWideIntObj(PTR2INT(GetParent((HWND)(size_t)hwnd))));
+ Tcl_NewWideIntObj(PTR2INT(GetParent((HWND)(size_t)hwnd))));
childrenObj = Tcl_NewListObj(0, NULL);
EnumChildWindows((HWND)(size_t)hwnd, EnumChildrenProc, (LPARAM)childrenObj);
diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c
index 0e79e6c..f50f49f 100644
--- a/win/ttkWinTheme.c
+++ b/win/ttkWinTheme.c
@@ -953,13 +953,8 @@ TTK_END_LAYOUT_TABLE
/* ---------------------------------------------------------------------- */
-MODULE_SCOPE
-int TtkWinTheme_Init(
- Tcl_Interp *interp,
- TCL_UNUSED(HWND));
-
-MODULE_SCOPE
-int TtkWinTheme_Init(
+MODULE_SCOPE int
+TtkWinTheme_Init(
Tcl_Interp *interp,
TCL_UNUSED(HWND))
{
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 3d2c9ec..4a15be6 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -1391,8 +1391,6 @@ retErr:
* +++ Initialization routine:
*/
-MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd);
-
MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd)
{
XPThemeData *themeData;