aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-07-08 10:43:30 +1000
committerinmarket <andrewh@inmarket.com.au>2018-07-08 10:43:30 +1000
commit7e95acb7310d83284288a6e89a6b3fe4bf4e8668 (patch)
treeab75f4037108ce704be60589e1ff830ef75bc5c4 /src/ginput
parente8b789bfb166ee3218e9dbb4c6ddf74bdba79510 (diff)
downloaduGFX-7e95acb7310d83284288a6e89a6b3fe4bf4e8668.tar.gz
uGFX-7e95acb7310d83284288a6e89a6b3fe4bf4e8668.tar.bz2
uGFX-7e95acb7310d83284288a6e89a6b3fe4bf4e8668.zip
Change point and point_t to gPoint
Diffstat (limited to 'src/ginput')
-rw-r--r--src/ginput/ginput_driver_mouse.h2
-rw-r--r--src/ginput/ginput_mouse.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ginput/ginput_driver_mouse.h b/src/ginput/ginput_driver_mouse.h
index ac5fb02d..42c93e75 100644
--- a/src/ginput/ginput_driver_mouse.h
+++ b/src/ginput/ginput_driver_mouse.h
@@ -50,7 +50,7 @@ typedef struct GMouse {
#define GMOUSE_FLG_FINGERMODE 0x0020 // Mouse is currently in finger mode
#define GMOUSE_FLG_NEEDREAD 0x0040 // The mouse needs reading
#define GMOUSE_FLG_DRIVER_FIRST 0x0100 // The first flag available for the driver
- point clickpos; // The position of the last click event
+ gPoint clickpos; // The position of the last click event
systemticks_t clicktime; // The time of the last click event
GDisplay * display; // The display the mouse is associated with
#if !GINPUT_TOUCH_NOCALIBRATE
diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c
index ca032623..73d855b8 100644
--- a/src/ginput/ginput_mouse.c
+++ b/src/ginput/ginput_mouse.c
@@ -351,7 +351,7 @@ static void MousePoll(void *param) {
#error "GINPUT: GFX_USE_GDISP must be defined when calibration is required"
#endif
- static GFXINLINE void CalibrationCrossDraw(GMouse *m, const point *pp) {
+ static GFXINLINE void CalibrationCrossDraw(GMouse *m, const gPoint *pp) {
gdispGDrawLine(m->display, pp->x-CALIBRATION_CROSS_RADIUS, pp->y, pp->x-CALIBRATION_CROSS_INNERGAP, pp->y, CALIBRATION_CROSS_COLOR1);
gdispGDrawLine(m->display, pp->x+CALIBRATION_CROSS_INNERGAP, pp->y, pp->x+CALIBRATION_CROSS_RADIUS, pp->y, CALIBRATION_CROSS_COLOR1);
gdispGDrawLine(m->display, pp->x, pp->y-CALIBRATION_CROSS_RADIUS, pp->x, pp->y-CALIBRATION_CROSS_INNERGAP, CALIBRATION_CROSS_COLOR1);
@@ -366,11 +366,11 @@ static void MousePoll(void *param) {
gdispGDrawLine(m->display, pp->x+CALIBRATION_CROSS_RADIUS, pp->y-CALIBRATION_CROSS_RADIUS, pp->x+CALIBRATION_CROSS_RADIUS, pp->y-CALIBRATION_CROSS_RADIUS/2, CALIBRATION_CROSS_COLOR2);
}
- static GFXINLINE void CalibrationCrossClear(GMouse *m, const point *pp) {
+ static GFXINLINE void CalibrationCrossClear(GMouse *m, const gPoint *pp) {
gdispGFillArea(m->display, pp->x - CALIBRATION_CROSS_RADIUS, pp->y - CALIBRATION_CROSS_RADIUS, CALIBRATION_CROSS_RADIUS*2+1, CALIBRATION_CROSS_RADIUS*2+1, CALIBRATION_BACKGROUND);
}
- static GFXINLINE void CalibrationCalculate(GMouse *m, const point *cross, const point *points) {
+ static GFXINLINE void CalibrationCalculate(GMouse *m, const gPoint *cross, const gPoint *points) {
float dx;
coord_t c0, c1, c2;
(void) m;
@@ -463,8 +463,8 @@ static void MousePoll(void *param) {
static uint32_t CalibrateMouse(GMouse *m) {
coord_t w, h;
- point cross[4]; // The locations of the test points on the display
- point points[4]; // The x, y readings obtained from the mouse for each test point
+ 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;
#if GDISP_NEED_TEXT
font_t font1, font2;