From 94f1cc2f0a4db0c6f1483e6d648068e031bcc094 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 10 Mar 2018 20:36:12 +1000 Subject: Change new colors to GFX_RED instead of GFXRED. Use the new color defs --- src/gwin/gwin.c | 4 ++-- src/gwin/gwin.h | 2 +- src/gwin/gwin_button.c | 4 ++-- src/gwin/gwin_button.h | 2 +- src/gwin/gwin_checkbox.c | 4 ++-- src/gwin/gwin_checkbox.h | 2 +- src/gwin/gwin_console.c | 16 ++++++++-------- src/gwin/gwin_console.h | 2 +- src/gwin/gwin_gl3d.h | 2 +- src/gwin/gwin_graph.c | 12 ++++++------ src/gwin/gwin_graph.h | 2 +- src/gwin/gwin_keyboard.h | 2 +- src/gwin/gwin_list.h | 2 +- src/gwin/gwin_progressbar.h | 2 +- src/gwin/gwin_radio.c | 8 ++++---- src/gwin/gwin_radio.h | 2 +- src/gwin/gwin_slider.h | 2 +- src/gwin/gwin_tabset.c | 4 ++-- 18 files changed, 37 insertions(+), 37 deletions(-) (limited to 'src/gwin') diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index c5082ea0..2de0c125 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -30,8 +30,8 @@ static const gwinVMT basegwinVMT = { 0, // The after-clear routine }; -static color_t defaultFgColor = White; -static color_t defaultBgColor = Black; +static color_t defaultFgColor = GFX_WHITE; +static color_t defaultBgColor = GFX_BLACK; #if GDISP_NEED_TEXT static font_t defaultFont; #endif diff --git a/src/gwin/gwin.h b/src/gwin/gwin.h index 1331a874..54421bd4 100644 --- a/src/gwin/gwin.h +++ b/src/gwin/gwin.h @@ -203,7 +203,7 @@ extern "C" { * @param[in] pInit How to initialise the window * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note A basic window does not save the drawing state. It is not automatically redrawn if the window is moved or diff --git a/src/gwin/gwin_button.c b/src/gwin/gwin_button.c index f4be41a1..8b3a2b6b 100644 --- a/src/gwin/gwin_button.c +++ b/src/gwin/gwin_button.c @@ -192,8 +192,8 @@ static const GColorSet *getButtonColors(GWidgetObject *gw) { pcol = getButtonColors(gw); /* Fill the box blended from variants of the fill color */ - tcol = gdispBlendColor(White, pcol->fill, BTN_TOP_FADE); - bcol = gdispBlendColor(Black, pcol->fill, BTN_BOTTOM_FADE); + tcol = gdispBlendColor(GFX_WHITE, pcol->fill, BTN_TOP_FADE); + bcol = gdispBlendColor(GFX_BLACK, pcol->fill, BTN_BOTTOM_FADE); dalpha = FIXED(255)/gw->g.height; for(alpha = 0, i = 0; i < gw->g.height; i++, alpha += dalpha) gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+i, gw->g.x+gw->g.width-2, gw->g.y+i, gdispBlendColor(bcol, tcol, NONFIXED(alpha))); diff --git a/src/gwin/gwin_button.h b/src/gwin/gwin_button.h index 77751c04..ba3bc354 100644 --- a/src/gwin/gwin_button.h +++ b/src/gwin/gwin_button.h @@ -71,7 +71,7 @@ extern "C" { * @param[in] pInit The initialisation parameters * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note A button remembers its normal drawing state. If there is a window manager then it is automatically diff --git a/src/gwin/gwin_checkbox.c b/src/gwin/gwin_checkbox.c index 1160f0b1..1b3d395a 100644 --- a/src/gwin/gwin_checkbox.c +++ b/src/gwin/gwin_checkbox.c @@ -267,8 +267,8 @@ void gwinCheckboxDraw_CheckOnRight(GWidgetObject *gw, void *param) { #endif /* Fill the box blended from variants of the fill color */ - tcol = gdispBlendColor(White, pcol->fill, CHK_TOP_FADE); - bcol = gdispBlendColor(Black, pcol->fill, CHK_BOTTOM_FADE); + tcol = gdispBlendColor(GFX_WHITE, pcol->fill, CHK_TOP_FADE); + bcol = gdispBlendColor(GFX_BLACK, pcol->fill, CHK_BOTTOM_FADE); dalpha = FIXED(255)/gw->g.height; for(alpha = 0, i = 0; i < gw->g.height; i++, alpha += dalpha) gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+i, gw->g.x+gw->g.width-2, gw->g.y+i, gdispBlendColor(bcol, tcol, NONFIXED(alpha))); diff --git a/src/gwin/gwin_checkbox.h b/src/gwin/gwin_checkbox.h index b4a1c811..2fba95c1 100644 --- a/src/gwin/gwin_checkbox.h +++ b/src/gwin/gwin_checkbox.h @@ -74,7 +74,7 @@ extern "C" { * @param[in] pInit The initialization parameters to use * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note A checkbox remembers its normal drawing state. If there is a window manager then it is automatically diff --git a/src/gwin/gwin_console.c b/src/gwin/gwin_console.c index 71d0905a..2d99b153 100644 --- a/src/gwin/gwin_console.c +++ b/src/gwin/gwin_console.c @@ -116,21 +116,21 @@ static color_t ESCPrintColor(GConsoleObject *gcw) { switch(gcw->currattr & (ESC_REDBIT|ESC_GREENBIT|ESC_BLUEBIT|ESC_USECOLOR)) { case (ESC_USECOLOR): - return Black; + return GFX_BLACK; case (ESC_USECOLOR|ESC_REDBIT): - return Red; + return GFX_RED; case (ESC_USECOLOR|ESC_GREENBIT): - return Green; + return GFX_GREEN; case (ESC_USECOLOR|ESC_REDBIT|ESC_GREENBIT): - return Yellow; + return GFX_YELLOW; case (ESC_USECOLOR|ESC_BLUEBIT): - return Blue; + return GFX_BLUE; case (ESC_USECOLOR|ESC_REDBIT|ESC_BLUEBIT): - return Magenta; + return GFX_MAGENTA; case (ESC_USECOLOR|ESC_GREENBIT|ESC_BLUEBIT): - return Cyan; + return GFX_CYAN; case (ESC_USECOLOR|ESC_REDBIT|ESC_GREENBIT|ESC_BLUEBIT): - return White; + return GFX_WHITE; default: return gcw->g.color; } diff --git a/src/gwin/gwin_console.h b/src/gwin/gwin_console.h index 6b0f3fe6..fcfca35e 100644 --- a/src/gwin/gwin_console.h +++ b/src/gwin/gwin_console.h @@ -69,7 +69,7 @@ extern "C" { * @param[in] pInit The initialization parameters to use * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note On creation even if the window is visible it is not automatically cleared. diff --git a/src/gwin/gwin_gl3d.h b/src/gwin/gwin_gl3d.h index fd1220b0..5dbfa893 100644 --- a/src/gwin/gwin_gl3d.h +++ b/src/gwin/gwin_gl3d.h @@ -51,7 +51,7 @@ extern "C" { * @param[in] pInit The initialization parameters to use * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note The dimensions and position may be changed to fit on the real screen. diff --git a/src/gwin/gwin_graph.c b/src/gwin/gwin_graph.c index 6f0ce2a4..c729103d 100644 --- a/src/gwin/gwin_graph.c +++ b/src/gwin/gwin_graph.c @@ -20,12 +20,12 @@ #define GGRAPH_ARROW_SIZE 5 static const GGraphStyle GGraphDefaultStyle = { - { GGRAPH_POINT_DOT, 0, White }, // point - { GGRAPH_LINE_DOT, 2, Gray }, // line - { GGRAPH_LINE_SOLID, 0, White }, // x axis - { GGRAPH_LINE_SOLID, 0, White }, // y axis - { GGRAPH_LINE_NONE, 0, White, 0 }, // x grid - { GGRAPH_LINE_NONE, 0, White, 0 }, // y grid + { GGRAPH_POINT_DOT, 0, GFX_WHITE }, // point + { GGRAPH_LINE_DOT, 2, GFX_GRAY }, // line + { GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // x axis + { GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // y axis + { GGRAPH_LINE_NONE, 0, GFX_WHITE, 0 }, // x grid + { GGRAPH_LINE_NONE, 0, GFX_WHITE, 0 }, // y grid GWIN_GRAPH_STYLE_XAXIS_ARROWS|GWIN_GRAPH_STYLE_YAXIS_ARROWS // flags }; diff --git a/src/gwin/gwin_graph.h b/src/gwin/gwin_graph.h index 61b411a2..76059a6f 100644 --- a/src/gwin/gwin_graph.h +++ b/src/gwin/gwin_graph.h @@ -98,7 +98,7 @@ extern "C" { * @param[in] pInit The initialization parameters to use * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note The dimensions and position may be changed to fit on the real screen. diff --git a/src/gwin/gwin_keyboard.h b/src/gwin/gwin_keyboard.h index 68bf215f..f98d6570 100644 --- a/src/gwin/gwin_keyboard.h +++ b/src/gwin/gwin_keyboard.h @@ -77,7 +77,7 @@ extern "C" { * @param[in] pInit The initialisation parameters * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note A keyboard remembers its normal drawing state. If there is a window manager then it is automatically diff --git a/src/gwin/gwin_list.h b/src/gwin/gwin_list.h index ad64be75..041bbb68 100644 --- a/src/gwin/gwin_list.h +++ b/src/gwin/gwin_list.h @@ -113,7 +113,7 @@ extern "C" { * @brief Create a list widget * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are Black and White. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then * there is no default font and text drawing operations will not display anything. * @note A list remembers its normal drawing state. If there is a window manager then it is automatically diff --git a/src/gwin/gwin_progressbar.h b/src/gwin/gwin_progressbar.h index 646f6954..95feaf4a 100644 --- a/src/gwin/gwin_progressbar.h +++ b/src/gwin/gwin_progressbar.h @@ -49,7 +49,7 @@ extern "C" { * @param[in] pInit The initialization parameters to use * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note A progressbar remembers its normal drawing state. If there is a window manager then it is automatically diff --git a/src/gwin/gwin_radio.c b/src/gwin/gwin_radio.c index 6d9bd60e..47110c35 100644 --- a/src/gwin/gwin_radio.c +++ b/src/gwin/gwin_radio.c @@ -249,8 +249,8 @@ void gwinRadioDraw_Radio(GWidgetObject *gw, void *param) { pcol = getDrawColors(gw); /* Fill the box blended from variants of the fill color */ - tcol = gdispBlendColor(White, pcol->fill, GRADIO_TOP_FADE); - bcol = gdispBlendColor(Black, pcol->fill, GRADIO_BOTTOM_FADE); + tcol = gdispBlendColor(GFX_WHITE, pcol->fill, GRADIO_TOP_FADE); + bcol = gdispBlendColor(GFX_BLACK, pcol->fill, GRADIO_BOTTOM_FADE); dalpha = FIXED(255)/gw->g.height; for(alpha = 0, i = 0; i < gw->g.height; i++, alpha += dalpha) gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+i, gw->g.x+gw->g.width-2, gw->g.y+i, gdispBlendColor(bcol, tcol, NONFIXED(alpha))); @@ -278,8 +278,8 @@ void gwinRadioDraw_Radio(GWidgetObject *gw, void *param) { gdispGDrawLine(gw->g.display, gw->g.x+gw->g.width-1, gw->g.y+GRADIO_TAB_CNR, gw->g.x+gw->g.width-1, gw->g.y+gw->g.height-1, tcol); } else { /* Fill the box blended from variants of the fill color */ - tcol = gdispBlendColor(White, pcol->fill, GRADIO_TOP_FADE); - bcol = gdispBlendColor(Black, pcol->fill, GRADIO_BOTTOM_FADE); + tcol = gdispBlendColor(GFX_WHITE, pcol->fill, GRADIO_TOP_FADE); + bcol = gdispBlendColor(GFX_BLACK, pcol->fill, GRADIO_BOTTOM_FADE); dalpha = FIXED(255)/gw->g.height; for(alpha = 0, i = 0; i < gw->g.height; i++, alpha += dalpha) gdispGDrawLine(gw->g.display, gw->g.x, gw->g.y+i, gw->g.x+gw->g.width-2, gw->g.y+i, gdispBlendColor(bcol, tcol, NONFIXED(alpha))); diff --git a/src/gwin/gwin_radio.h b/src/gwin/gwin_radio.h index 161cbb19..514620c1 100644 --- a/src/gwin/gwin_radio.h +++ b/src/gwin/gwin_radio.h @@ -81,7 +81,7 @@ extern "C" { * @note Only one radio button in any group is ever pressed at one time. Pressing one radio button will * release all others in the group. * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note A radio button remembers its normal drawing state. If there is a window manager then it is automatically diff --git a/src/gwin/gwin_slider.h b/src/gwin/gwin_slider.h index 616663be..c388417d 100644 --- a/src/gwin/gwin_slider.h +++ b/src/gwin/gwin_slider.h @@ -82,7 +82,7 @@ extern "C" { * @param[in] pInit The initialization parameters to use * * @note The drawing color and the background color get set to the current defaults. If you haven't called - * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. + * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are GFX_WHITE and GFX_BLACK respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. * @note A slider remembers its normal drawing state. If there is a window manager then it is automatically diff --git a/src/gwin/gwin_tabset.c b/src/gwin/gwin_tabset.c index 148a0bb1..0bb18c18 100644 --- a/src/gwin/gwin_tabset.c +++ b/src/gwin/gwin_tabset.c @@ -444,8 +444,8 @@ void gwinTabsetSetTab(GHandle gh) { pcol = (gw->g.flags & GWIN_FLG_SYSENABLED) ? &gw->pstyle->enabled : &gw->pstyle->disabled; /* Fill the box blended from variants of the fill color */ - tcol = gdispBlendColor(White, pcol->fill, GTABSET_TOP_FADE); - bcol = gdispBlendColor(Black, pcol->fill, GTABSET_BOTTOM_FADE); + tcol = gdispBlendColor(GFX_WHITE, pcol->fill, GTABSET_TOP_FADE); + bcol = gdispBlendColor(GFX_BLACK, pcol->fill, GTABSET_BOTTOM_FADE); for(alpha = 0, i = 0; i < GWIN_TABSET_TABHEIGHT; i++, alpha += FIXED(255)/GWIN_TABSET_TABHEIGHT) gdispGDrawLine(gw->g.display, gw->g.x+x, gw->g.y+y+i, gw->g.x+x+w-2, gw->g.y+y+i, gdispBlendColor(bcol, tcol, NONFIXED(alpha))); gdispGDrawLine(gw->g.display, gw->g.x+x+w-1, gw->g.y+y, gw->g.x+x+w-1, gw->g.y+y+GWIN_TABSET_TABHEIGHT-1, pcol->edge); -- cgit v1.2.3