aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/multiple
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 /drivers/multiple
parent7e95acb7310d83284288a6e89a6b3fe4bf4e8668 (diff)
downloaduGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.gz
uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.tar.bz2
uGFX-2ab2d77fcba42467b62f2be732cb8dc00510fe19.zip
Change coord_t to gCoord
Diffstat (limited to 'drivers/multiple')
-rw-r--r--drivers/multiple/SDL/gdisp_lld_SDL.c2
-rw-r--r--drivers/multiple/Win32/gdisp_lld_Win32.c44
-rw-r--r--drivers/multiple/Win32/gdisp_lld_config.h4
-rw-r--r--drivers/multiple/X/gdisp_lld_X.c2
-rw-r--r--drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c4
-rw-r--r--drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp4
6 files changed, 30 insertions, 30 deletions
diff --git a/drivers/multiple/SDL/gdisp_lld_SDL.c b/drivers/multiple/SDL/gdisp_lld_SDL.c
index 3ea2168f..54830d7f 100644
--- a/drivers/multiple/SDL/gdisp_lld_SDL.c
+++ b/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
diff --git a/drivers/multiple/Win32/gdisp_lld_Win32.c b/drivers/multiple/Win32/gdisp_lld_Win32.c
index 86af1d80..5e23b3d5 100644
--- a/drivers/multiple/Win32/gdisp_lld_Win32.c
+++ b/drivers/multiple/Win32/gdisp_lld_Win32.c
@@ -442,18 +442,18 @@ typedef struct winPriv {
HBITMAP dcBitmap;
HBITMAP dcOldBitmap;
#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE
- coord_t mousex, mousey;
+ gCoord mousex, mousey;
uint16_t mousebuttons;
GMouse *mouse;
gBool mouseenabled;
- void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, coord_t x, coord_t y);
+ void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, gCoord x, gCoord y);
#endif
#if GFX_USE_GINPUT && GINPUT_NEED_TOGGLE
uint8_t toggles;
#endif
#if GDISP_HARDWARE_STREAM_WRITE || GDISP_HARDWARE_STREAM_READ
- coord_t x0, y0, x1, y1;
- coord_t x, y;
+ gCoord x0, y0, x1, y1;
+ gCoord x, y;
#endif
} winPriv;
@@ -462,7 +462,7 @@ void gfxEmulatorSetParentWindow(void *hwnd) {
}
#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE
- void gfxEmulatorMouseInject(GDisplay *g, uint16_t buttons, coord_t x, coord_t y) {
+ void gfxEmulatorMouseInject(GDisplay *g, uint16_t buttons, gCoord x, gCoord y) {
winPriv * priv;
priv = (winPriv *)g->priv;
@@ -475,7 +475,7 @@ void gfxEmulatorSetParentWindow(void *hwnd) {
void gfxEmulatorMouseEnable(GDisplay *g, gBool enabled) {
((winPriv *)g->priv)->mouseenabled = enabled;
}
- void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, coord_t x, coord_t y)) {
+ void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, gCoord x, gCoord y)) {
((winPriv *)g->priv)->capfn = capfn;
}
#endif
@@ -495,7 +495,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
RECT rect;
HGDIOBJ old;
POINT p;
- coord_t pos;
+ gCoord pos;
uint8_t bit;
#endif
@@ -526,7 +526,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
// Handle mouse down on the window
#if GINPUT_NEED_MOUSE
- if ((coord_t)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
+ if ((gCoord)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
btns = priv->mousebuttons;
btns |= GINPUT_MOUSE_BTN_LEFT;
goto mousemove;
@@ -535,8 +535,8 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
// Handle mouse down on the toggle area
#if GINPUT_NEED_TOGGLE
- if ((coord_t)HIWORD(lParam) >= GDISP_SCREEN_HEIGHT && (g->flags & GDISP_FLG_HASTOGGLE)) {
- bit = 1 << ((coord_t)LOWORD(lParam)*8/g->g.Width);
+ if ((gCoord)HIWORD(lParam) >= GDISP_SCREEN_HEIGHT && (g->flags & GDISP_FLG_HASTOGGLE)) {
+ bit = 1 << ((gCoord)LOWORD(lParam)*8/g->g.Width);
priv->toggles ^= bit;
rect.left = 0;
rect.right = GDISP_SCREEN_WIDTH;
@@ -576,7 +576,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
// Handle mouse up on the window
#if GINPUT_NEED_MOUSE
- if ((coord_t)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
+ if ((gCoord)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
btns = priv->mousebuttons;
btns &= ~GINPUT_MOUSE_BTN_LEFT;
goto mousemove;
@@ -589,7 +589,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
case WM_MBUTTONDOWN:
g = (GDisplay *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
priv = (winPriv *)g->priv;
- if ((coord_t)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
+ if ((gCoord)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
btns = priv->mousebuttons;
btns |= GINPUT_MOUSE_BTN_MIDDLE;
goto mousemove;
@@ -598,7 +598,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
case WM_MBUTTONUP:
g = (GDisplay *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
priv = (winPriv *)g->priv;
- if ((coord_t)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
+ if ((gCoord)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
btns = priv->mousebuttons;
btns &= ~GINPUT_MOUSE_BTN_MIDDLE;
goto mousemove;
@@ -607,7 +607,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
case WM_RBUTTONDOWN:
g = (GDisplay *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
priv = (winPriv *)g->priv;
- if ((coord_t)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
+ if ((gCoord)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
btns = priv->mousebuttons;
btns |= GINPUT_MOUSE_BTN_RIGHT;
goto mousemove;
@@ -616,7 +616,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
case WM_RBUTTONUP:
g = (GDisplay *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
priv = (winPriv *)g->priv;
- if ((coord_t)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
+ if ((gCoord)HIWORD(lParam) < GDISP_SCREEN_HEIGHT) {
btns = priv->mousebuttons;
btns &= ~GINPUT_MOUSE_BTN_RIGHT;
goto mousemove;
@@ -625,17 +625,17 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
case WM_MOUSEMOVE:
g = (GDisplay *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
priv = (winPriv *)g->priv;
- if ((coord_t)HIWORD(lParam) >= GDISP_SCREEN_HEIGHT)
+ if ((gCoord)HIWORD(lParam) >= GDISP_SCREEN_HEIGHT)
break;
btns = priv->mousebuttons;
mousemove:
if (priv->capfn)
- priv->capfn(hWnd, g, btns, (coord_t)LOWORD(lParam), (coord_t)HIWORD(lParam));
+ priv->capfn(hWnd, g, btns, (gCoord)LOWORD(lParam), (gCoord)HIWORD(lParam));
if (priv->mouseenabled) {
priv->mousebuttons = btns;
- priv->mousex = (coord_t)LOWORD(lParam);
- priv->mousey = (coord_t)HIWORD(lParam);
+ priv->mousex = (gCoord)LOWORD(lParam);
+ priv->mousey = (gCoord)HIWORD(lParam);
if ((gmvmt(priv->mouse)->d.flags & GMOUSE_VFLG_NOPOLL)) // For normal setup this is always true
_gmouseWakeup(priv->mouse);
}
@@ -1229,7 +1229,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
pixel_t *dst;
const pixel_t *src;
size_t sz;
- coord_t i, j;
+ gCoord i, j;
// Allocate the destination buffer
sz = (size_t)g->p.cx * (size_t)g->p.cy;
@@ -1408,7 +1408,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
LLDSPEC void gdisp_lld_vertical_scroll(GDisplay *g) {
winPriv * priv;
RECT rect;
- coord_t lines;
+ gCoord lines;
priv = g->priv;
@@ -1571,7 +1571,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
#if GDISP_NEED_CONTROL
// If the self-rotation has been set in the VMT then do that here (TESTING ONLY)
if ((gmvmt(m)->d.flags & GMOUSE_VFLG_SELFROTATION)) { // For normal setup this is always False
- coord_t t;
+ gCoord t;
switch(gdispGGetOrientation(m->display)) {
case GDISP_ROTATE_0:
diff --git a/drivers/multiple/Win32/gdisp_lld_config.h b/drivers/multiple/Win32/gdisp_lld_config.h
index c95b554a..568c4c3d 100644
--- a/drivers/multiple/Win32/gdisp_lld_config.h
+++ b/drivers/multiple/Win32/gdisp_lld_config.h
@@ -55,14 +55,14 @@ void gfxEmulatorSetParentWindow(void *hwnd);
#if GINPUT_NEED_MOUSE
// This function allows you to inject mouse events into the ugfx mouse driver
- void gfxEmulatorMouseInject(GDisplay *g, uint16_t buttons, coord_t x, coord_t y);
+ void gfxEmulatorMouseInject(GDisplay *g, uint16_t buttons, gCoord x, gCoord y);
// This function enables you to turn on/off normal mouse functions on a ugfx Win32 display window.
void gfxEmulatorMouseEnable(GDisplay *g, gBool enabled);
// This function enables you to capture mouse events on a ugfx Win32 display window.
// Passing NULL turns off the capture
- void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, coord_t x, coord_t y));
+ void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, gCoord x, gCoord y));
#endif
#endif /* GFX_USE_GDISP */
diff --git a/drivers/multiple/X/gdisp_lld_X.c b/drivers/multiple/X/gdisp_lld_X.c
index 05e80614..78a9cb02 100644
--- a/drivers/multiple/X/gdisp_lld_X.c
+++ b/drivers/multiple/X/gdisp_lld_X.c
@@ -181,7 +181,7 @@ typedef struct xPriv {
GC gc;
Window win;
#if GINPUT_NEED_MOUSE
- coord_t mousex, mousey;
+ gCoord mousex, mousey;
uint16_t buttons;
GMouse * mouse;
#endif
diff --git a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
index 653b75c4..24460e97 100644
--- a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
+++ b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c
@@ -159,7 +159,7 @@ typedef struct netPriv {
unsigned databytes; // How many bytes have been read
uint16_t data[2]; // Buffer for storing data read.
#if GINPUT_NEED_MOUSE
- coord_t mousex, mousey;
+ gCoord mousex, mousey;
uint16_t mousebuttons;
GMouse * mouse;
#endif
@@ -540,7 +540,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
netPriv * priv;
pixel_t * buffer;
uint16_t buf[5];
- coord_t x, y;
+ gCoord x, y;
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
if (!(g->flags & GDISP_FLG_CONNECTED))
diff --git a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
index 8df5e08d..f8420bd3 100644
--- a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
+++ b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp
@@ -119,7 +119,7 @@ typedef struct netPriv {
unsigned databytes; // How many bytes have been read
uint16_t data[2]; // Buffer for storing data read.
#if GINPUT_NEED_MOUSE
- coord_t mousex, mousey;
+ gCoord mousex, mousey;
uint16_t mousebuttons;
GMouse * mouse;
#endif
@@ -423,7 +423,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
netPriv * priv;
pixel_t * buffer;
uint16_t buf[5];
- coord_t x, y;
+ gCoord x, y;
#if GDISP_DONT_WAIT_FOR_NET_DISPLAY
if (!(g->flags & GDISP_FLG_CONNECTED))