summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-14 12:58:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-14 12:58:38 (GMT)
commit384e8936ee8f4826db8273ae8423213c0aa59e45 (patch)
treecb492db66fde03da9dc9e1587893fbe339cc179f /generic
parentd6bb3158bccb27b30547d3df16e75948b646b280 (diff)
downloadtk-384e8936ee8f4826db8273ae8423213c0aa59e45.zip
tk-384e8936ee8f4826db8273ae8423213c0aa59e45.tar.gz
tk-384e8936ee8f4826db8273ae8423213c0aa59e45.tar.bz2
Add Tk_Window parameter to TtkSelectImage(). Not used yet
Diffstat (limited to 'generic')
-rw-r--r--generic/ttk/ttkImage.c9
-rw-r--r--generic/ttk/ttkLabel.c4
-rw-r--r--generic/ttk/ttkTheme.h2
3 files changed, 9 insertions, 6 deletions
diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c
index e33a9de..c47e432 100644
--- a/generic/ttk/ttkImage.c
+++ b/generic/ttk/ttkImage.c
@@ -156,7 +156,10 @@ void TtkFreeImageSpec(Ttk_ImageSpec *imageSpec)
/* TtkSelectImage --
* Return a state-specific image from an ImageSpec
*/
-Tk_Image TtkSelectImage(Ttk_ImageSpec *imageSpec, Ttk_State state)
+Tk_Image TtkSelectImage(
+ Ttk_ImageSpec *imageSpec,
+ TCL_UNUSED(Tk_Window),
+ Ttk_State state)
{
int i;
for (i = 0; i < imageSpec->mapCount; ++i) {
@@ -307,10 +310,10 @@ static void ImageElementDraw(
}
}
if (!image) {
- image = TtkSelectImage(imageData->imageSpec, state);
+ image = TtkSelectImage(imageData->imageSpec, tkwin, state);
}
#else
- image = TtkSelectImage(imageData->imageSpec, state);
+ image = TtkSelectImage(imageData->imageSpec, tkwin, state);
#endif
if (!image) {
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index f1de5de..54ecabd 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -282,7 +282,7 @@ static int ImageSetup(
if (!image->imageSpec) {
return 0;
}
- image->tkimg = TtkSelectImage(image->imageSpec, state);
+ image->tkimg = TtkSelectImage(image->imageSpec, tkwin, state);
if (!image->tkimg) {
TtkFreeImageSpec(image->imageSpec);
return 0;
@@ -356,7 +356,7 @@ static void ImageDraw(
if (state & TTK_STATE_DISABLED) {
- if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) {
+ if (TtkSelectImage(image->imageSpec, tkwin, 0ul) == image->tkimg) {
#ifndef MAC_OSX_TK
StippleOver(image, tkwin, d, b.x,b.y);
#endif
diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h
index cf0a07c..c927209 100644
--- a/generic/ttk/ttkTheme.h
+++ b/generic/ttk/ttkTheme.h
@@ -379,7 +379,7 @@ TTKAPI Ttk_ImageSpec *TtkGetImageSpec(Tcl_Interp *, Tk_Window, Tcl_Obj *);
TTKAPI Ttk_ImageSpec *TtkGetImageSpecEx(Tcl_Interp *, Tk_Window, Tcl_Obj *,
Tk_ImageChangedProc *, ClientData);
TTKAPI void TtkFreeImageSpec(Ttk_ImageSpec *);
-TTKAPI Tk_Image TtkSelectImage(Ttk_ImageSpec *, Ttk_State);
+TTKAPI Tk_Image TtkSelectImage(Ttk_ImageSpec *, Tk_Window, Ttk_State);
/*------------------------------------------------------------------------
* +++ Miscellaneous enumerations.