[vte/vte-next: 159/223] Move get_cursor_position to VteBuffer
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 159/223] Move get_cursor_position to VteBuffer
- Date: Wed, 22 Jun 2011 21:01:57 +0000 (UTC)
commit 60421a107a4d249b9458b633b165ae1445076e5a
Author: Christian Persch <chpe gnome org>
Date: Sat Jun 11 22:45:23 2011 +0200
Move get_cursor_position to VteBuffer
doc/reference/vte-sections.txt | 2 +-
src/vte.c | 12 ++++++------
src/vte.h | 2 --
src/vteaccess.c | 2 +-
src/vtebuffer.h | 4 ++++
5 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 5966b13..1b27e82 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -33,7 +33,6 @@ vte_terminal_get_mouse_autohide
vte_terminal_get_text
vte_terminal_get_text_include_trailing_spaces
vte_terminal_get_text_range
-vte_terminal_get_cursor_position
vte_terminal_match_add_gregex
vte_terminal_match_remove
vte_terminal_match_remove_all
@@ -107,6 +106,7 @@ vte_buffer_write_contents_sync
vte_buffer_set_size
vte_buffer_get_column_count
vte_buffer_get_row_count
+vte_buffer_get_cursor_position
<SUBSECTION>
vte_buffer_get_pty
diff --git a/src/vte.c b/src/vte.c
index 5ff66da..01d0ef5 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5957,8 +5957,8 @@ vte_terminal_get_text_include_trailing_spaces(VteTerminal *terminal,
}
/**
- * vte_terminal_get_cursor_position:
- * @terminal: a #VteTerminal
+ * vte_buffer_get_cursor_position:
+ * @buffer: a #VteBuffer
* @column: (out) (allow-none): a location to store the column, or %NULL
* @row : (out) (allow-none): a location to store the row, or %NULL
*
@@ -5966,15 +5966,15 @@ vte_terminal_get_text_include_trailing_spaces(VteTerminal *terminal,
* coordinate is absolute.
*/
void
-vte_terminal_get_cursor_position(VteTerminal *terminal,
+vte_buffer_get_cursor_position(VteBuffer *buffer,
glong *column, glong *row)
{
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
+ g_return_if_fail(VTE_IS_BUFFER(buffer));
if (column) {
- *column = terminal->pvt->screen->cursor_current.col;
+ *column = buffer->pvt->screen->cursor_current.col;
}
if (row) {
- *row = terminal->pvt->screen->cursor_current.row;
+ *row = buffer->pvt->screen->cursor_current.row;
}
}
diff --git a/src/vte.h b/src/vte.h
index 1807bed..b146221 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -187,8 +187,6 @@ char *vte_terminal_get_text_range(VteTerminal *terminal,
VteSelectionFunc is_selected,
gpointer user_data,
GArray *attributes);
-void vte_terminal_get_cursor_position(VteTerminal *terminal,
- glong *column, glong *row);
/* Add a matching expression, returning the tag the widget assigns to that
* expression. */
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 5846728..4362470 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -381,7 +381,7 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
}
/* Update the caret position. */
- vte_terminal_get_cursor_position(terminal, &ccol, &crow);
+ vte_buffer_get_cursor_position(vte_terminal_get_buffer(terminal), &ccol, &crow);
_vte_debug_print(VTE_DEBUG_ALLY,
"Cursor at (%ld, " "%ld).\n", ccol, crow);
diff --git a/src/vtebuffer.h b/src/vtebuffer.h
index 5d510fe..1b60c6b 100644
--- a/src/vtebuffer.h
+++ b/src/vtebuffer.h
@@ -145,6 +145,10 @@ glong vte_buffer_get_row_count (VteBuffer *buffer);
glong vte_buffer_get_column_count (VteBuffer *buffer);
+void vte_buffer_get_cursor_position (VteBuffer *buffer,
+ glong *column,
+ glong *row);
+
gboolean vte_buffer_write_contents_sync (VteBuffer *buffer,
GOutputStream *stream,
VteWriteFlags flags,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]