From 2ab2d77fcba42467b62f2be732cb8dc00510fe19 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 8 Jul 2018 10:54:19 +1000 Subject: Change coord_t to gCoord --- demos/3rdparty/notepad-2/notepadApp.c | 2 +- demos/3rdparty/notepad-2/notepadCore.c | 6 +++--- demos/applications/combo/bounce.c | 6 +++--- demos/applications/combo/main.c | 6 +++--- demos/benchmarks/main.c | 2 +- demos/modules/gadc/gwinosc.c | 12 ++++++------ demos/modules/gadc/gwinosc.h | 10 +++++----- demos/modules/gadc/main.c | 2 +- demos/modules/gaudio/oscilloscope/gwinosc.c | 14 +++++++------- demos/modules/gaudio/oscilloscope/gwinosc.h | 10 +++++----- demos/modules/gaudio/oscilloscope/main.c | 2 +- demos/modules/gdisp/arcsectors/main.c | 2 +- demos/modules/gdisp/basics/main.c | 4 ++-- demos/modules/gdisp/circles/main.c | 2 +- demos/modules/gdisp/fonts/main.c | 4 ++-- demos/modules/gdisp/images/main.c | 2 +- demos/modules/gdisp/images_animated/main.c | 2 +- demos/modules/gdisp/multiple_displays/main.c | 8 ++++---- demos/modules/gdisp/pixmap/main.c | 4 ++-- demos/modules/gdisp/polygons/main.c | 2 +- demos/modules/gdisp/streaming/main.c | 6 +++--- demos/modules/gtrans/basic/main.c | 4 ++-- demos/modules/gwin/basic/main.c | 2 +- demos/modules/gwin/widgets/main.c | 4 ++-- demos/tools/touch_calibration_grabber/main.c | 4 ++-- demos/tools/touch_driver_test/main.c | 4 ++-- demos/tools/touch_raw_readings/main.c | 4 ++-- demos/tools/uGFXnetDisplay/main.c | 2 +- 28 files changed, 66 insertions(+), 66 deletions(-) (limited to 'demos') diff --git a/demos/3rdparty/notepad-2/notepadApp.c b/demos/3rdparty/notepad-2/notepadApp.c index 0540da2c..57d2ad20 100644 --- a/demos/3rdparty/notepad-2/notepadApp.c +++ b/demos/3rdparty/notepad-2/notepadApp.c @@ -48,7 +48,7 @@ static GHandle gstatusConsole; // GConsole Handle to the Status Bar static GEventMouse curPtr; // Holder for current pointer location static font_t font; -static coord_t swidth, sheight; +static gCoord swidth, sheight; // The toolbar buttons - Self-Explanatory static GButtonObject btnNew, btnOpen, btnSave; diff --git a/demos/3rdparty/notepad-2/notepadCore.c b/demos/3rdparty/notepad-2/notepadCore.c index 65afc988..2a739e12 100644 --- a/demos/3rdparty/notepad-2/notepadCore.c +++ b/demos/3rdparty/notepad-2/notepadCore.c @@ -55,7 +55,7 @@ static GHandle nStatusConsole = NULL; static volatile gBool doExit; -static void draw_point(coord_t x, coord_t y) { +static void draw_point(gCoord x, gCoord y) { color_t c = ncoreDrawingArea->color; if (nMode == NCORE_MODE_DRAW) @@ -71,7 +71,7 @@ static void draw_point(coord_t x, coord_t y) { /* Bresenham's Line Drawing Algorithm Modified version to draw line of variable thickness */ -static void draw_line(coord_t x0, coord_t y0, coord_t x1, coord_t y1) { +static void draw_line(gCoord x0, gCoord y0, gCoord x1, gCoord y1) { int16_t dy, dx; int16_t addx, addy; int16_t P, diff, i; @@ -130,7 +130,7 @@ static void draw_line(coord_t x0, coord_t y0, coord_t x1, coord_t y1) { static DECLARE_THREAD_FUNCTION(ncoreDrawThread, msg) { GEventMouse ev, evPrev; - coord_t dx, dy; + gCoord dx, dy; int state = 0, dist; diff --git a/demos/applications/combo/bounce.c b/demos/applications/combo/bounce.c index d3709056..33bb8394 100644 --- a/demos/applications/combo/bounce.c +++ b/demos/applications/combo/bounce.c @@ -63,9 +63,9 @@ static gfxThreadHandle thread; #define SHADOWALPHA (255-255*0.2) static DECLARE_THREAD_FUNCTION(task, param) { - coord_t width, height, x, y, radius, ballx, bally, dx, floor; - coord_t minx, miny, maxx, maxy, winx, winy; - coord_t ballcx, ballcy; + gCoord width, height, x, y, radius, ballx, bally, dx, floor; + gCoord minx, miny, maxx, maxy, winx, winy; + gCoord ballcx, ballcy; color_t colour; float ii, spin, dy, spinspeed, h, f, g; (void) param; diff --git a/demos/applications/combo/main.c b/demos/applications/combo/main.c index 05cdb643..1e7c6584 100644 --- a/demos/applications/combo/main.c +++ b/demos/applications/combo/main.c @@ -115,14 +115,14 @@ static void nextline(GWidgetInit *pwi) { pwi->g.y += pwi->g.height+1; } -static void setbtntext(GWidgetInit *pwi, coord_t maxwidth, char *txt) { +static void setbtntext(GWidgetInit *pwi, gCoord maxwidth, char *txt) { pwi->text = txt; pwi->g.width = gdispGetStringWidth(pwi->text, font) + BUTTON_PADDING; if (pwi->g.x + pwi->g.width > maxwidth) nextline(pwi); } -static void nextpos(GWidgetInit *pwi, coord_t maxwidth, coord_t nextwidth) { +static void nextpos(GWidgetInit *pwi, gCoord maxwidth, gCoord nextwidth) { pwi->g.x += pwi->g.width+1; pwi->g.width = nextwidth; if (pwi->g.x + nextwidth > maxwidth) @@ -138,7 +138,7 @@ static void nextpos(GWidgetInit *pwi, coord_t maxwidth, coord_t nextwidth) { */ static void createWidgets(void) { GWidgetInit wi; - coord_t border, pagewidth; + gCoord border, pagewidth; gwinWidgetClearInit(&wi); diff --git a/demos/benchmarks/main.c b/demos/benchmarks/main.c index d14f3cc6..65dbd0bc 100644 --- a/demos/benchmarks/main.c +++ b/demos/benchmarks/main.c @@ -88,7 +88,7 @@ static int uitoa(unsigned int value, char * buf, int max) { void benchmark(void) { uint32_t i, pixels, ms, pps; char pps_str[25]; - coord_t height, width, rx, ry, rcx, rcy; + gCoord height, width, rx, ry, rcx, rcy; color_t random_color; font_t font; 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); diff --git a/demos/tools/touch_calibration_grabber/main.c b/demos/tools/touch_calibration_grabber/main.c index e6017030..d33774d7 100644 --- a/demos/tools/touch_calibration_grabber/main.c +++ b/demos/tools/touch_calibration_grabber/main.c @@ -34,9 +34,9 @@ static GConsoleObject gc; static font_t font; -static coord_t bHeight; +static gCoord bHeight; static GHandle ghc; -static coord_t swidth, sheight; +static gCoord swidth, sheight; #if !GWIN_CONSOLE_USE_FLOAT #error "You need to enable float support for the console widget. (GWIN_CONSOLE_USE_FLOAT)" diff --git a/demos/tools/touch_driver_test/main.c b/demos/tools/touch_driver_test/main.c index 8a4e5304..c8470aa9 100644 --- a/demos/tools/touch_driver_test/main.c +++ b/demos/tools/touch_driver_test/main.c @@ -38,9 +38,9 @@ static GConsoleObject gc; static GListener gl; static font_t font; -static coord_t bWidth, bWidth2, bHeight; +static gCoord bWidth, bWidth2, bHeight; static GHandle ghc; -static coord_t swidth, sheight; +static gCoord swidth, sheight; static void DrawHeader(const char *title, gBool btnNext, gBool btnPrev, gBool btnPlusMinus) { #if GDISP_NEED_CLIP diff --git a/demos/tools/touch_raw_readings/main.c b/demos/tools/touch_raw_readings/main.c index 1e19f69f..98a3191f 100644 --- a/demos/tools/touch_raw_readings/main.c +++ b/demos/tools/touch_raw_readings/main.c @@ -38,9 +38,9 @@ static GConsoleObject gc; static GListener gl; static font_t font; -static coord_t bHeight; +static gCoord bHeight; static GHandle ghc; -static coord_t swidth, sheight; +static gCoord swidth, sheight; /*------------------------------------------------------------------------* * GINPUT Touch Driver Calibrator. * diff --git a/demos/tools/uGFXnetDisplay/main.c b/demos/tools/uGFXnetDisplay/main.c index 9bf61b47..481b3a64 100644 --- a/demos/tools/uGFXnetDisplay/main.c +++ b/demos/tools/uGFXnetDisplay/main.c @@ -187,7 +187,7 @@ static gBool sendpkt(uint16_t *pkt, int len) { GEventMouse *pem; uint16_t cmd[2]; uint16_t lbuttons; - coord_t lx, ly; + gCoord lx, ly; (void) param; // Initialize the mouse and the listener. -- cgit v1.2.3