GWIN_CONSOLE_NEED_HISTORY -> GWIN_CONSOLE_USE_HISTORY

ugfx_release_2.6
Joel Bodenmann 2014-01-03 19:14:41 +01:00
parent ae6c2965ad
commit ffed62c5ba
4 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;