aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gwin
diff options
context:
space:
mode:
Diffstat (limited to 'demos/modules/gwin')
-rw-r--r--demos/modules/gwin/basic/main.c10
-rw-r--r--demos/modules/gwin/button/main.c4
-rw-r--r--demos/modules/gwin/checkbox/main.c2
-rw-r--r--demos/modules/gwin/console/main.c12
-rw-r--r--demos/modules/gwin/container/main.c2
-rw-r--r--demos/modules/gwin/container_nested/main.c2
-rw-r--r--demos/modules/gwin/frame/main.c2
-rw-r--r--demos/modules/gwin/gl3d-gears/main.c2
-rw-r--r--demos/modules/gwin/gl3d-spin/main.c2
-rw-r--r--demos/modules/gwin/graph/main.c26
-rw-r--r--demos/modules/gwin/imagebox/main.c2
-rw-r--r--demos/modules/gwin/keyboard/main.c4
-rw-r--r--demos/modules/gwin/label/main.c2
-rw-r--r--demos/modules/gwin/list/main.c2
-rw-r--r--demos/modules/gwin/progressbar/main.c2
-rw-r--r--demos/modules/gwin/radio/main.c2
-rw-r--r--demos/modules/gwin/slider/main.c6
-rw-r--r--demos/modules/gwin/tabset/main.c2
-rw-r--r--demos/modules/gwin/textedit/main.c10
-rw-r--r--demos/modules/gwin/textedit_virtual_keyboard/main.c6
-rw-r--r--demos/modules/gwin/widgets/main.c8
21 files changed, 55 insertions, 55 deletions
diff --git a/demos/modules/gwin/basic/main.c b/demos/modules/gwin/basic/main.c
index fca150c9..e5b66f17 100644
--- a/demos/modules/gwin/basic/main.c
+++ b/demos/modules/gwin/basic/main.c
@@ -37,7 +37,7 @@ int main(void) {
/* Initialize and clear the display */
gfxInit();
- gdispClear(White);
+ gdispClear(GFX_WHITE);
/* Create two windows */
{
@@ -51,10 +51,10 @@ int main(void) {
}
/* Set fore- and background colors for both windows */
- gwinSetColor(GW1, Black);
- gwinSetBgColor(GW1, White);
- gwinSetColor(GW2, White);
- gwinSetBgColor(GW2, Blue);
+ gwinSetColor(GW1, GFX_BLACK);
+ gwinSetBgColor(GW1, GFX_WHITE);
+ gwinSetColor(GW2, GFX_WHITE);
+ gwinSetBgColor(GW2, GFX_BLUE);
/* Clear both windows - to set background color */
gwinClear(GW1);
diff --git a/demos/modules/gwin/button/main.c b/demos/modules/gwin/button/main.c
index 1d8aa2e6..29a5641f 100644
--- a/demos/modules/gwin/button/main.c
+++ b/demos/modules/gwin/button/main.c
@@ -65,7 +65,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
@@ -89,7 +89,7 @@ int main(void) {
// GWIN windows. In this case however we know that the button is in the top-left
// corner which should translate safely into any orientation.
gdispSetOrientation(orients[which]);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
gwinRedrawDisplay(GDISP, FALSE);
}
break;
diff --git a/demos/modules/gwin/checkbox/main.c b/demos/modules/gwin/checkbox/main.c
index 22963e40..00f3ebdb 100644
--- a/demos/modules/gwin/checkbox/main.c
+++ b/demos/modules/gwin/checkbox/main.c
@@ -59,7 +59,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
diff --git a/demos/modules/gwin/console/main.c b/demos/modules/gwin/console/main.c
index 0e9000b5..248aeedf 100644
--- a/demos/modules/gwin/console/main.c
+++ b/demos/modules/gwin/console/main.c
@@ -62,12 +62,12 @@ int main(void) {
gwinSetFont(GW1, font2);
/* Set the fore- and background colors for each console */
- gwinSetColor(GW1, Green);
- gwinSetBgColor(GW1, Black);
- gwinSetColor(GW2, White);
- gwinSetBgColor(GW2, Blue);
- gwinSetColor(GW3, Black);
- gwinSetBgColor(GW3, Red);
+ gwinSetColor(GW1, GFX_GREEN);
+ gwinSetBgColor(GW1, GFX_BLACK);
+ gwinSetColor(GW2, GFX_WHITE);
+ gwinSetBgColor(GW2, GFX_BLUE);
+ gwinSetColor(GW3, GFX_BLACK);
+ gwinSetBgColor(GW3, GFX_RED);
/* clear all console windows - to set background */
gwinClear(GW1);
diff --git a/demos/modules/gwin/container/main.c b/demos/modules/gwin/container/main.c
index 75e3f78b..af2e8b1f 100644
--- a/demos/modules/gwin/container/main.c
+++ b/demos/modules/gwin/container/main.c
@@ -40,7 +40,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("*"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// Create the widget
createWidgets();
diff --git a/demos/modules/gwin/container_nested/main.c b/demos/modules/gwin/container_nested/main.c
index 5cd5e793..0e5a2634 100644
--- a/demos/modules/gwin/container_nested/main.c
+++ b/demos/modules/gwin/container_nested/main.c
@@ -118,7 +118,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("*"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// Create the widget
createWidgets();
diff --git a/demos/modules/gwin/frame/main.c b/demos/modules/gwin/frame/main.c
index 6668ddbb..aae4cfac 100644
--- a/demos/modules/gwin/frame/main.c
+++ b/demos/modules/gwin/frame/main.c
@@ -120,7 +120,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("*"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
_createWidgets();
diff --git a/demos/modules/gwin/gl3d-gears/main.c b/demos/modules/gwin/gl3d-gears/main.c
index 2bc4ed84..2b450799 100644
--- a/demos/modules/gwin/gl3d-gears/main.c
+++ b/demos/modules/gwin/gl3d-gears/main.c
@@ -263,7 +263,7 @@ static void init( void )
int main(void) {
/* Initialize and clear the display */
gfxInit();
- gdispClear(White);
+ gdispClear(GFX_WHITE);
/* Create the 3D window */
{
diff --git a/demos/modules/gwin/gl3d-spin/main.c b/demos/modules/gwin/gl3d-spin/main.c
index 2b80994f..4da6b053 100644
--- a/demos/modules/gwin/gl3d-spin/main.c
+++ b/demos/modules/gwin/gl3d-spin/main.c
@@ -134,7 +134,7 @@ static void spin( void )
int main(void) {
/* Initialize and clear the display */
gfxInit();
- gdispClear(White);
+ gdispClear(GFX_WHITE);
/* Create the 3D window */
{
diff --git a/demos/modules/gwin/graph/main.c b/demos/modules/gwin/graph/main.c
index 23a6a564..2ca4d1a6 100644
--- a/demos/modules/gwin/graph/main.c
+++ b/demos/modules/gwin/graph/main.c
@@ -41,23 +41,23 @@ static const point data[5] = {
// A graph styling
static GGraphStyle GraphStyle1 = {
- { GGRAPH_POINT_DOT, 0, Blue }, // Point
- { GGRAPH_LINE_NONE, 2, Gray }, // Line
- { GGRAPH_LINE_SOLID, 0, White }, // X axis
- { GGRAPH_LINE_SOLID, 0, White }, // Y axis
- { GGRAPH_LINE_DASH, 5, Gray, 50 }, // X grid
- { GGRAPH_LINE_DOT, 7, Yellow, 50 }, // Y grid
+ { GGRAPH_POINT_DOT, 0, GFX_BLUE }, // Point
+ { GGRAPH_LINE_NONE, 2, GFX_GRAY }, // Line
+ { GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // X axis
+ { GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // Y axis
+ { GGRAPH_LINE_DASH, 5, GFX_GRAY, 50 }, // X grid
+ { GGRAPH_LINE_DOT, 7, GFX_YELLOW, 50 }, // Y grid
GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // Flags
};
// Another graph styling
static const GGraphStyle GraphStyle2 = {
- { GGRAPH_POINT_SQUARE, 5, Red }, // Point
- { GGRAPH_LINE_DOT, 2, Pink }, // Line
- { GGRAPH_LINE_SOLID, 0, White }, // X axis
- { GGRAPH_LINE_SOLID, 0, White }, // Y axis
- { GGRAPH_LINE_DASH, 5, Gray, 50 }, // X grid
- { GGRAPH_LINE_DOT, 7, Yellow, 50 }, // Y grid
+ { GGRAPH_POINT_SQUARE, 5, GFX_RED }, // Point
+ { GGRAPH_LINE_DOT, 2, GFX_PINK }, // Line
+ { GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // X axis
+ { GGRAPH_LINE_SOLID, 0, GFX_WHITE }, // Y axis
+ { GGRAPH_LINE_DASH, 5, GFX_GRAY, 50 }, // X grid
+ { GGRAPH_LINE_DOT, 7, GFX_YELLOW, 50 }, // Y grid
GWIN_GRAPH_STYLE_POSITIVE_AXIS_ARROWS // Flags
};
@@ -90,7 +90,7 @@ int main(void) {
// Modify the style
gwinGraphStartSet(gh);
- GraphStyle1.point.color = Green;
+ GraphStyle1.point.color = GFX_GREEN;
gwinGraphSetStyle(gh, &GraphStyle1);
// Draw a different sine wave
diff --git a/demos/modules/gwin/imagebox/main.c b/demos/modules/gwin/imagebox/main.c
index 4b864f00..c4f70df2 100644
--- a/demos/modules/gwin/imagebox/main.c
+++ b/demos/modules/gwin/imagebox/main.c
@@ -53,7 +53,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
diff --git a/demos/modules/gwin/keyboard/main.c b/demos/modules/gwin/keyboard/main.c
index 47a10fc0..d81ac6a3 100644
--- a/demos/modules/gwin/keyboard/main.c
+++ b/demos/modules/gwin/keyboard/main.c
@@ -47,7 +47,7 @@ static void createWidgets(void) {
wi.g.x = 0; wi.g.y = 0;
wi.g.width = gdispGetWidth(); wi.g.height = gdispGetHeight()/2;
ghConsole = gwinConsoleCreate(0, &wi.g);
- gwinSetColor(ghConsole, Black);
+ gwinSetColor(ghConsole, GFX_BLACK);
gwinSetBgColor(ghConsole, HTML2COLOR(0xF0F0F0));
gwinShow(ghConsole);
gwinClear(ghConsole);
@@ -71,7 +71,7 @@ int main(void) {
font = gdispOpenFont("*"); // Get the first defined font.
gwinSetDefaultFont(font);
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// Create the gwin windows/widgets
createWidgets();
diff --git a/demos/modules/gwin/label/main.c b/demos/modules/gwin/label/main.c
index 425436ea..f1fb6b92 100644
--- a/demos/modules/gwin/label/main.c
+++ b/demos/modules/gwin/label/main.c
@@ -61,7 +61,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("*"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
diff --git a/demos/modules/gwin/list/main.c b/demos/modules/gwin/list/main.c
index 0102f276..22a2074e 100644
--- a/demos/modules/gwin/list/main.c
+++ b/demos/modules/gwin/list/main.c
@@ -77,7 +77,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
diff --git a/demos/modules/gwin/progressbar/main.c b/demos/modules/gwin/progressbar/main.c
index 8e9e8352..374728cf 100644
--- a/demos/modules/gwin/progressbar/main.c
+++ b/demos/modules/gwin/progressbar/main.c
@@ -17,7 +17,7 @@ int main(void) {
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
_createWidget();
diff --git a/demos/modules/gwin/radio/main.c b/demos/modules/gwin/radio/main.c
index 59b86983..18c34e4c 100644
--- a/demos/modules/gwin/radio/main.c
+++ b/demos/modules/gwin/radio/main.c
@@ -81,7 +81,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
diff --git a/demos/modules/gwin/slider/main.c b/demos/modules/gwin/slider/main.c
index 66cd7a1b..5e90c554 100644
--- a/demos/modules/gwin/slider/main.c
+++ b/demos/modules/gwin/slider/main.c
@@ -70,12 +70,12 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
- gwinSetColor(ghConsole, Green);
- gwinSetBgColor(ghConsole, White);
+ gwinSetColor(ghConsole, GFX_GREEN);
+ gwinSetBgColor(ghConsole, GFX_WHITE);
gwinClear(ghConsole);
// We want to listen for widget events
diff --git a/demos/modules/gwin/tabset/main.c b/demos/modules/gwin/tabset/main.c
index f70ab909..c4472c39 100644
--- a/demos/modules/gwin/tabset/main.c
+++ b/demos/modules/gwin/tabset/main.c
@@ -76,7 +76,7 @@ int main(void) {
// Set the widget defaults
gwinSetDefaultFont(gdispOpenFont("UI2"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// create the widget
createWidgets();
diff --git a/demos/modules/gwin/textedit/main.c b/demos/modules/gwin/textedit/main.c
index 4072f983..b3fafcf0 100644
--- a/demos/modules/gwin/textedit/main.c
+++ b/demos/modules/gwin/textedit/main.c
@@ -50,8 +50,8 @@ static void guiCreate(void)
wi.g.width = gdispGetWidth()/2;
wi.g.height = gdispGetHeight();
ghConsole = gwinConsoleCreate(0, &wi.g);
- gwinSetColor(ghConsole, Yellow);
- gwinSetBgColor(ghConsole, Black);
+ gwinSetColor(ghConsole, GFX_YELLOW);
+ gwinSetBgColor(ghConsole, GFX_BLACK);
gwinSetFont(ghConsole, gdispOpenFont("UI2"));
gwinClear(ghConsole);
@@ -102,11 +102,11 @@ int main(void) {
gfxInit();
- gdispClear(Silver);
+ gdispClear(GFX_SILVER);
gwinSetDefaultFont(gdispOpenFont("DejaVuSans16"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gwinSetDefaultColor(Black);
- gwinSetDefaultBgColor(White);
+ gwinSetDefaultColor(GFX_BLACK);
+ gwinSetDefaultBgColor(GFX_WHITE);
geventListenerInit(&gl);
geventAttachSource(&gl, ginputGetKeyboard(0), GLISTEN_KEYTRANSITIONS|GLISTEN_KEYUP);
diff --git a/demos/modules/gwin/textedit_virtual_keyboard/main.c b/demos/modules/gwin/textedit_virtual_keyboard/main.c
index 7b89423f..6bc29a57 100644
--- a/demos/modules/gwin/textedit_virtual_keyboard/main.c
+++ b/demos/modules/gwin/textedit_virtual_keyboard/main.c
@@ -80,11 +80,11 @@ int main(void)
{
gfxInit();
- gdispClear(Silver);
+ gdispClear(GFX_SILVER);
gwinSetDefaultFont(gdispOpenFont("DejaVuSans16"));
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gwinSetDefaultColor(Black);
- gwinSetDefaultBgColor(White);
+ gwinSetDefaultColor(GFX_BLACK);
+ gwinSetDefaultBgColor(GFX_WHITE);
geventListenerInit(&gl);
geventAttachSource(&gl, ginputGetKeyboard(0), 0);
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c
index 8252002b..5f98387e 100644
--- a/demos/modules/gwin/widgets/main.c
+++ b/demos/modules/gwin/widgets/main.c
@@ -48,7 +48,7 @@
/* Our custom yellow style */
static const GWidgetStyle YellowWidgetStyle = {
- Yellow, // window background
+ GFX_YELLOW, // window background
HTML2COLOR(0x800000), // focus
// enabled color set
@@ -225,7 +225,7 @@ static void createWidgets(void) {
wi.g.x = pagewidth;
wi.g.width = pagewidth;
ghConsole = gwinConsoleCreate(0, &wi.g);
- gwinSetColor(ghConsole, Black);
+ gwinSetColor(ghConsole, GFX_BLACK);
gwinSetBgColor(ghConsole, HTML2COLOR(0xF0F0F0));
#else
@@ -268,7 +268,7 @@ static void createWidgets(void) {
wi.g.x = ScrWidth/2+border;
wi.g.width = ScrWidth/2 - 2*border;
ghConsole = gwinConsoleCreate(0, &wi.g);
- gwinSetColor(ghConsole, Black);
+ gwinSetColor(ghConsole, GFX_BLACK);
gwinSetBgColor(ghConsole, HTML2COLOR(0xF0F0F0));
pagewidth = gwinGetInnerWidth(ghPgButtons);
@@ -504,7 +504,7 @@ int main(void) {
font = gdispOpenFont("*"); // Get the first defined font.
gwinSetDefaultFont(font);
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
- gdispClear(White);
+ gdispClear(GFX_WHITE);
// Create the gwin windows/widgets
createWidgets();