aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin')
-rw-r--r--src/gwin/gwin.c16
-rw-r--r--src/gwin/gwin.h14
-rw-r--r--src/gwin/gwin_button.c2
-rw-r--r--src/gwin/gwin_checkbox.c2
-rw-r--r--src/gwin/gwin_console.c2
-rw-r--r--src/gwin/gwin_frame.c4
-rw-r--r--src/gwin/gwin_gl3d.c2
-rw-r--r--src/gwin/gwin_graph.h6
-rw-r--r--src/gwin/gwin_image.c2
-rw-r--r--src/gwin/gwin_label.c2
-rw-r--r--src/gwin/gwin_list.c2
-rw-r--r--src/gwin/gwin_radio.c4
-rw-r--r--src/gwin/gwin_tabset.c4
-rw-r--r--src/gwin/gwin_widget.h12
14 files changed, 37 insertions, 37 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 00b2557d..7ddb2b8d 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 = GFX_WHITE;
-static color_t defaultBgColor = GFX_BLACK;
+static gColor defaultFgColor = GFX_WHITE;
+static gColor defaultBgColor = GFX_BLACK;
#if GDISP_NEED_TEXT
static font_t defaultFont;
#endif
@@ -161,19 +161,19 @@ void gwinClearInit(GWindowInit *pwi) {
*p++ = 0;
}
-void gwinSetDefaultColor(color_t clr) {
+void gwinSetDefaultColor(gColor clr) {
defaultFgColor = clr;
}
-color_t gwinGetDefaultColor(void) {
+gColor gwinGetDefaultColor(void) {
return defaultFgColor;
}
-void gwinSetDefaultBgColor(color_t bgclr) {
+void gwinSetDefaultBgColor(gColor bgclr) {
defaultBgColor = bgclr;
}
-color_t gwinGetDefaultBgColor(void) {
+gColor gwinGetDefaultBgColor(void) {
return defaultBgColor;
}
@@ -338,8 +338,8 @@ void gwinBlitArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord s
#endif
#if GDISP_NEED_PIXELREAD
- color_t gwinGetPixelColor(GHandle gh, gCoord x, gCoord y) {
- if (!_gwinDrawStart(gh)) return (color_t)0;
+ gColor gwinGetPixelColor(GHandle gh, gCoord x, gCoord y) {
+ if (!_gwinDrawStart(gh)) return (gColor)0;
return gdispGGetPixelColor(gh->display, gh->x+x, gh->y+y);
_gwinDrawEnd(gh);
}
diff --git a/src/gwin/gwin.h b/src/gwin/gwin.h
index 2ab50fd9..67bc2e42 100644
--- a/src/gwin/gwin.h
+++ b/src/gwin/gwin.h
@@ -48,8 +48,8 @@ typedef struct GWindowObject {
gCoord y; /**< The position relative to the screen */
gCoord width; /**< The width of this window */
gCoord height; /**< The height of this window */
- color_t color; /**< The current foreground drawing color */
- color_t bgcolor; /**< The current background drawing color */
+ gColor color; /**< The current foreground drawing color */
+ gColor bgcolor; /**< The current background drawing color */
uint32_t flags; /**< Window flags (the meaning is private to the GWIN class) */
#if GDISP_NEED_TEXT
font_t font; /**< The current font */
@@ -137,7 +137,7 @@ void gwinClearInit(GWindowInit *pwi);
*
* @api
*/
-void gwinSetDefaultColor(color_t clr);
+void gwinSetDefaultColor(gColor clr);
/**
* @brief Get the default foreground color for all new GWIN windows
@@ -146,7 +146,7 @@ void gwinSetDefaultColor(color_t clr);
*
* @api
*/
-color_t gwinGetDefaultColor(void);
+gColor gwinGetDefaultColor(void);
/**
* @brief Set the default background color for all new GWIN windows
@@ -155,7 +155,7 @@ color_t gwinGetDefaultColor(void);
*
* @api
*/
-void gwinSetDefaultBgColor(color_t bgclr);
+void gwinSetDefaultBgColor(gColor bgclr);
/**
* @brief Get the default background color for all new GWIN windows
@@ -164,7 +164,7 @@ void gwinSetDefaultBgColor(color_t bgclr);
*
* @api
*/
-color_t gwinGetDefaultBgColor(void);
+gColor gwinGetDefaultBgColor(void);
#if GDISP_NEED_TEXT || defined(__DOXYGEN__)
/**
@@ -871,7 +871,7 @@ void gwinBlitArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord s
*
* @api
*/
- color_t gwinGetPixelColor(GHandle gh, gCoord x, gCoord y);
+ gColor gwinGetPixelColor(GHandle gh, gCoord x, gCoord y);
#endif
/*-------------------------------------------------
diff --git a/src/gwin/gwin_button.c b/src/gwin/gwin_button.c
index 2e637140..38115ae5 100644
--- a/src/gwin/gwin_button.c
+++ b/src/gwin/gwin_button.c
@@ -184,7 +184,7 @@ static const GColorSet *getButtonColors(GWidgetObject *gw) {
fixed alpha;
fixed dalpha;
gCoord i;
- color_t tcol, bcol;
+ gColor tcol, bcol;
(void) param;
diff --git a/src/gwin/gwin_checkbox.c b/src/gwin/gwin_checkbox.c
index 42734626..5e6806fd 100644
--- a/src/gwin/gwin_checkbox.c
+++ b/src/gwin/gwin_checkbox.c
@@ -255,7 +255,7 @@ void gwinCheckboxDraw_CheckOnRight(GWidgetObject *gw, void *param) {
fixed alpha;
fixed dalpha;
gCoord i;
- color_t tcol, bcol;
+ gColor tcol, bcol;
(void) param;
if (gw->g.vmt != (gwinVMT *)&checkboxVMT) return;
diff --git a/src/gwin/gwin_console.c b/src/gwin/gwin_console.c
index d2b55f5d..c5db3da8 100644
--- a/src/gwin/gwin_console.c
+++ b/src/gwin/gwin_console.c
@@ -113,7 +113,7 @@
return gTrue;
}
- static color_t ESCPrintColor(GConsoleObject *gcw) {
+ static gColor ESCPrintColor(GConsoleObject *gcw) {
switch(gcw->currattr & (ESC_REDBIT|ESC_GREENBIT|ESC_BLUEBIT|ESC_USECOLOR)) {
case (ESC_USECOLOR):
return GFX_BLACK;
diff --git a/src/gwin/gwin_frame.c b/src/gwin/gwin_frame.c
index c79e813d..45bc4bc2 100644
--- a/src/gwin/gwin_frame.c
+++ b/src/gwin/gwin_frame.c
@@ -230,8 +230,8 @@ GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint
void gwinFrameDraw_Transparent(GWidgetObject *gw, void *param) {
const GColorSet *pcol;
gCoord pos;
- color_t contrast;
- color_t btn;
+ gColor contrast;
+ gColor btn;
(void)param;
if (gw->g.vmt != (gwinVMT *)&frameVMT)
diff --git a/src/gwin/gwin_gl3d.c b/src/gwin/gwin_gl3d.c
index 2c2861e2..5719f811 100644
--- a/src/gwin/gwin_gl3d.c
+++ b/src/gwin/gwin_gl3d.c
@@ -86,7 +86,7 @@ static void gl3dRedraw(GWindowObject *gh) {
ZBuffer * zb;
zb = ((GGL3DObject *)gh)->glcxt->zb;
- gdispGBlitArea(gh->display, gh->x, gh->y, zb->xsize, zb->ysize, 0, 0, zb->linesize/sizeof(color_t), (const gPixel *)zb->pbuf);
+ gdispGBlitArea(gh->display, gh->x, gh->y, zb->xsize, zb->ysize, 0, 0, zb->linesize/sizeof(gColor), (const gPixel *)zb->pbuf);
}
static int gl3dResizeGLViewport(GLContext *c, int *xsize_ptr, int *ysize_ptr) {
diff --git a/src/gwin/gwin_graph.h b/src/gwin/gwin_graph.h
index eaaa82ab..c16c0d9b 100644
--- a/src/gwin/gwin_graph.h
+++ b/src/gwin/gwin_graph.h
@@ -34,7 +34,7 @@ typedef enum GGraphPointType_e {
typedef struct GGraphPointStyle_t {
GGraphPointType type;
gCoord size;
- color_t color;
+ gColor color;
} GGraphPointStyle;
typedef enum GGraphLineType_e {
@@ -44,13 +44,13 @@ typedef enum GGraphLineType_e {
typedef struct GGraphLineStyle_t {
GGraphLineType type;
gCoord size;
- color_t color;
+ gColor color;
} GGraphLineStyle;
typedef struct GGraphGridStyle_t {
GGraphLineType type;
gCoord size;
- color_t color;
+ gColor color;
gCoord spacing;
} GGraphGridStyle;
diff --git a/src/gwin/gwin_image.c b/src/gwin/gwin_image.c
index 73db206e..547145ae 100644
--- a/src/gwin/gwin_image.c
+++ b/src/gwin/gwin_image.c
@@ -35,7 +35,7 @@ static void ImageDestroy(GWindowObject *gh) {
static void ImageRedraw(GHandle gh) {
gCoord x, y, w, h, dx, dy;
- color_t bg;
+ gColor bg;
#if GWIN_NEED_IMAGE_ANIMATION
delaytime_t delay;
#endif
diff --git a/src/gwin/gwin_label.c b/src/gwin/gwin_label.c
index d8ca1512..a067953a 100644
--- a/src/gwin/gwin_label.c
+++ b/src/gwin/gwin_label.c
@@ -131,7 +131,7 @@ void gwinLabelSetBorder(GHandle gh, gBool border) {
static void gwinLabelDraw(GWidgetObject *gw, justify_t justify) {
gCoord w, h;
- color_t c;
+ gColor c;
// is it a valid handle?
if (gw->g.vmt != (gwinVMT *)&labelVMT)
diff --git a/src/gwin/gwin_list.c b/src/gwin/gwin_list.c
index 49caefe1..c3a2b879 100644
--- a/src/gwin/gwin_list.c
+++ b/src/gwin/gwin_list.c
@@ -704,7 +704,7 @@ void gwinListDefaultDraw(GWidgetObject* gw, void* param) {
const gfxQueueASyncItem* qi;
int i;
gCoord x, y, iheight, iwidth;
- color_t fill;
+ gColor fill;
const GColorSet * ps;
#if GWIN_NEED_LIST_IMAGES
gCoord sy;
diff --git a/src/gwin/gwin_radio.c b/src/gwin/gwin_radio.c
index 53ca494b..d4ce2faf 100644
--- a/src/gwin/gwin_radio.c
+++ b/src/gwin/gwin_radio.c
@@ -264,7 +264,7 @@ void gwinRadioDraw_Radio(GWidgetObject *gw, void *param) {
fixed alpha;
fixed dalpha;
gCoord i;
- color_t tcol, bcol;
+ gColor tcol, bcol;
(void) param;
if (gw->g.vmt != (gwinVMT *)&radioVMT) return;
@@ -289,7 +289,7 @@ void gwinRadioDraw_Radio(GWidgetObject *gw, void *param) {
fixed alpha;
fixed dalpha;
gCoord i;
- color_t tcol, bcol;
+ gColor tcol, bcol;
(void) param;
if (gw->g.vmt != (gwinVMT *)&radioVMT) return;
diff --git a/src/gwin/gwin_tabset.c b/src/gwin/gwin_tabset.c
index f3e07eea..185d92b2 100644
--- a/src/gwin/gwin_tabset.c
+++ b/src/gwin/gwin_tabset.c
@@ -423,7 +423,7 @@ void gwinTabsetSetTab(GHandle gh) {
#else
static void fgarea(GWidgetObject *gw, const char *text, gCoord y, gCoord x, gCoord w) {
const GColorSet * pcol;
- color_t tcol;
+ gColor tcol;
pcol = (gw->g.flags & GWIN_FLG_SYSENABLED) ? &gw->pstyle->pressed : &gw->pstyle->disabled;
@@ -439,7 +439,7 @@ void gwinTabsetSetTab(GHandle gh) {
const GColorSet * pcol;
fixed alpha;
gCoord i;
- color_t tcol, bcol;
+ gColor tcol, bcol;
pcol = (gw->g.flags & GWIN_FLG_SYSENABLED) ? &gw->pstyle->enabled : &gw->pstyle->disabled;
diff --git a/src/gwin/gwin_widget.h b/src/gwin/gwin_widget.h
index c74eb877..309b62ec 100644
--- a/src/gwin/gwin_widget.h
+++ b/src/gwin/gwin_widget.h
@@ -35,10 +35,10 @@ struct GWidgetObject;
* @{
*/
typedef struct GColorSet {
- color_t text; /**< The text color */
- color_t edge; /**< The edge color */
- color_t fill; /**< The fill color */
- color_t progress; /**< The color of progress bars */
+ gColor text; /**< The text color */
+ gColor edge; /**< The edge color */
+ gColor fill; /**< The fill color */
+ gColor progress; /**< The color of progress bars */
} GColorSet;
/** @} */
@@ -50,8 +50,8 @@ typedef struct GColorSet {
* @{
*/
typedef struct GWidgetStyle {
- color_t background; /**< The window background color */
- color_t focus; /**< The color when a widget is focused */
+ gColor background; /**< The window background color */
+ gColor focus; /**< The color when a widget is focused */
GColorSet enabled; /**< The colors when enabled */
GColorSet disabled; /**< The colors when disabled */
GColorSet pressed; /**< The colors when pressed */