aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-04 00:20:32 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-04 00:20:32 +1000
commit09a359813f0abe8f99c32dadfa1ac2c68356ddfd (patch)
treece6bfc9861baac4ed2de9e84995f307b8fd7cffa /include
parent3f80e1f89dbeec06dd97a914d6851ad4596b1743 (diff)
downloaduGFX-09a359813f0abe8f99c32dadfa1ac2c68356ddfd.tar.gz
uGFX-09a359813f0abe8f99c32dadfa1ac2c68356ddfd.tar.bz2
uGFX-09a359813f0abe8f99c32dadfa1ac2c68356ddfd.zip
Label, Image and Window Manager changes
Diffstat (limited to 'include')
-rw-r--r--include/gfx_rules.h7
-rw-r--r--include/gwin/gwin.h14
-rw-r--r--include/gwin/image.h25
3 files changed, 24 insertions, 22 deletions
diff --git a/include/gfx_rules.h b/include/gfx_rules.h
index dfabe728..bfe017d3 100644
--- a/include/gfx_rules.h
+++ b/include/gfx_rules.h
@@ -46,7 +46,12 @@
#warning "GWIN: Drawing can occur outside the defined windows as GDISP_NEED_CLIP is FALSE"
#endif
#endif
- #if GWIN_NEED_BUTTON || GWIN_NEED_SLIDER || GWIN_NEED_CHECKBOX
+ #if GWIN_NEED_IMAGE
+ #if !GDISP_NEED_IMAGE
+ #error "GWIN: GDISP_NEED_IMAGE is required when GWIN_NEED_IMAGE is TRUE."
+ #endif
+ #endif
+ #if GWIN_NEED_BUTTON || GWIN_NEED_SLIDER || GWIN_NEED_CHECKBOX || GWIN_NEED_LABEL
#if !GWIN_NEED_WIDGET
#if GFX_DISPLAY_RULE_WARNINGS
#warning "GWIN: GWIN_NEED_WIDGET is required when a Widget is used. It has been turned on for you."
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h
index 21d465b2..4fb28bef 100644
--- a/include/gwin/gwin.h
+++ b/include/gwin/gwin.h
@@ -112,6 +112,13 @@ extern "C" {
void gwinSetDefaultColor(color_t clr);
/**
+ * @brief Get the default foreground color for all new GWIN windows
+ *
+ * @api
+ */
+ color_t gwinGetDefaultColor(void);
+
+ /**
* @brief Set the default background color for all new GWIN windows
*
* @param[in] bgclr The background color
@@ -120,6 +127,13 @@ extern "C" {
*/
void gwinSetDefaultBgColor(color_t bgclr);
+ /**
+ * @brief Get the default background color for all new GWIN windows
+ *
+ * @api
+ */
+ color_t gwinGetDefaultBgColor(void);
+
#if GDISP_NEED_TEXT || defined(__DOXYGEN__)
/**
* @brief Set the default font for all new GWIN windows
diff --git a/include/gwin/image.h b/include/gwin/image.h
index 95a26687..d32e9a0c 100644
--- a/include/gwin/image.h
+++ b/include/gwin/image.h
@@ -32,9 +32,7 @@
// An image window
typedef struct GImageWidget_t {
GWindowObject g;
-
- gdispImage *image;
- color_t bgColor;
+ gdispImage image;
} GImageWidget;
#ifdef __cplusplus
@@ -50,11 +48,10 @@ extern "C" {
* @param[in] pInit The initialization parameters to use.
*
* @note The default background color gets set to the current default one.
- * @note An image widget does not save the current drawing state. It is not automatically redrawn if the window
- * is moved or its visibility state is changed.
+ * @note An image window knows how to redraw.
*
* @api
- */
+ */
GHandle gwinImageCreate(GImageWidget *widget, GWindowInit *pInit);
/**
@@ -98,7 +95,7 @@ bool_t gwinImageOpenMemory(GHandle gh, const void* memory);
#endif
/**
- * @brief Cache an image.
+ * @brief Cache the image.
* @details Decodes and caches the current frame into RAM.
*
* param[in] gh The widget (must be an image widget)
@@ -109,20 +106,6 @@ bool_t gwinImageOpenMemory(GHandle gh, const void* memory);
*/
gdispImageError gwinImageCache(GHandle gh);
-/**
- * @brief Set the background color of an image widget.
- * @details Transparent images need a background color. If no background color has been set, the current default
- * on is used.
- *
- * @param[in] gh The widget (must be an image widget)
- * @param[in] bgColor The background color to be set
- *
- * @api
- */
-void gwinImageSetBgColor(GHandle gh, color_t bgColor);
-
-void gwinImageDraw(GHandle gh);
-
#ifdef __cplusplus
}
#endif