aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2013-04-05 05:34:35 -0700
committerTectu <joel@unormal.org>2013-04-05 05:34:35 -0700
commit89abbefc0ab5b875a5ec4f596a406b325dccdbc9 (patch)
tree62ee1f1e179797de6f9a87a05d80a1295f7f52fc
parent48c5fbabb1e4f7c3c682ed8df977d5952e563d1f (diff)
parentbe919fc38d46339a254e0d789c69773f7e600ff5 (diff)
downloaduGFX-89abbefc0ab5b875a5ec4f596a406b325dccdbc9.tar.gz
uGFX-89abbefc0ab5b875a5ec4f596a406b325dccdbc9.tar.bz2
uGFX-89abbefc0ab5b875a5ec4f596a406b325dccdbc9.zip
Merge pull request #59 from inmarket/master
Generic GWIN Draw routine
-rw-r--r--include/gwin/gwin.h10
-rw-r--r--src/gwin/gwin.c15
2 files changed, 25 insertions, 0 deletions
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h
index 47c2e38d..3d994d0a 100644
--- a/include/gwin/gwin.h
+++ b/include/gwin/gwin.h
@@ -166,6 +166,16 @@ void gwinDestroyWindow(GHandle gh);
/* Drawing Functions */
/**
+ * @brief Draw the window
+ * @note Redraws the Window if the GWIN object has a draw routine
+ *
+ * @param[in] gh The window handle
+ *
+ * @api
+ */
+void gwinDraw(GHandle gh);
+
+/**
* @brief Clear the window
* @note Uses the current background color to clear the window
*
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 58d75694..9f009fa1 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -107,6 +107,21 @@ void gwinDestroyWindow(GHandle gh) {
}
}
+void gwinDraw(GHandle gh) {
+ switch(gh->type) {
+ #if GWIN_NEED_BUTTON
+ case GW_BUTTON:
+ gwinButtonDraw(gh);
+ break;
+ #endif
+ #if GWIN_NEED_SLIDER
+ case GW_SLIDER:
+ gwinSliderDraw(gh);
+ break;
+ #endif
+ }
+}
+
#if GDISP_NEED_TEXT
void gwinSetFont(GHandle gh, font_t font) {
gh->font = font;