From 3957505ab119b21c7b0f4e72f56030c97711988a Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 7 Jul 2013 19:40:37 +1000 Subject: GWIN renaming, tidy up, color styles --- include/gwin/checkbox.h | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'include/gwin/checkbox.h') 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 -- cgit v1.2.3