diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-01-03 19:14:41 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-01-03 19:14:41 +0100 |
commit | ffed62c5ba3c208e83af5cc6615cfd1615a97d02 (patch) | |
tree | 6f15571875bd0922e6bd18e8c8d5d2d0d78336e6 | |
parent | ae6c2965ad35c512ae2404fe9079213034e6f7a6 (diff) | |
download | uGFX-ffed62c5ba3c208e83af5cc6615cfd1615a97d02.tar.gz uGFX-ffed62c5ba3c208e83af5cc6615cfd1615a97d02.tar.bz2 uGFX-ffed62c5ba3c208e83af5cc6615cfd1615a97d02.zip |
GWIN_CONSOLE_NEED_HISTORY -> GWIN_CONSOLE_USE_HISTORY
-rw-r--r-- | gfxconf.example.h | 2 | ||||
-rw-r--r-- | include/gwin/console.h | 6 | ||||
-rw-r--r-- | include/gwin/options.h | 4 | ||||
-rw-r--r-- | src/gwin/console.c | 14 |
4 files changed, 13 insertions, 13 deletions
diff --git a/gfxconf.example.h b/gfxconf.example.h index 239d2212..4631cddc 100644 --- a/gfxconf.example.h +++ b/gfxconf.example.h @@ -124,7 +124,7 @@ #define GWIN_NEED_WINDOWMANAGER FALSE #define GWIN_NEED_CONSOLE FALSE - #define GWIN_CONSOLE_NEED_HISTORY TRUE + #define GWIN_CONSOLE_USE_HISTORY TRUE #define GWIN_CONSOLE_USE_BASESTREAM FALSE #define GWIN_CONSOLE_USE_FLOAT FALSE #define GWIN_NEED_GRAPH FALSE diff --git a/include/gwin/console.h b/include/gwin/console.h index 850c5a57..ec108984 100644 --- a/include/gwin/console.h +++ b/include/gwin/console.h @@ -31,7 +31,7 @@ typedef struct GConsoleObject { GWindowObject g; coord_t cx, cy; // Cursor position - #if GWIN_CONSOLE_NEED_HISTORY + #if GWIN_CONSOLE_USE_HISTORY char* buffer; // buffer to store console content uint16_t last_char; // the last rendered character size_t size; // size of buffer @@ -89,10 +89,10 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p BaseSequentialStream *gwinConsoleGetStream(GHandle gh); #endif -#if GWIN_CONSOLE_NEED_HISTORY +#if GWIN_CONSOLE_USE_HISTORY /** * @brief Assing a buffer to keep track of the content while the widget is invisible. - * @pre GWIN_CONSOLE_NEED_HISTORY must be set to TRUE in your gfxconf.h + * @pre GWIN_CONSOLE_USE_HISTORY must be set to TRUE in your gfxconf.h * * @param[in] gh The window handle (must be a console window) * @param[in] buffer The pointer of the buffer that shall be used. Buffer will be diff --git a/include/gwin/options.h b/include/gwin/options.h index 260160ca..e6d2a81e 100644 --- a/include/gwin/options.h +++ b/include/gwin/options.h @@ -113,8 +113,8 @@ * content will be restored too. * @details Defaults to FALSE */ - #ifndef GWIN_CONSOLE_NEED_HISTORY - #define GWIN_CONSOLE_NEED_HISTORY FALSE + #ifndef GWIN_CONSOLE_USE_HISTORY + #define GWIN_CONSOLE_USE_HISTORY FALSE #endif /** * @brief Console Windows need floating point support in @p gwinPrintf diff --git a/src/gwin/console.c b/src/gwin/console.c index e06ca937..56e1abc6 100644 --- a/src/gwin/console.c +++ b/src/gwin/console.c @@ -22,7 +22,7 @@ #define GWIN_CONSOLE_USE_FILLED_CHARS FALSE // some temporary warning -#if GWIN_CONSOLE_NEED_HISTORY +#if GWIN_CONSOLE_USE_HISTORY #warning "This feature is work in progress and does currently contain a lot of bugs." #endif @@ -58,7 +58,7 @@ }; #endif -#if GWIN_CONSOLE_NEED_HISTORY +#if GWIN_CONSOLE_USE_HISTORY static void CustomRedraw(GWindowObject *gh) { #define gcw ((GConsoleObject *)gh) @@ -80,7 +80,7 @@ static void AfterClear(GWindowObject *gh) { gcw->cx = 0; gcw->cy = 0; - #if GWIN_CONSOLE_NEED_HISTORY + #if GWIN_CONSOLE_USE_HISTORY // issue an overflow, this is some kind // of emptying the buffer gcw->last_char = gcw->size; @@ -93,7 +93,7 @@ static const gwinVMT consoleVMT = { "Console", // The classname sizeof(GConsoleObject), // The object size 0, // The destroy routine - #if GWIN_CONSOLE_NEED_HISTORY + #if GWIN_CONSOLE_USE_HISTORY CustomRedraw, // The redraw routine (custom) #else 0, // The redraw routine (default) @@ -109,7 +109,7 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p gc->stream.vmt = &GWindowConsoleVMT; #endif - #if GWIN_CONSOLE_NEED_HISTORY + #if GWIN_CONSOLE_USE_HISTORY gc->buffer = 0; gc->size = 0; gc->last_char = 0; @@ -132,7 +132,7 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p } #endif -#if GWIN_CONSOLE_NEED_HISTORY +#if GWIN_CONSOLE_USE_HISTORY bool_t gwinConsoleSetBuffer(GHandle gh, void* buffer, size_t size) { #define gcw ((GConsoleObject *)gh) @@ -179,7 +179,7 @@ void gwinPutChar(GHandle gh, char c) { if (gh->vmt != &consoleVMT || !gh->font) return; - #if GWIN_CONSOLE_NEED_HISTORY + #if GWIN_CONSOLE_USE_HISTORY // buffer overflow check if (gcw->last_char >= gcw->size) gcw->last_char = 0; |