summaryrefslogtreecommitdiff
path: root/src/fe-text/textbuffer-view.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-06-01 21:49:07 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-06-01 21:49:07 +0000
commit05777636a78af7214b33027cdfa6f08b045e6fe7 (patch)
tree447188485ac78470d0270639a10a155fc5e4af94 /src/fe-text/textbuffer-view.c
parent6f5c1117debce23e12fdba370f0356bebf61d355 (diff)
downloadirssi-05777636a78af7214b33027cdfa6f08b045e6fe7.zip
Replaced all direct curses calls with screen_xx() wrappers. This should
enable us to optionally use termcap directly. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1535 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r--src/fe-text/textbuffer-view.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c
index 8ce08304..dc7030ed 100644
--- a/src/fe-text/textbuffer-view.c
+++ b/src/fe-text/textbuffer-view.c
@@ -254,12 +254,12 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
color = cache->lines[subline-1].color;
}
- set_color(view->window, 0);
- wmove(view->window, ypos, 0);
- wclrtoeol(view->window);
+ screen_set_color(view->window, 0);
+ screen_move(view->window, 0, ypos);
+ screen_clrtoeol(view->window);
- wmove(view->window, ypos, xpos);
- set_color(view->window, color);
+ screen_move(view->window, xpos, ypos);
+ screen_set_color(view->window, color);
/* get the beginning of the next subline */
text_newline = subline == cache->count-1 ? NULL :
@@ -298,18 +298,18 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
color |= 0x80;
break;
}
- set_color(view->window, color);
+ screen_set_color(view->window, color);
text++;
continue;
}
if ((*text & 127) >= 32)
- waddch(view->window, *text);
+ screen_addch(view->window, *text);
else {
/* low-ascii */
- set_color(view->window, ATTR_REVERSE);
- waddch(view->window, (*text & 127)+'A'-1);
- set_color(view->window, color);
+ screen_set_color(view->window, ATTR_REVERSE);
+ screen_addch(view->window, (*text & 127)+'A'-1);
+ screen_set_color(view->window, color);
}
text++;
}
@@ -475,8 +475,8 @@ static void view_draw(TEXT_BUFFER_VIEW_REC *view, GList *line,
/* clear the rest of the view */
while (lines > 0) {
- wmove(view->window, ypos, 0);
- wclrtoeol(view->window);
+ screen_move(view->window, ypos, 0);
+ screen_clrtoeol(view->window);
ypos++; lines--;
}
}
@@ -562,9 +562,7 @@ static int view_scroll(TEXT_BUFFER_VIEW_REC *view, GList **lines, int *subline,
whole view */
textbuffer_view_redraw(view);
} else {
- scrollok(view->window, TRUE);
- wscrl(view->window, realcount);
- scrollok(view->window, FALSE);
+ screen_window_scroll(view->window, realcount);
if (draw_nonclean) {
if (realcount < 0)
@@ -1054,7 +1052,8 @@ LINE_REC *textbuffer_view_get_bookmark(TEXT_BUFFER_VIEW_REC *view,
/* Specify window where the changes in view should be drawn,
NULL disables it. */
-void textbuffer_view_set_window(TEXT_BUFFER_VIEW_REC *view, WINDOW *window)
+void textbuffer_view_set_window(TEXT_BUFFER_VIEW_REC *view,
+ SCREEN_WINDOW *window)
{
g_return_if_fail(view != NULL);
@@ -1071,7 +1070,7 @@ void textbuffer_view_redraw(TEXT_BUFFER_VIEW_REC *view)
g_return_if_fail(view != NULL);
if (view->window != NULL) {
- werase(view->window);
+ screen_window_clear(view->window);
view_draw_top(view, view->height);
screen_refresh(view->window);
}