[vte] widget: Move some methods to VteTerminalPrivate
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Move some methods to VteTerminalPrivate
- Date: Sat, 5 Dec 2015 21:06:29 +0000 (UTC)
commit 98d51c8212fbb147a17b1ef9935e3bea29494515
Author: Christian Persch <chpe gnome org>
Date: Mon Nov 30 17:23:34 2015 +0100
widget: Move some methods to VteTerminalPrivate
src/vte.cc | 17 +++++++++--------
src/vteinternal.hh | 4 ++++
src/vteseq.cc | 8 ++++----
3 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 57295bd..9e04a7d 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -515,22 +515,23 @@ VteTerminalPrivate::invalidate_all()
/* Scroll a rectangular region up or down by a fixed number of lines,
* negative = up, positive = down. */
void
-_vte_terminal_scroll_region (VteTerminal *terminal,
- long row, glong count, glong delta)
+VteTerminalPrivate::scroll_region (long row,
+ long count,
+ long delta)
{
if ((delta == 0) || (count == 0)) {
/* Shenanigans! */
return;
}
- if (count >= terminal->pvt->row_count) {
+ if (count >= m_row_count) {
/* We have to repaint the entire window. */
- terminal->pvt->invalidate_all();
+ invalidate_all();
} else {
/* We have to repaint the area which is to be
* scrolled. */
- terminal->pvt->invalidate_cells(
- 0, terminal->pvt->column_count,
+ invalidate_cells(
+ 0, m_column_count,
row, count);
}
}
@@ -3045,7 +3046,7 @@ VteTerminalPrivate::cursor_down()
_vte_terminal_ring_insert(m_terminal, m_cursor.row, FALSE);
/* Force the areas below the region to be
* redrawn -- they've moved. */
- _vte_terminal_scroll_region(m_terminal, start,
+ scroll_region(start,
end - start + 1, 1);
/* Force scroll. */
adjust_adjustments();
@@ -3056,7 +3057,7 @@ VteTerminalPrivate::cursor_down()
_vte_terminal_ring_remove(m_terminal, start);
_vte_terminal_ring_insert(m_terminal, end, TRUE);
/* Update the display. */
- _vte_terminal_scroll_region(m_terminal, start,
+ scroll_region(start,
end - start + 1, -1);
invalidate_cells(
0, m_column_count,
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 78dd771..dbb4a95 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -518,6 +518,10 @@ public:
void start_autoscroll();
void stop_autoscroll();
+ void scroll_region (long row,
+ long count,
+ long delta);
+
void connect_pty_read();
void disconnect_pty_read();
diff --git a/src/vteseq.cc b/src/vteseq.cc
index f852d8c..b3d60ab 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -355,7 +355,7 @@ _vte_terminal_scroll_text (VteTerminal *terminal, int scroll_amount)
}
/* Update the display. */
- _vte_terminal_scroll_region(terminal, start, end - start + 1,
+ terminal->pvt->scroll_region(start, end - start + 1,
scroll_amount);
/* Adjust the scrollbars if necessary. */
@@ -1725,7 +1725,7 @@ vte_sequence_handler_reverse_index (VteTerminal *terminal, GValueArray *params)
_vte_terminal_ring_remove (terminal, end);
_vte_terminal_ring_insert (terminal, start, TRUE);
/* Update the display. */
- _vte_terminal_scroll_region(terminal, start, end - start + 1, 1);
+ terminal->pvt->scroll_region(start, end - start + 1, 1);
terminal->pvt->invalidate_cells(
0, terminal->pvt->column_count,
start, 2);
@@ -2570,7 +2570,7 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params)
}
terminal->pvt->cursor.col = 0;
/* Update the display. */
- _vte_terminal_scroll_region(terminal, row, end - row + 1, param);
+ terminal->pvt->scroll_region(row, end - row + 1, param);
/* Adjust the scrollbars if necessary. */
terminal->pvt->adjust_adjustments();
/* We've modified the display. Make a note of it. */
@@ -2618,7 +2618,7 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params)
}
terminal->pvt->cursor.col = 0;
/* Update the display. */
- _vte_terminal_scroll_region(terminal, row, end - row + 1, -param);
+ terminal->pvt->scroll_region(row, end - row + 1, -param);
/* Adjust the scrollbars if necessary. */
terminal->pvt->adjust_adjustments();
/* We've modified the display. Make a note of it. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]