<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkTextBuffer">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTextBuffer.top_of_page">GtkTextBuffer</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkTextBuffer</refname>
<refpurpose>Stores attributed text for display in a GtkTextView</refpurpose>
</refnamediv>

<refsect1 id="GtkTextBuffer.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkTextBuffer"><returnvalue>GtkTextBuffer</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-new">gtk_text_buffer_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-line-count">gtk_text_buffer_get_line_count</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-char-count">gtk_text_buffer_get_char_count</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTextTagTable"><returnvalue>GtkTextTagTable</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-tag-table">gtk_text_buffer_get_tag_table</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert">gtk_text_buffer_insert</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-at-cursor">gtk_text_buffer_insert_at_cursor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-interactive">gtk_text_buffer_insert_interactive</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-interactive-at-cursor">gtk_text_buffer_insert_interactive_at_cursor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-range">gtk_text_buffer_insert_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-range-interactive">gtk_text_buffer_insert_range_interactive</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-with-tags">gtk_text_buffer_insert_with_tags</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-with-tags-by-name">gtk_text_buffer_insert_with_tags_by_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-markup">gtk_text_buffer_insert_markup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-paintable">gtk_text_buffer_insert_paintable</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-delete">gtk_text_buffer_delete</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-delete-interactive">gtk_text_buffer_delete_interactive</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-backspace">gtk_text_buffer_backspace</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-set-text">gtk_text_buffer_set_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-text">gtk_text_buffer_get_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-slice">gtk_text_buffer_get_slice</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-insert-child-anchor">gtk_text_buffer_insert_child_anchor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTextChildAnchor"><returnvalue>GtkTextChildAnchor</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-create-child-anchor">gtk_text_buffer_create_child_anchor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-create-mark">gtk_text_buffer_create_mark</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-move-mark">gtk_text_buffer_move_mark</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-move-mark-by-name">gtk_text_buffer_move_mark_by_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-add-mark">gtk_text_buffer_add_mark</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-delete-mark">gtk_text_buffer_delete_mark</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-delete-mark-by-name">gtk_text_buffer_delete_mark_by_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-mark">gtk_text_buffer_get_mark</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-insert">gtk_text_buffer_get_insert</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-selection-bound">gtk_text_buffer_get_selection_bound</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-has-selection">gtk_text_buffer_get_has_selection</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-place-cursor">gtk_text_buffer_place_cursor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-select-range">gtk_text_buffer_select_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-apply-tag">gtk_text_buffer_apply_tag</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-remove-tag">gtk_text_buffer_remove_tag</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-apply-tag-by-name">gtk_text_buffer_apply_tag_by_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-remove-tag-by-name">gtk_text_buffer_remove_tag_by_name</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-remove-all-tags">gtk_text_buffer_remove_all_tags</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTextTag"><returnvalue>GtkTextTag</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-create-tag">gtk_text_buffer_create_tag</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-iter-at-line-offset">gtk_text_buffer_get_iter_at_line_offset</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-iter-at-offset">gtk_text_buffer_get_iter_at_offset</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-iter-at-line">gtk_text_buffer_get_iter_at_line</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-iter-at-line-index">gtk_text_buffer_get_iter_at_line_index</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-iter-at-mark">gtk_text_buffer_get_iter_at_mark</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-iter-at-child-anchor">gtk_text_buffer_get_iter_at_child_anchor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-start-iter">gtk_text_buffer_get_start_iter</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-end-iter">gtk_text_buffer_get_end_iter</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-bounds">gtk_text_buffer_get_bounds</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-modified">gtk_text_buffer_get_modified</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-set-modified">gtk_text_buffer_set_modified</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-delete-selection">gtk_text_buffer_delete_selection</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-paste-clipboard">gtk_text_buffer_paste_clipboard</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-copy-clipboard">gtk_text_buffer_copy_clipboard</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-cut-clipboard">gtk_text_buffer_cut_clipboard</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-selection-bounds">gtk_text_buffer_get_selection_bounds</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentProvider"><returnvalue>GdkContentProvider</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-selection-content">gtk_text_buffer_get_selection_content</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-begin-user-action">gtk_text_buffer_begin_user_action</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-end-user-action">gtk_text_buffer_end_user_action</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-add-selection-clipboard">gtk_text_buffer_add_selection_clipboard</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-remove-selection-clipboard">gtk_text_buffer_remove_selection_clipboard</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-can-undo">gtk_text_buffer_get_can_undo</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-can-redo">gtk_text_buffer_get_can_redo</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-enable-undo">gtk_text_buffer_get_enable_undo</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-set-enable-undo">gtk_text_buffer_set_enable_undo</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-get-max-undo-levels">gtk_text_buffer_get_max_undo_levels</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-set-max-undo-levels">gtk_text_buffer_set_max_undo_levels</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-undo">gtk_text_buffer_undo</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-redo">gtk_text_buffer_redo</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-begin-irreversible-action">gtk_text_buffer_begin_irreversible_action</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-buffer-end-irreversible-action">gtk_text_buffer_end_irreversible_action</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTextBuffer.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkTextBuffer--can-redo">can-redo</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkTextBuffer--can-undo">can-undo</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkTextBuffer--copy-target-list">copy-target-list</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkTextBuffer--cursor-position">cursor-position</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkTextBuffer--enable-undo">enable-undo</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkTextBuffer--has-selection">has-selection</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkTextBuffer--paste-target-list">paste-target-list</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkTextBuffer--tag-table">tag-table</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkTextBuffer--text">text</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTextBuffer.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-apply-tag">apply-tag</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-begin-user-action">begin-user-action</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-changed">changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-delete-range">delete-range</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-end-user-action">end-user-action</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-insert-child-anchor">insert-child-anchor</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-insert-paintable">insert-paintable</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-insert-text">insert-text</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-mark-deleted">mark-deleted</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-mark-set">mark-set</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-modified-changed">modified-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-paste-done">paste-done</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-redo">redo</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-remove-tag">remove-tag</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTextBuffer-undo">undo</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTextBuffer.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkTextBuffer-struct">GtkTextBuffer</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkTextBufferClass">GtkTextBufferClass</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTextBuffer.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkTextBuffer
</screen>
</refsect1>

<refsect1 id="GtkTextBuffer.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkTextBuffer.description" role="desc">
<title role="desc.title">Description</title>
<para>You may wish to begin by reading the
<link linkend="TextWidget">text widget conceptual overview</link>
which gives an overview of all the objects and data
types related to the text widget and how they work together.</para>

</refsect1>
<refsect1 id="GtkTextBuffer.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-text-buffer-new" role="function">
<title>gtk_text_buffer_new&#160;()</title>
<indexterm zone="gtk-text-buffer-new"><primary>gtk_text_buffer_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextBuffer"><returnvalue>GtkTextBuffer</returnvalue></link>&#160;*
gtk_text_buffer_new (<parameter><link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link> *table</parameter>);</programlisting>
<para>Creates a new text buffer.</para>
<refsect3 id="gtk-text-buffer-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>table</para></entry>
<entry role="parameter_description"><para>a tag table, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to create a new one. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-new.returns" role="returns">
<title>Returns</title>
<para> a new text buffer</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-line-count" role="function">
<title>gtk_text_buffer_get_line_count&#160;()</title>
<indexterm zone="gtk-text-buffer-get-line-count"><primary>gtk_text_buffer_get_line_count</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_text_buffer_get_line_count (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Obtains the number of lines in the buffer. This value is cached, so
the function is very fast.</para>
<refsect3 id="gtk-text-buffer-get-line-count.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-line-count.returns" role="returns">
<title>Returns</title>
<para> number of lines in the buffer</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-char-count" role="function">
<title>gtk_text_buffer_get_char_count&#160;()</title>
<indexterm zone="gtk-text-buffer-get-char-count"><primary>gtk_text_buffer_get_char_count</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_text_buffer_get_char_count (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Gets the number of characters in the buffer; note that characters
and bytes are not the same, you can’t e.g. expect the contents of
the buffer in string form to be this many bytes long. The character
count is cached, so this function is very fast.</para>
<refsect3 id="gtk-text-buffer-get-char-count.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-char-count.returns" role="returns">
<title>Returns</title>
<para> number of characters in the buffer</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-tag-table" role="function">
<title>gtk_text_buffer_get_tag_table&#160;()</title>
<indexterm zone="gtk-text-buffer-get-tag-table"><primary>gtk_text_buffer_get_tag_table</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextTagTable"><returnvalue>GtkTextTagTable</returnvalue></link>&#160;*
gtk_text_buffer_get_tag_table (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Get the <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link> associated with this buffer.</para>
<refsect3 id="gtk-text-buffer-get-tag-table.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-tag-table.returns" role="returns">
<title>Returns</title>
<para>the buffer’s tag table. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert" role="function">
<title>gtk_text_buffer_insert&#160;()</title>
<indexterm zone="gtk-text-buffer-insert"><primary>gtk_text_buffer_insert</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                        <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                        <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>,
                        <parameter><link linkend="gint"><type>gint</type></link> len</parameter>);</programlisting>
<para>Inserts <parameter>len</parameter>
 bytes of <parameter>text</parameter>
 at position <parameter>iter</parameter>
.  If <parameter>len</parameter>
 is -1,
<parameter>text</parameter>
 must be nul-terminated and will be inserted in its
entirety. Emits the “insert-text” signal; insertion actually occurs
in the default handler for the signal. <parameter>iter</parameter>
 is invalidated when
insertion occurs (because the buffer contents change), but the
default signal handler revalidates it to point to the end of the
inserted text.</para>
<refsect3 id="gtk-text-buffer-insert.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a position in the buffer</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text in UTF-8 format</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of text in bytes, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-at-cursor" role="function">
<title>gtk_text_buffer_insert_at_cursor&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-at-cursor"><primary>gtk_text_buffer_insert_at_cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert_at_cursor (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                  <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>,
                                  <parameter><link linkend="gint"><type>gint</type></link> len</parameter>);</programlisting>
<para>Simply calls <link linkend="gtk-text-buffer-insert"><function>gtk_text_buffer_insert()</function></link>, using the current
cursor position as the insertion point.</para>
<refsect3 id="gtk-text-buffer-insert-at-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text in UTF-8 format</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of text, in bytes</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-interactive" role="function">
<title>gtk_text_buffer_insert_interactive&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-interactive"><primary>gtk_text_buffer_insert_interactive</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_insert_interactive (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                    <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> len</parameter>,
                                    <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Like <link linkend="gtk-text-buffer-insert"><function>gtk_text_buffer_insert()</function></link>, but the insertion will not occur if
<parameter>iter</parameter>
 is at a non-editable location in the buffer. Usually you
want to prevent insertions at ineditable locations if the insertion
results from a user action (is interactive).</para>
<para><parameter>default_editable</parameter>
 indicates the editability of text that doesn't
have a tag affecting editability applied to it. Typically the
result of <link linkend="gtk-text-view-get-editable"><function>gtk_text_view_get_editable()</function></link> is appropriate here.</para>
<refsect3 id="gtk-text-buffer-insert-interactive.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a position in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>some UTF-8 text</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of text in bytes, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>default editability of buffer</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-insert-interactive.returns" role="returns">
<title>Returns</title>
<para> whether text was actually inserted</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-interactive-at-cursor" role="function">
<title>gtk_text_buffer_insert_interactive_at_cursor&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-interactive-at-cursor"><primary>gtk_text_buffer_insert_interactive_at_cursor</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_insert_interactive_at_cursor
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> len</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Calls <link linkend="gtk-text-buffer-insert-interactive"><function>gtk_text_buffer_insert_interactive()</function></link> at the cursor
position.</para>
<para><parameter>default_editable</parameter>
 indicates the editability of text that doesn't
have a tag affecting editability applied to it. Typically the
result of <link linkend="gtk-text-view-get-editable"><function>gtk_text_view_get_editable()</function></link> is appropriate here.</para>
<refsect3 id="gtk-text-buffer-insert-interactive-at-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text in UTF-8 format</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of text in bytes, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>default editability of buffer</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-insert-interactive-at-cursor.returns" role="returns">
<title>Returns</title>
<para> whether text was actually inserted</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-range" role="function">
<title>gtk_text_buffer_insert_range&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-range"><primary>gtk_text_buffer_insert_range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert_range (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                              <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                              <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                              <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Copies text, tags, and paintables between <parameter>start</parameter>
 and <parameter>end</parameter>
 (the order
of <parameter>start</parameter>
 and <parameter>end</parameter>
 doesn’t matter) and inserts the copy at <parameter>iter</parameter>
.
Used instead of simply getting/inserting text because it preserves
images and tags. If <parameter>start</parameter>
 and <parameter>end</parameter>
 are in a different buffer from
<parameter>buffer</parameter>
, the two buffers must share the same tag table.</para>
<para>Implemented via emissions of the insert_text and apply_tag signals,
so expect those.</para>
<refsect3 id="gtk-text-buffer-insert-range.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a position in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>a position in a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>another position in the same buffer as <parameter>start</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-range-interactive" role="function">
<title>gtk_text_buffer_insert_range_interactive&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-range-interactive"><primary>gtk_text_buffer_insert_range_interactive</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_insert_range_interactive
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                                <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Same as <link linkend="gtk-text-buffer-insert-range"><function>gtk_text_buffer_insert_range()</function></link>, but does nothing if the
insertion point isn’t editable. The <parameter>default_editable</parameter>
 parameter
indicates whether the text is editable at <parameter>iter</parameter>
 if no tags
enclosing <parameter>iter</parameter>
 affect editability. Typically the result of
<link linkend="gtk-text-view-get-editable"><function>gtk_text_view_get_editable()</function></link> is appropriate here.</para>
<refsect3 id="gtk-text-buffer-insert-range-interactive.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a position in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>a position in a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>another position in the same buffer as <parameter>start</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>default editability of the buffer</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-insert-range-interactive.returns" role="returns">
<title>Returns</title>
<para> whether an insertion was possible at <parameter>iter</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-with-tags" role="function">
<title>gtk_text_buffer_insert_with_tags&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-with-tags"><primary>gtk_text_buffer_insert_with_tags</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert_with_tags (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                  <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                  <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>,
                                  <parameter><link linkend="gint"><type>gint</type></link> len</parameter>,
                                  <parameter><link linkend="GtkTextTag"><type>GtkTextTag</type></link> *first_tag</parameter>,
                                  <parameter>...</parameter>);</programlisting>
<para>Inserts <parameter>text</parameter>
 into <parameter>buffer</parameter>
 at <parameter>iter</parameter>
, applying the list of tags to
the newly-inserted text. The last tag specified must be <link linkend="NULL:CAPS"><literal>NULL</literal></link> to
terminate the list. Equivalent to calling <link linkend="gtk-text-buffer-insert"><function>gtk_text_buffer_insert()</function></link>,
then <link linkend="gtk-text-buffer-apply-tag"><function>gtk_text_buffer_apply_tag()</function></link> on the inserted text;
<link linkend="gtk-text-buffer-insert-with-tags"><function>gtk_text_buffer_insert_with_tags()</function></link> is just a convenience function.</para>
<refsect3 id="gtk-text-buffer-insert-with-tags.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>an iterator in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>UTF-8 text</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of <parameter>text</parameter>
, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>first_tag</para></entry>
<entry role="parameter_description"><para>first tag to apply to <parameter>text</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para><link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated list of tags to apply</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-with-tags-by-name" role="function">
<title>gtk_text_buffer_insert_with_tags_by_name&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-with-tags-by-name"><primary>gtk_text_buffer_insert_with_tags_by_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert_with_tags_by_name
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> len</parameter>,
                                <parameter>const <link linkend="gchar"><type>gchar</type></link> *first_tag_name</parameter>,
                                <parameter>...</parameter>);</programlisting>
<para>Same as <link linkend="gtk-text-buffer-insert-with-tags"><function>gtk_text_buffer_insert_with_tags()</function></link>, but allows you
to pass in tag names instead of tag objects.</para>
<refsect3 id="gtk-text-buffer-insert-with-tags-by-name.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>position in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>UTF-8 text</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of <parameter>text</parameter>
, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>first_tag_name</para></entry>
<entry role="parameter_description"><para>name of a tag to apply to <parameter>text</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>more tag names</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-markup" role="function">
<title>gtk_text_buffer_insert_markup&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-markup"><primary>gtk_text_buffer_insert_markup</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert_markup (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                               <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                               <parameter>const <link linkend="gchar"><type>gchar</type></link> *markup</parameter>,
                               <parameter><link linkend="gint"><type>gint</type></link> len</parameter>);</programlisting>
<para>Inserts the text in <parameter>markup</parameter>
 at position <parameter>iter</parameter>
. <parameter>markup</parameter>
 will be inserted
in its entirety and must be nul-terminated and valid UTF-8. Emits the
<link linkend="GtkTextBuffer-insert-text"><type>“insert-text”</type></link> signal, possibly multiple times; insertion
actually occurs in the default handler for the signal. <parameter>iter</parameter>
 will point
to the end of the inserted text on return.</para>
<refsect3 id="gtk-text-buffer-insert-markup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>location to insert the markup</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>markup</para></entry>
<entry role="parameter_description"><para>a nul-terminated UTF-8 string containing <link linkend="PangoMarkupFormat">Pango markup</link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of <parameter>markup</parameter>
in bytes, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-paintable" role="function">
<title>gtk_text_buffer_insert_paintable&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-paintable"><primary>gtk_text_buffer_insert_paintable</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert_paintable (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                  <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                  <parameter><link linkend="GdkPaintable"><type>GdkPaintable</type></link> *paintable</parameter>);</programlisting>
<para>Inserts an image into the text buffer at <parameter>iter</parameter>
. The image will be
counted as one character in character counts, and when obtaining
the buffer contents as a string, will be represented by the Unicode
“object replacement character” 0xFFFC. Note that the “slice”
variants for obtaining portions of the buffer as a string include
this character for paintable, but the “text” variants do
not. e.g. see <link linkend="gtk-text-buffer-get-slice"><function>gtk_text_buffer_get_slice()</function></link> and
<link linkend="gtk-text-buffer-get-text"><function>gtk_text_buffer_get_text()</function></link>.</para>
<refsect3 id="gtk-text-buffer-insert-paintable.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>location to insert the paintable</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>paintable</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkPaintable"><type>GdkPaintable</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-delete" role="function">
<title>gtk_text_buffer_delete&#160;()</title>
<indexterm zone="gtk-text-buffer-delete"><primary>gtk_text_buffer_delete</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_delete (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                        <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                        <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Deletes text between <parameter>start</parameter>
 and <parameter>end</parameter>
. The order of <parameter>start</parameter>
 and <parameter>end</parameter>

is not actually relevant; <link linkend="gtk-text-buffer-delete"><function>gtk_text_buffer_delete()</function></link> will reorder
them. This function actually emits the “delete-range” signal, and
the default handler of that signal deletes the text. Because the
buffer is modified, all outstanding iterators become invalid after
calling this function; however, the <parameter>start</parameter>
 and <parameter>end</parameter>
 will be
re-initialized to point to the location where text was deleted.</para>
<refsect3 id="gtk-text-buffer-delete.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>a position in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>another position in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-delete-interactive" role="function">
<title>gtk_text_buffer_delete_interactive&#160;()</title>
<indexterm zone="gtk-text-buffer-delete-interactive"><primary>gtk_text_buffer_delete_interactive</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_delete_interactive (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                    <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start_iter</parameter>,
                                    <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end_iter</parameter>,
                                    <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Deletes all editable text in the given range.
Calls <link linkend="gtk-text-buffer-delete"><function>gtk_text_buffer_delete()</function></link> for each editable sub-range of
[<parameter>start</parameter>
,<parameter>end</parameter>
). <parameter>start</parameter>
 and <parameter>end</parameter>
 are revalidated to point to
the location of the last deleted range, or left untouched if
no text was deleted.</para>
<refsect3 id="gtk-text-buffer-delete-interactive.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_iter</para></entry>
<entry role="parameter_description"><para>start of range to delete</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_iter</para></entry>
<entry role="parameter_description"><para>end of range</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>whether the buffer is editable by default</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-delete-interactive.returns" role="returns">
<title>Returns</title>
<para> whether some text was actually deleted</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-backspace" role="function">
<title>gtk_text_buffer_backspace&#160;()</title>
<indexterm zone="gtk-text-buffer-backspace"><primary>gtk_text_buffer_backspace</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_backspace (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                           <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                           <parameter><link linkend="gboolean"><type>gboolean</type></link> interactive</parameter>,
                           <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Performs the appropriate action as if the user hit the delete
key with the cursor at the position specified by <parameter>iter</parameter>
. In the
normal case a single character will be deleted, but when
combining accents are involved, more than one character can
be deleted, and when precomposed character and accent combinations
are involved, less than one character will be deleted.</para>
<para>Because the buffer is modified, all outstanding iterators become 
invalid after calling this function; however, the <parameter>iter</parameter>
 will be
re-initialized to point to the location where text was deleted.</para>
<refsect3 id="gtk-text-buffer-backspace.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a position in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>interactive</para></entry>
<entry role="parameter_description"><para>whether the deletion is caused by user interaction</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>whether the buffer is editable by default</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-backspace.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the buffer was modified</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-set-text" role="function">
<title>gtk_text_buffer_set_text&#160;()</title>
<indexterm zone="gtk-text-buffer-set-text"><primary>gtk_text_buffer_set_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_set_text (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                          <parameter>const <link linkend="gchar"><type>gchar</type></link> *text</parameter>,
                          <parameter><link linkend="gint"><type>gint</type></link> len</parameter>);</programlisting>
<para>Deletes current contents of <parameter>buffer</parameter>
, and inserts <parameter>text</parameter>
 instead. If
<parameter>len</parameter>
 is -1, <parameter>text</parameter>
 must be nul-terminated. <parameter>text</parameter>
 must be valid UTF-8.</para>
<refsect3 id="gtk-text-buffer-set-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>UTF-8 text to insert</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of <parameter>text</parameter>
in bytes</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-text" role="function">
<title>gtk_text_buffer_get_text&#160;()</title>
<indexterm zone="gtk-text-buffer-get-text"><primary>gtk_text_buffer_get_text</primary></indexterm>
<programlisting language="C"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_text_buffer_get_text (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                          <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                          <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>,
                          <parameter><link linkend="gboolean"><type>gboolean</type></link> include_hidden_chars</parameter>);</programlisting>
<para>Returns the text in the range [<parameter>start</parameter>
,<parameter>end</parameter>
). Excludes undisplayed
text (text marked with tags that set the invisibility attribute) if
<parameter>include_hidden_chars</parameter>
 is <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>. Does not include characters
representing embedded images, so byte and character indexes into
the returned string do not correspond to byte
and character indexes into the buffer. Contrast with
<link linkend="gtk-text-buffer-get-slice"><function>gtk_text_buffer_get_slice()</function></link>.</para>
<refsect3 id="gtk-text-buffer-get-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>start of a range</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>end of a range</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>include_hidden_chars</para></entry>
<entry role="parameter_description"><para>whether to include invisible text</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-text.returns" role="returns">
<title>Returns</title>
<para>an allocated UTF-8 string. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-slice" role="function">
<title>gtk_text_buffer_get_slice&#160;()</title>
<indexterm zone="gtk-text-buffer-get-slice"><primary>gtk_text_buffer_get_slice</primary></indexterm>
<programlisting language="C"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_text_buffer_get_slice (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                           <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                           <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>,
                           <parameter><link linkend="gboolean"><type>gboolean</type></link> include_hidden_chars</parameter>);</programlisting>
<para>Returns the text in the range [<parameter>start</parameter>
,<parameter>end</parameter>
). Excludes undisplayed
text (text marked with tags that set the invisibility attribute) if
<parameter>include_hidden_chars</parameter>
 is <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>. The returned string includes a
0xFFFC character whenever the buffer contains
embedded images, so byte and character indexes into
the returned string do correspond to byte
and character indexes into the buffer. Contrast with
<link linkend="gtk-text-buffer-get-text"><function>gtk_text_buffer_get_text()</function></link>. Note that 0xFFFC can occur in normal
text as well, so it is not a reliable indicator that a paintable or
widget is in the buffer.</para>
<refsect3 id="gtk-text-buffer-get-slice.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>start of a range</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>end of a range</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>include_hidden_chars</para></entry>
<entry role="parameter_description"><para>whether to include invisible text</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-slice.returns" role="returns">
<title>Returns</title>
<para>an allocated UTF-8 string. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-insert-child-anchor" role="function">
<title>gtk_text_buffer_insert_child_anchor&#160;()</title>
<indexterm zone="gtk-text-buffer-insert-child-anchor"><primary>gtk_text_buffer_insert_child_anchor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_insert_child_anchor (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                     <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                     <parameter><link linkend="GtkTextChildAnchor"><type>GtkTextChildAnchor</type></link> *anchor</parameter>);</programlisting>
<para>Inserts a child widget anchor into the text buffer at <parameter>iter</parameter>
. The
anchor will be counted as one character in character counts, and
when obtaining the buffer contents as a string, will be represented
by the Unicode “object replacement character” 0xFFFC. Note that the
“slice” variants for obtaining portions of the buffer as a string
include this character for child anchors, but the “text” variants do
not. E.g. see <link linkend="gtk-text-buffer-get-slice"><function>gtk_text_buffer_get_slice()</function></link> and
<link linkend="gtk-text-buffer-get-text"><function>gtk_text_buffer_get_text()</function></link>. Consider
<link linkend="gtk-text-buffer-create-child-anchor"><function>gtk_text_buffer_create_child_anchor()</function></link> as a more convenient
alternative to this function. The buffer will add a reference to
the anchor, so you can unref it after insertion.</para>
<refsect3 id="gtk-text-buffer-insert-child-anchor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>location to insert the anchor</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>anchor</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextChildAnchor"><type>GtkTextChildAnchor</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-create-child-anchor" role="function">
<title>gtk_text_buffer_create_child_anchor&#160;()</title>
<indexterm zone="gtk-text-buffer-create-child-anchor"><primary>gtk_text_buffer_create_child_anchor</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextChildAnchor"><returnvalue>GtkTextChildAnchor</returnvalue></link>&#160;*
gtk_text_buffer_create_child_anchor (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                     <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>);</programlisting>
<para>This is a convenience function which simply creates a child anchor
with <link linkend="gtk-text-child-anchor-new"><function>gtk_text_child_anchor_new()</function></link> and inserts it into the buffer
with <link linkend="gtk-text-buffer-insert-child-anchor"><function>gtk_text_buffer_insert_child_anchor()</function></link>. The new anchor is
owned by the buffer; no reference count is returned to
the caller of <link linkend="gtk-text-buffer-create-child-anchor"><function>gtk_text_buffer_create_child_anchor()</function></link>.</para>
<refsect3 id="gtk-text-buffer-create-child-anchor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>location in the buffer</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-create-child-anchor.returns" role="returns">
<title>Returns</title>
<para>the created child anchor. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-create-mark" role="function">
<title>gtk_text_buffer_create_mark&#160;()</title>
<indexterm zone="gtk-text-buffer-create-mark"><primary>gtk_text_buffer_create_mark</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
gtk_text_buffer_create_mark (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                             <parameter>const <link linkend="gchar"><type>gchar</type></link> *mark_name</parameter>,
                             <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *where</parameter>,
                             <parameter><link linkend="gboolean"><type>gboolean</type></link> left_gravity</parameter>);</programlisting>
<para>Creates a mark at position <parameter>where</parameter>
. If <parameter>mark_name</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, the mark
is anonymous; otherwise, the mark can be retrieved by name using
<link linkend="gtk-text-buffer-get-mark"><function>gtk_text_buffer_get_mark()</function></link>. If a mark has left gravity, and text is
inserted at the mark’s current location, the mark will be moved to
the left of the newly-inserted text. If the mark has right gravity
(<parameter>left_gravity</parameter>
 = <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>), the mark will end up on the right of
newly-inserted text. The standard left-to-right cursor is a mark
with right gravity (when you type, the cursor stays on the right
side of the text you’re typing).</para>
<para>The caller of this function does not own a 
reference to the returned <link linkend="GtkTextMark"><type>GtkTextMark</type></link>, so you can ignore the 
return value if you like. Marks are owned by the buffer and go 
away when the buffer does.</para>
<para>Emits the <link linkend="GtkTextBuffer-mark-set"><type>“mark-set”</type></link> signal as notification of the mark's
initial placement.</para>
<refsect3 id="gtk-text-buffer-create-mark.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mark_name</para></entry>
<entry role="parameter_description"><para>name for mark, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>where</para></entry>
<entry role="parameter_description"><para>location to place mark</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>left_gravity</para></entry>
<entry role="parameter_description"><para>whether the mark has left gravity</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-create-mark.returns" role="returns">
<title>Returns</title>
<para>the new <link linkend="GtkTextMark"><type>GtkTextMark</type></link> object. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-move-mark" role="function">
<title>gtk_text_buffer_move_mark&#160;()</title>
<indexterm zone="gtk-text-buffer-move-mark"><primary>gtk_text_buffer_move_mark</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_move_mark (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                           <parameter><link linkend="GtkTextMark"><type>GtkTextMark</type></link> *mark</parameter>,
                           <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *where</parameter>);</programlisting>
<para>Moves <parameter>mark</parameter>
 to the new location <parameter>where</parameter>
. Emits the <link linkend="GtkTextBuffer-mark-set"><type>“mark-set”</type></link>
signal as notification of the move.</para>
<refsect3 id="gtk-text-buffer-move-mark.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mark</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextMark"><type>GtkTextMark</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>where</para></entry>
<entry role="parameter_description"><para>new location for <parameter>mark</parameter>
in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-move-mark-by-name" role="function">
<title>gtk_text_buffer_move_mark_by_name&#160;()</title>
<indexterm zone="gtk-text-buffer-move-mark-by-name"><primary>gtk_text_buffer_move_mark_by_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_move_mark_by_name (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                   <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
                                   <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *where</parameter>);</programlisting>
<para>Moves the mark named <parameter>name</parameter>
 (which must exist) to location <parameter>where</parameter>
.
See <link linkend="gtk-text-buffer-move-mark"><function>gtk_text_buffer_move_mark()</function></link> for details.</para>
<refsect3 id="gtk-text-buffer-move-mark-by-name.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>name of a mark</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>where</para></entry>
<entry role="parameter_description"><para>new location for mark</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-add-mark" role="function">
<title>gtk_text_buffer_add_mark&#160;()</title>
<indexterm zone="gtk-text-buffer-add-mark"><primary>gtk_text_buffer_add_mark</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_add_mark (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                          <parameter><link linkend="GtkTextMark"><type>GtkTextMark</type></link> *mark</parameter>,
                          <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *where</parameter>);</programlisting>
<para>Adds the mark at position <parameter>where</parameter>
. The mark must not be added to
another buffer, and if its name is not <link linkend="NULL:CAPS"><literal>NULL</literal></link> then there must not
be another mark in the buffer with the same name.</para>
<para>Emits the <link linkend="GtkTextBuffer-mark-set"><type>“mark-set”</type></link> signal as notification of the mark's
initial placement.</para>
<refsect3 id="gtk-text-buffer-add-mark.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mark</para></entry>
<entry role="parameter_description"><para>the mark to add</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>where</para></entry>
<entry role="parameter_description"><para>location to place mark</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-delete-mark" role="function">
<title>gtk_text_buffer_delete_mark&#160;()</title>
<indexterm zone="gtk-text-buffer-delete-mark"><primary>gtk_text_buffer_delete_mark</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_delete_mark (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                             <parameter><link linkend="GtkTextMark"><type>GtkTextMark</type></link> *mark</parameter>);</programlisting>
<para>Deletes <parameter>mark</parameter>
, so that it’s no longer located anywhere in the
buffer. Removes the reference the buffer holds to the mark, so if
you haven’t called <link linkend="g-object-ref"><function>g_object_ref()</function></link> on the mark, it will be freed. Even
if the mark isn’t freed, most operations on <parameter>mark</parameter>
 become
invalid, until it gets added to a buffer again with 
<link linkend="gtk-text-buffer-add-mark"><function>gtk_text_buffer_add_mark()</function></link>. Use <link linkend="gtk-text-mark-get-deleted"><function>gtk_text_mark_get_deleted()</function></link> to  
find out if a mark has been removed from its buffer.
The <link linkend="GtkTextBuffer-mark-deleted"><type>“mark-deleted”</type></link> signal will be emitted as notification after
the mark is deleted.</para>
<refsect3 id="gtk-text-buffer-delete-mark.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mark</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextMark"><type>GtkTextMark</type></link> in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-delete-mark-by-name" role="function">
<title>gtk_text_buffer_delete_mark_by_name&#160;()</title>
<indexterm zone="gtk-text-buffer-delete-mark-by-name"><primary>gtk_text_buffer_delete_mark_by_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_delete_mark_by_name (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                     <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>);</programlisting>
<para>Deletes the mark named <parameter>name</parameter>
; the mark must exist. See
<link linkend="gtk-text-buffer-delete-mark"><function>gtk_text_buffer_delete_mark()</function></link> for details.</para>
<refsect3 id="gtk-text-buffer-delete-mark-by-name.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>name of a mark in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-mark" role="function">
<title>gtk_text_buffer_get_mark&#160;()</title>
<indexterm zone="gtk-text-buffer-get-mark"><primary>gtk_text_buffer_get_mark</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
gtk_text_buffer_get_mark (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                          <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>);</programlisting>
<para>Returns the mark named <parameter>name</parameter>
 in buffer <parameter>buffer</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no such
mark exists in the buffer.</para>
<refsect3 id="gtk-text-buffer-get-mark.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>a mark name</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-mark.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GtkTextMark"><type>GtkTextMark</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-insert" role="function">
<title>gtk_text_buffer_get_insert&#160;()</title>
<indexterm zone="gtk-text-buffer-get-insert"><primary>gtk_text_buffer_get_insert</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
gtk_text_buffer_get_insert (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Returns the mark that represents the cursor (insertion point).
Equivalent to calling <link linkend="gtk-text-buffer-get-mark"><function>gtk_text_buffer_get_mark()</function></link> to get the mark
named “insert”, but very slightly more efficient, and involves less
typing.</para>
<refsect3 id="gtk-text-buffer-get-insert.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-insert.returns" role="returns">
<title>Returns</title>
<para>insertion point mark. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-selection-bound" role="function">
<title>gtk_text_buffer_get_selection_bound&#160;()</title>
<indexterm zone="gtk-text-buffer-get-selection-bound"><primary>gtk_text_buffer_get_selection_bound</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextMark"><returnvalue>GtkTextMark</returnvalue></link>&#160;*
gtk_text_buffer_get_selection_bound (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Returns the mark that represents the selection bound.  Equivalent
to calling <link linkend="gtk-text-buffer-get-mark"><function>gtk_text_buffer_get_mark()</function></link> to get the mark named
“selection_bound”, but very slightly more efficient, and involves
less typing.</para>
<para>The currently-selected text in <parameter>buffer</parameter>
 is the region between the
“selection_bound” and “insert” marks. If “selection_bound” and
“insert” are in the same place, then there is no current selection.
<link linkend="gtk-text-buffer-get-selection-bounds"><function>gtk_text_buffer_get_selection_bounds()</function></link> is another convenient function
for handling the selection, if you just want to know whether there’s a
selection and what its bounds are.</para>
<refsect3 id="gtk-text-buffer-get-selection-bound.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-selection-bound.returns" role="returns">
<title>Returns</title>
<para>selection bound mark. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-has-selection" role="function">
<title>gtk_text_buffer_get_has_selection&#160;()</title>
<indexterm zone="gtk-text-buffer-get-has-selection"><primary>gtk_text_buffer_get_has_selection</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_get_has_selection (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Indicates whether the buffer has some text currently selected.</para>
<refsect3 id="gtk-text-buffer-get-has-selection.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-has-selection.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the there is text selected</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-place-cursor" role="function">
<title>gtk_text_buffer_place_cursor&#160;()</title>
<indexterm zone="gtk-text-buffer-place-cursor"><primary>gtk_text_buffer_place_cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_place_cursor (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                              <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *where</parameter>);</programlisting>
<para>This function moves the “insert” and “selection_bound” marks
simultaneously.  If you move them to the same place in two steps
with <link linkend="gtk-text-buffer-move-mark"><function>gtk_text_buffer_move_mark()</function></link>, you will temporarily select a
region in between their old and new locations, which can be pretty
inefficient since the temporarily-selected region will force stuff
to be recalculated. This function moves them as a unit, which can
be optimized.</para>
<refsect3 id="gtk-text-buffer-place-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>where</para></entry>
<entry role="parameter_description"><para>where to put the cursor</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-select-range" role="function">
<title>gtk_text_buffer_select_range&#160;()</title>
<indexterm zone="gtk-text-buffer-select-range"><primary>gtk_text_buffer_select_range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_select_range (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                              <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *ins</parameter>,
                              <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *bound</parameter>);</programlisting>
<para>This function moves the “insert” and “selection_bound” marks
simultaneously.  If you move them in two steps
with <link linkend="gtk-text-buffer-move-mark"><function>gtk_text_buffer_move_mark()</function></link>, you will temporarily select a
region in between their old and new locations, which can be pretty
inefficient since the temporarily-selected region will force stuff
to be recalculated. This function moves them as a unit, which can
be optimized.</para>
<refsect3 id="gtk-text-buffer-select-range.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>ins</para></entry>
<entry role="parameter_description"><para>where to put the “insert” mark</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bound</para></entry>
<entry role="parameter_description"><para>where to put the “selection_bound” mark</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-apply-tag" role="function">
<title>gtk_text_buffer_apply_tag&#160;()</title>
<indexterm zone="gtk-text-buffer-apply-tag"><primary>gtk_text_buffer_apply_tag</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_apply_tag (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                           <parameter><link linkend="GtkTextTag"><type>GtkTextTag</type></link> *tag</parameter>,
                           <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                           <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Emits the “apply-tag” signal on <parameter>buffer</parameter>
. The default
handler for the signal applies <parameter>tag</parameter>
 to the given range.
<parameter>start</parameter>
 and <parameter>end</parameter>
 do not have to be in order.</para>
<refsect3 id="gtk-text-buffer-apply-tag.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextTag"><type>GtkTextTag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>one bound of range to be tagged</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>other bound of range to be tagged</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-remove-tag" role="function">
<title>gtk_text_buffer_remove_tag&#160;()</title>
<indexterm zone="gtk-text-buffer-remove-tag"><primary>gtk_text_buffer_remove_tag</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_remove_tag (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                            <parameter><link linkend="GtkTextTag"><type>GtkTextTag</type></link> *tag</parameter>,
                            <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                            <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Emits the “remove-tag” signal. The default handler for the signal
removes all occurrences of <parameter>tag</parameter>
 from the given range. <parameter>start</parameter>
 and
<parameter>end</parameter>
 don’t have to be in order.</para>
<refsect3 id="gtk-text-buffer-remove-tag.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextTag"><type>GtkTextTag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>one bound of range to be untagged</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>other bound of range to be untagged</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-apply-tag-by-name" role="function">
<title>gtk_text_buffer_apply_tag_by_name&#160;()</title>
<indexterm zone="gtk-text-buffer-apply-tag-by-name"><primary>gtk_text_buffer_apply_tag_by_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_apply_tag_by_name (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                   <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
                                   <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                                   <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Calls <link linkend="gtk-text-tag-table-lookup"><function>gtk_text_tag_table_lookup()</function></link> on the buffer’s tag table to
get a <link linkend="GtkTextTag"><type>GtkTextTag</type></link>, then calls <link linkend="gtk-text-buffer-apply-tag"><function>gtk_text_buffer_apply_tag()</function></link>.</para>
<refsect3 id="gtk-text-buffer-apply-tag-by-name.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>name of a named <link linkend="GtkTextTag"><type>GtkTextTag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>one bound of range to be tagged</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>other bound of range to be tagged</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-remove-tag-by-name" role="function">
<title>gtk_text_buffer_remove_tag_by_name&#160;()</title>
<indexterm zone="gtk-text-buffer-remove-tag-by-name"><primary>gtk_text_buffer_remove_tag_by_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_remove_tag_by_name (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
                                    <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                                    <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Calls <link linkend="gtk-text-tag-table-lookup"><function>gtk_text_tag_table_lookup()</function></link> on the buffer’s tag table to
get a <link linkend="GtkTextTag"><type>GtkTextTag</type></link>, then calls <link linkend="gtk-text-buffer-remove-tag"><function>gtk_text_buffer_remove_tag()</function></link>.</para>
<refsect3 id="gtk-text-buffer-remove-tag-by-name.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>name of a <link linkend="GtkTextTag"><type>GtkTextTag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>one bound of range to be untagged</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>other bound of range to be untagged</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-remove-all-tags" role="function">
<title>gtk_text_buffer_remove_all_tags&#160;()</title>
<indexterm zone="gtk-text-buffer-remove-all-tags"><primary>gtk_text_buffer_remove_all_tags</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_remove_all_tags (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                 <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                                 <parameter>const <link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Removes all tags in the range between <parameter>start</parameter>
 and <parameter>end</parameter>
.  Be careful
with this function; it could remove tags added in code unrelated to
the code you’re currently writing. That is, using this function is
probably a bad idea if you have two or more unrelated code sections
that add tags.</para>
<refsect3 id="gtk-text-buffer-remove-all-tags.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>one bound of range to be untagged</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>other bound of range to be untagged</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-create-tag" role="function">
<title>gtk_text_buffer_create_tag&#160;()</title>
<indexterm zone="gtk-text-buffer-create-tag"><primary>gtk_text_buffer_create_tag</primary></indexterm>
<programlisting language="C"><link linkend="GtkTextTag"><returnvalue>GtkTextTag</returnvalue></link>&#160;*
gtk_text_buffer_create_tag (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                            <parameter>const <link linkend="gchar"><type>gchar</type></link> *tag_name</parameter>,
                            <parameter>const <link linkend="gchar"><type>gchar</type></link> *first_property_name</parameter>,
                            <parameter>...</parameter>);</programlisting>
<para>Creates a tag and adds it to the tag table for <parameter>buffer</parameter>
.
Equivalent to calling <link linkend="gtk-text-tag-new"><function>gtk_text_tag_new()</function></link> and then adding the
tag to the buffer’s tag table. The returned tag is owned by
the buffer’s tag table, so the ref count will be equal to one.</para>
<para>If <parameter>tag_name</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, the tag is anonymous.</para>
<para>If <parameter>tag_name</parameter>
 is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, a tag called <parameter>tag_name</parameter>
 must not already
exist in the tag table for this buffer.</para>
<para>The <parameter>first_property_name</parameter>
 argument and subsequent arguments are a list
of properties to set on the tag, as with <link linkend="g-object-set"><function>g_object_set()</function></link>.</para>
<refsect3 id="gtk-text-buffer-create-tag.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tag_name</para></entry>
<entry role="parameter_description"><para>name of the new tag, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>first_property_name</para></entry>
<entry role="parameter_description"><para>name of first property to set, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para><link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated list of property names and values</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-create-tag.returns" role="returns">
<title>Returns</title>
<para>a new tag. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-iter-at-line-offset" role="function">
<title>gtk_text_buffer_get_iter_at_line_offset&#160;()</title>
<indexterm zone="gtk-text-buffer-get-iter-at-line-offset"><primary>gtk_text_buffer_get_iter_at_line_offset</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_iter_at_line_offset
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> line_number</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> char_offset</parameter>);</programlisting>
<para>Obtains an iterator pointing to <parameter>char_offset</parameter>
 within the given line. Note
characters, not bytes; UTF-8 may encode one character as multiple bytes.</para>
<para>Before the 3.20 version, it was not allowed to pass an invalid location.</para>
<para>If <parameter>line_number</parameter>
 is greater than the number of lines
in the <parameter>buffer</parameter>
, the end iterator is returned. And if <parameter>char_offset</parameter>
 is off the
end of the line, the iterator at the end of the line is returned.</para>
<refsect3 id="gtk-text-buffer-get-iter-at-line-offset.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>iterator to initialize. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>line_number</para></entry>
<entry role="parameter_description"><para>line number counting from 0</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>char_offset</para></entry>
<entry role="parameter_description"><para>char offset from start of line</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-iter-at-offset" role="function">
<title>gtk_text_buffer_get_iter_at_offset&#160;()</title>
<indexterm zone="gtk-text-buffer-get-iter-at-offset"><primary>gtk_text_buffer_get_iter_at_offset</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_iter_at_offset (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                    <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> char_offset</parameter>);</programlisting>
<para>Initializes <parameter>iter</parameter>
 to a position <parameter>char_offset</parameter>
 chars from the start
of the entire buffer. If <parameter>char_offset</parameter>
 is -1 or greater than the number
of characters in the buffer, <parameter>iter</parameter>
 is initialized to the end iterator,
the iterator one past the last valid character in the buffer.</para>
<refsect3 id="gtk-text-buffer-get-iter-at-offset.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>iterator to initialize. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>char_offset</para></entry>
<entry role="parameter_description"><para>char offset from start of buffer, counting from 0, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-iter-at-line" role="function">
<title>gtk_text_buffer_get_iter_at_line&#160;()</title>
<indexterm zone="gtk-text-buffer-get-iter-at-line"><primary>gtk_text_buffer_get_iter_at_line</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_iter_at_line (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                  <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                  <parameter><link linkend="gint"><type>gint</type></link> line_number</parameter>);</programlisting>
<para>Initializes <parameter>iter</parameter>
 to the start of the given line. If <parameter>line_number</parameter>
 is greater
than the number of lines in the <parameter>buffer</parameter>
, the end iterator is returned.</para>
<refsect3 id="gtk-text-buffer-get-iter-at-line.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>iterator to initialize. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>line_number</para></entry>
<entry role="parameter_description"><para>line number counting from 0</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-iter-at-line-index" role="function">
<title>gtk_text_buffer_get_iter_at_line_index&#160;()</title>
<indexterm zone="gtk-text-buffer-get-iter-at-line-index"><primary>gtk_text_buffer_get_iter_at_line_index</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_iter_at_line_index
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> line_number</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> byte_index</parameter>);</programlisting>
<para>Obtains an iterator pointing to <parameter>byte_index</parameter>
 within the given line.
<parameter>byte_index</parameter>
 must be the start of a UTF-8 character. Note bytes, not
characters; UTF-8 may encode one character as multiple bytes.</para>
<para>If <parameter>line_number</parameter>
 is greater than the number of lines
in the <parameter>buffer</parameter>
, the end iterator is returned. And if <parameter>byte_index</parameter>
 is off the
end of the line, the iterator at the end of the line is returned.</para>
<refsect3 id="gtk-text-buffer-get-iter-at-line-index.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>iterator to initialize. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>line_number</para></entry>
<entry role="parameter_description"><para>line number counting from 0</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>byte_index</para></entry>
<entry role="parameter_description"><para>byte index from start of line</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-iter-at-mark" role="function">
<title>gtk_text_buffer_get_iter_at_mark&#160;()</title>
<indexterm zone="gtk-text-buffer-get-iter-at-mark"><primary>gtk_text_buffer_get_iter_at_mark</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_iter_at_mark (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                  <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                  <parameter><link linkend="GtkTextMark"><type>GtkTextMark</type></link> *mark</parameter>);</programlisting>
<para>Initializes <parameter>iter</parameter>
 with the current position of <parameter>mark</parameter>
.</para>
<refsect3 id="gtk-text-buffer-get-iter-at-mark.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>iterator to initialize. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>mark</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextMark"><type>GtkTextMark</type></link> in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-iter-at-child-anchor" role="function">
<title>gtk_text_buffer_get_iter_at_child_anchor&#160;()</title>
<indexterm zone="gtk-text-buffer-get-iter-at-child-anchor"><primary>gtk_text_buffer_get_iter_at_child_anchor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_iter_at_child_anchor
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>,
                                <parameter><link linkend="GtkTextChildAnchor"><type>GtkTextChildAnchor</type></link> *anchor</parameter>);</programlisting>
<para>Obtains the location of <parameter>anchor</parameter>
 within <parameter>buffer</parameter>
.</para>
<refsect3 id="gtk-text-buffer-get-iter-at-child-anchor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>an iterator to be initialized. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>anchor</para></entry>
<entry role="parameter_description"><para>a child anchor that appears in <parameter>buffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-start-iter" role="function">
<title>gtk_text_buffer_get_start_iter&#160;()</title>
<indexterm zone="gtk-text-buffer-get-start-iter"><primary>gtk_text_buffer_get_start_iter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_start_iter (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>);</programlisting>
<para>Initialized <parameter>iter</parameter>
 with the first position in the text buffer. This
is the same as using <link linkend="gtk-text-buffer-get-iter-at-offset"><function>gtk_text_buffer_get_iter_at_offset()</function></link> to get
the iter at character offset 0.</para>
<refsect3 id="gtk-text-buffer-get-start-iter.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>iterator to initialize. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-end-iter" role="function">
<title>gtk_text_buffer_get_end_iter&#160;()</title>
<indexterm zone="gtk-text-buffer-get-end-iter"><primary>gtk_text_buffer_get_end_iter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_end_iter (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                              <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *iter</parameter>);</programlisting>
<para>Initializes <parameter>iter</parameter>
 with the “end iterator,” one past the last valid
character in the text buffer. If dereferenced with
<link linkend="gtk-text-iter-get-char"><function>gtk_text_iter_get_char()</function></link>, the end iterator has a character value of 0.
The entire buffer lies in the range from the first position in
the buffer (call <link linkend="gtk-text-buffer-get-start-iter"><function>gtk_text_buffer_get_start_iter()</function></link> to get
character position 0) to the end iterator.</para>
<refsect3 id="gtk-text-buffer-get-end-iter.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>iterator to initialize. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-bounds" role="function">
<title>gtk_text_buffer_get_bounds&#160;()</title>
<indexterm zone="gtk-text-buffer-get-bounds"><primary>gtk_text_buffer_get_bounds</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_get_bounds (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                            <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                            <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Retrieves the first and last iterators in the buffer, i.e. the
entire buffer lies within the range [<parameter>start</parameter>
,<parameter>end</parameter>
).</para>
<refsect3 id="gtk-text-buffer-get-bounds.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>iterator to initialize with first position in the buffer. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>iterator to initialize with the end iterator. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-modified" role="function">
<title>gtk_text_buffer_get_modified&#160;()</title>
<indexterm zone="gtk-text-buffer-get-modified"><primary>gtk_text_buffer_get_modified</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_get_modified (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Indicates whether the buffer has been modified since the last call
to <link linkend="gtk-text-buffer-set-modified"><function>gtk_text_buffer_set_modified()</function></link> set the modification flag to
<link linkend="FALSE:CAPS"><literal>FALSE</literal></link>. Used for example to enable a “save” function in a text
editor.</para>
<refsect3 id="gtk-text-buffer-get-modified.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-modified.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the buffer has been modified</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-set-modified" role="function">
<title>gtk_text_buffer_set_modified&#160;()</title>
<indexterm zone="gtk-text-buffer-set-modified"><primary>gtk_text_buffer_set_modified</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_set_modified (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                              <parameter><link linkend="gboolean"><type>gboolean</type></link> setting</parameter>);</programlisting>
<para>Used to keep track of whether the buffer has been modified since the
last time it was saved. Whenever the buffer is saved to disk, call
gtk_text_buffer_set_modified (<parameter>buffer</parameter>
, FALSE). When the buffer is modified,
it will automatically toggled on the modified bit again. When the modified
bit flips, the buffer emits the <link linkend="GtkTextBuffer-modified-changed"><type>“modified-changed”</type></link> signal.</para>
<refsect3 id="gtk-text-buffer-set-modified.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>setting</para></entry>
<entry role="parameter_description"><para>modification flag setting</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-delete-selection" role="function">
<title>gtk_text_buffer_delete_selection&#160;()</title>
<indexterm zone="gtk-text-buffer-delete-selection"><primary>gtk_text_buffer_delete_selection</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_delete_selection (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                  <parameter><link linkend="gboolean"><type>gboolean</type></link> interactive</parameter>,
                                  <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Deletes the range between the “insert” and “selection_bound” marks,
that is, the currently-selected text. If <parameter>interactive</parameter>
 is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>,
the editability of the selection will be considered (users can’t delete
uneditable text).</para>
<refsect3 id="gtk-text-buffer-delete-selection.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>interactive</para></entry>
<entry role="parameter_description"><para>whether the deletion is caused by user interaction</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>whether the buffer is editable by default</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-delete-selection.returns" role="returns">
<title>Returns</title>
<para> whether there was a non-empty selection to delete</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-paste-clipboard" role="function">
<title>gtk_text_buffer_paste_clipboard&#160;()</title>
<indexterm zone="gtk-text-buffer-paste-clipboard"><primary>gtk_text_buffer_paste_clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_paste_clipboard (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                 <parameter><link linkend="GdkClipboard"><type>GdkClipboard</type></link> *clipboard</parameter>,
                                 <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *override_location</parameter>,
                                 <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Pastes the contents of a clipboard. If <parameter>override_location</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, the
pasted text will be inserted at the cursor position, or the buffer selection
will be replaced if the selection is non-empty.</para>
<para>Note: pasting is asynchronous, that is, we’ll ask for the paste data and
return, and at some point later after the main loop runs, the paste data will
be inserted.</para>
<refsect3 id="gtk-text-buffer-paste-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clipboard</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkClipboard"><type>GdkClipboard</type></link> to paste from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>override_location</para></entry>
<entry role="parameter_description"><para>location to insert pasted text, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>whether the buffer is editable by default</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-copy-clipboard" role="function">
<title>gtk_text_buffer_copy_clipboard&#160;()</title>
<indexterm zone="gtk-text-buffer-copy-clipboard"><primary>gtk_text_buffer_copy_clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_copy_clipboard (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GdkClipboard"><type>GdkClipboard</type></link> *clipboard</parameter>);</programlisting>
<para>Copies the currently-selected text to a clipboard.</para>
<refsect3 id="gtk-text-buffer-copy-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clipboard</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkClipboard"><type>GdkClipboard</type></link> object to copy to</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-cut-clipboard" role="function">
<title>gtk_text_buffer_cut_clipboard&#160;()</title>
<indexterm zone="gtk-text-buffer-cut-clipboard"><primary>gtk_text_buffer_cut_clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_cut_clipboard (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                               <parameter><link linkend="GdkClipboard"><type>GdkClipboard</type></link> *clipboard</parameter>,
                               <parameter><link linkend="gboolean"><type>gboolean</type></link> default_editable</parameter>);</programlisting>
<para>Copies the currently-selected text to a clipboard, then deletes
said text if it’s editable.</para>
<refsect3 id="gtk-text-buffer-cut-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clipboard</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkClipboard"><type>GdkClipboard</type></link> object to cut to</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>default_editable</para></entry>
<entry role="parameter_description"><para>default editability of the buffer</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-selection-bounds" role="function">
<title>gtk_text_buffer_get_selection_bounds&#160;()</title>
<indexterm zone="gtk-text-buffer-get-selection-bounds"><primary>gtk_text_buffer_get_selection_bounds</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_get_selection_bounds (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                      <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *start</parameter>,
                                      <parameter><link linkend="GtkTextIter"><type>GtkTextIter</type></link> *end</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if some text is selected; places the bounds
of the selection in <parameter>start</parameter>
 and <parameter>end</parameter>
 (if the selection has length 0,
then <parameter>start</parameter>
 and <parameter>end</parameter>
 are filled in with the same value).
<parameter>start</parameter>
 and <parameter>end</parameter>
 will be in ascending order. If <parameter>start</parameter>
 and <parameter>end</parameter>
 are
NULL, then they are not filled in, but the return value still indicates
whether text is selected.</para>
<refsect3 id="gtk-text-buffer-get-selection-bounds.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>iterator to initialize with selection start. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>iterator to initialize with selection end. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-selection-bounds.returns" role="returns">
<title>Returns</title>
<para> whether the selection has nonzero length</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-selection-content" role="function">
<title>gtk_text_buffer_get_selection_content&#160;()</title>
<indexterm zone="gtk-text-buffer-get-selection-content"><primary>gtk_text_buffer_get_selection_content</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentProvider"><returnvalue>GdkContentProvider</returnvalue></link>&#160;*
gtk_text_buffer_get_selection_content (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Get a content provider for this buffer.</para>
<refsect3 id="gtk-text-buffer-get-selection-content.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-selection-content.returns" role="returns">
<title>Returns</title>
<para>a new <link linkend="GdkContentProvider"><type>GdkContentProvider</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-begin-user-action" role="function">
<title>gtk_text_buffer_begin_user_action&#160;()</title>
<indexterm zone="gtk-text-buffer-begin-user-action"><primary>gtk_text_buffer_begin_user_action</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_begin_user_action (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Called to indicate that the buffer operations between here and a
call to <link linkend="gtk-text-buffer-end-user-action"><function>gtk_text_buffer_end_user_action()</function></link> are part of a single
user-visible operation. The operations between
<link linkend="gtk-text-buffer-begin-user-action"><function>gtk_text_buffer_begin_user_action()</function></link> and
<link linkend="gtk-text-buffer-end-user-action"><function>gtk_text_buffer_end_user_action()</function></link> can then be grouped when creating
an undo stack. <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> maintains a count of calls to
<link linkend="gtk-text-buffer-begin-user-action"><function>gtk_text_buffer_begin_user_action()</function></link> that have not been closed with
a call to <link linkend="gtk-text-buffer-end-user-action"><function>gtk_text_buffer_end_user_action()</function></link>, and emits the 
“begin-user-action” and “end-user-action” signals only for the 
outermost pair of calls. This allows you to build user actions 
from other user actions.</para>
<para>The “interactive” buffer mutation functions, such as
<link linkend="gtk-text-buffer-insert-interactive"><function>gtk_text_buffer_insert_interactive()</function></link>, automatically call begin/end
user action around the buffer operations they perform, so there's
no need to add extra calls if you user action consists solely of a
single call to one of those functions.</para>
<refsect3 id="gtk-text-buffer-begin-user-action.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-end-user-action" role="function">
<title>gtk_text_buffer_end_user_action&#160;()</title>
<indexterm zone="gtk-text-buffer-end-user-action"><primary>gtk_text_buffer_end_user_action</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_end_user_action (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Should be paired with a call to <link linkend="gtk-text-buffer-begin-user-action"><function>gtk_text_buffer_begin_user_action()</function></link>.
See that function for a full explanation.</para>
<refsect3 id="gtk-text-buffer-end-user-action.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-add-selection-clipboard" role="function">
<title>gtk_text_buffer_add_selection_clipboard&#160;()</title>
<indexterm zone="gtk-text-buffer-add-selection-clipboard"><primary>gtk_text_buffer_add_selection_clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_add_selection_clipboard
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GdkClipboard"><type>GdkClipboard</type></link> *clipboard</parameter>);</programlisting>
<para>Adds <parameter>clipboard</parameter>
 to the list of clipboards in which the selection 
contents of <parameter>buffer</parameter>
 are available. In most cases, <parameter>clipboard</parameter>
 will be 
the <link linkend="GdkClipboard"><type>GdkClipboard</type></link> returned by <link linkend="gtk-widget-get-primary-clipboard"><function>gtk_widget_get_primary_clipboard()</function></link>
for a view of <parameter>buffer</parameter>
.</para>
<refsect3 id="gtk-text-buffer-add-selection-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clipboard</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkClipboard"><type>GdkClipboard</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-remove-selection-clipboard" role="function">
<title>gtk_text_buffer_remove_selection_clipboard&#160;()</title>
<indexterm zone="gtk-text-buffer-remove-selection-clipboard"><primary>gtk_text_buffer_remove_selection_clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_remove_selection_clipboard
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                <parameter><link linkend="GdkClipboard"><type>GdkClipboard</type></link> *clipboard</parameter>);</programlisting>
<para>Removes a <link linkend="GdkClipboard"><type>GdkClipboard</type></link> added with 
<link linkend="gtk-text-buffer-add-selection-clipboard"><function>gtk_text_buffer_add_selection_clipboard()</function></link>.</para>
<refsect3 id="gtk-text-buffer-remove-selection-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clipboard</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkClipboard"><type>GdkClipboard</type></link> added to <parameter>buffer</parameter>
by
<link linkend="gtk-text-buffer-add-selection-clipboard"><function>gtk_text_buffer_add_selection_clipboard()</function></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-can-undo" role="function">
<title>gtk_text_buffer_get_can_undo&#160;()</title>
<indexterm zone="gtk-text-buffer-get-can-undo"><primary>gtk_text_buffer_get_can_undo</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_get_can_undo (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Gets whether there is an undoable action in the history.</para>
<refsect3 id="gtk-text-buffer-get-can-undo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-can-undo.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if there is an undoable action</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-can-redo" role="function">
<title>gtk_text_buffer_get_can_redo&#160;()</title>
<indexterm zone="gtk-text-buffer-get-can-redo"><primary>gtk_text_buffer_get_can_redo</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_get_can_redo (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Gets whether there is a redoable action in the history.</para>
<refsect3 id="gtk-text-buffer-get-can-redo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-buffer-get-can-redo.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if there is an redoable action</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-enable-undo" role="function">
<title>gtk_text_buffer_get_enable_undo&#160;()</title>
<indexterm zone="gtk-text-buffer-get-enable-undo"><primary>gtk_text_buffer_get_enable_undo</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_buffer_get_enable_undo (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Gets whether the buffer is saving modifications to the buffer to allow for
undo and redo actions.</para>
<para>See <link linkend="gtk-text-buffer-begin-irreversible-action"><function>gtk_text_buffer_begin_irreversible_action()</function></link> and
<link linkend="gtk-text-buffer-end-irreversible-action"><function>gtk_text_buffer_end_irreversible_action()</function></link> to create changes to the buffer
that cannot be undone.</para>
<refsect3 id="gtk-text-buffer-get-enable-undo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-set-enable-undo" role="function">
<title>gtk_text_buffer_set_enable_undo&#160;()</title>
<indexterm zone="gtk-text-buffer-set-enable-undo"><primary>gtk_text_buffer_set_enable_undo</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_set_enable_undo (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                 <parameter><link linkend="gboolean"><type>gboolean</type></link> enable_undo</parameter>);</programlisting>
<para>Sets whether or not to enable undoable actions in the text buffer. If
enabled, the user will be able to undo the last number of actions up to
<link linkend="gtk-text-buffer-get-max-undo-levels"><function>gtk_text_buffer_get_max_undo_levels()</function></link>.</para>
<para>See <link linkend="gtk-text-buffer-begin-irreversible-action"><function>gtk_text_buffer_begin_irreversible_action()</function></link> and
<link linkend="gtk-text-buffer-end-irreversible-action"><function>gtk_text_buffer_end_irreversible_action()</function></link> to create changes to the buffer
that cannot be undone.</para>
<refsect3 id="gtk-text-buffer-set-enable-undo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>enable_undo</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to enable undo</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-get-max-undo-levels" role="function">
<title>gtk_text_buffer_get_max_undo_levels&#160;()</title>
<indexterm zone="gtk-text-buffer-get-max-undo-levels"><primary>gtk_text_buffer_get_max_undo_levels</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_text_buffer_get_max_undo_levels (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Gets the maximum number of undo levels to perform. If 0, unlimited undo
actions may be performed. Note that this may have a memory usage impact
as it requires storing an additional copy of the inserted or removed text
within the text buffer.</para>
<refsect3 id="gtk-text-buffer-get-max-undo-levels.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-set-max-undo-levels" role="function">
<title>gtk_text_buffer_set_max_undo_levels&#160;()</title>
<indexterm zone="gtk-text-buffer-set-max-undo-levels"><primary>gtk_text_buffer_set_max_undo_levels</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_set_max_undo_levels (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>,
                                     <parameter><link linkend="guint"><type>guint</type></link> max_undo_levels</parameter>);</programlisting>
<para>Sets the maximum number of undo levels to perform. If 0, unlimited undo
actions may be performed. Note that this may have a memory usage impact
as it requires storing an additional copy of the inserted or removed text
within the text buffer.</para>
<refsect3 id="gtk-text-buffer-set-max-undo-levels.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>max_undo_levels</para></entry>
<entry role="parameter_description"><para>the maximum number of undo actions to perform</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-undo" role="function">
<title>gtk_text_buffer_undo&#160;()</title>
<indexterm zone="gtk-text-buffer-undo"><primary>gtk_text_buffer_undo</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_undo (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Undoes the last undoable action on the buffer, if there is one.</para>
<refsect3 id="gtk-text-buffer-undo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-redo" role="function">
<title>gtk_text_buffer_redo&#160;()</title>
<indexterm zone="gtk-text-buffer-redo"><primary>gtk_text_buffer_redo</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_redo (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Redoes the next redoable action on the buffer, if there is one.</para>
<refsect3 id="gtk-text-buffer-redo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-begin-irreversible-action" role="function">
<title>gtk_text_buffer_begin_irreversible_action&#160;()</title>
<indexterm zone="gtk-text-buffer-begin-irreversible-action"><primary>gtk_text_buffer_begin_irreversible_action</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_begin_irreversible_action
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Denotes the beginning of an action that may not be undone. This will cause
any previous operations in the undo/redo queue to be cleared.</para>
<para>This should be paired with a call to
<link linkend="gtk-text-buffer-end-irreversible-action"><function>gtk_text_buffer_end_irreversible_action()</function></link> after the irreversible action
has completed.</para>
<para>You may nest calls to <link linkend="gtk-text-buffer-begin-irreversible-action"><function>gtk_text_buffer_begin_irreversible_action()</function></link> and
<link linkend="gtk-text-buffer-end-irreversible-action"><function>gtk_text_buffer_end_irreversible_action()</function></link> pairs.</para>
<refsect3 id="gtk-text-buffer-begin-irreversible-action.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-buffer-end-irreversible-action" role="function">
<title>gtk_text_buffer_end_irreversible_action&#160;()</title>
<indexterm zone="gtk-text-buffer-end-irreversible-action"><primary>gtk_text_buffer_end_irreversible_action</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_buffer_end_irreversible_action
                               (<parameter><link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Denotes the end of an action that may not be undone. This will cause
any previous operations in the undo/redo queue to be cleared.</para>
<para>This should be called after completing modifications to the text buffer
after <link linkend="gtk-text-buffer-begin-irreversible-action"><function>gtk_text_buffer_begin_irreversible_action()</function></link> was called.</para>
<para>You may nest calls to <link linkend="gtk-text-buffer-begin-irreversible-action"><function>gtk_text_buffer_begin_irreversible_action()</function></link> and
<link linkend="gtk-text-buffer-end-irreversible-action"><function>gtk_text_buffer_end_irreversible_action()</function></link> pairs.</para>
<refsect3 id="gtk-text-buffer-end-irreversible-action.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkTextBuffer.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkTextBuffer-struct" role="struct">
<title>GtkTextBuffer</title>
<indexterm zone="GtkTextBuffer-struct"><primary>GtkTextBuffer</primary></indexterm>
<programlisting language="C">typedef struct _GtkTextBuffer GtkTextBuffer;</programlisting>
</refsect2>
<refsect2 id="GtkTextBufferClass" role="struct">
<title>struct GtkTextBufferClass</title>
<indexterm zone="GtkTextBufferClass"><primary>GtkTextBufferClass</primary></indexterm>
<programlisting language="C">struct GtkTextBufferClass {
  GObjectClass parent_class;

  void (* insert_text)            (GtkTextBuffer      *buffer,
                                   GtkTextIter        *pos,
                                   const gchar        *new_text,
                                   gint                new_text_length);

  void (* insert_paintable)       (GtkTextBuffer      *buffer,
                                   GtkTextIter        *iter,
                                   GdkPaintable       *paintable);

  void (* insert_child_anchor)    (GtkTextBuffer      *buffer,
                                   GtkTextIter        *iter,
                                   GtkTextChildAnchor *anchor);

  void (* delete_range)           (GtkTextBuffer      *buffer,
                                   GtkTextIter        *start,
                                   GtkTextIter        *end);

  void (* changed)                (GtkTextBuffer      *buffer);

  void (* modified_changed)       (GtkTextBuffer      *buffer);

  void (* mark_set)               (GtkTextBuffer      *buffer,
                                   const GtkTextIter  *location,
                                   GtkTextMark        *mark);

  void (* mark_deleted)           (GtkTextBuffer      *buffer,
                                   GtkTextMark        *mark);

  void (* apply_tag)              (GtkTextBuffer      *buffer,
                                   GtkTextTag         *tag,
                                   const GtkTextIter  *start,
                                   const GtkTextIter  *end);

  void (* remove_tag)             (GtkTextBuffer      *buffer,
                                   GtkTextTag         *tag,
                                   const GtkTextIter  *start,
                                   const GtkTextIter  *end);

  void (* begin_user_action)      (GtkTextBuffer      *buffer);

  void (* end_user_action)        (GtkTextBuffer      *buffer);

  void (* paste_done)             (GtkTextBuffer      *buffer,
                                   GdkClipboard       *clipboard);
  void (* undo)                   (GtkTextBuffer      *buffer);
  void (* redo)                   (GtkTextBuffer      *buffer);
};
</programlisting>
<refsect3 id="GtkTextBufferClass.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.insert-text">insert_text</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-insert-text"><type>“insert-text”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.insert-paintable">insert_paintable</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-insert-paintable"><type>“insert-paintable”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.insert-child-anchor">insert_child_anchor</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-insert-child-anchor"><type>“insert-child-anchor”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.delete-range">delete_range</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-delete-range"><type>“delete-range”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.changed">changed</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-changed"><type>“changed”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.modified-changed">modified_changed</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-modified-changed"><type>“modified-changed”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.mark-set">mark_set</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-mark-set"><type>“mark-set”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.mark-deleted">mark_deleted</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-mark-deleted"><type>“mark-deleted”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.apply-tag">apply_tag</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-apply-tag"><type>“apply-tag”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.remove-tag">remove_tag</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-remove-tag"><type>“remove-tag”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.begin-user-action">begin_user_action</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-begin-user-action"><type>“begin-user-action”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.end-user-action">end_user_action</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-end-user-action"><type>“end-user-action”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.paste-done">paste_done</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>The class handler for the <link linkend="GtkTextBuffer-paste-done"><type>“paste-done”</type></link> signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.undo">undo</structfield>&#160;()</para></entry>
<entry /><entry />
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTextBufferClass.redo">redo</structfield>&#160;()</para></entry>
<entry /><entry />
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>

</refsect1>
<refsect1 id="GtkTextBuffer.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkTextBuffer--can-redo" role="property"><title>The <literal>“can-redo”</literal> property</title>
<indexterm zone="GtkTextBuffer--can-redo"><primary>GtkTextBuffer:can-redo</primary></indexterm>
<programlisting>  “can-redo”                 <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>The <link linkend="GtkTextBuffer--can-redo"><type>“can-redo”</type></link> property denotes that the buffer can reapply the
last undone action.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkTextBuffer--can-undo" role="property"><title>The <literal>“can-undo”</literal> property</title>
<indexterm zone="GtkTextBuffer--can-undo"><primary>GtkTextBuffer:can-undo</primary></indexterm>
<programlisting>  “can-undo”                 <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>The <link linkend="GtkTextBuffer--can-undo"><type>“can-undo”</type></link> property denotes that the buffer can undo the last
applied action.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkTextBuffer--copy-target-list" role="property"><title>The <literal>“copy-target-list”</literal> property</title>
<indexterm zone="GtkTextBuffer--copy-target-list"><primary>GtkTextBuffer:copy-target-list</primary></indexterm>
<programlisting>  “copy-target-list”         <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</programlisting>
<para>The list of targets this buffer supports for clipboard copying
and as DND source.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read</para>
</refsect2>
<refsect2 id="GtkTextBuffer--cursor-position" role="property"><title>The <literal>“cursor-position”</literal> property</title>
<indexterm zone="GtkTextBuffer--cursor-position"><primary>GtkTextBuffer:cursor-position</primary></indexterm>
<programlisting>  “cursor-position”          <link linkend="gint"><type>gint</type></link></programlisting>
<para>The position of the insert mark (as offset from the beginning
of the buffer). It is useful for getting notified when the
cursor moves.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read</para>
<para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkTextBuffer--enable-undo" role="property"><title>The <literal>“enable-undo”</literal> property</title>
<indexterm zone="GtkTextBuffer--enable-undo"><primary>GtkTextBuffer:enable-undo</primary></indexterm>
<programlisting>  “enable-undo”              <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>The <link linkend="GtkTextBuffer--enable-undo"><type>“enable-undo”</type></link> property denotes if support for undoing and
redoing changes to the buffer is allowed.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkTextBuffer--has-selection" role="property"><title>The <literal>“has-selection”</literal> property</title>
<indexterm zone="GtkTextBuffer--has-selection"><primary>GtkTextBuffer:has-selection</primary></indexterm>
<programlisting>  “has-selection”            <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the buffer has some text currently selected.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkTextBuffer--paste-target-list" role="property"><title>The <literal>“paste-target-list”</literal> property</title>
<indexterm zone="GtkTextBuffer--paste-target-list"><primary>GtkTextBuffer:paste-target-list</primary></indexterm>
<programlisting>  “paste-target-list”        <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</programlisting>
<para>The list of targets this buffer supports for clipboard pasting
and as DND destination.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read</para>
</refsect2>
<refsect2 id="GtkTextBuffer--tag-table" role="property"><title>The <literal>“tag-table”</literal> property</title>
<indexterm zone="GtkTextBuffer--tag-table"><primary>GtkTextBuffer:tag-table</primary></indexterm>
<programlisting>  “tag-table”                <link linkend="GtkTextTagTable"><type>GtkTextTagTable</type></link>&#160;*</programlisting>
<para>Text Tag Table.</para><para>Owner: GtkTextBuffer</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GtkTextBuffer--text" role="property"><title>The <literal>“text”</literal> property</title>
<indexterm zone="GtkTextBuffer--text"><primary>GtkTextBuffer:text</primary></indexterm>
<programlisting>  “text”                     <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The text content of the buffer. Without child widgets and images,
see <link linkend="gtk-text-buffer-get-text"><function>gtk_text_buffer_get_text()</function></link> for more information.</para>
<para>Owner: GtkTextBuffer</para>
<para>Flags: Read / Write</para>
<para>Default value: ""</para>
</refsect2>

</refsect1>
<refsect1 id="GtkTextBuffer.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkTextBuffer-apply-tag" role="signal"><title>The <literal>“apply-tag”</literal> signal</title>
<indexterm zone="GtkTextBuffer-apply-tag"><primary>GtkTextBuffer::apply-tag</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GtkTextTag"><type>GtkTextTag</type></link>    *tag,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *start,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *end,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-apply-tag"><type>“apply-tag”</type></link> signal is emitted to apply a tag to a
range of text in a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>.

Applying actually occurs in the default handler.</para>
<para>Note that if your handler runs before the default handler it must not

invalidate the <parameter>start</parameter>
 and <parameter>end</parameter>
 iters (or has to revalidate them). </para>
<para>See also:

<link linkend="gtk-text-buffer-apply-tag"><function>gtk_text_buffer_apply_tag()</function></link>,
<link linkend="gtk-text-buffer-insert-with-tags"><function>gtk_text_buffer_insert_with_tags()</function></link>,
<link linkend="gtk-text-buffer-insert-range"><function>gtk_text_buffer_insert_range()</function></link>.</para>
<refsect3 id="GtkTextBuffer-apply-tag.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tag</para></entry>
<entry role="parameter_description"><para>the applied tag</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>the start of the range the tag is applied to</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>the end of the range the tag is applied to</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-begin-user-action" role="signal"><title>The <literal>“begin-user-action”</literal> signal</title>
<indexterm zone="GtkTextBuffer-begin-user-action"><primary>GtkTextBuffer::begin-user-action</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-begin-user-action"><type>“begin-user-action”</type></link> signal is emitted at the beginning of a single
user-visible operation on a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>.</para>
<para>See also:

<link linkend="gtk-text-buffer-begin-user-action"><function>gtk_text_buffer_begin_user_action()</function></link>,
<link linkend="gtk-text-buffer-insert-interactive"><function>gtk_text_buffer_insert_interactive()</function></link>,
<link linkend="gtk-text-buffer-insert-range-interactive"><function>gtk_text_buffer_insert_range_interactive()</function></link>,
<link linkend="gtk-text-buffer-delete-interactive"><function>gtk_text_buffer_delete_interactive()</function></link>,
<link linkend="gtk-text-buffer-backspace"><function>gtk_text_buffer_backspace()</function></link>,
<link linkend="gtk-text-buffer-delete-selection"><function>gtk_text_buffer_delete_selection()</function></link>.</para>
<refsect3 id="GtkTextBuffer-begin-user-action.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-changed" role="signal"><title>The <literal>“changed”</literal> signal</title>
<indexterm zone="GtkTextBuffer-changed"><primary>GtkTextBuffer::changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-changed"><type>“changed”</type></link> signal is emitted when the content of a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>

has changed.</para>
<refsect3 id="GtkTextBuffer-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-delete-range" role="signal"><title>The <literal>“delete-range”</literal> signal</title>
<indexterm zone="GtkTextBuffer-delete-range"><primary>GtkTextBuffer::delete-range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *start,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *end,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-delete-range"><type>“delete-range”</type></link> signal is emitted to delete a range

from a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>. </para>
<para>Note that if your handler runs before the default handler it must not

invalidate the <parameter>start</parameter>
 and <parameter>end</parameter>
 iters (or has to revalidate them).

The default signal handler revalidates the <parameter>start</parameter>
 and <parameter>end</parameter>
 iters to

both point to the location where text was deleted. Handlers
which run after the default handler (see <link linkend="g-signal-connect-after"><function>g_signal_connect_after()</function></link>)
do not have access to the deleted text.</para>
<para>See also: <link linkend="gtk-text-buffer-delete"><function>gtk_text_buffer_delete()</function></link>.</para>
<refsect3 id="GtkTextBuffer-delete-range.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>the start of the range to be deleted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>the end of the range to be deleted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-end-user-action" role="signal"><title>The <literal>“end-user-action”</literal> signal</title>
<indexterm zone="GtkTextBuffer-end-user-action"><primary>GtkTextBuffer::end-user-action</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-end-user-action"><type>“end-user-action”</type></link> signal is emitted at the end of a single
user-visible operation on the <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>.</para>
<para>See also:

<link linkend="gtk-text-buffer-end-user-action"><function>gtk_text_buffer_end_user_action()</function></link>,
<link linkend="gtk-text-buffer-insert-interactive"><function>gtk_text_buffer_insert_interactive()</function></link>,
<link linkend="gtk-text-buffer-insert-range-interactive"><function>gtk_text_buffer_insert_range_interactive()</function></link>,
<link linkend="gtk-text-buffer-delete-interactive"><function>gtk_text_buffer_delete_interactive()</function></link>,
<link linkend="gtk-text-buffer-backspace"><function>gtk_text_buffer_backspace()</function></link>,
<link linkend="gtk-text-buffer-delete-selection"><function>gtk_text_buffer_delete_selection()</function></link>,
<link linkend="gtk-text-buffer-backspace"><function>gtk_text_buffer_backspace()</function></link>.</para>
<refsect3 id="GtkTextBuffer-end-user-action.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-insert-child-anchor" role="signal"><title>The <literal>“insert-child-anchor”</literal> signal</title>
<indexterm zone="GtkTextBuffer-insert-child-anchor"><primary>GtkTextBuffer::insert-child-anchor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>      *textbuffer,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>        *location,
               <link linkend="GtkTextChildAnchor"><type>GtkTextChildAnchor</type></link> *anchor,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-insert-child-anchor"><type>“insert-child-anchor”</type></link> signal is emitted to insert a
<link linkend="GtkTextChildAnchor"><type>GtkTextChildAnchor</type></link> in a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>.
Insertion actually occurs in the default handler.</para>
<para>Note that if your handler runs before the default handler it must
not invalidate the <parameter>location</parameter>
 iter (or has to revalidate it).

The default signal handler revalidates it to be placed after the

inserted <parameter>anchor</parameter>
.</para>
<para>See also: <link linkend="gtk-text-buffer-insert-child-anchor"><function>gtk_text_buffer_insert_child_anchor()</function></link>.</para>
<refsect3 id="GtkTextBuffer-insert-child-anchor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>location</para></entry>
<entry role="parameter_description"><para>position to insert <parameter>anchor</parameter>
in <parameter>textbuffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>anchor</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTextChildAnchor"><type>GtkTextChildAnchor</type></link> to be inserted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-insert-paintable" role="signal"><title>The <literal>“insert-paintable”</literal> signal</title>
<indexterm zone="GtkTextBuffer-insert-paintable"><primary>GtkTextBuffer::insert-paintable</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *location,
               <link linkend="GdkPaintable"><type>GdkPaintable</type></link>  *paintable,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-insert-paintable"><type>“insert-paintable”</type></link> signal is emitted to insert a <link linkend="GdkPaintable"><type>GdkPaintable</type></link>
in a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>. Insertion actually occurs in the default handler.</para>
<para>Note that if your handler runs before the default handler it must not
invalidate the <parameter>location</parameter>
 iter (or has to revalidate it).
The default signal handler revalidates it to be placed after the
inserted <parameter>paintable</parameter>
.</para>
<para>See also: <link linkend="gtk-text-buffer-insert-paintable"><function>gtk_text_buffer_insert_paintable()</function></link>.</para>
<refsect3 id="GtkTextBuffer-insert-paintable.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>location</para></entry>
<entry role="parameter_description"><para>position to insert <parameter>paintable</parameter>
in <parameter>textbuffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>paintable</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkPaintable"><type>GdkPaintable</type></link> to be inserted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-insert-text" role="signal"><title>The <literal>“insert-text”</literal> signal</title>
<indexterm zone="GtkTextBuffer-insert-text"><primary>GtkTextBuffer::insert-text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *location,
               <link linkend="gchar"><type>gchar</type></link>         *text,
               <link linkend="gint"><type>gint</type></link>           len,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The ::insert-text signal is emitted to insert text in a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>.
Insertion actually occurs in the default handler.  </para>
<para>Note that if your handler runs before the default handler it must not

invalidate the <parameter>location</parameter>
 iter (or has to revalidate it).

The default signal handler revalidates it to point to the end of the

inserted text.</para>
<para>See also:

<link linkend="gtk-text-buffer-insert"><function>gtk_text_buffer_insert()</function></link>,

<link linkend="gtk-text-buffer-insert-range"><function>gtk_text_buffer_insert_range()</function></link>.</para>
<refsect3 id="GtkTextBuffer-insert-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>location</para></entry>
<entry role="parameter_description"><para>position to insert <parameter>text</parameter>
in <parameter>textbuffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>the UTF-8 text to be inserted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>len</para></entry>
<entry role="parameter_description"><para>length of the inserted text in bytes</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-mark-deleted" role="signal"><title>The <literal>“mark-deleted”</literal> signal</title>
<indexterm zone="GtkTextBuffer-mark-deleted"><primary>GtkTextBuffer::mark-deleted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GtkTextMark"><type>GtkTextMark</type></link>   *mark,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-mark-deleted"><type>“mark-deleted”</type></link> signal is emitted as notification
after a <link linkend="GtkTextMark"><type>GtkTextMark</type></link> is deleted. </para>
<para>See also:
<link linkend="gtk-text-buffer-delete-mark"><function>gtk_text_buffer_delete_mark()</function></link>.</para>
<refsect3 id="GtkTextBuffer-mark-deleted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mark</para></entry>
<entry role="parameter_description"><para>The mark that was deleted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-mark-set" role="signal"><title>The <literal>“mark-set”</literal> signal</title>
<indexterm zone="GtkTextBuffer-mark-set"><primary>GtkTextBuffer::mark-set</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *location,
               <link linkend="GtkTextMark"><type>GtkTextMark</type></link>   *mark,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-mark-set"><type>“mark-set”</type></link> signal is emitted as notification
after a <link linkend="GtkTextMark"><type>GtkTextMark</type></link> is set.</para>
<para>See also:

<link linkend="gtk-text-buffer-create-mark"><function>gtk_text_buffer_create_mark()</function></link>,
<link linkend="gtk-text-buffer-move-mark"><function>gtk_text_buffer_move_mark()</function></link>.</para>
<refsect3 id="GtkTextBuffer-mark-set.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>location</para></entry>
<entry role="parameter_description"><para>The location of <parameter>mark</parameter>
in <parameter>textbuffer</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mark</para></entry>
<entry role="parameter_description"><para>The mark that is set</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-modified-changed" role="signal"><title>The <literal>“modified-changed”</literal> signal</title>
<indexterm zone="GtkTextBuffer-modified-changed"><primary>GtkTextBuffer::modified-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-modified-changed"><type>“modified-changed”</type></link> signal is emitted when the modified bit of a

<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> flips.</para>
<para>See also:
<link linkend="gtk-text-buffer-set-modified"><function>gtk_text_buffer_set_modified()</function></link>.</para>
<refsect3 id="GtkTextBuffer-modified-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-paste-done" role="signal"><title>The <literal>“paste-done”</literal> signal</title>
<indexterm zone="GtkTextBuffer-paste-done"><primary>GtkTextBuffer::paste-done</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GdkClipboard"><type>GdkClipboard</type></link>  *clipboard,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The paste-done signal is emitted after paste operation has been completed.
This is useful to properly scroll the view to the end of the pasted text.
See <link linkend="gtk-text-buffer-paste-clipboard"><function>gtk_text_buffer_paste_clipboard()</function></link> for more details.</para>
<refsect3 id="GtkTextBuffer-paste-done.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clipboard</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkClipboard"><type>GdkClipboard</type></link> pasted from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-redo" role="signal"><title>The <literal>“redo”</literal> signal</title>
<indexterm zone="GtkTextBuffer-redo"><primary>GtkTextBuffer::redo</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The "redo" signal is emitted when a request has been made to redo the
previously undone operation.</para>
<refsect3 id="GtkTextBuffer-redo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-remove-tag" role="signal"><title>The <literal>“remove-tag”</literal> signal</title>
<indexterm zone="GtkTextBuffer-remove-tag"><primary>GtkTextBuffer::remove-tag</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *textbuffer,
               <link linkend="GtkTextTag"><type>GtkTextTag</type></link>    *tag,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *start,
               <link linkend="GtkTextIter"><type>GtkTextIter</type></link>   *end,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The <link linkend="GtkTextBuffer-remove-tag"><type>“remove-tag”</type></link> signal is emitted to remove all occurrences
of <parameter>tag</parameter>
 from a range of text in a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>.

Removal actually occurs in the default handler.</para>
<para>Note that if your handler runs before the default handler it must not

invalidate the <parameter>start</parameter>
 and <parameter>end</parameter>
 iters (or has to revalidate them). </para>
<para>See also:

<link linkend="gtk-text-buffer-remove-tag"><function>gtk_text_buffer_remove_tag()</function></link>.</para>
<refsect3 id="GtkTextBuffer-remove-tag.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>textbuffer</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tag</para></entry>
<entry role="parameter_description"><para>the tag to be removed</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>the start of the range the tag is removed from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>the end of the range the tag is removed from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTextBuffer-undo" role="signal"><title>The <literal>“undo”</literal> signal</title>
<indexterm zone="GtkTextBuffer-undo"><primary>GtkTextBuffer::undo</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link> *buffer,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The "undo" signal is emitted when a request has been made to undo the
previous operation or set of operations that have been grouped together.</para>
<refsect3 id="GtkTextBuffer-undo.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkTextBuffer.see-also">
<title>See Also</title>
<para><link linkend="GtkTextView"><type>GtkTextView</type></link>, <link linkend="GtkTextIter"><type>GtkTextIter</type></link>, <link linkend="GtkTextMark"><type>GtkTextMark</type></link></para>

</refsect1>

</refentry>
