aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-04-23 23:29:50 +0200
committerJoel Bodenmann <joel@unormal.org>2014-04-23 23:29:50 +0200
commit8169a0453b77364a0ef804f43762cc5675f450bf (patch)
tree2a5d11ab15e4441c802b65e4e8aec14b87db8019
parentd15d3ee19ba331fb96c8de23a2f385711fde9c66 (diff)
downloaduGFX-8169a0453b77364a0ef804f43762cc5675f450bf.tar.gz
uGFX-8169a0453b77364a0ef804f43762cc5675f450bf.tar.bz2
uGFX-8169a0453b77364a0ef804f43762cc5675f450bf.zip
Added gwinProgressbarStop()
-rw-r--r--releases.txt1
-rw-r--r--src/gwin/progressbar.c11
-rw-r--r--src/gwin/progressbar.h9
3 files changed, 21 insertions, 0 deletions
diff --git a/releases.txt b/releases.txt
index 3f438b12..9d2aa386 100644
--- a/releases.txt
+++ b/releases.txt
@@ -21,6 +21,7 @@ DEPRECTATE: Old image opening functions deprecated.
FEATURE: Restructure and simplify the include path for GFX
FEATURE: Added LGDP4532 driver by user shilow
FEATURE: Support for ChibiOS/RT 3.x
+FEATURE: Added gwinProgressbarStop()
*** changes after 1.9 ***
diff --git a/src/gwin/progressbar.c b/src/gwin/progressbar.c
index 37bad3c8..671c0971 100644
--- a/src/gwin/progressbar.c
+++ b/src/gwin/progressbar.c
@@ -200,6 +200,17 @@ void gwinProgressbarStart(GHandle gh, delaytime_t delay) {
#undef gsw
}
+void gwinProgressbarStop(GHandle gh) {
+ #define gsw ((GProgressbarObject *)gh)
+
+ if (gh->vmt != (gwinVMT *)&progressbarVMT)
+ return;
+
+ gtimerStop(&(gsw->gt));
+
+ #undef gsw
+}
+
/*----------------------------------------------------------
* Custom Draw Routines
*----------------------------------------------------------*/
diff --git a/src/gwin/progressbar.h b/src/gwin/progressbar.h
index de10783f..1b7e4424 100644
--- a/src/gwin/progressbar.h
+++ b/src/gwin/progressbar.h
@@ -156,6 +156,15 @@ void gwinProgressbarDecrement(GHandle gh);
void gwinProgressbarStart(GHandle gh, delaytime_t delay);
/**
+ * @brief Stop the timer which is started by @p gwinProgressbarStart()
+ *
+ * @param[in] gh The window handle (must be a progressbar window)
+ *
+ * @api
+ */
+void gwinProgressbarStop(GHandle gh);
+
+/**
* @brief Some custom progressbar drawing routines
* @details These function may be passed to @p gwinSetCustomDraw() to get different progressbar drawing styles
*