From 41271d632b74f5cf47c30d3b699eb6b2786f2136 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 23 Jun 2018 13:02:07 +1000 Subject: Added new type definitions - moving towards V3.0 --- demos/tools/touch_calibration_grabber/main.c | 2 +- demos/tools/touch_driver_test/main.c | 30 ++++++++++++++-------------- demos/tools/touch_raw_readings/main.c | 2 +- demos/tools/uGFXnetDisplay/main.c | 12 +++++------ 4 files changed, 23 insertions(+), 23 deletions(-) (limited to 'demos/tools') diff --git a/demos/tools/touch_calibration_grabber/main.c b/demos/tools/touch_calibration_grabber/main.c index 9f16bb90..e6017030 100644 --- a/demos/tools/touch_calibration_grabber/main.c +++ b/demos/tools/touch_calibration_grabber/main.c @@ -63,7 +63,7 @@ int main(void) { GWindowInit wi; gwinClearInit(&wi); - wi.show = TRUE; wi.x = 0; wi.y = bHeight; wi.width = swidth; wi.height = sheight-bHeight; + wi.show = gTrue; wi.x = 0; wi.y = bHeight; wi.width = swidth; wi.height = sheight-bHeight; ghc = gwinConsoleCreate(&gc, &wi); } diff --git a/demos/tools/touch_driver_test/main.c b/demos/tools/touch_driver_test/main.c index 5182056a..8a4e5304 100644 --- a/demos/tools/touch_driver_test/main.c +++ b/demos/tools/touch_driver_test/main.c @@ -42,7 +42,7 @@ static coord_t bWidth, bWidth2, bHeight; static GHandle ghc; static coord_t swidth, sheight; -static void DrawHeader(const char *title, bool_t btnNext, bool_t btnPrev, bool_t btnPlusMinus) { +static void DrawHeader(const char *title, gBool btnNext, gBool btnPrev, gBool btnPlusMinus) { #if GDISP_NEED_CLIP gdispSetClip(0, 0, swidth, sheight); #endif @@ -87,10 +87,10 @@ static int CheckButtons(GEventMouse *pem) { int main(void) { GSourceHandle gs; GEventMouse *pem; - bool_t isFirstTime; - bool_t isCalibrated; - bool_t isTouch; - bool_t isFinger; + gBool isFirstTime; + gBool isCalibrated; + gBool isTouch; + gBool isFinger; const char * isFingerText; const char * deviceText; GMouse * m; @@ -122,7 +122,7 @@ int main(void) { GWindowInit wi; gwinClearInit(&wi); - wi.show = TRUE; wi.x = 0; wi.y = bHeight; wi.width = swidth; wi.height = sheight-bHeight; + wi.show = gTrue; wi.x = 0; wi.y = bHeight; wi.width = swidth; wi.height = sheight-bHeight; ghc = gwinConsoleCreate(&gc, &wi); } @@ -144,8 +144,8 @@ int main(void) { geventAttachSource(&gl, gs, GLISTEN_MOUSEDOWNMOVES|GLISTEN_MOUSEMETA); // Get initial display settings for buttons - isFirstTime = TRUE; - isCalibrated = (vmt->d.flags & GMOUSE_VFLG_CALIBRATE) ? FALSE : TRUE; + isFirstTime = gTrue; + isCalibrated = (vmt->d.flags & GMOUSE_VFLG_CALIBRATE) ? gFalse : gTrue; calerr = 0; /* @@ -156,8 +156,8 @@ StepDeviceType: DrawHeader("1. Device Type", isCalibrated, isCalibrated && !isFirstTime, isCalibrated); // Get the type of device and the current mode - isTouch = (vmt->d.flags & GMOUSE_VFLG_TOUCH) ? TRUE : FALSE; - isFinger = (m->flags & GMOUSE_FLG_FINGERMODE) ? TRUE : FALSE; + isTouch = (vmt->d.flags & GMOUSE_VFLG_TOUCH) ? gTrue : gFalse; + isFinger = (m->flags & GMOUSE_FLG_FINGERMODE) ? gTrue : gFalse; pjit = isFinger ? &vmt->finger_jitter : &vmt->pen_jitter; isFingerText = isFinger ? "finger" : "pen"; deviceText = isTouch ? isFingerText : "mouse"; @@ -205,7 +205,7 @@ StepDeviceType: */ StepRawReading: - DrawHeader("2. Raw Mouse Output", FALSE, FALSE, FALSE); + DrawHeader("2. Raw Mouse Output", gFalse, gFalse, gFalse); if (isTouch) gwinPrintf(ghc, "Press and hold on the surface.\n\n"); else @@ -292,7 +292,7 @@ StepCalibrate: calerr = ginputCalibrateMouse(0); if (calerr) goto StepCalibrate; - isCalibrated = TRUE; + isCalibrated = gTrue; } /* @@ -300,7 +300,7 @@ StepCalibrate: */ StepMouseCoords: - DrawHeader("4. Show Mouse Coordinates", TRUE, TRUE, TRUE); + DrawHeader("4. Show Mouse Coordinates", gTrue, gTrue, gTrue); if (isTouch) gwinPrintf(ghc, "Press and hold on the surface.\n\n"); else @@ -345,7 +345,7 @@ StepMouseCoords: */ StepMovementJitter: - DrawHeader("5. Movement Jitter", TRUE, TRUE, TRUE); + DrawHeader("5. Movement Jitter", gTrue, gTrue, gTrue); if (isTouch) gwinPrintf(ghc, "Press firmly on the surface and move around as if to draw.\n\n"); else @@ -456,6 +456,6 @@ StepDrawing: } // Can't let this really exit - isFirstTime = FALSE; + isFirstTime = gFalse; goto StepDeviceType; } diff --git a/demos/tools/touch_raw_readings/main.c b/demos/tools/touch_raw_readings/main.c index 27c799f7..1e19f69f 100644 --- a/demos/tools/touch_raw_readings/main.c +++ b/demos/tools/touch_raw_readings/main.c @@ -68,7 +68,7 @@ int main(void) { GWindowInit wi; gwinClearInit(&wi); - wi.show = TRUE; wi.x = 0; wi.y = bHeight; wi.width = swidth; wi.height = sheight-bHeight; + wi.show = gTrue; wi.x = 0; wi.y = bHeight; wi.width = swidth; wi.height = sheight-bHeight; ghc = gwinConsoleCreate(&gc, &wi); } diff --git a/demos/tools/uGFXnetDisplay/main.c b/demos/tools/uGFXnetDisplay/main.c index 6f4ad4b6..9bf61b47 100644 --- a/demos/tools/uGFXnetDisplay/main.c +++ b/demos/tools/uGFXnetDisplay/main.c @@ -135,9 +135,9 @@ static font_t font; /** * Get a whole packet of data. * Len is specified in the number of uint16_t's we want as our protocol only talks uint16_t's. - * If the connection closes before we get all the data - the call returns FALSE. + * If the connection closes before we get all the data - the call returns gFalse. */ -static bool_t getpkt(uint16_t *pkt, int len) { +static gBool getpkt(uint16_t *pkt, int len) { int got; int have; @@ -149,22 +149,22 @@ static bool_t getpkt(uint16_t *pkt, int len) { len -= got; } if (len) - return FALSE; + return gFalse; // Convert each uint16_t to host order for(got = 0, have /= 2; got < have; got++) pkt[got] = ntohs(pkt[got]); - return TRUE; + return gTrue; } /** * Send a whole packet of data. * Len is specified in the number of uint16_t's we want to send as our protocol only talks uint16_t's. * Note that contents of the packet are modified to ensure it will cross the wire in the correct format. - * If the connection closes before we send all the data - the call returns FALSE. + * If the connection closes before we send all the data - the call returns gFalse. */ -static bool_t sendpkt(uint16_t *pkt, int len) { +static gBool sendpkt(uint16_t *pkt, int len) { int i; // Convert each uint16_t to network order -- cgit v1.2.3