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
This commit is contained in:
Mirsal Ennaime 2010-04-17 23:49:49 +02:00 committed by Javier Jardón
parent 41a073263a
commit 5eaff47e85
3 changed files with 41 additions and 0 deletions

View File

@ -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

View File

@ -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)
{

View File

@ -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,