forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
348482374a
commit
7009511a22
@ -1,3 +1,11 @@
|
||||
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>
|
||||
|
||||
* gtk/gtkcompat.h.in:
|
||||
|
@ -1,3 +1,11 @@
|
||||
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>
|
||||
|
||||
* gtk/gtkcompat.h.in:
|
||||
|
@ -1,3 +1,11 @@
|
||||
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>
|
||||
|
||||
* gtk/gtkcompat.h.in:
|
||||
|
@ -1,3 +1,11 @@
|
||||
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>
|
||||
|
||||
* gtk/gtkcompat.h.in:
|
||||
|
@ -1,3 +1,11 @@
|
||||
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>
|
||||
|
||||
* gtk/gtkcompat.h.in:
|
||||
|
@ -1,3 +1,11 @@
|
||||
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>
|
||||
|
||||
* gtk/gtkcompat.h.in:
|
||||
|
@ -1,3 +1,11 @@
|
||||
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>
|
||||
|
||||
* gtk/gtkcompat.h.in:
|
||||
|
@ -1005,6 +1005,15 @@ is enabled.
|
||||
@colorsel:
|
||||
@use_palette:
|
||||
|
||||
<!-- ##### FUNCTION gtk_container_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@container:
|
||||
@direction:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gtk_ctree_construct ##### -->
|
||||
<para>
|
||||
This function is not usually used by users.
|
||||
|
@ -101,16 +101,6 @@ GtkContainer
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_container_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@container:
|
||||
@direction:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_container_set_reallocate_redraws ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -495,6 +495,7 @@ This can later be composited together with other
|
||||
#GtkRcStyle structures to form a #GtkStyle.
|
||||
</para>
|
||||
|
||||
@parent_instance:
|
||||
@name:
|
||||
@bg_pixmap_name:
|
||||
@font_desc:
|
||||
|
@ -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_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:
|
||||
* @buffer: a #GtkTextBuffer
|
||||
@ -2333,7 +2353,7 @@ gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer,
|
||||
* character in the text buffer. If dereferenced with
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
**/
|
||||
|
@ -296,6 +296,8 @@ void gtk_text_buffer_get_iter_at_offset (GtkTextBuffer *buffer,
|
||||
void gtk_text_buffer_get_iter_at_line (GtkTextBuffer *buffer,
|
||||
GtkTextIter *iter,
|
||||
gint line_number);
|
||||
void gtk_text_buffer_get_start_iter (GtkTextBuffer *buffer,
|
||||
GtkTextIter *iter);
|
||||
void gtk_text_buffer_get_end_iter (GtkTextBuffer *buffer,
|
||||
GtkTextIter *iter);
|
||||
void gtk_text_buffer_get_bounds (GtkTextBuffer *buffer,
|
||||
|
@ -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
|
||||
* 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
|
||||
* 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
|
||||
gtk_text_iter_get_attributes (const GtkTextIter *iter,
|
||||
|
@ -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
|
||||
gtk_text_view_destroy_layout (GtkTextView *text_view)
|
||||
{
|
||||
|
@ -317,7 +317,8 @@ void gtk_text_view_set_tabs (GtkTextView *text_vi
|
||||
PangoTabArray *tabs);
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user