Commit 7009511a authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

added this function

2001-06-08  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
	function

	* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
	this function
parent 34848237
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
function
* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
this function
2001-06-08 Alex Larsson <alexl@redhat.com> 2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in: * gtk/gtkcompat.h.in:
...@@ -5,7 +13,7 @@ ...@@ -5,7 +13,7 @@
Fixes bug #52892 Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com> 2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as * gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still parent still
......
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
function
* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
this function
2001-06-08 Alex Larsson <alexl@redhat.com> 2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in: * gtk/gtkcompat.h.in:
...@@ -5,7 +13,7 @@ ...@@ -5,7 +13,7 @@
Fixes bug #52892 Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com> 2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as * gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still parent still
......
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
function
* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
this function
2001-06-08 Alex Larsson <alexl@redhat.com> 2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in: * gtk/gtkcompat.h.in:
...@@ -5,7 +13,7 @@ ...@@ -5,7 +13,7 @@
Fixes bug #52892 Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com> 2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as * gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still parent still
......
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
function
* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
this function
2001-06-08 Alex Larsson <alexl@redhat.com> 2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in: * gtk/gtkcompat.h.in:
...@@ -5,7 +13,7 @@ ...@@ -5,7 +13,7 @@
Fixes bug #52892 Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com> 2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as * gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still parent still
......
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
function
* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
this function
2001-06-08 Alex Larsson <alexl@redhat.com> 2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in: * gtk/gtkcompat.h.in:
...@@ -5,7 +13,7 @@ ...@@ -5,7 +13,7 @@
Fixes bug #52892 Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com> 2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as * gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still parent still
......
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
function
* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
this function
2001-06-08 Alex Larsson <alexl@redhat.com> 2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in: * gtk/gtkcompat.h.in:
...@@ -5,7 +13,7 @@ ...@@ -5,7 +13,7 @@
Fixes bug #52892 Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com> 2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as * gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still parent still
......
2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_get_start_iter): added this
function
* gtk/gtktextview.c (gtk_text_view_get_default_attributes): added
this function
2001-06-08 Alex Larsson <alexl@redhat.com> 2001-06-08 Alex Larsson <alexl@redhat.com>
* gtk/gtkcompat.h.in: * gtk/gtkcompat.h.in:
...@@ -5,7 +13,7 @@ ...@@ -5,7 +13,7 @@
Fixes bug #52892 Fixes bug #52892
2001-06-08 Havoc Pennington <hp@redhat.com> 2001-06-08 Havoc Pennington <hp@redhat.com>
* gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as * gtk/gtkhsv.h (struct _GtkHSVClass): had GtkContainerClass as
parent still parent still
......
...@@ -1005,6 +1005,15 @@ is enabled. ...@@ -1005,6 +1005,15 @@ is enabled.
@colorsel: @colorsel:
@use_palette: @use_palette:
<!-- ##### FUNCTION gtk_container_focus ##### -->
<para>
</para>
@container:
@direction:
@Returns:
<!-- ##### FUNCTION gtk_ctree_construct ##### --> <!-- ##### FUNCTION gtk_ctree_construct ##### -->
<para> <para>
This function is not usually used by users. This function is not usually used by users.
......
...@@ -101,16 +101,6 @@ GtkContainer ...@@ -101,16 +101,6 @@ GtkContainer
@Returns: @Returns:
<!-- ##### FUNCTION gtk_container_focus ##### -->
<para>
</para>
@container:
@direction:
@Returns:
<!-- ##### FUNCTION gtk_container_set_reallocate_redraws ##### --> <!-- ##### FUNCTION gtk_container_set_reallocate_redraws ##### -->
<para> <para>
......
...@@ -495,6 +495,7 @@ This can later be composited together with other ...@@ -495,6 +495,7 @@ This can later be composited together with other
#GtkRcStyle structures to form a #GtkStyle. #GtkRcStyle structures to form a #GtkStyle.
</para> </para>
@parent_instance:
@name: @name:
@bg_pixmap_name: @bg_pixmap_name:
@font_desc: @font_desc:
......
...@@ -2324,6 +2324,26 @@ gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer, ...@@ -2324,6 +2324,26 @@ gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer,
_gtk_text_btree_get_iter_at_char (get_btree (buffer), iter, char_offset); _gtk_text_btree_get_iter_at_char (get_btree (buffer), iter, char_offset);
} }
/**
* gtk_text_buffer_get_start_iter:
* @buffer: a #GtkTextBuffer
* @iter: iterator to initialize
*
* Initialized @iter with the first position in the text buffer. This
* is the same as using gtk_text_buffer_get_iter_at_offset() to get
* the iter at character offset 0.
*
**/
void
gtk_text_buffer_get_start_iter (GtkTextBuffer *buffer,
GtkTextIter *iter)
{
g_return_if_fail (iter != NULL);
g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer));
_gtk_text_btree_get_iter_at_char (get_btree (buffer), iter, 0);
}
/** /**
* gtk_text_buffer_get_end_iter: * gtk_text_buffer_get_end_iter:
* @buffer: a #GtkTextBuffer * @buffer: a #GtkTextBuffer
...@@ -2333,7 +2353,7 @@ gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer, ...@@ -2333,7 +2353,7 @@ gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer,
* character in the text buffer. If dereferenced with * character in the text buffer. If dereferenced with
* gtk_text_iter_get_char(), the end iterator has a character value of * gtk_text_iter_get_char(), the end iterator has a character value of
* 0. The entire buffer lies in the range from the first position in * 0. The entire buffer lies in the range from the first position in
* the buffer (call gtk_text_buffer_get_iter_at_offset() to get * the buffer (call gtk_text_buffer_get_start_iter() to get
* character position 0) to the end iterator. * character position 0) to the end iterator.
* *
**/ **/
......
...@@ -296,6 +296,8 @@ void gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer, ...@@ -296,6 +296,8 @@ void gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer,
void gtk_text_buffer_get_iter_at_line (GtkTextBuffer *buffer, void gtk_text_buffer_get_iter_at_line (GtkTextBuffer *buffer,
GtkTextIter *iter, GtkTextIter *iter,
gint line_number); gint line_number);
void gtk_text_buffer_get_start_iter (GtkTextBuffer *buffer,
GtkTextIter *iter);
void gtk_text_buffer_get_end_iter (GtkTextBuffer *buffer, void gtk_text_buffer_get_end_iter (GtkTextBuffer *buffer,
GtkTextIter *iter); GtkTextIter *iter);
void gtk_text_buffer_get_bounds (GtkTextBuffer *buffer, void gtk_text_buffer_get_bounds (GtkTextBuffer *buffer,
......
...@@ -1629,12 +1629,14 @@ gtk_text_iter_get_bytes_in_line (const GtkTextIter *iter) ...@@ -1629,12 +1629,14 @@ gtk_text_iter_get_bytes_in_line (const GtkTextIter *iter)
* *
* Computes the effect of any tags applied to this spot in the * Computes the effect of any tags applied to this spot in the
* text. The @values parameter should be initialized to the default * text. The @values parameter should be initialized to the default
* settings you wish to use if no tags are in effect. * settings you wish to use if no tags are in effect. You'd typically
* obtain the defaults from gtk_text_view_get_default_attributes().
*
* gtk_text_iter_get_attributes () will modify @values, applying the * gtk_text_iter_get_attributes () will modify @values, applying the
* effects of any tags present at @iter. If any tags affected @values, * effects of any tags present at @iter. If any tags affected @values,
* the function returns TRUE. * the function returns %TRUE.
* *
* Return value: TRUE if @values was modified * Return value: %TRUE if @values was modified
**/ **/
gboolean gboolean
gtk_text_iter_get_attributes (const GtkTextIter *iter, gtk_text_iter_get_attributes (const GtkTextIter *iter,
......
...@@ -4410,6 +4410,31 @@ gtk_text_view_ensure_layout (GtkTextView *text_view) ...@@ -4410,6 +4410,31 @@ gtk_text_view_ensure_layout (GtkTextView *text_view)
} }
} }
/**
* gtk_text_view_get_default_attributes:
* @text_view: a #GtkTextView
*
* Obtains a copy of the default text attributes. These are the
* attributes used for text unless a tag overrides them.
* You'd typically pass the default attributes in to
* gtk_text_tag_get_attributes() in order to get the
* attributes in effect at a given text position.
*
* The return value is a copy owned by the caller of this function,
* and should be freed.
*
* Return value: a new #GtkTextAttributes
**/
GtkTextAttributes*
gtk_text_view_get_default_attributes (GtkTextView *text_view)
{
g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), NULL);
gtk_text_view_ensure_layout (text_view);
return gtk_text_attributes_copy (text_view->layout->default_style);
}
static void static void
gtk_text_view_destroy_layout (GtkTextView *text_view) gtk_text_view_destroy_layout (GtkTextView *text_view)
{ {
......
...@@ -316,8 +316,9 @@ gint gtk_text_view_get_indent (GtkTextView *text_vi ...@@ -316,8 +316,9 @@ gint gtk_text_view_get_indent (GtkTextView *text_vi
void gtk_text_view_set_tabs (GtkTextView *text_view, void gtk_text_view_set_tabs (GtkTextView *text_view,
PangoTabArray *tabs); PangoTabArray *tabs);
PangoTabArray* gtk_text_view_get_tabs (GtkTextView *text_view); PangoTabArray* gtk_text_view_get_tabs (GtkTextView *text_view);
/* note that the return value of this changes with the theme */
GtkTextAttributes* gtk_text_view_get_default_attributes (GtkTextView *text_view);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment