aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gimage.c
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-05-21 13:02:00 +1000
committerinmarket <andrewh@inmarket.com.au>2014-05-21 13:02:00 +1000
commit34e23320b4c69f5e409f25431603d901abfc4740 (patch)
tree2959d9c395b5364243a267229779e8afd8ee094d /src/gwin/gimage.c
parent7afe4e78b7ffd2150f7eba51d6613422ccc7abe5 (diff)
downloaduGFX-34e23320b4c69f5e409f25431603d901abfc4740.tar.gz
uGFX-34e23320b4c69f5e409f25431603d901abfc4740.tar.bz2
uGFX-34e23320b4c69f5e409f25431603d901abfc4740.zip
Significant changes to the window redrawing methodology.
Move and Resize should probably work for containers now Still to be tested - nested containers, progressbar timers while redrawing its container, move/resize on containers.
Diffstat (limited to 'src/gwin/gimage.c')
-rw-r--r--src/gwin/gimage.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/gwin/gimage.c b/src/gwin/gimage.c
index a4f477e9..d5ca2c38 100644
--- a/src/gwin/gimage.c
+++ b/src/gwin/gimage.c
@@ -24,22 +24,8 @@ static void _destroy(GWindowObject *gh) {
}
#if GWIN_NEED_IMAGE_ANIMATION
- static void _redraw(GHandle gh);
-
static void _timer(void *param) {
- #define gh ((GHandle)param)
-
- // We need to re-test the visibility in case it has been made invisible since the last frame.
- if ((gh->flags & GWIN_FLG_SYSVISIBLE)) {
- // Setting the clip here shouldn't be necessary if the redraw doesn't overdraw
- // but we put it in for safety anyway
- #if GDISP_NEED_CLIP
- gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height);
- #endif
- _redraw(gh);
- }
-
- #undef gh
+ _gwinUpdate((GHandle)param);
}
#endif
@@ -160,14 +146,7 @@ bool_t gwinImageOpenGFile(GHandle gh, GFILE *f) {
if ((gdispImageOpenGFile(&widget(gh)->image, f) & GDISP_IMAGE_ERR_UNRECOVERABLE))
return FALSE;
- if ((gh->flags & GWIN_FLG_SYSVISIBLE)) {
- // Setting the clip here shouldn't be necessary if the redraw doesn't overdraw
- // but we put it in for safety anyway
- #if GDISP_NEED_CLIP
- gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height);
- #endif
- _redraw(gh);
- }
+ _gwinUpdate(gh);
return TRUE;
}