summaryrefslogtreecommitdiff
path: root/src/ring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ring.h')
-rw-r--r--src/ring.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/ring.h b/src/ring.h
index 50dd5a27..ec38019b 100644
--- a/src/ring.h
+++ b/src/ring.h
@@ -1,19 +1,19 @@
/*
* Copyright (C) 2002,2009,2010 Red Hat, Inc.
*
- * This is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Red Hat Author(s): Behdad Esfahbod
*/
@@ -32,8 +32,12 @@
G_BEGIN_DECLS
+typedef struct _VteVisualPosition {
+ long row, col;
+} VteVisualPosition;
+
typedef struct _VteCellAttrChange {
- gsize text_offset;
+ gsize text_end_offset; /* offset of first character no longer using this attr */
VteIntCellAttr attr;
} VteCellAttrChange;
@@ -53,14 +57,15 @@ struct _VteRing {
VteRowData *array;
/* Storage */
- gulong last_page;
VteStream *attr_stream, *text_stream, *row_stream;
- VteCellAttrChange last_attr;
+ gsize last_attr_text_start_offset;
+ VteIntCellAttr last_attr;
GString *utf8_buffer;
VteRowData cached_row;
gulong cached_row_num;
+ gulong visible_rows_hint; /* to keep at least a screenful of lines in memory, bug 646098 comment 12 */
};
#define _vte_ring_contains(__ring, __position) \
@@ -80,9 +85,11 @@ void _vte_ring_shrink (VteRing *ring, gulong max_len);
VteRowData *_vte_ring_insert (VteRing *ring, gulong position);
VteRowData *_vte_ring_append (VteRing *ring);
void _vte_ring_remove (VteRing *ring, gulong position);
+void _vte_ring_set_visible_rows_hint (VteRing *ring, gulong rows);
+void _vte_ring_rewrap (VteRing *ring, glong columns, VteVisualPosition **markers);
gboolean _vte_ring_write_contents (VteRing *ring,
GOutputStream *stream,
- VteTerminalWriteFlags flags,
+ VteWriteFlags flags,
GCancellable *cancellable,
GError **error);