[gtk+] Add accessors for GtkTextView adjustments
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add accessors for GtkTextView adjustments
- Date: Tue, 27 Apr 2010 00:30:55 +0000 (UTC)
commit 5eaff47e85e5a6cb8bd370ce1cccf5fad5cba5fe
Author: Mirsal Ennaime <mirsal ennaime gmail com>
Date: Sat Apr 17 23:49:49 2010 +0200
Add accessors for GtkTextView adjustments
GtkTextView is missing accessors for its sealed hadjustment
and vadjustment members.
This patch adds gtk_text_view_get_hadjustment() and
gtk_text_view_get_vadjustment() to GtkTextView
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=616053
gtk/gtk.symbols | 2 ++
gtk/gtktextview.c | 36 ++++++++++++++++++++++++++++++++++++
gtk/gtktextview.h | 3 +++
3 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index b1c0471..af6ada4 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4252,6 +4252,7 @@ gtk_text_view_get_buffer
gtk_text_view_get_cursor_visible
gtk_text_view_get_default_attributes
gtk_text_view_get_editable
+gtk_text_view_get_hadjustment
gtk_text_view_get_indent
gtk_text_view_get_iter_at_location
gtk_text_view_get_iter_at_position
@@ -4267,6 +4268,7 @@ gtk_text_view_get_pixels_inside_wrap
gtk_text_view_get_right_margin
gtk_text_view_get_tabs
gtk_text_view_get_type G_GNUC_CONST
+gtk_text_view_get_vadjustment
gtk_text_view_get_visible_rect
gtk_text_view_get_window
gtk_text_view_get_window_type
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 282aee2..e286101 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -7037,6 +7037,42 @@ gtk_text_view_drag_data_received (GtkWidget *widget,
}
}
+/**
+ * gtk_text_view_get_hadjustment:
+ * @text_view: a #GtkTextView
+ *
+ * Gets the horizontal-scrolling #GtkAdjustment.
+ *
+ * Returns: (transfer none): pointer to the horizontal #GtkAdjustment
+ *
+ * Since: 2.22
+ **/
+GtkAdjustment*
+gtk_text_view_get_hadjustment (GtkTextView *text_view)
+{
+ g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), NULL);
+
+ return get_hadjustment (text_view);
+}
+
+/**
+ * gtk_text_view_get_vadjustment:
+ * @text_view: a #GtkTextView
+ *
+ * Gets the vertical-scrolling #GtkAdjustment.
+ *
+ * Returns: (transfer none): pointer to the vertical #GtkAdjustment
+ *
+ * Since: 2.22
+ **/
+GtkAdjustment*
+gtk_text_view_get_vadjustment (GtkTextView *text_view)
+{
+ g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), NULL);
+
+ return get_vadjustment (text_view);
+}
+
static GtkAdjustment*
get_hadjustment (GtkTextView *text_view)
{
diff --git a/gtk/gtktextview.h b/gtk/gtktextview.h
index 2dfe23f..5fe62ba 100644
--- a/gtk/gtktextview.h
+++ b/gtk/gtktextview.h
@@ -279,6 +279,9 @@ void gtk_text_view_window_to_buffer_coords (GtkTextView *text_view,
gint *buffer_x,
gint *buffer_y);
+GtkAdjustment* gtk_text_view_get_hadjustment (GtkTextView *text_view);
+GtkAdjustment* gtk_text_view_get_vadjustment (GtkTextView *text_view);
+
GdkWindow* gtk_text_view_get_window (GtkTextView *text_view,
GtkTextWindowType win);
GtkTextWindowType gtk_text_view_get_window_type (GtkTextView *text_view,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]