diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-05-26 02:06:55 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-05-26 02:06:55 +1000 |
commit | 8fcbf4e5d5cc88d52f4e6e67ebead27fc856ff4a (patch) | |
tree | c52d7733525727320d2de00acedb42bc18124471 /include/gwin | |
parent | 7fbfde42aabbcd30cffba2fba35158236c0a6c6c (diff) | |
download | uGFX-8fcbf4e5d5cc88d52f4e6e67ebead27fc856ff4a.tar.gz uGFX-8fcbf4e5d5cc88d52f4e6e67ebead27fc856ff4a.tar.bz2 uGFX-8fcbf4e5d5cc88d52f4e6e67ebead27fc856ff4a.zip |
More GOS module changes
GQUEUE as a seperate module
GOS changes including basic Win32 O/S support
Diffstat (limited to 'include/gwin')
-rw-r--r-- | include/gwin/console.h | 29 | ||||
-rw-r--r-- | include/gwin/options.h | 18 |
2 files changed, 45 insertions, 2 deletions
diff --git a/include/gwin/console.h b/include/gwin/console.h index 1fc19e42..4c317cdb 100644 --- a/include/gwin/console.h +++ b/include/gwin/console.h @@ -40,7 +40,7 @@ typedef struct GConsoleObject_t { GWindowObject gwin; - #if GFX_USE_OS_CHIBIOS + #if GFX_USE_OS_CHIBIOS && GWIN_CONSOLE_USE_BASESTREAM struct GConsoleWindowStream_t { const struct GConsoleWindowVMT_t *vmt; _base_asynchronous_channel_data @@ -80,7 +80,7 @@ extern "C" { */ GHandle gwinCreateConsole(GConsoleObject *gc, coord_t x, coord_t y, coord_t width, coord_t height, font_t font); -#if GFX_USE_OS_CHIBIOS +#if GFX_USE_OS_CHIBIOS && GWIN_CONSOLE_USE_BASESTREAM /** * @brief Get a stream from a console window suitable for use with chprintf(). * @return The stream handle or NULL if this is not a console window. @@ -128,6 +128,31 @@ void gwinPutString(GHandle gh, const char *str); */ void gwinPutCharArray(GHandle gh, const char *str, size_t n); +/** + * @brief Print a formatted string at the cursor position in the window. It will wrap lines as required. + * @details This function implements a minimal printf() like functionality + * The general parameters format is: %[-][width|*][.precision|*][l|L]p. + * The following parameter types (p) are supported: + * - <b>x</b> hexadecimal integer. + * - <b>X</b> hexadecimal long. + * - <b>o</b> octal integer. + * - <b>O</b> octal long. + * - <b>d</b> decimal signed integer. + * - <b>D</b> decimal signed long. + * - <b>u</b> decimal unsigned integer. + * - <b>U</b> decimal unsigned long. + * - <b>c</b> character. + * - <b>s</b> string. + * @note Uses the current foreground color to draw the string and fills the background using the background drawing color + * + * @param[in] gh The window handle (must be a console window) + * @param[in] fmt The format string (as per printf) + * @param[in] ... The format string arguments. + * + * @api + */ +void gwinPrintf(GHandle gh, const char *fmt, ...); + #ifdef __cplusplus } #endif diff --git a/include/gwin/options.h b/include/gwin/options.h index 8d78a751..683a6e55 100644 --- a/include/gwin/options.h +++ b/include/gwin/options.h @@ -59,9 +59,27 @@ * @name GWIN Optional Parameters * @{ */ + /** + * @brief Buttons should not insist the mouse is over the button on mouse release + * @details Defaults to FALSE + */ #ifndef GWIN_BUTTON_LAZY_RELEASE #define GWIN_BUTTON_LAZY_RELEASE FALSE #endif + /** + * @brief Console Windows need floating point support in @p gwinPrintf + * @details Defaults to FALSE + */ + #ifndef GWIN_CONSOLE_USE_FLOAT + #define GWIN_CONSOLE_USE_FLOAT FALSE + #endif + /** + * @brief Console Windows need BaseStreamSequential support (ChibiOS only) + * @details Defaults to FALSE + */ + #ifndef GWIN_CONSOLE_USE_BASESTREAM + #define GWIN_CONSOLE_USE_BASESTREAM FALSE + #endif /** @} */ #endif /* _GWIN_OPTIONS_H */ |