aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin/gwin.c')
-rw-r--r--src/gwin/gwin.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index a2b702e2..9f009fa1 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -90,6 +90,12 @@ void gwinDestroyWindow(GHandle gh) {
geventDetachSourceListeners((GSourceHandle)gh);
break;
#endif
+#if GWIN_NEED_SLIDER
+ case GW_SLIDER:
+ geventDetachSource(&((GSliderObject *)gh)->listener, 0);
+ geventDetachSourceListeners((GSourceHandle)gh);
+ break;
+#endif
default:
break;
}
@@ -101,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;
@@ -285,6 +306,15 @@ void gwinBlitArea(GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, coor
}
#endif
+#if GDISP_NEED_IMAGE
+ gdispImageError gwinImageDraw(GHandle gh, gdispImage *img, coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t sx, coord_t sy) {
+ #if GDISP_NEED_CLIP
+ gdispSetClip(gh->x, gh->y, gh->width, gh->height);
+ #endif
+ return gdispImageDraw(img, gh->x+x, gh->y+y, cx, cy, sx, sy);
+ }
+#endif
+
#endif /* GFX_USE_GWIN */
/** @} */