summaryrefslogtreecommitdiffstats
path: root/win/ttkWinXPTheme.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-03 12:58:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-03 12:58:16 (GMT)
commitc594f7549d926ba7d3ad0f7ee0ad3638719870dd (patch)
treebcd38dec13f43f75cfe3b20dcfc22a8c27b50be3 /win/ttkWinXPTheme.c
parent1e1f629ce1661dec695273cc771f3273bcd1cf22 (diff)
downloadtk-c594f7549d926ba7d3ad0f7ee0ad3638719870dd.zip
tk-c594f7549d926ba7d3ad0f7ee0ad3638719870dd.tar.gz
tk-c594f7549d926ba7d3ad0f7ee0ad3638719870dd.tar.bz2
More usage for Tcl_Size (internal TkEnsemble)
Diffstat (limited to 'win/ttkWinXPTheme.c')
-rw-r--r--win/ttkWinXPTheme.c47
1 files changed, 30 insertions, 17 deletions
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 0d5c06f..0365867 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -140,12 +140,13 @@ XPThemeDeleteProc(void *clientData)
}
static int
-XPThemeEnabled(Ttk_Theme theme, void *clientData)
+XPThemeEnabled(
+ TCL_UNUSED(Ttk_Theme),
+ void *clientData)
{
XPThemeData *themeData = (XPThemeData *)clientData;
int active = themeData->procs->IsThemeActive();
int themed = themeData->procs->IsAppThemed();
- (void)theme;
return (active && themed);
}
@@ -492,13 +493,16 @@ FreeElementData(ElementData *elementData)
*/
static void GenericElementSize(
- void *clientData, void *elementRecord, Tk_Window tkwin,
- int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr)
+ void *clientData,
+ TCL_UNUSED(void *),
+ Tk_Window tkwin,
+ int *widthPtr,
+ int *heightPtr,
+ Ttk_Padding *paddingPtr)
{
ElementData *elementData = (ElementData *)clientData;
HRESULT result;
SIZE size;
- (void)elementRecord;
if (!InitElementData(elementData, tkwin, 0))
return;
@@ -529,12 +533,15 @@ static void GenericElementSize(
}
static void GenericElementDraw(
- void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ void *clientData,
+ TCL_UNUSED(void *),
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ unsigned int state)
{
ElementData *elementData = (ElementData *)clientData;
RECT rc;
- (void)elementRecord;
if (!InitElementData(elementData, tkwin, d)) {
return;
@@ -640,13 +647,16 @@ static const Ttk_ElementSpec SpinboxArrowElementSpec = {
*/
static void ThumbElementDraw(
- void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ void *clientData,
+ TCL_UNUSED(void *),
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ unsigned int state)
{
ElementData *elementData = (ElementData *)clientData;
unsigned stateId = Ttk_StateTableLookup(elementData->info->statemap, state);
RECT rc = BoxToRect(b);
- (void)elementRecord;
/*
* Don't draw the thumb if we are disabled.
@@ -720,13 +730,16 @@ static const Ttk_ElementSpec PbarElementSpec =
* we can use the same statemap no matter what the partId.
*/
static void TabElementDraw(
- void *clientData, void *elementRecord, Tk_Window tkwin,
- Drawable d, Ttk_Box b, unsigned int state)
+ void *clientData,
+ TCL_UNUSED(void *),
+ Tk_Window tkwin,
+ Drawable d,
+ Ttk_Box b,
+ unsigned int state)
{
ElementData *elementData = (ElementData *)clientData;
int partId = elementData->info->partId;
RECT rc = BoxToRect(b);
- (void)elementRecord;
if (!InitElementData(elementData, tkwin, d))
return;
@@ -863,7 +876,7 @@ static void TextElementSize(
}
static void TextElementDraw(
- ClientData clientData, void *elementRecord, Tk_Window tkwin,
+ void *clientData, void *elementRecord, Tk_Window tkwin,
Drawable d, Ttk_Box b, unsigned int state)
{
TextElement *element = elementRecord;
@@ -1114,7 +1127,7 @@ Ttk_CreateVsapiElement(
{
XPThemeData *themeData = (XPThemeData *)clientData;
ElementInfo *elementPtr = NULL;
- ClientData elementData;
+ void *elementData;
LPCWSTR className;
int partId = 0;
Ttk_StateTable *stateTable;
@@ -1327,7 +1340,7 @@ MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd)
* New elements:
*/
for (infoPtr = ElementInfoTable; infoPtr->elementName != 0; ++infoPtr) {
- ClientData clientData = NewElementData(procs, infoPtr);
+ void *clientData = NewElementData(procs, infoPtr);
Ttk_RegisterElementSpec(
themePtr, infoPtr->elementName, infoPtr->elementSpec, clientData);
Ttk_RegisterCleanup(interp, clientData, DestroyElementData);