aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin/checkbox.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-07 19:40:37 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-07 19:40:37 +1000
commit3957505ab119b21c7b0f4e72f56030c97711988a (patch)
tree5a059012d5fa0d07a93fcb70e72518bdaca1d4c5 /include/gwin/checkbox.h
parentde28112a7d6db829142ad113c93eb8ad071b0d65 (diff)
downloaduGFX-3957505ab119b21c7b0f4e72f56030c97711988a.tar.gz
uGFX-3957505ab119b21c7b0f4e72f56030c97711988a.tar.bz2
uGFX-3957505ab119b21c7b0f4e72f56030c97711988a.zip
GWIN renaming, tidy up, color styles
Diffstat (limited to 'include/gwin/checkbox.h')
-rw-r--r--include/gwin/checkbox.h30
1 files changed, 11 insertions, 19 deletions
diff --git a/include/gwin/checkbox.h b/include/gwin/checkbox.h
index 679a5d9c..fcd0549d 100644
--- a/include/gwin/checkbox.h
+++ b/include/gwin/checkbox.h
@@ -34,26 +34,18 @@
/* Type definitions */
/*===========================================================================*/
-typedef struct GEventGWinCheckbox_t {
+typedef struct GEventGWinCheckbox {
GEventType type; // The type of this event (GEVENT_GWIN_CHECKBOX)
GHandle checkbox; // The checkbox that has been depressed (actually triggered on release)
bool_t isChecked; // Is the checkbox currently checked or unchecked?
} GEventGWinCheckbox;
-typedef struct GCheckboxColors {
- color_t color_border;
- color_t color_checked;
- color_t color_bg;
- color_t color_txt;
-} GCheckboxColors;
-
/* A Checkbox window */
-typedef struct GCheckboxObject_t {
+typedef struct GCheckboxObject {
GWidgetObject w;
#if GINPUT_NEED_TOGGLE
uint16_t toggle;
#endif
- GCheckboxColors c;
} GCheckboxObject;
/**
@@ -75,27 +67,27 @@ typedef struct GCheckboxObject_t {
*
* @api
*/
-GHandle gwinCreateCheckbox(GCheckboxObject *gb, const GWidgetInit *pInit);
+GHandle gwinCheckboxCreate(GCheckboxObject *gb, const GWidgetInit *pInit);
/**
- * @brief Get the state of a checkbox
- * @return TRUE if the checkbox is currently checked
+ * @brief Set the state of a checkbox
*
- * @param[in] gh The window handle (must be a checkbox window)
+ * @param[in] gh The window handle (must be a checkbox window)
+ * @param[in] isChecked TRUE to set the check, FALSE to uncheck.
*
* @api
*/
-bool_t gwinIsCheckboxChecked(GHandle gh);
+void gwinCheckboxCheck(GHandle gh, bool_t isChecked);
/**
- * @brief Set the colors used to draw the checkbox
+ * @brief Get the state of a checkbox
+ * @return TRUE if the checkbox is currently checked
*
- * @param[in] gh The window handle (must be a checkbox window)
- * @param[in] pColors The colors to use
+ * @param[in] gh The window handle (must be a checkbox window)
*
* @api
*/
-void gwinCheckboxSetColors(GHandle gh, GCheckboxColors *pColors);
+bool_t gwinCheckboxIsChecked(GHandle gh);
/**
* @brief Some custom checkbox drawing routines