diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-04 16:28:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-04 16:28:54 (GMT) |
commit | ad53ca0af06e1300fb06d68be098a961a06eb05a (patch) | |
tree | 846ad867c759618c77f08238968efd2366b063d1 /generic | |
parent | 184a6c52517c826425e6ef06aaa06e3dc1cee92f (diff) | |
download | tk-ad53ca0af06e1300fb06d68be098a961a06eb05a.zip tk-ad53ca0af06e1300fb06d68be098a961a06eb05a.tar.gz tk-ad53ca0af06e1300fb06d68be098a961a06eb05a.tar.bz2 |
alwaysRedraw -> flags
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 10 | ||||
-rw-r--r-- | generic/tkCanvWind.c | 2 | ||||
-rw-r--r-- | generic/tkCanvas.c | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/generic/tk.h b/generic/tk.h index e1b76b2..167ed56 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1089,9 +1089,7 @@ typedef struct Tk_ItemType { * type. */ Tk_ItemDisplayProc *displayProc; /* Procedure to display items of this type. */ - int alwaysRedraw; /* Non-zero means displayProc should be called - * even when the item has been moved - * off-screen. */ + int flags; /* Combination of TK_ALWAYS_REDRAW/TK_MOVABLE_POINTS */ Tk_ItemPointProc *pointProc;/* Computes distance from item to a given * point. */ Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, outside, @@ -1128,11 +1126,11 @@ typedef struct Tk_ItemType { } Tk_ItemType; /* - * Flag (used in the alwaysRedraw field) to say whether an item supports - * point-level manipulation like the line and polygon items. + * Possible flags for 'flags' field. */ -#define TK_MOVABLE_POINTS 2 +#define TK_ALWAYS_REDRAW 1 /* item should be redrawn always*/ +#define TK_MOVABLE_POINTS 2 /* item supports point-level manipulation */ #endif /* __NO_OLD_CONFIG */ diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 4691e63..2472c3f 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -120,7 +120,7 @@ Tk_ItemType tkWindowType = { WinItemCoords, /* coordProc */ DeleteWinItem, /* deleteProc */ DisplayWinItem, /* displayProc */ - 1, /* flags */ + TK_ALWAYS_REDRAW, /* flags */ WinItemToPoint, /* pointProc */ WinItemToArea, /* areaProc */ WinItemToPostscript, /* postscriptProc */ diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 82ab17e..705df64 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -323,7 +323,7 @@ static inline int AlwaysRedraw( Tk_Item *itemPtr) { - return itemPtr->typePtr->alwaysRedraw & 1; + return itemPtr->typePtr->flags & TK_ALWAYS_REDRAW; } static inline int @@ -1164,7 +1164,7 @@ CanvasWidgetCmd( */ if (itemPtr == NULL || - !(itemPtr->typePtr->alwaysRedraw & TK_MOVABLE_POINTS)) { + !(itemPtr->typePtr->flags & TK_MOVABLE_POINTS)) { continue; } |