summaryrefslogtreecommitdiffstats
path: root/win
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 /win
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
Diffstat (limited to 'win')
-rw-r--r--win/tkWinTest.c9
-rw-r--r--win/ttkWinTheme.c9
-rw-r--r--win/ttkWinXPTheme.c2
3 files changed, 6 insertions, 14 deletions
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;