aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin/gwin.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-01-04 04:41:32 +0100
committerJoel Bodenmann <joel@unormal.org>2014-01-04 04:41:32 +0100
commitabe6a47c1f59941faac719770aa654d2c79cacef (patch)
treebae98fd4e90b4e1467523a26fbd1263dc78b0777 /include/gwin/gwin.h
parent07869da90938e375e71081d30757cc767596b431 (diff)
downloaduGFX-abe6a47c1f59941faac719770aa654d2c79cacef.tar.gz
uGFX-abe6a47c1f59941faac719770aa654d2c79cacef.tar.bz2
uGFX-abe6a47c1f59941faac719770aa654d2c79cacef.zip
basic implementation of parent/child (no flag handling done yet)
Diffstat (limited to 'include/gwin/gwin.h')
-rw-r--r--include/gwin/gwin.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h
index 96055376..b9d4f966 100644
--- a/include/gwin/gwin.h
+++ b/include/gwin/gwin.h
@@ -27,6 +27,9 @@
#if GFX_USE_GWIN || defined(__DOXYGEN__)
+/* Forward declaration */
+typedef struct GWindowObject *GHandle;
+
/**
* @brief A window object structure
* @note Do not access the members directly. Treat it as a black-box and use the method functions.
@@ -46,6 +49,11 @@ typedef struct GWindowObject {
#if GDISP_NEED_TEXT
font_t font; // @< The current font
#endif
+ #if GWIN_NEED_HIERARCHY
+ GHandle *parent; // @< The pointer to the parent (or NULL)
+ GHandle *sibling; // @< The pointer to a widgets brother
+ GHandle *child; // @< The pointer to a widgets child
+ #endif
} GWindowObject, * GHandle;
/* @} */
@@ -377,6 +385,19 @@ extern "C" {
*/
void gwinRedraw(GHandle gh);
+ #if GWIN_NEED_HIERARCHY
+ /**
+ * @brief Add a child widget to a parent one
+ *
+ * @param[in] parent The parent widget (does not need to be parent yet)
+ * @param[in] child The child widget
+ * @param[in] last Should the child widget be added to the front or the back of the list?
+ *
+ * @api
+ */
+ void gwinAddChild(GHandle parent, GHandle child, bool_t last);
+ #endif
+
#if GWIN_NEED_WINDOWMANAGER || defined (__DOXYGEN__)
/**
* @brief Redraw a window