aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-10-21 14:37:42 +0200
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-10-21 14:37:42 +0200
commit29251f33bd106cfdc317fa00c10ecfb3a64fcc2d (patch)
treed4a5b60de91b4116895dc542c017454711d03bc4 /src
parent9a1d2e43e50da99b924b281e91c03a7e96b02b73 (diff)
parent506355309e5bb88885ae8e449ea1fc905d98a54a (diff)
downloaduGFX-29251f33bd106cfdc317fa00c10ecfb3a64fcc2d.tar.gz
uGFX-29251f33bd106cfdc317fa00c10ecfb3a64fcc2d.tar.bz2
uGFX-29251f33bd106cfdc317fa00c10ecfb3a64fcc2d.zip
Merge branch 'master' into Keil
Diffstat (limited to 'src')
-rw-r--r--src/ginput/ginput_mouse.c8
-rw-r--r--src/gwin/gwin.c27
2 files changed, 19 insertions, 16 deletions
diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c
index fc993646..83cd7db4 100644
--- a/src/ginput/ginput_mouse.c
+++ b/src/ginput/ginput_mouse.c
@@ -55,7 +55,7 @@ static GTIMER_DECL(MouseTimer);
#if !GINPUT_TOUCH_NOCALIBRATE
#include <string.h> // Required for memcpy
- static inline void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) {
+ static INLINE void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) {
pt->x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx);
pt->y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy);
}
@@ -330,7 +330,7 @@ static void MousePoll(void *param) {
#error "GINPUT: GFX_USE_GDISP must be defined when calibration is required"
#endif
- static inline void CalibrationCrossDraw(GMouse *m, const point *pp) {
+ static INLINE void CalibrationCrossDraw(GMouse *m, const point *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);
@@ -345,11 +345,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 inline void CalibrationCrossClear(GMouse *m, const point *pp) {
+ static INLINE void CalibrationCrossClear(GMouse *m, const point *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 inline void CalibrationCalculate(GMouse *m, const point *cross, const point *points) {
+ static INLINE void CalibrationCalculate(GMouse *m, const point *cross, const point *points) {
float dx;
coord_t c0, c1, c2;
(void) m;
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 5879e895..07beb996 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -36,6 +36,18 @@ static color_t defaultBgColor = Black;
static font_t defaultFont;
#endif
+/* These init functions are defined by each module but not published */
+extern void _gwmInit(void);
+extern void _gwmDeinit(void);
+#if GWIN_NEED_WIDGET
+ extern void _gwidgetInit(void);
+ extern void _gwidgetDeinit(void);
+#endif
+#if GWIN_NEED_CONTAINERS
+ extern void _gcontainerInit(void);
+ extern void _gcontainerDeinit(void);
+#endif
+
/*-----------------------------------------------
* Helper Routines
*-----------------------------------------------*/
@@ -46,33 +58,24 @@ static color_t defaultBgColor = Black;
void _gwinInit(void)
{
- extern void _gwmInit(void);
-
_gwmInit();
- #if GWIN_NEED_WIDGET
- extern void _gwidgetInit(void);
+ #if GWIN_NEED_WIDGET
_gwidgetInit();
#endif
- #if GWIN_NEED_CONTAINERS
- extern void _gcontainerInit(void);
+ #if GWIN_NEED_CONTAINERS
_gcontainerInit();
#endif
}
void _gwinDeinit(void)
{
- extern void _gwmDeinit(void);
-
#if GWIN_NEED_CONTAINERS
- extern void _gcontainerDeinit(void);
-
_gcontainerDeinit();
#endif
- #if GWIN_NEED_WIDGET
- extern void _gwidgetDeinit(void);
+ #if GWIN_NEED_WIDGET
_gwidgetDeinit();
#endif