aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-07-08 11:08:55 +1000
committerinmarket <andrewh@inmarket.com.au>2018-07-08 11:08:55 +1000
commitcfb1b2a488d5b1a9e14c889b80e5324d16f63f1b (patch)
tree08ffe293a154f08325bca487ba73de1843e94ba5
parent2ab2d77fcba42467b62f2be732cb8dc00510fe19 (diff)
downloaduGFX-cfb1b2a488d5b1a9e14c889b80e5324d16f63f1b.tar.gz
uGFX-cfb1b2a488d5b1a9e14c889b80e5324d16f63f1b.tar.bz2
uGFX-cfb1b2a488d5b1a9e14c889b80e5324d16f63f1b.zip
Change pixel_t to gPixel
-rw-r--r--changelog.txt1
-rw-r--r--demos/modules/gdisp/pixmap/main.c2
-rw-r--r--drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c8
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c4
-rw-r--r--drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c4
-rw-r--r--drivers/multiple/Win32/gdisp_lld_Win32.c24
-rw-r--r--drivers/multiple/X/gdisp_lld_X.c2
-rw-r--r--drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c2
-rw-r--r--drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp2
-rw-r--r--src/gdisp/gdisp.c4
-rw-r--r--src/gdisp/gdisp.h5
-rw-r--r--src/gdisp/gdisp_driver.h2
-rw-r--r--src/gdisp/gdisp_image_bmp.c12
-rw-r--r--src/gdisp/gdisp_image_gif.c4
-rw-r--r--src/gdisp/gdisp_image_jpg.c8
-rw-r--r--src/gdisp/gdisp_image_native.c18
-rw-r--r--src/gdisp/gdisp_image_png.c2
-rw-r--r--src/gdisp/gdisp_pixmap.c2
-rw-r--r--src/gdisp/gdisp_pixmap.h2
-rw-r--r--src/gwin/gwin.c2
-rw-r--r--src/gwin/gwin.h2
-rw-r--r--src/gwin/gwin_gl3d.c2
22 files changed, 58 insertions, 56 deletions
diff --git a/changelog.txt b/changelog.txt
index 7dd306b9..09957a0e 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -21,6 +21,7 @@ FEATURE: Added gI64 and gU64 when the compiler supports it. GFX_TYPE_64 macro is
FEATURE: Fixed headers to ensure size_t, NULL are always defined. size_t is not used as it may be 64bit.
CHANGE: Added type gPoint to replace V2.x point and point_t
CHANGE: Added type gCoord to replace V2.x coord_t
+CHANGE: Added type gPixel to replace V2.x pixel_t
FIX: Added gfxRealloc() to Qt port
FIX: Fixed UC1610 driver private area initialisation
FIX: Fixed ST7735 driver and added kapacuk changes
diff --git a/demos/modules/gdisp/pixmap/main.c b/demos/modules/gdisp/pixmap/main.c
index ce9a4a13..450620e4 100644
--- a/demos/modules/gdisp/pixmap/main.c
+++ b/demos/modules/gdisp/pixmap/main.c
@@ -33,7 +33,7 @@
#define PIXMAP_HEIGHT 10
static GDisplay* pixmap;
-static pixel_t* surface;
+static gPixel* surface;
int main(void) {
gCoord width, height;
diff --git a/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c b/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
index 2a9d2488..496a3d91 100644
--- a/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
+++ b/drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
@@ -345,16 +345,16 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
gCoord lg, x, y;
uint16_t c1, c2;
unsigned tuples;
- const pixel_t *buffer;
+ const gPixel *buffer;
#if GDISP_PACKED_PIXELS
unsigned pnum, pstart;
const uint8_t *p;
#else
- const pixel_t *p;
+ const gPixel *p;
#endif
tuples = (g->p.cx * g->p.cy + 1)>>1;
- buffer = (const pixel_t *)g->p.ptr;
+ buffer = (const gPixel *)g->p.ptr;
/* Set up the data window to transfer */
acquire_bus(g);
@@ -428,7 +428,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
srccx = (g->p.x2 + 1) & ~1;
#endif
pstart = g->p.y1 * g->p.x2 + g->p.x1; // The starting pixel number
- buffer = (const pixel_t)(((const uint8_t *)buffer) + ((pstart>>1) * 3)); // The buffer start position
+ buffer = (const gPixel)(((const uint8_t *)buffer) + ((pstart>>1) * 3)); // The buffer start position
lg = ((g->p.x2-g->p.cx)>>1)*3; // The buffer gap between lines
pnum = pstart + g->p.x2*y + x; // Adjustment for controller craziness
p = ((const uint8_t *)buffer) + (((g->p.x2*y + x)>>1)*3); // Adjustment for controller craziness
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
index b8ee55cb..7a9c4e27 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
+++ b/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
@@ -258,10 +258,10 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#endif
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
- pixel_t *buffer;
+ gPixel *buffer;
gCoord ycnt;
- buffer = (pixel_t *)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;
+ buffer = (gPixel *)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;
acquire_bus(g);
set_viewport(g);
diff --git a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c
index 0631b0c0..c44a262f 100644
--- a/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c
+++ b/drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c
@@ -294,10 +294,10 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g) {
#endif
LLDSPEC void gdisp_lld_blit_area(GDisplay* g) {
- pixel_t* buffer;
+ gPixel* buffer;
gCoord ycnt;
- buffer = (pixel_t*)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;
+ buffer = (gPixel*)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;
acquire_bus(g);
set_viewport(g);
diff --git a/drivers/multiple/Win32/gdisp_lld_Win32.c b/drivers/multiple/Win32/gdisp_lld_Win32.c
index 5e23b3d5..36776d49 100644
--- a/drivers/multiple/Win32/gdisp_lld_Win32.c
+++ b/drivers/multiple/Win32/gdisp_lld_Win32.c
@@ -1224,16 +1224,16 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#endif
#if GDISP_HARDWARE_BITFILLS && GDISP_NEED_CONTROL
- static pixel_t *rotateimg(GDisplay *g, const pixel_t *buffer) {
- pixel_t *dstbuf;
- pixel_t *dst;
- const pixel_t *src;
+ static gPixel *rotateimg(GDisplay *g, const gPixel *buffer) {
+ gPixel *dstbuf;
+ gPixel *dst;
+ const gPixel *src;
size_t sz;
gCoord i, j;
// Allocate the destination buffer
sz = (size_t)g->p.cx * (size_t)g->p.cy;
- if (!(dstbuf = (pixel_t *)malloc(sz * sizeof(pixel_t))))
+ if (!(dstbuf = (gPixel *)malloc(sz * sizeof(gPixel))))
return 0;
// Copy the bits we need
@@ -1272,7 +1272,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
winPriv * priv;
- pixel_t * buffer;
+ gPixel * buffer;
RECT rect;
BITMAPV4HEADER bmpInfo;
@@ -1300,7 +1300,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
switch(g->g.Orientation) {
case GDISP_ROTATE_0:
default:
- bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(pixel_t);
+ bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(gPixel);
bmpInfo.bV4Width = g->p.x2;
bmpInfo.bV4Height = -g->p.cy; /* top-down image */
rect.top = g->p.y;
@@ -1310,7 +1310,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
break;
case GDISP_ROTATE_90:
if (!(buffer = rotateimg(g, buffer))) return;
- bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(pixel_t);
+ bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(gPixel);
bmpInfo.bV4Width = g->p.cy;
bmpInfo.bV4Height = -g->p.cx; /* top-down image */
rect.bottom = g->g.Width - g->p.x;
@@ -1320,7 +1320,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
break;
case GDISP_ROTATE_180:
if (!(buffer = rotateimg(g, buffer))) return;
- bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(pixel_t);
+ bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(gPixel);
bmpInfo.bV4Width = g->p.cx;
bmpInfo.bV4Height = -g->p.cy; /* top-down image */
rect.bottom = g->g.Height-1 - g->p.y;
@@ -1330,7 +1330,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
break;
case GDISP_ROTATE_270:
if (!(buffer = rotateimg(g, buffer))) return;
- bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(pixel_t);
+ bmpInfo.bV4SizeImage = (g->p.cy*g->p.cx) * sizeof(gPixel);
bmpInfo.bV4Width = g->p.cy;
bmpInfo.bV4Height = -g->p.cx; /* top-down image */
rect.top = g->p.x;
@@ -1340,7 +1340,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
break;
}
#else
- bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(pixel_t);
+ bmpInfo.bV4SizeImage = (g->p.cy*g->p.x2) * sizeof(gPixel);
bmpInfo.bV4Width = g->p.x2;
bmpInfo.bV4Height = -g->p.cy; /* top-down image */
rect.top = g->p.y;
@@ -1365,7 +1365,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#endif
#if GDISP_NEED_CONTROL
- if (buffer != (pixel_t *)g->p.ptr)
+ if (buffer != (gPixel *)g->p.ptr)
free(buffer);
#endif
}
diff --git a/drivers/multiple/X/gdisp_lld_X.c b/drivers/multiple/X/gdisp_lld_X.c
index 78a9cb02..875b9621 100644
--- a/drivers/multiple/X/gdisp_lld_X.c
+++ b/drivers/multiple/X/gdisp_lld_X.c
@@ -443,7 +443,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g)
// Start of Bitblit code
//XImage bitmap;
- //pixel_t *bits;
+ //gPixel *bits;
// bits = malloc(vis.depth * GDISP_SCREEN_WIDTH * GDISP_SCREEN_HEIGHT);
// bitmap = XCreateImage(dis, vis, vis.depth, ZPixmap,
// 0, bits, GDISP_SCREEN_WIDTH, GDISP_SCREEN_HEIGHT,
diff --git a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
index 24460e97..ea235668 100644
--- a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
+++ b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
@@ -538,7 +538,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_BITFILLS
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
netPriv * priv;
- pixel_t * buffer;
+ gPixel * buffer;
uint16_t buf[5];
gCoord x, y;
diff --git a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
index f8420bd3..42c1df35 100644
--- a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
+++ b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
@@ -421,7 +421,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_BITFILLS
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
netPriv * priv;
- pixel_t * buffer;
+ gPixel * buffer;
uint16_t buf[5];
gCoord x, y;
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 96e425fd..60c54b4f 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -1097,7 +1097,7 @@ void gdispGFillArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, color
MUTEX_EXIT(g);
}
-void gdispGBlitArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const pixel_t *buffer) {
+void gdispGBlitArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const gPixel *buffer) {
MUTEX_ENTER(g);
#if NEED_CLIPPING
@@ -3732,7 +3732,7 @@ color_t gdispContrastColor(color_t color) {
}
#if (!defined(gdispPackPixels) && !defined(GDISP_PIXELFORMAT_CUSTOM))
- void gdispPackPixels(pixel_t *buf, gCoord cx, gCoord x, gCoord y, color_t color) {
+ void gdispPackPixels(gPixel *buf, gCoord cx, gCoord x, gCoord y, color_t color) {
/* No mutex required as we only read static data */
#if defined(GDISP_PIXELFORMAT_RGB888)
#error "GDISP: Packed pixels not supported yet"
diff --git a/src/gdisp/gdisp.h b/src/gdisp/gdisp.h
index 3a92d784..1af38afe 100644
--- a/src/gdisp/gdisp.h
+++ b/src/gdisp/gdisp.h
@@ -223,7 +223,7 @@ extern GDisplay *GDISP;
/**
* @brief The type of a pixel.
*/
-typedef color_t pixel_t;
+typedef color_t gPixel;
/* Color Utility Functions */
@@ -452,7 +452,7 @@ void gdispGFillArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, color
*
* @api
*/
-void gdispGBlitArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const pixel_t *buffer);
+void gdispGBlitArea(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const gPixel *buffer);
#define gdispBlitAreaEx(x,y,cx,cy,sx,sy,rx,b) gdispGBlitArea(GDISP,x,y,cx,cy,sx,sy,rx,b)
/**
@@ -1230,6 +1230,7 @@ void gdispGDrawBox(GDisplay *g, gCoord x, gCoord y, gCoord cx, gCoord cy, color_
/* V2 compatibility */
#if GFX_COMPAT_V2
+ typedef gPixel pixel_t;
typedef gCoord coord_t;
typedef gPoint point, point_t;
#endif
diff --git a/src/gdisp/gdisp_driver.h b/src/gdisp/gdisp_driver.h
index 1b6b89d6..863d4c0c 100644
--- a/src/gdisp/gdisp_driver.h
+++ b/src/gdisp/gdisp_driver.h
@@ -308,7 +308,7 @@
*
* @api
*/
- void gdispPackPixels(const pixel_t *buf, gCoord cx, gCoord x, gCoord y, color_t color);
+ void gdispPackPixels(const gPixel *buf, gCoord cx, gCoord x, gCoord y, color_t color);
#endif
//------------------------------------------------------------------------------------------------------------
diff --git a/src/gdisp/gdisp_image_bmp.c b/src/gdisp/gdisp_image_bmp.c
index 54e66abb..7c26cc22 100644
--- a/src/gdisp/gdisp_image_bmp.c
+++ b/src/gdisp/gdisp_image_bmp.c
@@ -24,7 +24,7 @@ typedef struct gdispImagePrivate_BMP {
uint8_t bitsperpixel;
#if GDISP_NEED_IMAGE_BMP_1 || GDISP_NEED_IMAGE_BMP_4 || GDISP_NEED_IMAGE_BMP_4_RLE || GDISP_NEED_IMAGE_BMP_8 || GDISP_NEED_IMAGE_BMP_8_RLE
uint16_t palsize;
- pixel_t *palette;
+ gPixel *palette;
#endif
#if GDISP_NEED_IMAGE_BMP_4_RLE || GDISP_NEED_IMAGE_BMP_8_RLE
uint16_t rlerun;
@@ -41,8 +41,8 @@ typedef struct gdispImagePrivate_BMP {
uint32_t maskalpha;
#endif
size_t frame0pos;
- pixel_t *frame0cache;
- pixel_t buf[GDISP_IMAGE_BMP_BLIT_BUFFER_SIZE];
+ gPixel *frame0cache;
+ gPixel buf[GDISP_IMAGE_BMP_BLIT_BUFFER_SIZE];
} gdispImagePrivate_BMP;
void gdispImageClose_BMP(gdispImage *img) {
@@ -55,7 +55,7 @@ void gdispImageClose_BMP(gdispImage *img) {
gdispImageFree(img, (void *)priv->palette, priv->palsize*sizeof(color_t));
#endif
if (priv->frame0cache)
- gdispImageFree(img, (void *)priv->frame0cache, img->width*img->height*sizeof(pixel_t));
+ gdispImageFree(img, (void *)priv->frame0cache, img->width*img->height*sizeof(gPixel));
gdispImageFree(img, (void *)priv, sizeof(gdispImagePrivate_BMP));
img->priv = 0;
}
@@ -704,8 +704,8 @@ gdispImageError gdispImageCache_BMP(gdispImage *img) {
return GDISP_IMAGE_ERR_OK;
/* We need to allocate the cache */
- len = img->width * img->height * sizeof(pixel_t);
- priv->frame0cache = (pixel_t *)gdispImageAlloc(img, len);
+ len = img->width * img->height * sizeof(gPixel);
+ priv->frame0cache = (gPixel *)gdispImageAlloc(img, len);
if (!priv->frame0cache)
return GDISP_IMAGE_ERR_NOMEMORY;
diff --git a/src/gdisp/gdisp_image_gif.c b/src/gdisp/gdisp_image_gif.c
index 5aaeaeb1..57af7fd9 100644
--- a/src/gdisp/gdisp_image_gif.c
+++ b/src/gdisp/gdisp_image_gif.c
@@ -91,14 +91,14 @@ typedef struct gdispImagePrivate_GIF {
uint8_t bgcolor; // Background Color (global)
uint16_t loops; // Remaining frame loops (if animated)
uint16_t palsize; // Global palette size (global)
- pixel_t *palette; // Global palette (global)
+ gPixel *palette; // Global palette (global)
size_t frame0pos; // The position of the first frame
gifimgcache * cache; // The list of cached frames
gifimgcache * curcache; // The cache of the current frame (if created)
gifimgdecode * decode; // The decode data for the decode in progress
gifimgframe frame;
gifimgdispose dispose;
- pixel_t buf[GDISP_IMAGE_GIF_BLIT_BUFFER_SIZE]; // Buffer for reading and blitting
+ gPixel buf[GDISP_IMAGE_GIF_BLIT_BUFFER_SIZE]; // Buffer for reading and blitting
} gdispImagePrivate_GIF;
/**
diff --git a/src/gdisp/gdisp_image_jpg.c b/src/gdisp/gdisp_image_jpg.c
index b188f0f0..8056ac42 100644
--- a/src/gdisp/gdisp_image_jpg.c
+++ b/src/gdisp/gdisp_image_jpg.c
@@ -59,7 +59,7 @@ gdispImageError jd_decomp(JDEC*, unsigned(*)(gdispImage*,void*,JRECT*), uint8_t)
/*---------------------------------------------------------------------------*/
typedef struct gdispImagePrivate_JPG {
- pixel_t *frame0cache;
+ gPixel *frame0cache;
} gdispImagePrivate_JPG;
gdispImageError gdispImageOpen_JPG(gdispImage *img){
@@ -123,7 +123,7 @@ void gdispImageClose_JPG(gdispImage *img){
gdispImagePrivate_JPG *priv = (gdispImagePrivate_JPG *)img->priv;
if(priv){
if (priv->frame0cache){
- gdispImageFree(img, (void *)priv->frame0cache, img->width * img->height * sizeof(pixel_t));
+ gdispImageFree(img, (void *)priv->frame0cache, img->width * img->height * sizeof(gPixel));
}
gdispImageFree(img, (void*) priv, sizeof(gdispImagePrivate_JPG));
}
@@ -133,7 +133,7 @@ static unsigned gdispImage_JPG_WriteToCache(gdispImage *img, void *bitmap, JRECT
{
gdispImagePrivate_JPG *priv;
uint8_t *in;
- pixel_t *out;
+ gPixel *out;
gCoord x, y;
priv = (gdispImagePrivate_JPG *)img->priv;
@@ -158,7 +158,7 @@ gdispImageError gdispImageCache_JPG(gdispImage *img) {
return GDISP_IMAGE_ERR_OK;
/* Otherwise start a new decode */
- priv->frame0cache = (pixel_t *)gdispImageAlloc(img, img->width * img->height * sizeof(pixel_t));
+ priv->frame0cache = (gPixel *)gdispImageAlloc(img, img->width * img->height * sizeof(gPixel));
if (!priv->frame0cache)
return GDISP_IMAGE_ERR_NOMEMORY;
diff --git a/src/gdisp/gdisp_image_native.c b/src/gdisp/gdisp_image_native.c
index 2043401c..f97b7539 100644
--- a/src/gdisp/gdisp_image_native.c
+++ b/src/gdisp/gdisp_image_native.c
@@ -27,8 +27,8 @@ void *gdispImageAlloc(gdispImage *img, size_t sz);
void gdispImageFree(gdispImage *img, void *ptr, size_t sz);
typedef struct gdispImagePrivate_NATIVE {
- pixel_t *frame0cache;
- pixel_t buf[BLIT_BUFFER_SIZE_NATIVE];
+ gPixel *frame0cache;
+ gPixel buf[BLIT_BUFFER_SIZE_NATIVE];
} gdispImagePrivate_NATIVE;
void gdispImageClose_NATIVE(gdispImage *img) {
@@ -37,7 +37,7 @@ void gdispImageClose_NATIVE(gdispImage *img) {
priv = (gdispImagePrivate_NATIVE *)img->priv;
if (priv) {
if (priv->frame0cache)
- gdispImageFree(img, (void *)priv->frame0cache, img->width * img->height * sizeof(pixel_t));
+ gdispImageFree(img, (void *)priv->frame0cache, img->width * img->height * sizeof(gPixel));
gdispImageFree(img, (void *)priv, sizeof(gdispImagePrivate_NATIVE));
img->priv = 0;
}
@@ -80,8 +80,8 @@ gdispImageError gdispImageCache_NATIVE(gdispImage *img) {
return GDISP_IMAGE_ERR_OK;
/* We need to allocate the cache */
- len = img->width * img->height * sizeof(pixel_t);
- priv->frame0cache = (pixel_t *)gdispImageAlloc(img, len);
+ len = img->width * img->height * sizeof(gPixel);
+ priv->frame0cache = (gPixel *)gdispImageAlloc(img, len);
if (!priv->frame0cache)
return GDISP_IMAGE_ERR_NOMEMORY;
@@ -112,7 +112,7 @@ gdispImageError gdispGImageDraw_NATIVE(GDisplay *g, gdispImage *img, gCoord x, g
}
/* For this image decoder we cheat and just seek straight to the region we want to display */
- pos = FRAME0POS_NATIVE + (img->width * sy + sx) * sizeof(pixel_t);
+ pos = FRAME0POS_NATIVE + (img->width * sy + sx) * sizeof(gPixel);
/* Cycle through the lines */
for(;cy;cy--, y++) {
@@ -124,8 +124,8 @@ gdispImageError gdispGImageDraw_NATIVE(GDisplay *g, gdispImage *img, gCoord x, g
// Read the data
len = gfileRead(img->f,
priv->buf,
- mcx > BLIT_BUFFER_SIZE_NATIVE ? (BLIT_BUFFER_SIZE_NATIVE*sizeof(pixel_t)) : (mcx * sizeof(pixel_t)))
- / sizeof(pixel_t);
+ mcx > BLIT_BUFFER_SIZE_NATIVE ? (BLIT_BUFFER_SIZE_NATIVE*sizeof(gPixel)) : (mcx * sizeof(gPixel)))
+ / sizeof(gPixel);
if (!len)
return GDISP_IMAGE_ERR_BADDATA;
@@ -134,7 +134,7 @@ gdispImageError gdispGImageDraw_NATIVE(GDisplay *g, gdispImage *img, gCoord x, g
}
/* Get the position for the start of the next line */
- pos += img->width*sizeof(pixel_t);
+ pos += img->width*sizeof(gPixel);
}
return GDISP_IMAGE_ERR_OK;
diff --git a/src/gdisp/gdisp_image_png.c b/src/gdisp/gdisp_image_png.c
index 9cb34cd5..cd7e3234 100644
--- a/src/gdisp/gdisp_image_png.c
+++ b/src/gdisp/gdisp_image_png.c
@@ -70,7 +70,7 @@ typedef struct PNG_output {
gCoord sx, sy;
gCoord ix, iy;
unsigned cnt;
- pixel_t buf[GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE];
+ gPixel buf[GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE];
} PNG_output;
// Handle the PNG scan line filter
diff --git a/src/gdisp/gdisp_pixmap.c b/src/gdisp/gdisp_pixmap.c
index 081db8d3..9f59ce40 100644
--- a/src/gdisp/gdisp_pixmap.c
+++ b/src/gdisp/gdisp_pixmap.c
@@ -92,7 +92,7 @@ void gdispPixmapDelete(GDisplay *g) {
gdriverUnRegister(&g->d);
}
-pixel_t *gdispPixmapGetBits(GDisplay *g) {
+gPixel *gdispPixmapGetBits(GDisplay *g) {
if (gvmt(g) != GDISPVMT_pixmap)
return 0;
return ((pixmap *)g->priv)->pixels;
diff --git a/src/gdisp/gdisp_pixmap.h b/src/gdisp/gdisp_pixmap.h
index 5e139796..3e7aea4b 100644
--- a/src/gdisp/gdisp_pixmap.h
+++ b/src/gdisp/gdisp_pixmap.h
@@ -59,7 +59,7 @@ void gdispPixmapDelete(GDisplay *g);
* (although different pixmaps will have different pixel pointers). Once a pixmap is deleted, the pixel pointer
* should not be used by the application.
*/
-pixel_t *gdispPixmapGetBits(GDisplay *g);
+gPixel *gdispPixmapGetBits(GDisplay *g);
#if GDISP_NEED_PIXMAP_IMAGE || defined(__DOXYGEN__)
/**
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 8b093851..00b2557d 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -261,7 +261,7 @@ void gwinFillArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy) {
_gwinDrawEnd(gh);
}
-void gwinBlitArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const pixel_t *buffer) {
+void gwinBlitArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const gPixel *buffer) {
if (!_gwinDrawStart(gh)) return;
gdispGBlitArea(gh->display, gh->x+x, gh->y+y, cx, cy, srcx, srcy, srccx, buffer);
_gwinDrawEnd(gh);
diff --git a/src/gwin/gwin.h b/src/gwin/gwin.h
index c27aadc3..2ab50fd9 100644
--- a/src/gwin/gwin.h
+++ b/src/gwin/gwin.h
@@ -680,7 +680,7 @@ void gwinFillArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy);
*
* @api
*/
-void gwinBlitArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const pixel_t *buffer);
+void gwinBlitArea(GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const gPixel *buffer);
/*-------------------------------------------------
* Circle, ellipse, arc and arc-sectors functions
diff --git a/src/gwin/gwin_gl3d.c b/src/gwin/gwin_gl3d.c
index 4c3f0f7f..2c2861e2 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 pixel_t *)zb->pbuf);
+ gdispGBlitArea(gh->display, gh->x, gh->y, zb->xsize, zb->ysize, 0, 0, zb->linesize/sizeof(color_t), (const gPixel *)zb->pbuf);
}
static int gl3dResizeGLViewport(GLContext *c, int *xsize_ptr, int *ysize_ptr) {