[vte] widget: Move some methods to VteTerminalPrivate



commit a20eda749abe40d20fd6edd1424abc28c10fc6c4
Author: Christian Persch <chpe gnome org>
Date:   Thu Jan 14 17:05:36 2016 +0100

    widget: Move some methods to VteTerminalPrivate

 src/vteinternal.hh |    1 +
 src/vteseq.cc      |   32 +++++++++++++++++---------------
 2 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index b562ad9..339993f 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -1127,6 +1127,7 @@ public:
         inline void seq_cb();
         inline void seq_cd();
         inline void seq_ce();
+        inline void seq_dc();
         inline void set_cursor_column(vte::grid::column_t col);
         inline void set_cursor_row(vte::grid::row_t row /* relative to scrolling region */);
         inline void set_cursor_coords(vte::grid::row_t row /* relative to scrolling region */,
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 58c9e69..1f7ebca 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -1377,39 +1377,41 @@ vte_sequence_handler_line_position_absolute (VteTerminal *terminal, GValueArray
 static void
 _vte_sequence_handler_dc (VteTerminal *terminal, GValueArray *params)
 {
-       VteScreen *screen;
+        terminal->pvt->seq_dc();
+}
+
+void
+VteTerminalPrivate::seq_dc()
+{
        VteRowData *rowdata;
        long col;
 
-        terminal->pvt->ensure_cursor_is_onscreen();
-
-       screen = terminal->pvt->screen;
+        ensure_cursor_is_onscreen();
 
-        if (_vte_ring_next(screen->row_data) > terminal->pvt->cursor.row) {
+        if (_vte_ring_next(m_screen->row_data) > m_cursor.row) {
                long len;
                /* Get the data for the row which the cursor points to. */
-                rowdata = _vte_ring_index_writable (screen->row_data, terminal->pvt->cursor.row);
+                rowdata = _vte_ring_index_writable(m_screen->row_data, m_cursor.row);
                g_assert(rowdata != NULL);
-                col = terminal->pvt->cursor.col;
+                col = m_cursor.col;
                len = _vte_row_data_length (rowdata);
                /* Remove the column. */
                if (col < len) {
                         /* Clean up Tab/CJK fragments. */
-                        terminal->pvt->cleanup_fragments(col, col + 1);
+                        cleanup_fragments(col, col + 1);
                        _vte_row_data_remove (rowdata, col);
-                        if (terminal->pvt->fill_defaults.attr.back != VTE_DEFAULT_BG) {
-                                _vte_row_data_fill (rowdata, &terminal->pvt->fill_defaults, 
terminal->pvt->column_count);
-                               len = terminal->pvt->column_count;
+                        if (m_fill_defaults.attr.back != VTE_DEFAULT_BG) {
+                                _vte_row_data_fill(rowdata, &m_fill_defaults, m_column_count);
+                                len = m_column_count;
                        }
                        /* Repaint this row. */
-                       terminal->pvt->invalidate_cells(
-                                       col, len - col,
-                                        terminal->pvt->cursor.row, 1);
+                        invalidate_cells(col, len - col,
+                                         m_cursor.row, 1);
                }
        }
 
        /* We've modified the display.  Make a note of it. */
-       terminal->pvt->text_deleted_flag = TRUE;
+        m_text_deleted_flag = TRUE;
 }
 
 /* Delete N characters at the current cursor position. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]