aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput
diff options
context:
space:
mode:
Diffstat (limited to 'src/ginput')
-rw-r--r--src/ginput/ginput_driver_mouse.h16
-rw-r--r--src/ginput/ginput_mouse.c16
-rw-r--r--src/ginput/ginput_mouse.h2
3 files changed, 17 insertions, 17 deletions
diff --git a/src/ginput/ginput_driver_mouse.h b/src/ginput/ginput_driver_mouse.h
index 42c93e75..8b239517 100644
--- a/src/ginput/ginput_driver_mouse.h
+++ b/src/ginput/ginput_driver_mouse.h
@@ -23,7 +23,7 @@
#include "../gdriver/gdriver.h"
typedef struct GMouseReading {
- coord_t x, y, z;
+ gCoord x, y, z;
uint16_t buttons;
} GMouseReading;
@@ -60,9 +60,9 @@ typedef struct GMouse {
} GMouse;
typedef struct GMouseJitter {
- coord_t calibrate; // Maximum error for a calibration to succeed
- coord_t click; // Movement allowed without discarding the CLICK or CLICKCXT event
- coord_t move; // Movement allowed without discarding the MOVE event
+ gCoord calibrate; // Maximum error for a calibration to succeed
+ gCoord click; // Movement allowed without discarding the CLICK or CLICKCXT event
+ gCoord move; // Movement allowed without discarding the MOVE event
} GMouseJitter;
typedef struct GMouseVMT {
@@ -77,10 +77,10 @@ typedef struct GMouseVMT {
#define GMOUSE_VFLG_ONLY_DOWN 0x0100 // This device returns a valid position only when the mouse is down
#define GMOUSE_VFLG_POORUPDOWN 0x0200 // Position readings during up/down are unreliable
#define GMOUSE_VFLG_DYNAMICONLY 0x8000 // This mouse driver should not be statically initialized eg Win32
- coord_t z_max; // TOUCH: Maximum possible z value (fully touched)
- coord_t z_min; // TOUCH: Minimum possible z value (touch off screen). Note may also be > z_max
- coord_t z_touchon; // TOUCH: z values between z_max and this are a solid touch on
- coord_t z_touchoff; // TOUCH: z values between z_min and this are a solid touch off
+ gCoord z_max; // TOUCH: Maximum possible z value (fully touched)
+ gCoord z_min; // TOUCH: Minimum possible z value (touch off screen). Note may also be > z_max
+ gCoord z_touchon; // TOUCH: z values between z_max and this are a solid touch on
+ gCoord z_touchoff; // TOUCH: z values between z_min and this are a solid touch off
GMouseJitter pen_jitter; // PEN MODE: Jitter settings
GMouseJitter finger_jitter; // FINGER MODE: Jitter settings
diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c
index 73d855b8..4caaeb92 100644
--- a/src/ginput/ginput_mouse.c
+++ b/src/ginput/ginput_mouse.c
@@ -72,10 +72,10 @@ static GTIMER_DECL(MouseTimer);
#include <string.h> // Required for memcpy
static GFXINLINE void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) {
- coord_t x, y;
+ gCoord x, y;
- x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx);
- y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy);
+ x = (gCoord) (c->ax * pt->x + c->bx * pt->y + c->cx);
+ y = (gCoord) (c->ay * pt->x + c->by * pt->y + c->cy);
pt->x = x;
pt->y = y;
@@ -196,7 +196,7 @@ static void GetMouseReading(GMouse *m) {
// We can't clip or rotate if we don't have a display
if (m->display) {
- coord_t w, h;
+ gCoord w, h;
// We now need display information
w = gdispGGetWidth(m->display);
@@ -205,7 +205,7 @@ static void GetMouseReading(GMouse *m) {
#if GDISP_NEED_CONTROL
// Do we need to rotate the reading to match the display
if (!(gmvmt(m)->d.flags & GMOUSE_VFLG_SELFROTATION)) {
- coord_t t;
+ gCoord t;
switch(gdispGGetOrientation(m->display)) {
case GDISP_ROTATE_0:
@@ -372,7 +372,7 @@ static void MousePoll(void *param) {
static GFXINLINE void CalibrationCalculate(GMouse *m, const gPoint *cross, const gPoint *points) {
float dx;
- coord_t c0, c1, c2;
+ gCoord c0, c1, c2;
(void) m;
// Work on x values
@@ -462,7 +462,7 @@ static void MousePoll(void *param) {
}
static uint32_t CalibrateMouse(GMouse *m) {
- coord_t w, h;
+ gCoord w, h;
gPoint cross[4]; // The locations of the test points on the display
gPoint points[4]; // The x, y readings obtained from the mouse for each test point
uint32_t err;
@@ -570,7 +570,7 @@ static void MousePoll(void *param) {
// Do we need to rotate the reading to match the display
#if GDISP_NEED_CONTROL
if (!(gmvmt(m)->d.flags & GMOUSE_VFLG_SELFROTATION)) {
- coord_t t;
+ gCoord t;
switch(gdispGGetOrientation(m->display)) {
case GDISP_ROTATE_0:
diff --git a/src/ginput/ginput_mouse.h b/src/ginput/ginput_mouse.h
index 0d641d90..4b31f814 100644
--- a/src/ginput/ginput_mouse.h
+++ b/src/ginput/ginput_mouse.h
@@ -33,7 +33,7 @@
/* This type definition is also used by touch */
typedef struct GEventMouse_t {
GEventType type; // The type of this event (GEVENT_MOUSE or GEVENT_TOUCH)
- coord_t x, y, z; // The position of the mouse.
+ gCoord x, y, z; // The position of the mouse.
// - For touch devices, Z is the current pressure if supported (values are device specific)
// - For mice, Z is the 3rd dimension if supported (values are device specific)
uint16_t buttons; // A bit is set if the button is down or a meta event has occurred.