[vte/vte-next: 219/223] Remove public char_{width,height} accessors



commit 4613631aeb5b844d4c41d68cbdfb57cdf9dacf56
Author: Christian Persch <chpe gnome org>
Date:   Wed Jun 22 20:47:21 2011 +0200

    Remove public char_{width,height} accessors
    
    It was used to size windows and to convert from event to
    grid coordinates, but all of these now have dedicated functions
    on VteView.

 doc/reference/vte-sections.txt |    4 ----
 src/vte-private.h              |    2 ++
 src/vte.c                      |   12 ++++++------
 src/vteaccess.c                |    8 ++++----
 src/vteview.h                  |    3 ---
 5 files changed, 12 insertions(+), 17 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 8ae43cf..14a6669 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -79,10 +79,6 @@ VTE_VIEW_GET_CLASS
 VTE_IS_VIEW_CLASS
 VTE_VIEW_CLASS
 
-<SUBSECTION Binding Accessors>
-vte_view_get_char_height
-vte_view_get_char_width
-
 <SUBSECTION Private>
 VteCharAttributes
 VteViewPrivate
diff --git a/src/vte-private.h b/src/vte-private.h
index 98edd8b..e4ef164 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -470,6 +470,8 @@ void _vte_view_set_effect_color(VteView *terminal,
                                     gboolean override);
 
 gboolean _vte_view_is_word_char(VteView *terminal, gunichar c);
+glong _vte_view_get_char_width(VteView *view);
+glong _vte_view_get_char_height(VteView *view);
 
 /* private VteBuffer methods */
 
diff --git a/src/vte.c b/src/vte.c
index 364774a..f9a918c 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -12258,28 +12258,28 @@ vte_buffer_get_status_line(VteBuffer *buffer)
 	return buffer->pvt->screen->status_line_contents->str;
 }
 
-/**
- * vte_view_get_char_width:
+/*
+ * _vte_view_get_char_width:
  * @terminal: a #VteView
  *
  * Returns: the width of a character cell
  */
 glong
-vte_view_get_char_width(VteView *terminal)
+_vte_view_get_char_width(VteView *terminal)
 {
 	g_return_val_if_fail(VTE_IS_VIEW(terminal), -1);
 	vte_view_ensure_font (terminal);
 	return terminal->pvt->char_width;
 }
 
-/**
- * vte_view_get_char_height:
+/*
+ * _vte_view_get_char_height:
  * @terminal: a #VteView
  *
  * Returns: the height of a character cell
  */
 glong
-vte_view_get_char_height(VteView *terminal)
+_vte_view_get_char_height(VteView *terminal)
 {
 	g_return_val_if_fail(VTE_IS_VIEW(terminal), -1);
 	vte_view_ensure_font (terminal);
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 80c4c4f..4f2fb94 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -1442,8 +1442,8 @@ vte_view_accessible_get_character_extents(AtkText *text, gint offset,
 
 	atk_component_get_position (ATK_COMPONENT (text), &base_x, &base_y, coords);
 	xy_from_offset (priv, offset, x, y);
-	char_width = vte_view_get_char_width (terminal);
-	char_height = vte_view_get_char_height (terminal);
+	char_width = _vte_view_get_char_width (terminal);
+	char_height = _vte_view_get_char_height (terminal);
 	*x *= char_width;
 	*y *= char_height;
 	*width = char_width;
@@ -1485,8 +1485,8 @@ vte_view_accessible_get_offset_at_point(AtkText *text,
 	terminal = VTE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (text)));
 
 	atk_component_get_position (ATK_COMPONENT (text), &base_x, &base_y, coords);
-	char_width = vte_view_get_char_width (terminal);
-	char_height = vte_view_get_char_height (terminal);
+	char_width = _vte_view_get_char_width (terminal);
+	char_height = _vte_view_get_char_height (terminal);
 	x -= base_x;
 	y -= base_y;
 	x /= char_width;
diff --git a/src/vteview.h b/src/vteview.h
index 2230c6e..30ee455 100644
--- a/src/vteview.h
+++ b/src/vteview.h
@@ -177,9 +177,6 @@ gboolean  vte_view_search_get_wrap_around (VteView *terminal);
 gboolean  vte_view_search_find_previous   (VteView *terminal);
 gboolean  vte_view_search_find_next       (VteView *terminal);
 
-glong vte_view_get_char_width(VteView *terminal);
-glong vte_view_get_char_height(VteView *terminal);
-
 void vte_view_get_geometry_hints(VteView *view,
                                  GdkGeometry *hints,
                                  int min_rows,



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