Browse Source

Change coord_t to gCoord

remotes/origin_old/release/v2.9
inmarket 5 years ago
parent
commit
2ab2d77fcb
  1. 4
      boards/base/ArduinoTinyScreen/ugfx_test.ino
  2. 1
      changelog.txt
  3. 2
      demos/3rdparty/notepad-2/notepadApp.c
  4. 6
      demos/3rdparty/notepad-2/notepadCore.c
  5. 6
      demos/applications/combo/bounce.c
  6. 6
      demos/applications/combo/main.c
  7. 2
      demos/benchmarks/main.c
  8. 12
      demos/modules/gadc/gwinosc.c
  9. 10
      demos/modules/gadc/gwinosc.h
  10. 2
      demos/modules/gadc/main.c
  11. 14
      demos/modules/gaudio/oscilloscope/gwinosc.c
  12. 10
      demos/modules/gaudio/oscilloscope/gwinosc.h
  13. 2
      demos/modules/gaudio/oscilloscope/main.c
  14. 2
      demos/modules/gdisp/arcsectors/main.c
  15. 4
      demos/modules/gdisp/basics/main.c
  16. 2
      demos/modules/gdisp/circles/main.c
  17. 4
      demos/modules/gdisp/fonts/main.c
  18. 2
      demos/modules/gdisp/images/main.c
  19. 2
      demos/modules/gdisp/images_animated/main.c
  20. 8
      demos/modules/gdisp/multiple_displays/main.c
  21. 4
      demos/modules/gdisp/pixmap/main.c
  22. 2
      demos/modules/gdisp/polygons/main.c
  23. 6
      demos/modules/gdisp/streaming/main.c
  24. 4
      demos/modules/gtrans/basic/main.c
  25. 2
      demos/modules/gwin/basic/main.c
  26. 4
      demos/modules/gwin/widgets/main.c
  27. 4
      demos/tools/touch_calibration_grabber/main.c
  28. 4
      demos/tools/touch_driver_test/main.c
  29. 4
      demos/tools/touch_raw_readings/main.c
  30. 2
      demos/tools/uGFXnetDisplay/main.c
  31. 6
      drivers/gdisp/AlteraFramereader/gdisp_lld_alteraframereader.c
  32. 6
      drivers/gdisp/Fb24bpp/gdisp_lld_fb24bpp.c
  33. 2
      drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c
  34. 8
      drivers/gdisp/PCD8544/gdisp_lld_PCD8544.c
  35. 8
      drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c
  36. 2
      drivers/gdisp/QImage/gdisp_lld_qimage.cpp
  37. 2
      drivers/gdisp/QImage/gdisp_lld_qimage.h
  38. 2
      drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c
  39. 10
      drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c
  40. 4
      drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c
  41. 12
      drivers/gdisp/SSD1848/gdisp_lld_SSD1848.c
  42. 2
      drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c
  43. 2
      drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c
  44. 4
      drivers/gdisp/ST7565/gdisp_lld_ST7565.c
  45. 20
      drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c
  46. 8
      drivers/gdisp/TLS8204/gdisp_lld_TLS8204.c
  47. 8
      drivers/gdisp/UC1601s/gdisp_lld_UC1601s.c
  48. 12
      drivers/gdisp/UC1610/gdisp_lld_UC1610.c
  49. 4
      drivers/gdisp/UC8173/gdisp_lld_UC8173.c
  50. 2
      drivers/gdisp/WS29EPD/gdisp_lld_WS29EPD.c
  51. 6
      drivers/gdisp/framebuffer/gdisp_lld_framebuffer.c
  52. 4
      drivers/ginput/touch/FT5336/gmouse_lld_FT5336.c
  53. 4
      drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c
  54. 4
      drivers/ginput/touch/FT6x06/gmouse_lld_FT6x06.c
  55. 2
      drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802.c
  56. 6
      drivers/ginput/touch/QWidget/example/mywidget.cpp
  57. 6
      drivers/ginput/touch/QWidget/gmouse_lld_QWidget.c
  58. 6
      drivers/ginput/touch/STMPE610/gmouse_lld_STMPE610.c
  59. 6
      drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c
  60. 2
      drivers/multiple/SDL/gdisp_lld_SDL.c
  61. 44
      drivers/multiple/Win32/gdisp_lld_Win32.c
  62. 4
      drivers/multiple/Win32/gdisp_lld_config.h
  63. 2
      drivers/multiple/X/gdisp_lld_X.c
  64. 4
      drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
  65. 4
      drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
  66. 138
      src/gdisp/gdisp.c
  67. 79
      src/gdisp/gdisp.h
  68. 24
      src/gdisp/gdisp_driver.h
  69. 18
      src/gdisp/gdisp_image.c
  70. 4
      src/gdisp/gdisp_image.h
  71. 12
      src/gdisp/gdisp_image_bmp.c
  72. 14
      src/gdisp/gdisp_image_gif.c
  73. 6
      src/gdisp/gdisp_image_jpg.c
  74. 4
      src/gdisp/gdisp_image_native.c
  75. 16
      src/gdisp/gdisp_image_png.c
  76. 18
      src/gdisp/gdisp_pixmap.c
  77. 2
      src/gdisp/gdisp_pixmap.h
  78. 16
      src/ginput/ginput_driver_mouse.h
  79. 16
      src/ginput/ginput_mouse.c
  80. 2
      src/ginput/ginput_mouse.h
  81. 2
      src/gmisc/gmisc_hittest.c
  82. 2
      src/gmisc/gmisc_matrix2d.c
  83. 52
      src/gwin/gwin.c
  84. 72
      src/gwin/gwin.h
  85. 8
      src/gwin/gwin_button.c
  86. 8
      src/gwin/gwin_checkbox.c
  87. 22
      src/gwin/gwin_class.h
  88. 6
      src/gwin/gwin_console.c
  89. 2
      src/gwin/gwin_console.h
  90. 8
      src/gwin/gwin_container.c
  91. 4
      src/gwin/gwin_container.h
  92. 20
      src/gwin/gwin_frame.c
  93. 18
      src/gwin/gwin_graph.c
  94. 16
      src/gwin/gwin_graph.h
  95. 2
      src/gwin/gwin_image.c
  96. 8
      src/gwin/gwin_keyboard.c
  97. 4
      src/gwin/gwin_keyboard.h
  98. 8
      src/gwin/gwin_label.c
  99. 4
      src/gwin/gwin_label.h
  100. 20
      src/gwin/gwin_list.c

4
boards/base/ArduinoTinyScreen/ugfx_test.ino

@ -3,8 +3,8 @@
#include <gfx.h>
void setup() {
coord_t width, height;
coord_t i, j;
gCoord width, height;
gCoord i, j;
pinMode(13, OUTPUT);

1
changelog.txt

@ -20,6 +20,7 @@ FEATURE: Added types gPtr and gPtrDiff
FEATURE: Added gI64 and gU64 when the compiler supports it. GFX_TYPE_64 macro is defined as GFXON if it does.
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
FIX: Added gfxRealloc() to Qt port
FIX: Fixed UC1610 driver private area initialisation
FIX: Fixed ST7735 driver and added kapacuk changes

2
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;

6
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;

6
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;

6
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);

2
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;

12
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 */

10
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;

2
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;

14
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 */

10
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;

2
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();

2
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

4
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();

2
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();

4
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];

2
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();

2
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

8
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];

4
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();

2
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;

6
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;

4
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);

2
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();

4
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);

4
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)"

4
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

4
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. *

2
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.

6
drivers/gdisp/AlteraFramereader/gdisp_lld_alteraframereader.c

@ -29,7 +29,7 @@
typedef struct fbPriv {
void* pixels; // The pixel buffer
coord_t linelen; // The number of bytes per display line
gCoord linelen; // The number of bytes per display line
void* frame0;
void* frame1;
} fbPriv;
@ -177,7 +177,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g)
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -187,7 +187,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g)
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

6
drivers/gdisp/Fb24bpp/gdisp_lld_fb24bpp.c

@ -15,7 +15,7 @@
typedef struct fbInfo {
void * pixels; // The pixel buffer
coord_t linelen; // The number of bytes per display line
gCoord linelen; // The number of bytes per display line
} fbInfo;
#include "board_fb24bpp.h"
@ -155,7 +155,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -165,7 +165,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

2
drivers/gdisp/Nokia6610GE8/gdisp_lld_Nokia6610GE8.c

@ -342,7 +342,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_BITFILLS
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
coord_t lg, x, y;
gCoord lg, x, y;
uint16_t c1, c2;
unsigned tuples;
const pixel_t *buffer;

8
drivers/gdisp/PCD8544/gdisp_lld_PCD8544.c

@ -117,7 +117,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -156,7 +156,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -209,7 +209,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -219,7 +219,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

8
drivers/gdisp/PCF8812/gdisp_lld_PCF8812.c

@ -127,7 +127,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -166,7 +166,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -219,7 +219,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -229,7 +229,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

2
drivers/gdisp/QImage/gdisp_lld_qimage.cpp

@ -3,7 +3,7 @@
#include "../../../src/gdisp/gdisp_driver.h"
#include "gdisp_lld_qimage.h"
gBool qimage_init(GDisplay* g, coord_t width, coord_t height)
gBool qimage_init(GDisplay* g, gCoord width, gCoord height)
{
QImage* qimage = new QImage(width, height, QImage::Format_RGB888);
if (!qimage) {

2
drivers/gdisp/QImage/gdisp_lld_qimage.h

@ -7,7 +7,7 @@
extern "C" {
#endif
gBool qimage_init(GDisplay* g, coord_t width, coord_t height);
gBool qimage_init(GDisplay* g, gCoord width, gCoord height);
void qimage_setPixel(GDisplay* g);
color_t qimage_getPixel(GDisplay* g);

2
drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c

@ -259,7 +259,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
pixel_t *buffer;
coord_t ycnt;
gCoord ycnt;
buffer = (pixel_t *)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;

10
drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c

@ -169,9 +169,9 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area(GDisplay *g) {
coord_t sy, ey;
coord_t sx, ex;
coord_t col;
gCoord sy, ey;
gCoord sx, ex;
gCoord col;
unsigned spage, zpages;
uint8_t * base;
uint8_t mask;
@ -236,7 +236,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -267,7 +267,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:

4
drivers/gdisp/SSD1322/gdisp_lld_SSD1322.c

@ -189,7 +189,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
uint8_t *ram;
switch(g->g.Orientation) {
@ -220,7 +220,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
LLDCOLOR_TYPE c;
switch(g->g.Orientation) {

12
drivers/gdisp/SSD1848/gdisp_lld_SSD1848.c

@ -341,8 +341,8 @@ LLDSPEC void gdisp_lld_clear (GDisplay *g)
#if GDISP_HARDWARE_FILLS
LLDSPEC void gdisp_lld_fill_area (GDisplay *g)
{
coord_t scol, ecol, sx, ex;
coord_t y, col, x;
gCoord scol, ecol, sx, ex;
gCoord y, col, x;
uint16_t area = (uint16_t) g->p.cx * g->p.cy;
uint8_t temp;
@ -400,7 +400,7 @@ LLDSPEC void gdisp_lld_fill_area (GDisplay *g)
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel (GDisplay *g)
{
coord_t x, y;
gCoord x, y;
switch (g->g.Orientation)
{
@ -436,7 +436,7 @@ LLDSPEC void gdisp_lld_draw_pixel (GDisplay *g)
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color (GDisplay *g)
{
coord_t x, y;
gCoord x, y;
switch (g->g.Orientation)
{
@ -554,8 +554,8 @@ LLDSPEC void gdisp_lld_control (GDisplay *g)
#if GDISP_HARDWARE_BITFILLS
LLDSPEC void gdisp_lld_blit_area (GDisplay *g)
{
coord_t scol, ecol, sx;
coord_t y, col;
gCoord scol, ecol, sx;
gCoord y, col;
uint16_t area;
uint8_t temp, temp2, i;

2
drivers/gdisp/SSD1963/gdisp_lld_SSD1963.c

@ -17,7 +17,7 @@
#define CALC_FPR(w,h,hb,hf,hp,vb,vf,vp,fps) ((fps * CALC_PERIOD(w,hb,hf,hp) * CALC_PERIOD(h,vb,vf,vp) * 1048576)/100000000)
typedef struct LCD_Parameters {
coord_t width, height; // Panel width and height
gCoord width, height; // Panel width and height
uint16_t hbporch; // Horizontal Back Porch
uint16_t hfporch; // Horizontal Front Porch
uint16_t hpulse; // Horizontal Pulse

2
drivers/gdisp/SSD2119/gdisp_lld_SSD2119.c

@ -295,7 +295,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g) {
LLDSPEC void gdisp_lld_blit_area(GDisplay* g) {
pixel_t* buffer;
coord_t ycnt;
gCoord ycnt;
buffer = (pixel_t*)g->p.ptr + g->p.x1 + g->p.y1 * g->p.x2;

4
drivers/gdisp/ST7565/gdisp_lld_ST7565.c

@ -166,7 +166,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -197,7 +197,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:

20
drivers/gdisp/STM32LTDC/gdisp_lld_STM32LTDC.c

@ -48,13 +48,13 @@
typedef struct ltdcLayerConfig {
// Frame
LLDCOLOR_TYPE* frame; // Frame buffer address
coord_t width, height; // Frame size in pixels
coord_t pitch; // Line pitch, in bytes
gCoord width, height; // Frame size in pixels
gCoord pitch; // Line pitch, in bytes
uint16_t fmt; // Pixel format in LTDC format
// Window
coord_t x, y; // Start pixel position of the virtual layer
coord_t cx, cy; // Size of the virtual layer
gCoord x, y; // Start pixel position of the virtual layer
gCoord cx, cy; // Size of the virtual layer
uint32_t defcolor; // Default color, ARGB8888
uint32_t keycolor; // Color key, RGB888
@ -66,10 +66,10 @@ typedef struct ltdcLayerConfig {
} ltdcLayerConfig;
typedef struct ltdcConfig {
coord_t width, height; // Screen size
coord_t hsync, vsync; // Horizontal and Vertical sync pixels
coord_t hbackporch, vbackporch; // Horizontal and Vertical back porch pixels
coord_t hfrontporch, vfrontporch; // Horizontal and Vertical front porch pixels
gCoord width, height; // Screen size
gCoord hsync, vsync; // Horizontal and Vertical sync pixels
gCoord hbackporch, vbackporch; // Horizontal and Vertical back porch pixels
gCoord hfrontporch, vfrontporch; // Horizontal and Vertical front porch pixels
uint32_t syncflags; // Sync flags
uint32_t bgcolor; // Clear screen color RGB888
@ -382,7 +382,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -392,7 +392,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay* g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

8
drivers/gdisp/TLS8204/gdisp_lld_TLS8204.c

@ -133,7 +133,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -172,7 +172,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -229,7 +229,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -239,7 +239,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

8
drivers/gdisp/UC1601s/gdisp_lld_UC1601s.c

@ -138,7 +138,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
@ -177,7 +177,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_PIXELREAD
LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:
@ -234,7 +234,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -244,7 +244,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

12
drivers/gdisp/UC1610/gdisp_lld_UC1610.c

@ -45,10 +45,10 @@
#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0)
typedef struct UC1610_Window {
coord_t x1;
coord_t y1;
coord_t x2;
coord_t y2;
gCoord x1;
gCoord y1;
gCoord x2;
gCoord y2;
} UC1610_Window;
/*===========================================================================*/
@ -133,7 +133,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
uint8_t *c;
// handle orientation
@ -170,7 +170,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay* g)
{
coord_t x1, y1, x2, y2, cx;
gCoord x1, y1, x2, y2, cx;
uint8_t *c;
// Don't flush unless we really need to

4
drivers/gdisp/UC8173/gdisp_lld_UC8173.c

@ -309,7 +309,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
#if GDISP_HARDWARE_FLUSH
LLDSPEC void gdisp_lld_flush(GDisplay* g)
{
coord_t cy, cx, dx, dy;
gCoord cy, cx, dx, dy;
LLDCOLOR_TYPE *fb;
UC8173_Private *priv;
@ -390,7 +390,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay* g)
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay* g)
{
coord_t x, y;
gCoord x, y;
UC8173_Private *priv;
priv = (UC8173_Private *)g->priv;

2
drivers/gdisp/WS29EPD/gdisp_lld_WS29EPD.c

@ -163,7 +163,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_HARDWARE_DRAWPIXEL
LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
coord_t x, y;
gCoord x, y;
switch(g->g.Orientation) {
default:

6
drivers/gdisp/framebuffer/gdisp_lld_framebuffer.c

@ -15,7 +15,7 @@
typedef struct fbInfo {
void * pixels; // The pixel buffer
coord_t linelen; // The number of bytes per display line
gCoord linelen; // The number of bytes per display line
} fbInfo;
#include "board_framebuffer.h"
@ -135,7 +135,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_0:
case GDISP_ROTATE_180:
if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;
@ -145,7 +145,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
case GDISP_ROTATE_90:
case GDISP_ROTATE_270:
if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
coord_t tmp;
gCoord tmp;
tmp = g->g.Width;
g->g.Width = g->g.Height;

4
drivers/ginput/touch/FT5336/gmouse_lld_FT5336.c

@ -65,8 +65,8 @@ static gBool ft5336ReadXYZ(GMouse* m, GMouseReading* pdr)
// Only take a reading if exactly one touch contact point
if (read_byte(m, FT5336_TD_STAT_REG) == 1) {
// Get and return X, Y an Z values
pdr->y = (coord_t)(read_word(m, FT5336_P1_XH_REG) & 0x0FFF);
pdr->x = (coord_t)(read_word(m, FT5336_P1_YH_REG) & 0x0FFF);
pdr->y = (gCoord)(read_word(m, FT5336_P1_XH_REG) & 0x0FFF);
pdr->x = (gCoord)(read_word(m, FT5336_P1_YH_REG) & 0x0FFF);
pdr->z = 1;
}

4
drivers/ginput/touch/FT5x06/gmouse_lld_FT5x06.c

@ -68,8 +68,8 @@ static gBool read_xyz(GMouse* m, GMouseReading* pdr)
if ((read_byte(m, FT5x06_TOUCH_POINTS) & 0x07)) {
/* Get the X, Y, Z values */
pdr->x = (coord_t)(read_word(m, FT5x06_TOUCH1_XH) & 0x0fff);
pdr->y = (coord_t)read_word(m, FT5x06_TOUCH1_YH);
pdr->x = (gCoord)(read_word(m, FT5x06_TOUCH1_XH) & 0x0fff);
pdr->y = (gCoord)read_word(m, FT5x06_TOUCH1_YH);
pdr->z = 1;
// Rescale X,Y if we are using self-calibration

4
drivers/ginput/touch/FT6x06/gmouse_lld_FT6x06.c

@ -68,8 +68,8 @@ static gBool read_xyz(GMouse* m, GMouseReading* pdr)
if ((read_byte(m, FT6x06_TOUCH_POINTS) & 0x07)) {
/* Get the X, Y, Z values */
pdr->x = (coord_t)(read_word(m, FT6x06_TOUCH1_XH) & 0x0fff);
pdr->y = (coord_t)read_word(m, FT6x06_TOUCH1_YH);
pdr->x = (gCoord)(read_word(m, FT6x06_TOUCH1_XH) & 0x0fff);
pdr->y = (gCoord)read_word(m, FT6x06_TOUCH1_YH);
pdr->z = 1;
// Rescale X,Y if we are using self-calibration

2
drivers/ginput/touch/MAX11802/gmouse_lld_MAX11802.c

@ -152,7 +152,7 @@ static gBool read_xyz(GMouse* m, GMouseReading* pdr)
return gTrue;
}
// Strip the tags (we need to take care because coord_t is signed - and sign bit gets extended on shift!)
// Strip the tags (we need to take care because gCoord is signed - and sign bit gets extended on shift!)
pdr->x = (uint16_t)(pdr->x) >> 4;
pdr->y = (uint16_t)(pdr->y) >> 4;
pdr->z = Z_MAX;

6
drivers/ginput/touch/QWidget/example/mywidget.cpp

@ -2,9 +2,9 @@
#include "ugfx/src/ginput/ginput_driver_mouse.h"
extern GMouse* qwidgetMouse;
extern coord_t qwidgetMouseX;
extern coord_t qwidgetMouseY;
extern coord_t qwidgetMouseZ;
extern gCoord qwidgetMouseX;
extern gCoord qwidgetMouseY;
extern gCoord qwidgetMouseZ;
extern uint16_t qwidgetMouseButtons;
MyWidget::MyWidget(QWidget* parent) : QWidget(parent)

6
drivers/ginput/touch/QWidget/gmouse_lld_QWidget.c

@ -14,9 +14,9 @@
#include "../../../../src/ginput/ginput_driver_mouse.h"
GMouse* qwidgetMouse;
coord_t qwidgetMouseX;
coord_t qwidgetMouseY;
coord_t qwidgetMouseZ;
gCoord qwidgetMouseX;
gCoord qwidgetMouseY;
gCoord qwidgetMouseZ;
uint16_t qwidgetMouseButtons;
static gBool _init(GMouse* m, unsigned driverinstance)

6
drivers/ginput/touch/STMPE610/gmouse_lld_STMPE610.c

@ -171,10 +171,10 @@ static gBool read_xyz(GMouse* m, GMouseReading* pdr)
#endif
// Time to get some readings
pdr->x = (coord_t)read_word(m, STMPE610_REG_TSC_DATA_X);
pdr->y = (coord_t)read_word(m, STMPE610_REG_TSC_DATA_Y);
pdr->x = (gCoord)read_word(m, STMPE610_REG_TSC_DATA_X);
pdr->y = (gCoord)read_word(m, STMPE610_REG_TSC_DATA_Y);
#if GMOUSE_STMPE610_READ_PRESSURE
pdr->z = (coord_t)read_byte(m, STMPE610_REG_TSC_DATA_Z);
pdr->z = (gCoord)read_byte(m, STMPE610_REG_TSC_DATA_Z);
#else
pdr->z = gmvmt(m)->z_max;
#endif

6
drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c

@ -171,10 +171,10 @@ static gBool read_xyz(GMouse* m, GMouseReading* pdr)
#endif
// Time to get some readings
pdr->x = (coord_t)read_word(m, STMPE811_REG_TSC_DATA_X);
pdr->y = (coord_t)read_word(m, STMPE811_REG_TSC_DATA_Y);
pdr->x = (gCoord)read_word(m, STMPE811_REG_TSC_DATA_X);
pdr->y = (gCoord)read_word(m, STMPE811_REG_TSC_DATA_Y);
#if GMOUSE_STMPE811_READ_PRESSURE
pdr->z = (coord_t)read_byte(m, STMPE811_REG_TSC_DATA_Z);
pdr->z = (gCoord)read_byte(m, STMPE811_REG_TSC_DATA_Z);
#else
pdr->z = gmvmt(m)->z_max;
#endif

2
drivers/multiple/SDL/gdisp_lld_SDL.c

@ -161,7 +161,7 @@ struct SDL_UGFXContext {
int16_t need_redraw;
int minx,miny,maxx,maxy;
#if GINPUT_NEED_MOUSE
coord_t mousex, mousey;
gCoord mousex, mousey;
uint16_t buttons;
#endif
#if GINPUT_NEED_KEYBOARD

44
drivers/multiple/Win32/gdisp_lld_Win32.c