diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-11-10 21:07:16 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-11-10 21:07:16 +0100 |
commit | da2740b706d720292113445ee1db30f8a9873dc4 (patch) | |
tree | 8f8b1902d4af6a23b3daf26990f580b76ea31ea4 /src/gwin/console.c | |
parent | 6ca3537a696e7ace8098771a9a7105380604253d (diff) | |
parent | a8ce005e2621b0108863297948cea0fa52c8bf2a (diff) | |
download | uGFX-da2740b706d720292113445ee1db30f8a9873dc4.tar.gz uGFX-da2740b706d720292113445ee1db30f8a9873dc4.tar.bz2 uGFX-da2740b706d720292113445ee1db30f8a9873dc4.zip |
merging GDISPStreaming
Diffstat (limited to 'src/gwin/console.c')
-rw-r--r-- | src/gwin/console.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gwin/console.c b/src/gwin/console.c index b6a20dea..1be18662 100644 --- a/src/gwin/console.c +++ b/src/gwin/console.c @@ -66,8 +66,8 @@ static const gwinVMT consoleVMT = { AfterClear, // The after-clear routine }; -GHandle gwinConsoleCreate(GConsoleObject *gc, const GWindowInit *pInit) { - if (!(gc = (GConsoleObject *)_gwindowCreate(&gc->g, pInit, &consoleVMT, 0))) +GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *pInit) { + if (!(gc = (GConsoleObject *)_gwindowCreate(g, &gc->g, pInit, &consoleVMT, 0))) return 0; #if GFX_USE_OS_CHIBIOS && GWIN_CONSOLE_USE_BASESTREAM gc->stream.vmt = &GWindowConsoleVMT; @@ -97,7 +97,7 @@ void gwinPutChar(GHandle gh, char c) { fp = gdispGetFontMetric(gh->font, fontCharPadding); #if GDISP_NEED_CLIP - gdispSetClip(gh->x, gh->y, gh->width, gh->height); + gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height); #endif if (c == '\n') { @@ -116,13 +116,13 @@ void gwinPutChar(GHandle gh, char c) { if (gcw->cy + fy > gh->height) { #if GDISP_NEED_SCROLL /* scroll the console */ - gdispVerticalScroll(gh->x, gh->y, gh->width, gh->height, fy, gh->bgcolor); + gdispGVerticalScroll(gh->display, gh->x, gh->y, gh->width, gh->height, fy, gh->bgcolor); /* reset the cursor to the start of the last line */ gcw->cx = 0; gcw->cy = (((coord_t)(gh->height/fy))-1)*fy; #else /* clear the console */ - gdispFillArea(gh->x, gh->y, gh->width, gh->height, gh->bgcolor); + gdispGFillArea(gh->display, gh->x, gh->y, gh->width, gh->height, gh->bgcolor); /* reset the cursor to the top of the window */ gcw->cx = 0; gcw->cy = 0; @@ -132,12 +132,12 @@ void gwinPutChar(GHandle gh, char c) { #if GWIN_CONSOLE_USE_CLEAR_LINES /* clear to the end of the line */ if (gcw->cx == 0) - gdispFillArea(gh->x, gh->y + gcw->cy, gh->width, fy, gh->bgcolor); + gdispGFillArea(gh->display, gh->x, gh->y + gcw->cy, gh->width, fy, gh->bgcolor); #endif #if GWIN_CONSOLE_USE_FILLED_CHARS - gdispFillChar(gh->x + gcw->cx, gh->y + gcw->cy, c, gh->font, gh->color, gh->bgcolor); + gdispGFillChar(gh->display, gh->x + gcw->cx, gh->y + gcw->cy, c, gh->font, gh->color, gh->bgcolor); #else - gdispDrawChar(gh->x + gcw->cx, gh->y + gcw->cy, c, gh->font, gh->color); + gdispGDrawChar(gh->display, gh->x + gcw->cx, gh->y + gcw->cy, c, gh->font, gh->color); #endif /* update cursor */ |