aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2015-01-25 17:40:34 +1000
committerinmarket <andrewh@inmarket.com.au>2015-01-25 17:40:34 +1000
commitb9f53aa7936686134f19c480346816a3d234f7f7 (patch)
tree84a51da605c4e3f54320a6ed793e8ffb6ba2aaac /src/gwin/gwin.h
parentb316263833c95cf2b8cf14fe890321d5880aa81c (diff)
downloaduGFX-b9f53aa7936686134f19c480346816a3d234f7f7.tar.gz
uGFX-b9f53aa7936686134f19c480346816a3d234f7f7.tar.bz2
uGFX-b9f53aa7936686134f19c480346816a3d234f7f7.zip
Add the ability to flash a gwin window/widget.
Only the button draws for checkbox's and radio's currently do anything about it. Widget demo updated to show this on Checkbox 3 (the toggle button).
Diffstat (limited to 'src/gwin/gwin.h')
-rw-r--r--src/gwin/gwin.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gwin/gwin.h b/src/gwin/gwin.h
index 81bf38e5..9b2d18b7 100644
--- a/src/gwin/gwin.h
+++ b/src/gwin/gwin.h
@@ -547,6 +547,40 @@ extern "C" {
*/
GHandle gwinGetNextWindow(GHandle gh);
+ /**
+ * @brief Set a window or widget to flash
+ *
+ * @param[in] gh The window handle
+ * @param[in] flash Enable or disable the flashing of the window
+ *
+ * @note The window is automatically redrawn if it supports self-redrawing.
+ * @note When a window is set to flash, its appearance changes in some
+ * way every flash period (GWIN_FLASHING_PERIOD). How its appearance
+ * changes depends on the draw for each window/widget.
+ *
+ * @pre Requires GWIN_NEED_FLASHING to be TRUE
+ *
+ * @api
+ */
+ void gwinSetFlashing(GHandle gh, bool_t flash);
+
+ /**
+ * @brief Enables flashing of a window or widget
+ *
+ * @param[in] gh The window handle
+ *
+ * @api
+ */
+ #define gwinFlash(gh) gwinSetFlashing(gh, TRUE)
+
+ /**
+ * @brief Disables a widget
+ *
+ * @param[in] gh The window handle
+ *
+ * @api
+ */
+ #define gwinNoFlash(gh) gwinSetFlashing(gh, FALSE)
#endif
#if GDISP_NEED_TEXT || defined(__DOXYGEN__)