aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-01 17:47:35 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-01 17:47:35 +1000
commit4afd5ec74429232e4db96001ed89757b0ba55ee7 (patch)
tree5889174cdcadbf39655a178509073952f68462d8 /include
parentde27a6c2db6f5fb97b3a5d07395a629c879abfbc (diff)
parentdf5f701a11ea5603f1f0b44f0e6bd96084b6d09d (diff)
downloaduGFX-4afd5ec74429232e4db96001ed89757b0ba55ee7.tar.gz
uGFX-4afd5ec74429232e4db96001ed89757b0ba55ee7.tar.bz2
uGFX-4afd5ec74429232e4db96001ed89757b0ba55ee7.zip
Merge branch 'GWIN' into image
Diffstat (limited to 'include')
-rw-r--r--include/gdisp/image.h15
-rw-r--r--include/gwin/button.h2
-rw-r--r--include/gwin/checkbox.h2
-rw-r--r--include/gwin/class_gwin.h10
-rw-r--r--include/gwin/console.h2
-rw-r--r--include/gwin/graph.h2
-rw-r--r--include/gwin/gwidget.h4
-rw-r--r--include/gwin/gwin.h2
-rw-r--r--include/gwin/slider.h2
9 files changed, 26 insertions, 15 deletions
diff --git a/include/gdisp/image.h b/include/gdisp/image.h
index 696500a6..ea8a02d4 100644
--- a/include/gdisp/image.h
+++ b/include/gdisp/image.h
@@ -185,7 +185,7 @@ extern "C" {
gdispImageError gdispImageOpen(gdispImage *img);
/**
- * @brief Close an image and release any dynamicly allocated working storage.
+ * @brief Close an image and release any dynamically allocated working storage.
*
* @param[in] img The image structure
*
@@ -196,6 +196,19 @@ extern "C" {
void gdispImageClose(gdispImage *img);
/**
+ * @brief Is an image open.
+ * @return TRUE if the image is currently open.
+ *
+ * @param[in] img The image structure
+ *
+ * @note Be careful with calling this on an uninitialized image structure as the image
+ * will contain random data which may be interpreted as meaning the image
+ * is open. Clearing the Image structure to 0's will guarantee the image
+ * is seen as being closed.
+ */
+ bool_t gdispImageIsOpen(gdispImage *img);
+
+ /**
* @brief Set the background color of the image.
*
* @param[in] img The image structure
diff --git a/include/gwin/button.h b/include/gwin/button.h
index a6b19333..73f42e37 100644
--- a/include/gwin/button.h
+++ b/include/gwin/button.h
@@ -84,7 +84,7 @@ extern "C" {
*
* @api
*/
-GHandle gwinCreateButton(GButtonObject *gb, GWidgetInit *pInit);
+GHandle gwinCreateButton(GButtonObject *gb, const GWidgetInit *pInit);
/**
* @brief Set the colors of a button.
diff --git a/include/gwin/checkbox.h b/include/gwin/checkbox.h
index 9a19a2e1..2823007a 100644
--- a/include/gwin/checkbox.h
+++ b/include/gwin/checkbox.h
@@ -73,7 +73,7 @@ typedef struct GCheckboxObject_t {
*
* @api
*/
-GHandle gwinCreateCheckbox(GCheckboxObject *gb, GWidgetInit *pInit);
+GHandle gwinCreateCheckbox(GCheckboxObject *gb, const GWidgetInit *pInit);
/**
* @brief Get the state of a checkbox
diff --git a/include/gwin/class_gwin.h b/include/gwin/class_gwin.h
index c3d2ee36..dbda3619 100644
--- a/include/gwin/class_gwin.h
+++ b/include/gwin/class_gwin.h
@@ -117,7 +117,7 @@ typedef struct gwinVMT {
typedef struct gwmVMT {
void (*Init) (void); // @< The window manager has just been set as the current window manager
void (*DeInit) (void); // @< The window manager has just been removed as the current window manager
- bool_t (*Add) (GHandle gh, GWindowInit *pInit); // @< A window has been added
+ bool_t (*Add) (GHandle gh, const GWindowInit *pInit); // @< A window has been added
void (*Delete) (GHandle gh); // @< A window has been deleted
void (*Visible) (GHandle gh); // @< A window has changed its visibility state
void (*Redim) (GHandle gh, coord_t x, coord_t y, coord_t w, coord_t h); // @< A window wants to be moved or resized
@@ -146,21 +146,19 @@ extern "C" {
*
* @notapi
*/
-GHandle _gwindowCreate(GWindowObject *pgw, GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags);
+GHandle _gwindowCreate(GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags);
#if GWIN_NEED_WIDGET || defined(__DOXYGEN__)
/**
* @brief Initialise (and allocate if necessary) the base Widget object
*
* @param[in] pgw The GWidgetObject structure. If NULL one is allocated from the heap
- * @param[in] x, y The top left corner of the Widget relative to the screen
- * @param[in] w, h The width and height of the Widget window
- * @param[in] size The size of the Widget object to allocate
+ * @param[in] pInit The user initialization parameters
* @param[in] vmt The virtual method table for the Widget object
*
* @notapi
*/
- GHandle _gwidgetCreate(GWidgetObject *pgw, GWidgetInit *pInit, const gwidgetVMT *vmt);
+ GHandle _gwidgetCreate(GWidgetObject *pgw, const GWidgetInit *pInit, const gwidgetVMT *vmt);
/**
* @brief Destroy the Widget object
diff --git a/include/gwin/console.h b/include/gwin/console.h
index 38c88f63..a3b3697c 100644
--- a/include/gwin/console.h
+++ b/include/gwin/console.h
@@ -64,7 +64,7 @@ extern "C" {
*
* @api
*/
-GHandle gwinCreateConsole(GConsoleObject *gc, GWindowInit *pInit);
+GHandle gwinCreateConsole(GConsoleObject *gc, const GWindowInit *pInit);
#if GFX_USE_OS_CHIBIOS && GWIN_CONSOLE_USE_BASESTREAM
/**
diff --git a/include/gwin/graph.h b/include/gwin/graph.h
index 5e6abee1..b5fc1405 100644
--- a/include/gwin/graph.h
+++ b/include/gwin/graph.h
@@ -107,7 +107,7 @@ extern "C" {
*
* @api
*/
-GHandle gwinCreateGraph(GGraphObject *gg, GWindowInit *pInit);
+GHandle gwinCreateGraph(GGraphObject *gg, const GWindowInit *pInit);
/**
* @brief Set the style of the graphing operations.
diff --git a/include/gwin/gwidget.h b/include/gwin/gwidget.h
index 50f19193..817f2b0d 100644
--- a/include/gwin/gwidget.h
+++ b/include/gwin/gwidget.h
@@ -23,7 +23,7 @@
* via an input device such as a mouse or toggle buttons. It is the
* base class for widgets such as buttons and sliders.
*
- * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
+ * @pre GFX_USE_GWIN and GWIN_NEED_WIDGET must be set to TRUE in your gfxconf.h
* @{
*/
@@ -40,7 +40,7 @@ typedef void (*CustomWidgetDrawFunction)(struct GWidgetObject *gw, void *param);
* @note A widget is a GWIN window that accepts user input.
* It also has a number of other properties such as its ability
* to redraw itself (a widget maintains drawing state).
- * @note Do you access the members directly. Treat it as a black-box and use the method functions.
+ * @note Do not access the members directly. Treat it as a black-box and use the method functions.
*
* @{
*/
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h
index 93cca142..b4be6a83 100644
--- a/include/gwin/gwin.h
+++ b/include/gwin/gwin.h
@@ -154,7 +154,7 @@ extern "C" {
*
* @api
*/
- GHandle gwinCreateWindow(GWindowObject *pgw, GWindowInit *pInit);
+ GHandle gwinCreateWindow(GWindowObject *pgw, const GWindowInit *pInit);
/**
* @brief Destroy a window (of any type). Releases any dynamically allocated memory.
diff --git a/include/gwin/slider.h b/include/gwin/slider.h
index 4479950f..57bd5a72 100644
--- a/include/gwin/slider.h
+++ b/include/gwin/slider.h
@@ -82,7 +82,7 @@ extern "C" {
*
* @api
*/
-GHandle gwinCreateSlider(GSliderObject *gb, GWidgetInit *pInit);
+GHandle gwinCreateSlider(GSliderObject *gb, const GWidgetInit *pInit);
/**
* @brief Set the slider range.