diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 09:44:05 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 09:44:05 (GMT) |
commit | e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6 (patch) | |
tree | 6bca925436edc8dce431cfd10502d50117b62d46 /generic/tkMenuDraw.c | |
parent | 0c4227b6cc6e9716ddd086a75e45c4e9373fa51b (diff) | |
parent | 81b0bd7641a9d2f63154c97d41c27bbb696ef674 (diff) | |
download | tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.zip tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.gz tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.bz2 |
Fix [9e31fd9449]: X11/X.h and Windows.h have conflicting symbols
*** POTENTIAL INCOMPATIBILITY *** for Win32 only: On X11 and Mac, "None" can still be used as before
Diffstat (limited to 'generic/tkMenuDraw.c')
-rw-r--r-- | generic/tkMenuDraw.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 3f492db..df501c3 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -43,12 +43,12 @@ void TkMenuInitializeDrawingFields( TkMenu *menuPtr) /* The menu we are initializing. */ { - menuPtr->textGC = None; - menuPtr->gray = None; - menuPtr->disabledGC = None; - menuPtr->activeGC = None; - menuPtr->indicatorGC = None; - menuPtr->disabledImageGC = None; + menuPtr->textGC = 0; + menuPtr->gray = 0; + menuPtr->disabledGC = 0; + menuPtr->activeGC = 0; + menuPtr->indicatorGC = 0; + menuPtr->disabledImageGC = 0; menuPtr->totalWidth = menuPtr->totalHeight = 0; } @@ -79,10 +79,10 @@ TkMenuInitializeEntryDrawingFields( mePtr->y = 0; mePtr->indicatorSpace = 0; mePtr->labelWidth = 0; - mePtr->textGC = None; - mePtr->activeGC = None; - mePtr->disabledGC = None; - mePtr->indicatorGC = None; + mePtr->textGC = 0; + mePtr->activeGC = 0; + mePtr->disabledGC = 0; + mePtr->indicatorGC = 0; } /* @@ -106,22 +106,22 @@ void TkMenuFreeDrawOptions( TkMenu *menuPtr) { - if (menuPtr->textGC != None) { + if (menuPtr->textGC) { Tk_FreeGC(menuPtr->display, menuPtr->textGC); } - if (menuPtr->disabledImageGC != None) { + if (menuPtr->disabledImageGC) { Tk_FreeGC(menuPtr->display, menuPtr->disabledImageGC); } - if (menuPtr->gray != None) { + if (menuPtr->gray) { Tk_FreeBitmap(menuPtr->display, menuPtr->gray); } - if (menuPtr->disabledGC != None) { + if (menuPtr->disabledGC) { Tk_FreeGC(menuPtr->display, menuPtr->disabledGC); } - if (menuPtr->activeGC != None) { + if (menuPtr->activeGC) { Tk_FreeGC(menuPtr->display, menuPtr->activeGC); } - if (menuPtr->indicatorGC != None) { + if (menuPtr->indicatorGC) { Tk_FreeGC(menuPtr->display, menuPtr->indicatorGC); } } @@ -147,16 +147,16 @@ void TkMenuEntryFreeDrawOptions( TkMenuEntry *mePtr) { - if (mePtr->textGC != None) { + if (mePtr->textGC) { Tk_FreeGC(mePtr->menuPtr->display, mePtr->textGC); } - if (mePtr->disabledGC != None) { + if (mePtr->disabledGC) { Tk_FreeGC(mePtr->menuPtr->display, mePtr->disabledGC); } - if (mePtr->activeGC != None) { + if (mePtr->activeGC) { Tk_FreeGC(mePtr->menuPtr->display, mePtr->activeGC); } - if (mePtr->indicatorGC != None) { + if (mePtr->indicatorGC) { Tk_FreeGC(mePtr->menuPtr->display, mePtr->indicatorGC); } } @@ -205,7 +205,7 @@ TkMenuConfigureDrawOptions( gcValues.background = Tk_3DBorderColor(border)->pixel; newGC = Tk_GetGC(menuPtr->tkwin, GCForeground|GCBackground|GCFont, &gcValues); - if (menuPtr->textGC != None) { + if (menuPtr->textGC) { Tk_FreeGC(menuPtr->display, menuPtr->textGC); } menuPtr->textGC = newGC; @@ -222,34 +222,34 @@ TkMenuConfigureDrawOptions( } else { gcValues.foreground = gcValues.background; mask = GCForeground; - if (menuPtr->gray == None) { + if (!menuPtr->gray) { menuPtr->gray = Tk_GetBitmap(menuPtr->interp, menuPtr->tkwin, "gray50"); } - if (menuPtr->gray != None) { + if (menuPtr->gray) { gcValues.fill_style = FillStippled; gcValues.stipple = menuPtr->gray; mask = GCForeground|GCFillStyle|GCStipple; } } newGC = Tk_GetGC(menuPtr->tkwin, mask, &gcValues); - if (menuPtr->disabledGC != None) { + if (menuPtr->disabledGC) { Tk_FreeGC(menuPtr->display, menuPtr->disabledGC); } menuPtr->disabledGC = newGC; gcValues.foreground = Tk_3DBorderColor(border)->pixel; - if (menuPtr->gray == None) { + if (!menuPtr->gray) { menuPtr->gray = Tk_GetBitmap(menuPtr->interp, menuPtr->tkwin, "gray50"); } - if (menuPtr->gray != None) { + if (menuPtr->gray) { gcValues.fill_style = FillStippled; gcValues.stipple = menuPtr->gray; newGC = Tk_GetGC(menuPtr->tkwin, GCForeground|GCFillStyle|GCStipple, &gcValues); } - if (menuPtr->disabledImageGC != None) { + if (menuPtr->disabledImageGC) { Tk_FreeGC(menuPtr->display, menuPtr->disabledImageGC); } menuPtr->disabledImageGC = newGC; @@ -262,7 +262,7 @@ TkMenuConfigureDrawOptions( gcValues.background = Tk_3DBorderColor(activeBorder)->pixel; newGC = Tk_GetGC(menuPtr->tkwin, GCForeground|GCBackground|GCFont, &gcValues); - if (menuPtr->activeGC != None) { + if (menuPtr->activeGC) { Tk_FreeGC(menuPtr->display, menuPtr->activeGC); } menuPtr->activeGC = newGC; @@ -273,7 +273,7 @@ TkMenuConfigureDrawOptions( gcValues.background = Tk_3DBorderColor(border)->pixel; newGC = Tk_GetGC(menuPtr->tkwin, GCForeground|GCBackground|GCFont, &gcValues); - if (menuPtr->indicatorGC != None) { + if (menuPtr->indicatorGC) { Tk_FreeGC(menuPtr->display, menuPtr->indicatorGC); } menuPtr->indicatorGC = newGC; @@ -385,24 +385,24 @@ TkMenuConfigureEntryDrawOptions( GCForeground|GCBackground|GCFont|GCGraphicsExposures, &gcValues); } else { - newGC = None; - newActiveGC = None; - newDisabledGC = None; - newIndicatorGC = None; + newGC = 0; + newActiveGC = 0; + newDisabledGC = 0; + newIndicatorGC = 0; } - if (mePtr->textGC != None) { + if (mePtr->textGC) { Tk_FreeGC(menuPtr->display, mePtr->textGC); } mePtr->textGC = newGC; - if (mePtr->activeGC != None) { + if (mePtr->activeGC) { Tk_FreeGC(menuPtr->display, mePtr->activeGC); } mePtr->activeGC = newActiveGC; - if (mePtr->disabledGC != None) { + if (mePtr->disabledGC) { Tk_FreeGC(menuPtr->display, mePtr->disabledGC); } mePtr->disabledGC = newDisabledGC; - if (mePtr->indicatorGC != None) { + if (mePtr->indicatorGC) { Tk_FreeGC(menuPtr->display, mePtr->indicatorGC); } mePtr->indicatorGC = newIndicatorGC; |