aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-05-20 16:18:10 +0200
committerJoel Bodenmann <joel@unormal.org>2013-05-20 16:18:10 +0200
commit757b28531f944a01edf3d64bf9608cde8ffeffba (patch)
tree19ad939dee98d026521c2813a6afe3a16fe05194 /include
parent92883c795ee27ededc68b7ee89bfa314987598b3 (diff)
downloaduGFX-757b28531f944a01edf3d64bf9608cde8ffeffba.tar.gz
uGFX-757b28531f944a01edf3d64bf9608cde8ffeffba.tar.bz2
uGFX-757b28531f944a01edf3d64bf9608cde8ffeffba.zip
added enable and disable APIs to high level GWIN code
Diffstat (limited to 'include')
-rw-r--r--include/gwin/gwin.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h
index c7b20008..d1192bc7 100644
--- a/include/gwin/gwin.h
+++ b/include/gwin/gwin.h
@@ -88,6 +88,15 @@ GHandle gwinCreateWindow(GWindowObject *gw, coord_t x, coord_t y, coord_t width,
void gwinDestroyWindow(GHandle gh);
/**
+ * @brief Enable or disable a widget (of any type).
+ *
+ * @param[in] gh The window handle
+ *
+ * @api
+ */
+void gwinSetEnabled(GHandle gh, bool_t enabled);
+
+/**
* @brief Get the X coordinate of the window
* @details Returns the X coordinate of the origin of the window.
* The coordinate is relative to the physical screen zero point.
@@ -138,6 +147,20 @@ void gwinDestroyWindow(GHandle gh);
*/
#define gwinSetBgColor(gh, bgclr) (gh)->bgcolor = (bgclr)
+/**
+ * @brief Enable a window of any type
+ *
+ * @param[in] gh The window handle
+ */
+#define gwinEnable(gh) gwinSetEnabled(gh, TRUE)
+
+/**
+ * @brief Disable a window of any type
+ *
+ * @param[in] gh The window handle
+ */
+#define gwinDisable(gh) gwinSetEnabled(gh, FALSE)
+
/* Set up for text */
#if GDISP_NEED_TEXT || defined(__DOXYGEN__)