aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-02-02 19:24:43 +0100
committerJoel Bodenmann <joel@unormal.org>2014-02-02 19:24:43 +0100
commita11f7da53638ee4fe282c7b5725294ca1780f9bf (patch)
tree9259f98c7a7cceef766d332311f77eb9278a2eeb /src/gwin
parentfababafc9a4fce83c4a6879624a8caa38ea9f438 (diff)
downloaduGFX-a11f7da53638ee4fe282c7b5725294ca1780f9bf.tar.gz
uGFX-a11f7da53638ee4fe282c7b5725294ca1780f9bf.tar.bz2
uGFX-a11f7da53638ee4fe282c7b5725294ca1780f9bf.zip
added deinit() routines for all modules (not implemented so far)
Diffstat (limited to 'src/gwin')
-rw-r--r--src/gwin/gwidget.c8
-rw-r--r--src/gwin/gwin.c17
-rw-r--r--src/gwin/gwm.c8
3 files changed, 30 insertions, 3 deletions
diff --git a/src/gwin/gwidget.c b/src/gwin/gwidget.c
index 484b8c37..75a69667 100644
--- a/src/gwin/gwidget.c
+++ b/src/gwin/gwidget.c
@@ -224,11 +224,17 @@ static void gwidgetEvent(void *param, GEvent *pe) {
}
#endif
-void _gwidgetInit(void) {
+void _gwidgetInit(void)
+{
geventListenerInit(&gl);
geventRegisterCallback(&gl, gwidgetEvent, 0);
}
+void _gwidgetDeinit(void)
+{
+ /* ToDo */
+}
+
GHandle _gwidgetCreate(GDisplay *g, GWidgetObject *pgw, const GWidgetInit *pInit, const gwidgetVMT *vmt) {
if (!(pgw = (GWidgetObject *)_gwindowCreate(g, &pgw->g, &pInit->g, &vmt->g, GWIN_FLG_WIDGET|GWIN_FLG_ENABLED)))
return 0;
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 94799482..485ccaaa 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -84,7 +84,8 @@ static color_t defaultBgColor = Black;
* Class Routines
*-----------------------------------------------*/
-void _gwinInit(void) {
+void _gwinInit(void)
+{
#if GWIN_NEED_WIDGET
extern void _gwidgetInit(void);
@@ -97,6 +98,20 @@ void _gwinInit(void) {
#endif
}
+void _gwinDeinit(void)
+{
+ #if GWIN_NEED_WIDGET
+ extern void _gwidgetDeinit(void);
+
+ _gwidgetDeinit();
+ #endif
+ #if GWIN_NEED_WINDOWMANAGER
+ extern void _gwmDeinit(void);
+
+ _gwmDeinit();
+ #endif
+}
+
// Internal routine for use by GWIN components only
// Initialise a window creating it dynamically if required.
GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags) {
diff --git a/src/gwin/gwm.c b/src/gwin/gwm.c
index f4dd8090..e7a71737 100644
--- a/src/gwin/gwm.c
+++ b/src/gwin/gwm.c
@@ -60,7 +60,8 @@ GWindowManager * _GWINwm;
* Window Routines
*-----------------------------------------------*/
-void _gwmInit(void) {
+void _gwmInit(void)
+{
gfxQueueASyncInit(&_GWINList);
_GWINwm = (GWindowManager *)&GNullWindowManager;
_GWINwm->vmt->Init();
@@ -70,6 +71,11 @@ void _gwmInit(void) {
#endif
}
+void _gwmDeinit(void)
+{
+ /* ToDo */
+}
+
void gwinSetWindowManager(struct GWindowManager *gwm) {
if (!gwm)
gwm = (GWindowManager *)&GNullWindowManager;