From 785047b0aa1d43d5f33ae69d7e0ed708df6db0bd Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Wed, 10 Apr 2019 17:33:15 +0200 Subject: Introduce type gImage to replace v2.x gdispImage --- src/gwin/gwin.c | 2 +- src/gwin/gwin.h | 2 +- src/gwin/gwin_button.c | 2 +- src/gwin/gwin_button.h | 2 +- src/gwin/gwin_container.c | 2 +- src/gwin/gwin_frame.c | 2 +- src/gwin/gwin_frame.h | 2 +- src/gwin/gwin_image.h | 2 +- src/gwin/gwin_list.c | 2 +- src/gwin/gwin_list.h | 4 ++-- src/gwin/gwin_progressbar.c | 2 +- src/gwin/gwin_slider.c | 2 +- src/gwin/gwin_tabset.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/gwin') diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index b254fb96..5c0fd9ae 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -403,7 +403,7 @@ void gwinBlitArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord s #endif #if GDISP_NEED_IMAGE - gdispImageError gwinDrawImage(GHandle gh, gdispImage *img, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord sx, gCoord sy) { + gdispImageError gwinDrawImage(GHandle gh, gImage *img, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord sx, gCoord sy) { gdispImageError ret; if (!_gwinDrawStart(gh)) return GDISP_IMAGE_ERR_OK; diff --git a/src/gwin/gwin.h b/src/gwin/gwin.h index 6ca9964b..15d7d4fb 100644 --- a/src/gwin/gwin.h +++ b/src/gwin/gwin.h @@ -1056,7 +1056,7 @@ typedef enum { GWIN_NORMAL, GWIN_MAXIMIZE, GWIN_MINIMIZE } GWindowMinMax; * * @api */ - gdispImageError gwinDrawImage(GHandle gh, gdispImage *img, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord sx, gCoord sy); + gdispImageError gwinDrawImage(GHandle gh, gImage *img, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord sx, gCoord sy); #endif /*------------------------------------------------- diff --git a/src/gwin/gwin_button.c b/src/gwin/gwin_button.c index 7d588e80..39d19d35 100644 --- a/src/gwin/gwin_button.c +++ b/src/gwin/gwin_button.c @@ -466,7 +466,7 @@ static const GColorSet *getButtonColors(GWidgetObject *gw) { sy = 0; } - gdispGImageDraw(gw->g.display, (gdispImage *)param, gw->g.x, gw->g.y, gw->g.width, gw->g.height, 0, sy); + gdispGImageDraw(gw->g.display, (gImage *)param, gw->g.x, gw->g.y, gw->g.width, gw->g.height, 0, sy); gdispGDrawStringBox(gw->g.display, gw->g.x+1, gw->g.y+1, gw->g.width-2, gw->g.height-2, gw->text, gw->g.font, pcol->text, gJustifyCenter); } #endif diff --git a/src/gwin/gwin_button.h b/src/gwin/gwin_button.h index ff6e0a22..818b439c 100644 --- a/src/gwin/gwin_button.h +++ b/src/gwin/gwin_button.h @@ -101,7 +101,7 @@ gBool gwinButtonIsPressed(GHandle gh); * @note In your custom button drawing function you may optionally call these * standard functions and then draw your extra details on top. * @note The standard functions below ignore the param parameter except for @p gwinButtonDraw_Image(). - * @note The image custom draw function @p gwinButtonDraw_Image() uses param to pass in the gdispImage pointer. + * @note The image custom draw function @p gwinButtonDraw_Image() uses param to pass in the gImage pointer. * @note These custom drawing routines don't have to worry about setting clipping as the framework * sets clipping to the object window prior to calling these routines. * diff --git a/src/gwin/gwin_container.c b/src/gwin/gwin_container.c index 7f5f60bc..6bc2b655 100644 --- a/src/gwin/gwin_container.c +++ b/src/gwin/gwin_container.c @@ -168,7 +168,7 @@ void gwinContainerDraw_Std(GWidgetObject *gw, void *param) { #if GDISP_NEED_IMAGE void gwinContainerDraw_Image(GWidgetObject *gw, void *param) { - #define gi ((gdispImage *)param) + #define gi ((gImage *)param) gCoord x, y, iw, ih, mx, my; if (gw->g.vmt != (gwinVMT *)&containerVMT) diff --git a/src/gwin/gwin_frame.c b/src/gwin/gwin_frame.c index 402da514..8450b196 100644 --- a/src/gwin/gwin_frame.c +++ b/src/gwin/gwin_frame.c @@ -294,7 +294,7 @@ void gwinFrameDraw_Std(GWidgetObject *gw, void *param) { #if GDISP_NEED_IMAGE void gwinFrameDraw_Image(GWidgetObject *gw, void *param) { - #define gi ((gdispImage *)param) + #define gi ((gImage *)param) gCoord x, y, iw, ih, mx, my; if (gw->g.vmt != (gwinVMT *)&frameVMT) diff --git a/src/gwin/gwin_frame.h b/src/gwin/gwin_frame.h index df26008d..c45222c3 100644 --- a/src/gwin/gwin_frame.h +++ b/src/gwin/gwin_frame.h @@ -106,7 +106,7 @@ void gwinFrameDraw_Std(GWidgetObject *gw, void *param); * @param[in] gw The widget object (must be a frame object). * @param[in] param A parameter passed in from the user. Ignored by this function. * - * @note The image custom draw function @p gwinFrameDraw_Image() uses param to pass in the gdispImage pointer. + * @note The image custom draw function @p gwinFrameDraw_Image() uses param to pass in the gImage pointer. * The image must be already opened before calling @p gwinSetCustomDraw(). * * @api diff --git a/src/gwin/gwin_image.h b/src/gwin/gwin_image.h index 6914c201..6cee8e02 100644 --- a/src/gwin/gwin_image.h +++ b/src/gwin/gwin_image.h @@ -34,7 +34,7 @@ // An image window typedef struct GImageObject { GWindowObject g; - gdispImage image; // The image itself + gImage image; // The image itself #if GWIN_NEED_IMAGE_ANIMATION GTimer timer; // Timer used for animated images #endif diff --git a/src/gwin/gwin_list.c b/src/gwin/gwin_list.c index 82b5c106..d0b0e3e7 100644 --- a/src/gwin/gwin_list.c +++ b/src/gwin/gwin_list.c @@ -677,7 +677,7 @@ void gwinListViewItem(GHandle gh, int item) { } #if GWIN_NEED_LIST_IMAGES - void gwinListItemSetImage(GHandle gh, int item, gdispImage *pimg) { + void gwinListItemSetImage(GHandle gh, int item, gImage *pimg) { const gfxQueueASyncItem * qi; int i; diff --git a/src/gwin/gwin_list.h b/src/gwin/gwin_list.h index 80488c08..a438e2a8 100644 --- a/src/gwin/gwin_list.h +++ b/src/gwin/gwin_list.h @@ -100,7 +100,7 @@ typedef struct ListItem { gU16 param; // A parameter the user can specify himself const char* text; #if GWIN_NEED_LIST_IMAGES - gdispImage* pimg; + gImage* pimg; #endif } ListItem; @@ -361,7 +361,7 @@ void gwinListViewItem(GHandle gh, int item); * for this list is to call gwinListDeleteAll(). * */ - void gwinListItemSetImage(GHandle gh, int item, gdispImage *pimg); + void gwinListItemSetImage(GHandle gh, int item, gImage *pimg); #endif /** diff --git a/src/gwin/gwin_progressbar.c b/src/gwin/gwin_progressbar.c index b907ec2b..d1c43f5e 100644 --- a/src/gwin/gwin_progressbar.c +++ b/src/gwin/gwin_progressbar.c @@ -263,7 +263,7 @@ void gwinProgressbarDraw_Std(GWidgetObject *gw, void *param) { #if GDISP_NEED_IMAGE void gwinProgressbarDraw_Image(GWidgetObject *gw, void *param) { #define gsw ((GProgressbarObject *)gw) - #define gi ((gdispImage *)param) + #define gi ((gImage *)param) const GColorSet * pcol; gCoord z, v; diff --git a/src/gwin/gwin_slider.c b/src/gwin/gwin_slider.c index 22373027..c3f52ef9 100644 --- a/src/gwin/gwin_slider.c +++ b/src/gwin/gwin_slider.c @@ -389,7 +389,7 @@ void gwinSliderDraw_Std(GWidgetObject *gw, void *param) { #if GDISP_NEED_IMAGE void gwinSliderDraw_Image(GWidgetObject *gw, void *param) { #define gsw ((GSliderObject *)gw) - #define gi ((gdispImage *)param) + #define gi ((gImage *)param) const GColorSet * pcol; gCoord z, v; diff --git a/src/gwin/gwin_tabset.c b/src/gwin/gwin_tabset.c index 80a5f10d..5f56ea07 100644 --- a/src/gwin/gwin_tabset.c +++ b/src/gwin/gwin_tabset.c @@ -532,7 +532,7 @@ void gwinTabsetDraw_Std(GWidgetObject *gw, void *param) { #if GDISP_NEED_IMAGE void gwinTabsetDraw_Image(GWidgetObject *gw, void *param) { - #define gi ((gdispImage *)param) + #define gi ((gImage *)param) gCoord x, y, iw, ih, mx, my; if (gw->g.vmt != (gwinVMT *)&tabsetVMT) -- cgit v1.2.3