aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-07-17 05:58:03 +0200
committerJoel Bodenmann <joel@unormal.org>2013-07-17 05:58:03 +0200
commitceae37b7bfe50f74a1b6ccb0e0c91736d64a5755 (patch)
tree6b396af562abd1edcf60fa47d9206923b07865de
parentd1861f04e04608facbbda43aea4b5fb5004e8dcc (diff)
downloaduGFX-ceae37b7bfe50f74a1b6ccb0e0c91736d64a5755.tar.gz
uGFX-ceae37b7bfe50f74a1b6ccb0e0c91736d64a5755.tar.bz2
uGFX-ceae37b7bfe50f74a1b6ccb0e0c91736d64a5755.zip
added gwinImageNext()
-rw-r--r--include/gwin/image.h20
-rw-r--r--src/gwin/gimage.c4
2 files changed, 24 insertions, 0 deletions
diff --git a/include/gwin/image.h b/include/gwin/image.h
index 142f6374..688435c7 100644
--- a/include/gwin/image.h
+++ b/include/gwin/image.h
@@ -104,6 +104,26 @@ bool_t gwinImageOpenMemory(GHandle gh, const void* memory);
*/
gdispImageError gwinImageCache(GHandle gh);
+
+/**
+ * @brief Prepare for the next frame/page in the image file.
+ * @return A time in milliseconds to keep displaying the current frame before trying to draw
+ * the next frame. Watch out for the special values TIME_IMMEDIATE and TIME_INFINITE.
+ *
+ * @param[in] gh The widget handle (must be an image box handle)
+ *
+ * @pre gwinImageOpenXxx() must have returned successfully.
+ *
+ * @note It will return TIME_IMMEDIATE if the first frame/page hasn't been drawn or if the next frame
+ * should be drawn immediately.
+ * @note It will return TIME_INFINITE if another image frame doesn't exist or an error has occurred.
+ * @note Images that support multiple pages (eg TIFF files) will return TIME_IMMEDIATE between pages
+ * and then TIME_INFINITE when there are no more pages.
+ * @note An image that displays a looped animation will never return TIME_INFINITE unless it
+ * gets an error.
+ */
+delaytime_t gwinImageNext(GHandle gh);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/gwin/gimage.c b/src/gwin/gimage.c
index 1eabfed1..e1b04b2b 100644
--- a/src/gwin/gimage.c
+++ b/src/gwin/gimage.c
@@ -171,5 +171,9 @@ gdispImageError gwinImageCache(GHandle gh) {
return gdispImageCache(&widget(gh)->image);
}
+delaytime_t gwinImageNext(GHandle gh) {
+ return gdispImageNext(&widget(gh)->image);
+}
+
#endif // GFX_USE_GWIN && GWIN_NEED_IMAGE
/** @} */