diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-10-14 08:55:15 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-10-14 08:55:15 +1000 |
commit | ea4af865f11cd18ac1b3d33fb9951f7527a42ab7 (patch) | |
tree | 7088388d6e29cfc2bdc7ed11ef74f030cd0b1caa /include/gdisp | |
parent | 769766aa4ad4d35a8aa94ff5cf2df2b88549d426 (diff) | |
download | uGFX-ea4af865f11cd18ac1b3d33fb9951f7527a42ab7.tar.gz uGFX-ea4af865f11cd18ac1b3d33fb9951f7527a42ab7.tar.bz2 uGFX-ea4af865f11cd18ac1b3d33fb9951f7527a42ab7.zip |
Compile time fix to text rendering.
Updated gdisp Get/Set Display routines to a more logical API.
Diffstat (limited to 'include/gdisp')
-rw-r--r-- | include/gdisp/gdisp.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/gdisp/gdisp.h b/include/gdisp/gdisp.h index 7f0f8012..0c8310bb 100644 --- a/include/gdisp/gdisp.h +++ b/include/gdisp/gdisp.h @@ -366,16 +366,32 @@ extern "C" { color_t gdispBlendColor(color_t fg, color_t bg, uint8_t alpha); /** + * @brief Get the specified display + * @return The pointer to the display or NULL if the display doesn't exist + * @note The GDISP variable contains the display used by the gdispXxxx routines + * as opposed to the gdispGXxxx routines which take an explicit display + * parameter. + * @note Displays are numbered from 0 to GDISP_TOTAL_DISPLAYS - 1 + * + * @param[in] display The display number (0..n) + * + * @api + */ +GDisplay *gdispGetDisplay(unsigned display); + +/** * @brief Set the current default display to the specified display * @note The default display is used for the gdispXxxx functions. - * @note Displays are numbered from 0 to GDISP_TOTAL_DISPLAYS - 1 - * @note If an invalid display number is specified the request is ignored. + * @note The default display is contained in the variable GDISP. Using + * this function to set it protects against it being set to a NULL + * value. + * @note If a NULL is passed for the dispay this call is ignored. * * @param[in] display The display number (0..n) * * @api */ -void gdispSetDisplay(unsigned display); +void gdispSetDisplay(GDisplay *g); /* Drawing Functions */ |