aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-07-08 10:54:19 +1000
committerinmarket <andrewh@inmarket.com.au>2018-07-08 10:54:19 +1000
commit2ab2d77fcba42467b62f2be732cb8dc00510fe19 (patch)
tree8dbd616faa116a2946ad47c62c20d4a34fb749b2 /demos/modules
parent7e95acb7310d83284288a6e89a6b3fe4bf4e8668 (diff)
downloaduGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.gz
uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.bz2
uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.zip
Change coord_t to gCoord
Diffstat (limited to 'demos/modules')
-rw-r--r--demos/modules/gadc/gwinosc.c12
-rw-r--r--demos/modules/gadc/gwinosc.h10
-rw-r--r--demos/modules/gadc/main.c2
-rw-r--r--demos/modules/gaudio/oscilloscope/gwinosc.c14
-rw-r--r--demos/modules/gaudio/oscilloscope/gwinosc.h10
-rw-r--r--demos/modules/gaudio/oscilloscope/main.c2
-rw-r--r--demos/modules/gdisp/arcsectors/main.c2
-rw-r--r--demos/modules/gdisp/basics/main.c4
-rw-r--r--demos/modules/gdisp/circles/main.c2
-rw-r--r--demos/modules/gdisp/fonts/main.c4
-rw-r--r--demos/modules/gdisp/images/main.c2
-rw-r--r--demos/modules/gdisp/images_animated/main.c2
-rw-r--r--demos/modules/gdisp/multiple_displays/main.c8
-rw-r--r--demos/modules/gdisp/pixmap/main.c4
-rw-r--r--demos/modules/gdisp/polygons/main.c2
-rw-r--r--demos/modules/gdisp/streaming/main.c6
-rw-r--r--demos/modules/gtrans/basic/main.c4
-rw-r--r--demos/modules/gwin/basic/main.c2
-rw-r--r--demos/modules/gwin/widgets/main.c4
19 files changed, 48 insertions, 48 deletions
diff --git a/demos/modules/gadc/gwinosc.c b/demos/modules/gadc/gwinosc.c
index e82cd7d8..4f89a262 100644
--- a/demos/modules/gadc/gwinosc.c
+++ b/demos/modules/gadc/gwinosc.c
@@ -62,7 +62,7 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
if (!(gs = (GScopeObject *)_gwindowCreate(g, &gs->g, pInit, &scopeVMT, 0)))
return 0;
gs->nextx = 0;
- if (!(gs->lastscopetrace = gfxAlloc(gs->g.width * sizeof(coord_t))))
+ if (!(gs->lastscopetrace = gfxAlloc(gs->g.width * sizeof(gCoord))))
return 0;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
gs->lasty = gs->g.height/2;
@@ -82,10 +82,10 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
void gwinScopeWaitForTrace(GHandle gh) {
#define gs ((GScopeObject *)(gh))
int i;
- coord_t x, y;
- coord_t yoffset;
+ gCoord x, y;
+ gCoord yoffset;
adcsample_t *pa;
- coord_t *pc;
+ gCoord *pc;
GDataBuffer *pd;
uint8_t shr;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
@@ -94,7 +94,7 @@ void gwinScopeWaitForTrace(GHandle gh) {
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
gBool rdytrigger;
int flsamples;
- coord_t scopemin;
+ gCoord scopemin;
#endif
if (gh->vmt != &scopeVMT)
@@ -127,7 +127,7 @@ void gwinScopeWaitForTrace(GHandle gh) {
for(i = pd->len/sizeof(adcsample_t); i; i--) {
/* Calculate the new scope value - re-scale using simple shifts for efficiency, re-center and y-invert */
- y = yoffset - (((coord_t)(*pa++) << shr) >> (16-SCOPE_Y_BITS));
+ y = yoffset - (((gCoord)(*pa++) << shr) >> (16-SCOPE_Y_BITS));
#if TRIGGER_METHOD == TRIGGER_MINVALUE
/* Calculate the scopemin ready for the next trace */
diff --git a/demos/modules/gadc/gwinosc.h b/demos/modules/gadc/gwinosc.h
index 0c687a4f..15ef2f3a 100644
--- a/demos/modules/gadc/gwinosc.h
+++ b/demos/modules/gadc/gwinosc.h
@@ -63,13 +63,13 @@
typedef struct GScopeObject_t {
GWindowObject g; // Base Class
- coord_t *lastscopetrace; // To store last scope trace
- coord_t nextx; // Where we are up to
+ gCoord *lastscopetrace; // To store last scope trace
+ gCoord nextx; // Where we are up to
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
- coord_t lasty; // The last y value - used for trigger slope detection
+ gCoord lasty; // The last y value - used for trigger slope detection
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
- coord_t lasty; // The last y value - used for trigger slope detection
- coord_t scopemin; // The last scopes minimum value
+ gCoord lasty; // The last y value - used for trigger slope detection
+ gCoord scopemin; // The last scopes minimum value
#endif
} GScopeObject;
diff --git a/demos/modules/gadc/main.c b/demos/modules/gadc/main.c
index 5d07f8eb..92312e83 100644
--- a/demos/modules/gadc/main.c
+++ b/demos/modules/gadc/main.c
@@ -134,7 +134,7 @@ static GTimer lsTimer;
*/
int main(void) {
GHandle ghScope;
- coord_t swidth, sheight;
+ gCoord swidth, sheight;
#if defined(MY_DIAL_DEVICE) || defined(MY_TEMP_DEVICE)
GHandle ghText;
font_t font;
diff --git a/demos/modules/gaudio/oscilloscope/gwinosc.c b/demos/modules/gaudio/oscilloscope/gwinosc.c
index 38edb35e..17ea9566 100644
--- a/demos/modules/gaudio/oscilloscope/gwinosc.c
+++ b/demos/modules/gaudio/oscilloscope/gwinosc.c
@@ -76,7 +76,7 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
/* Initialise the scope object members and allocate memory for buffers */
gs->format = format;
gs->nextx = 0;
- if (!(gs->lastscopetrace = (coord_t *)gfxAlloc(gs->g.width * sizeof(coord_t))))
+ if (!(gs->lastscopetrace = (gCoord *)gfxAlloc(gs->g.width * sizeof(gCoord))))
return 0;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
gs->lasty = gs->g.height/2;
@@ -98,11 +98,11 @@ void gwinScopeWaitForTrace(GHandle gh) {
#define gs ((GScopeObject *)(gh))
GDataBuffer *paud;
int i;
- coord_t x, y;
- coord_t yoffset;
+ gCoord x, y;
+ gCoord yoffset;
uint8_t *pa8;
uint16_t *pa16;
- coord_t *pc;
+ gCoord *pc;
uint8_t shr;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
@@ -111,7 +111,7 @@ void gwinScopeWaitForTrace(GHandle gh) {
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
gBool rdytrigger;
int flsamples;
- coord_t scopemin;
+ gCoord scopemin;
#endif
if (gh->vmt != &scopeVMT)
@@ -148,9 +148,9 @@ void gwinScopeWaitForTrace(GHandle gh) {
/* Calculate the new scope value - re-scale using simple shifts for efficiency, re-center and y-invert */
if (gfxSampleFormatBits(gs->format) <= 8)
- y = yoffset - (((coord_t)(*pa8++ ) << shr) >> (16-SCOPE_Y_BITS));
+ y = yoffset - (((gCoord)(*pa8++ ) << shr) >> (16-SCOPE_Y_BITS));
else
- y = yoffset - (((coord_t)(*pa16++) << shr) >> (16-SCOPE_Y_BITS));
+ y = yoffset - (((gCoord)(*pa16++) << shr) >> (16-SCOPE_Y_BITS));
#if TRIGGER_METHOD == TRIGGER_MINVALUE
/* Calculate the scopemin ready for the next trace */
diff --git a/demos/modules/gaudio/oscilloscope/gwinosc.h b/demos/modules/gaudio/oscilloscope/gwinosc.h
index 5a5c5034..e77a61b2 100644
--- a/demos/modules/gaudio/oscilloscope/gwinosc.h
+++ b/demos/modules/gaudio/oscilloscope/gwinosc.h
@@ -63,14 +63,14 @@
typedef struct GScopeObject_t {
GWindowObject g; // Base Class
- coord_t *lastscopetrace; // To store last scope trace
+ gCoord *lastscopetrace; // To store last scope trace
ArrayDataFormat format; // The sample format
- coord_t nextx; // Where we are up to
+ gCoord nextx; // Where we are up to
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
- coord_t lasty; // The last y value - used for trigger slope detection
+ gCoord lasty; // The last y value - used for trigger slope detection
#elif TRIGGER_METHOD == TRIGGER_MINVALUE
- coord_t lasty; // The last y value - used for trigger slope detection
- coord_t scopemin; // The last scopes minimum value
+ gCoord lasty; // The last y value - used for trigger slope detection
+ gCoord scopemin; // The last scopes minimum value
#endif
} GScopeObject;
diff --git a/demos/modules/gaudio/oscilloscope/main.c b/demos/modules/gaudio/oscilloscope/main.c
index cd62e1f1..f9623b29 100644
--- a/demos/modules/gaudio/oscilloscope/main.c
+++ b/demos/modules/gaudio/oscilloscope/main.c
@@ -51,7 +51,7 @@ static GScopeObject gScopeWindow;
*/
int main(void) {
GHandle ghScope;
- coord_t swidth, sheight;
+ gCoord swidth, sheight;
gfxInit();
diff --git a/demos/modules/gdisp/arcsectors/main.c b/demos/modules/gdisp/arcsectors/main.c
index 7c73201c..6a9a2737 100644
--- a/demos/modules/gdisp/arcsectors/main.c
+++ b/demos/modules/gdisp/arcsectors/main.c
@@ -30,7 +30,7 @@
#include "gfx.h"
int main(void) {
- coord_t width, height, r1, r2, cx, cy;
+ gCoord width, height, r1, r2, cx, cy;
uint8_t sectors;
// Initialize and clear the display
diff --git a/demos/modules/gdisp/basics/main.c b/demos/modules/gdisp/basics/main.c
index 9517e0a6..ac7870f1 100644
--- a/demos/modules/gdisp/basics/main.c
+++ b/demos/modules/gdisp/basics/main.c
@@ -30,8 +30,8 @@
#include "gfx.h"
int main(void) {
- coord_t width, height;
- coord_t i, j;
+ gCoord width, height;
+ gCoord i, j;
// Initialize and clear the display
gfxInit();
diff --git a/demos/modules/gdisp/circles/main.c b/demos/modules/gdisp/circles/main.c
index e631da1a..bd7d5c2e 100644
--- a/demos/modules/gdisp/circles/main.c
+++ b/demos/modules/gdisp/circles/main.c
@@ -30,7 +30,7 @@
#include "gfx.h"
int main(void) {
- coord_t width, height;
+ gCoord width, height;
// Initialize and clear the display
gfxInit();
diff --git a/demos/modules/gdisp/fonts/main.c b/demos/modules/gdisp/fonts/main.c
index a0d888dc..d7852a93 100644
--- a/demos/modules/gdisp/fonts/main.c
+++ b/demos/modules/gdisp/fonts/main.c
@@ -30,9 +30,9 @@
#include "gfx.h"
int main(void) {
- coord_t width, y;
+ gCoord width, y;
font_t font1, font2;
- coord_t fheight1, fheight2;
+ gCoord fheight1, fheight2;
const char *line1, *line2;
char buf[8];
diff --git a/demos/modules/gdisp/images/main.c b/demos/modules/gdisp/images/main.c
index 6a2e4418..a394bd2e 100644
--- a/demos/modules/gdisp/images/main.c
+++ b/demos/modules/gdisp/images/main.c
@@ -39,7 +39,7 @@
static gdispImage myImage;
int main(void) {
- coord_t swidth, sheight;
+ gCoord swidth, sheight;
// Initialize uGFX and the underlying system
gfxInit();
diff --git a/demos/modules/gdisp/images_animated/main.c b/demos/modules/gdisp/images_animated/main.c
index a50e593f..09d46304 100644
--- a/demos/modules/gdisp/images_animated/main.c
+++ b/demos/modules/gdisp/images_animated/main.c
@@ -54,7 +54,7 @@ static gdispImage myImage;
* Orange - Decoding a frame has produced an error.
*/
int main(void) {
- coord_t swidth, sheight, errx, erry, errcx, errcy;
+ gCoord swidth, sheight, errx, erry, errcx, errcy;
delaytime_t delay;
gfxInit(); // Initialize the display
diff --git a/demos/modules/gdisp/multiple_displays/main.c b/demos/modules/gdisp/multiple_displays/main.c
index ea05507b..b753fc04 100644
--- a/demos/modules/gdisp/multiple_displays/main.c
+++ b/demos/modules/gdisp/multiple_displays/main.c
@@ -45,8 +45,8 @@
#if USE_METHOD_1
int main(void) {
- coord_t width, height;
- coord_t display, i, j, cnt;
+ gCoord width, height;
+ gCoord display, i, j, cnt;
font_t f;
GDisplay *g;
char buf[16];
@@ -89,8 +89,8 @@
}
#else
int main(void) {
- coord_t width, height;
- coord_t display, i, j, cnt;
+ gCoord width, height;
+ gCoord display, i, j, cnt;
font_t f;
char buf[16];
diff --git a/demos/modules/gdisp/pixmap/main.c b/demos/modules/gdisp/pixmap/main.c
index 975611c8..ce9a4a13 100644
--- a/demos/modules/gdisp/pixmap/main.c
+++ b/demos/modules/gdisp/pixmap/main.c
@@ -36,8 +36,8 @@ static GDisplay* pixmap;
static pixel_t* surface;
int main(void) {
- coord_t width, height;
- coord_t i, j;
+ gCoord width, height;
+ gCoord i, j;
// Initialize and clear the display
gfxInit();
diff --git a/demos/modules/gdisp/polygons/main.c b/demos/modules/gdisp/polygons/main.c
index f91a5cdd..6b3896fe 100644
--- a/demos/modules/gdisp/polygons/main.c
+++ b/demos/modules/gdisp/polygons/main.c
@@ -69,7 +69,7 @@ static gPoint oldresult[NUM_POINTS];
int main(void) {
- coord_t width, height;
+ gCoord width, height;
mtype scalex, scaley;
mtype scaleincx, scaleincy;
mtype translatex, translatey;
diff --git a/demos/modules/gdisp/streaming/main.c b/demos/modules/gdisp/streaming/main.c
index a360ecc2..695b15b6 100644
--- a/demos/modules/gdisp/streaming/main.c
+++ b/demos/modules/gdisp/streaming/main.c
@@ -57,9 +57,9 @@
#define SHADOWALPHA (255-255*0.2)
int main(void) {
- coord_t width, height, x, y, radius, ballx, bally, dx, floor;
- coord_t minx, miny, maxx, maxy;
- coord_t ballcx, ballcy;
+ gCoord width, height, x, y, radius, ballx, bally, dx, floor;
+ gCoord minx, miny, maxx, maxy;
+ gCoord ballcx, ballcy;
color_t colour;
float ii, spin, dy, spinspeed, h, f, g;
diff --git a/demos/modules/gtrans/basic/main.c b/demos/modules/gtrans/basic/main.c
index da42aa46..1a1657cf 100644
--- a/demos/modules/gtrans/basic/main.c
+++ b/demos/modules/gtrans/basic/main.c
@@ -64,8 +64,8 @@ static const transTable FrenchTranslation = { sizeof(FrenchStrings)/sizeof(Frenc
void updateText()
{
- coord_t width = 400;
- coord_t height = 30;
+ gCoord width = 400;
+ gCoord height = 30;
// Translate some basic strings
gdispFillStringBox(20, 20, width, height, gt("Welcome"), font, COLOR_TEXT, COLOR_BACKGROUND, justifyLeft);
diff --git a/demos/modules/gwin/basic/main.c b/demos/modules/gwin/basic/main.c
index 901f9e6d..00404aae 100644
--- a/demos/modules/gwin/basic/main.c
+++ b/demos/modules/gwin/basic/main.c
@@ -33,7 +33,7 @@
GHandle GW1, GW2;
int main(void) {
- coord_t i, j;
+ gCoord i, j;
/* Initialize and clear the display */
gfxInit();
diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c
index 8e56af90..fd0bee1a 100644
--- a/demos/modules/gwin/widgets/main.c
+++ b/demos/modules/gwin/widgets/main.c
@@ -171,7 +171,7 @@ static gdispImage imgYesNo;
#endif
// Wrap buttons onto the next line if they don't fit.
-static void setbtntext(GWidgetInit *pwi, coord_t maxwidth, char *txt) {
+static void setbtntext(GWidgetInit *pwi, gCoord maxwidth, char *txt) {
if (pwi->g.x >= maxwidth) {
pwi->g.x = 5;
pwi->g.y += pwi->g.height+1;
@@ -194,7 +194,7 @@ static void setbtntext(GWidgetInit *pwi, coord_t maxwidth, char *txt) {
*/
static void createWidgets(void) {
GWidgetInit wi;
- coord_t border, pagewidth;
+ gCoord border, pagewidth;
gwinWidgetClearInit(&wi);