aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin_progressbar.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2015-06-08 14:14:40 +1000
committerinmarket <andrewh@inmarket.com.au>2015-06-08 14:14:40 +1000
commitccde54722f2c284fb0e7fc273d65c57a3be71db1 (patch)
treefffa49870c73d7e9d5caaf5c6d1d47cf0e5c90d3 /src/gwin/gwin_progressbar.c
parente850c344b818f21a2ec286f9c4a149a9cd4ac34b (diff)
downloaduGFX-ccde54722f2c284fb0e7fc273d65c57a3be71db1.tar.gz
uGFX-ccde54722f2c284fb0e7fc273d65c57a3be71db1.tar.bz2
uGFX-ccde54722f2c284fb0e7fc273d65c57a3be71db1.zip
Added ability to compile ugfx as a single file (excluding driver and board files).
Simply compile src/gfx_mk.c
Diffstat (limited to 'src/gwin/gwin_progressbar.c')
-rw-r--r--src/gwin/gwin_progressbar.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gwin/gwin_progressbar.c b/src/gwin/gwin_progressbar.c
index db58f9a7..e275b9e4 100644
--- a/src/gwin/gwin_progressbar.c
+++ b/src/gwin/gwin_progressbar.c
@@ -17,7 +17,7 @@
#include "gwin_class.h"
// Reset the display position back to the value predicted by the saved progressbar position
-static void ResetDisplayPos(GProgressbarObject *gsw) {
+static void PBResetDisplayPos(GProgressbarObject *gsw) {
if (gsw->w.g.width < gsw->w.g.height)
gsw->dpos = gsw->w.g.height-1-((gsw->w.g.height-1)*(gsw->pos-gsw->min))/(gsw->max-gsw->min);
else
@@ -25,7 +25,7 @@ static void ResetDisplayPos(GProgressbarObject *gsw) {
}
// We have to deinitialize the timer which auto updates the progressbar if any
-static void _destroy(GHandle gh) {
+static void PBDestroy(GHandle gh) {
#if GWIN_PROGRESSBAR_AUTO
gtimerStop(&((GProgressbarObject *)gh)->gt);
gtimerDeinit(&((GProgressbarObject *)gh)->gt);
@@ -39,7 +39,7 @@ static const gwidgetVMT progressbarVMT = {
{
"Progressbar", // The classname
sizeof(GProgressbarObject), // The object size
- _destroy, // The destroy routine
+ PBDestroy, // The destroy routine
_gwidgetRedraw, // The redraw routine
0, // The after-clear routine
},
@@ -83,7 +83,7 @@ GHandle gwinGProgressbarCreate(GDisplay *g, GProgressbarObject *gs, const GWidge
gtimerInit(&gs->gt);
#endif
- ResetDisplayPos(gs);
+ PBResetDisplayPos(gs);
gwinSetVisible((GHandle)gs, pInit->g.show);
return (GHandle)gs;
@@ -101,7 +101,7 @@ void gwinProgressbarSetRange(GHandle gh, int min, int max) {
gsw->max = max;
gsw->pos = min;
- ResetDisplayPos(gsw);
+ PBResetDisplayPos(gsw);
#undef gsw
}
@@ -122,7 +122,7 @@ void gwinProgressbarSetPosition(GHandle gh, int pos) {
else gsw->pos = pos;
}
- ResetDisplayPos(gsw);
+ PBResetDisplayPos(gsw);
_gwinUpdate(gh);
#undef gsw
@@ -153,7 +153,7 @@ void gwinProgressbarIncrement(GHandle gh) {
else
gsw->pos = gsw->max;
- ResetDisplayPos(gsw);
+ PBResetDisplayPos(gsw);
_gwinUpdate(gh);
#undef gsw
@@ -172,7 +172,7 @@ void gwinProgressbarDecrement(GHandle gh) {
gsw->pos -= gsw->res;
- ResetDisplayPos(gsw);
+ PBResetDisplayPos(gsw);
_gwinUpdate(gh);
#undef gsw