<root>
<enum name="GtkSourceBackgroundPatternType">
<description>
Since: 3.16

</description>
<parameters>
<parameter name="GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE">
<parameter_description> no pattern
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_BACKGROUND_PATTERN_TYPE_GRID">
<parameter_description> grid pattern
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceBracketMatchType">
<description>

</description>
<parameters>
<parameter name="GTK_SOURCE_BRACKET_MATCH_NONE">
<parameter_description> there is no bracket to match.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_BRACKET_MATCH_OUT_OF_RANGE">
<parameter_description> matching a bracket
failed because the maximum range was reached.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_BRACKET_MATCH_NOT_FOUND">
<parameter_description> a matching bracket was not found.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_BRACKET_MATCH_FOUND">
<parameter_description> a matching bracket was found.
</parameter_description>
</parameter>
</parameters>
</enum>

<signal name="GtkSourceBuffer::bracket-matched">
<description>
@iter is set to a valid iterator pointing to the matching bracket
if @state is %GTK_SOURCE_BRACKET_MATCH_FOUND. Otherwise @iter is
meaningless.

The signal is emitted only when the @state changes, typically when
the cursor moves.

A use-case for this signal is to show messages in a #GtkStatusbar.

Since: 2.12

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> if found, the location of the matching bracket.
</parameter_description>
</parameter>
<parameter name="state">
<parameter_description> state of bracket matching.
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceBuffer::highlight-updated">
<description>
The ::highlight-updated signal is emitted when the syntax
highlighting is updated in a certain region of the @buffer. This
signal is useful to be notified when a context class region is
updated (e.g. the no-spell-check context class).

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the buffer that received the signal
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> the start of the updated region
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> the end of the updated region
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceBuffer::redo">
<description>
The ::redo signal is emitted to redo the last undo operation.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the buffer that received the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceBuffer::source-mark-updated">
<description>
The ::source-mark-updated signal is emitted each time
a mark is added to, moved or removed from the @buffer.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the buffer that received the signal
</parameter_description>
</parameter>
<parameter name="mark">
<parameter_description> the #GtkSourceMark
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceBuffer::undo">
<description>
The ::undo signal is emitted to undo the last user action which
modified the buffer.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the buffer that received the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<enum name="GtkSourceChangeCaseType">
<description>
Since: 3.12

</description>
<parameters>
<parameter name="GTK_SOURCE_CHANGE_CASE_LOWER">
<parameter_description> change case to lowercase.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_CHANGE_CASE_UPPER">
<parameter_description> change case to uppercase.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_CHANGE_CASE_TOGGLE">
<parameter_description> toggle case of each character.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_CHANGE_CASE_TITLE">
<parameter_description> capitalize each word.
</parameter_description>
</parameter>
</parameters>
</enum>

<signal name="GtkSourceCompletion::activate-proposal">
<description>
The #GtkSourceCompletion::activate-proposal signal is a
keybinding signal which gets emitted when the user initiates
a proposal activation.

Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the proposal
activation programmatically.

</description>
<parameters>
<parameter name="completion">
<parameter_description> The #GtkSourceCompletion who emits the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceCompletion::hide">
<description>
Emitted when the completion window is hidden. The default handler
will actually hide the window.

</description>
<parameters>
<parameter name="completion">
<parameter_description> The #GtkSourceCompletion who emits the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceCompletion::move-cursor">
<description>
The #GtkSourceCompletion::move-cursor signal is a keybinding
signal which gets emitted when the user initiates a cursor
movement.

The &lt;keycap&gt;Up&lt;/keycap&gt;, &lt;keycap&gt;Down&lt;/keycap&gt;,
&lt;keycap&gt;PageUp&lt;/keycap&gt;, &lt;keycap&gt;PageDown&lt;/keycap&gt;,
&lt;keycap&gt;Home&lt;/keycap&gt; and &lt;keycap&gt;End&lt;/keycap&gt; keys are bound to the
normal behavior expected by those keys.

When @step is equal to %GTK_SCROLL_PAGES, the page size is defined by
the #GtkSourceCompletion:proposal-page-size property. It is used for
the &lt;keycap&gt;PageDown&lt;/keycap&gt; and &lt;keycap&gt;PageUp&lt;/keycap&gt; keys.

Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.

</description>
<parameters>
<parameter name="completion">
<parameter_description> The #GtkSourceCompletion who emits the signal
</parameter_description>
</parameter>
<parameter name="step">
<parameter_description> The #GtkScrollStep by which to move the cursor
</parameter_description>
</parameter>
<parameter name="num">
<parameter_description> The amount of steps to move the cursor
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceCompletion::move-page">
<description>
The #GtkSourceCompletion::move-page signal is a keybinding
signal which gets emitted when the user initiates a page
movement (i.e. switches between provider pages).

&lt;keycombo&gt;&lt;keycap&gt;Control&lt;/keycap&gt;&lt;keycap&gt;Left&lt;/keycap&gt;&lt;/keycombo&gt;
is for going to the previous provider.
&lt;keycombo&gt;&lt;keycap&gt;Control&lt;/keycap&gt;&lt;keycap&gt;Right&lt;/keycap&gt;&lt;/keycombo&gt;
is for going to the next provider.
&lt;keycombo&gt;&lt;keycap&gt;Control&lt;/keycap&gt;&lt;keycap&gt;Home&lt;/keycap&gt;&lt;/keycombo&gt;
is for displaying all the providers.
&lt;keycombo&gt;&lt;keycap&gt;Control&lt;/keycap&gt;&lt;keycap&gt;End&lt;/keycap&gt;&lt;/keycombo&gt;
is for going to the last provider.

When @step is equal to #GTK_SCROLL_PAGES, the page size is defined by
the #GtkSourceCompletion:provider-page-size property.

Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the page selection
programmatically.

</description>
<parameters>
<parameter name="completion">
<parameter_description> The #GtkSourceCompletion who emits the signal
</parameter_description>
</parameter>
<parameter name="step">
<parameter_description> The #GtkScrollStep by which to move the page
</parameter_description>
</parameter>
<parameter name="num">
<parameter_description> The amount of steps to move the page
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceCompletion::populate-context">
<description>
Emitted just before starting to populate the completion with providers.
You can use this signal to add additional attributes in the context.

</description>
<parameters>
<parameter name="completion">
<parameter_description> The #GtkSourceCompletion who emits the signal
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> The #GtkSourceCompletionContext for the current completion
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceCompletion::show">
<description>
Emitted when the completion window is shown. The default handler
will actually show the window.

</description>
<parameters>
<parameter name="completion">
<parameter_description> The #GtkSourceCompletion who emits the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<enum name="GtkSourceCompletionActivation">
<description>

</description>
<parameters>
<parameter name="GTK_SOURCE_COMPLETION_ACTIVATION_NONE">
<parameter_description> None.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE">
<parameter_description> Interactive activation. By
default, it occurs on each insertion in the #GtkTextBuffer. This can be
blocked temporarily with gtk_source_completion_block_interactive().
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED">
<parameter_description> User requested activation.
By default, it occurs when the user presses
&lt;keycombo&gt;&lt;keycap&gt;Control&lt;/keycap&gt;&lt;keycap&gt;space&lt;/keycap&gt;&lt;/keycombo&gt;.
</parameter_description>
</parameter>
</parameters>
</enum>

<signal name="GtkSourceCompletionContext::cancelled">
<description>
Emitted when the current population of proposals has been cancelled.
Providers adding proposals asynchronously should connect to this signal
to know when to cancel running proposal queries.

</description>
<parameters>
</parameters>
<return></return>
</signal>

<enum name="GtkSourceCompletionError">
<description>
An error code used with %GTK_SOURCE_COMPLETION_ERROR in a #GError returned
from a completion-related function.

</description>
<parameters>
<parameter name="GTK_SOURCE_COMPLETION_ERROR_ALREADY_BOUND">
<parameter_description> The #GtkSourceCompletionProvider
is already bound to the #GtkSourceCompletion object.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_COMPLETION_ERROR_NOT_BOUND">
<parameter_description> The #GtkSourceCompletionProvider is
not bound to the #GtkSourceCompletion object.
</parameter_description>
</parameter>
</parameters>
</enum>

<signal name="GtkSourceCompletionInfo::before-show">
<description>
This signal is emitted before any &quot;show&quot; management. You can connect
to this signal if you want to change some properties or position
before the real &quot;show&quot;.

Deprecated: 3.10: This signal should not be used.

</description>
<parameters>
<parameter name="info">
<parameter_description> The #GtkSourceCompletionInfo who emits the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceCompletionProposal::changed">
<description>
Emitted when the proposal has changed. The completion popup
will react to this by updating the shown information.


</description>
<parameters>
<parameter name="proposal">
<parameter_description> The #GtkSourceCompletionProposal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<enum name="GtkSourceCompressionType">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="GTK_SOURCE_COMPRESSION_TYPE_NONE">
<parameter_description> plain text.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_COMPRESSION_TYPE_GZIP">
<parameter_description> gzip compression.
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceDrawSpacesFlags">
<description>
GtkSourceDrawSpacesFlags determine what kind of spaces whould be drawn. If none
of GTK_SOURCE_DRAW_SPACES_LEADING, GTK_SOURCE_DRAW_SPACES_TEXT or
GTK_SOURCE_DRAW_SPACES_TRAILING is specified, whitespaces at any position in
the line will be drawn (i.e. it has the same effect as specifying all of them).

</description>
<parameters>
<parameter name="GTK_SOURCE_DRAW_SPACES_SPACE">
<parameter_description> whether the space character should be drawn.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_DRAW_SPACES_TAB">
<parameter_description> whether the tab character should be drawn.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_DRAW_SPACES_NEWLINE">
<parameter_description> whether the line breaks should be drawn.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_DRAW_SPACES_NBSP">
<parameter_description> whether the non-breaking whitespaces should be drawn.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_DRAW_SPACES_LEADING">
<parameter_description> whether leading whitespaces should be drawn.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_DRAW_SPACES_TEXT">
<parameter_description> whether whitespaces inside text should be drawn.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_DRAW_SPACES_TRAILING">
<parameter_description> whether trailing whitespaces should be drawn.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_DRAW_SPACES_ALL">
<parameter_description> wheter all kind of spaces should be drawn.
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceFileLoaderError">
<description>
An error code used with the %GTK_SOURCE_FILE_LOADER_ERROR domain.

</description>
<parameters>
<parameter name="GTK_SOURCE_FILE_LOADER_ERROR_TOO_BIG">
<parameter_description> The file is too big.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_FILE_LOADER_ERROR_ENCODING_AUTO_DETECTION_FAILED">
<parameter_description> It is not
possible to detect the encoding automatically.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_FILE_LOADER_ERROR_CONVERSION_FALLBACK">
<parameter_description> There was an encoding
conversion error and it was needed to use a fallback character.
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceFileSaverError">
<description>
An error code used with the %GTK_SOURCE_FILE_SAVER_ERROR domain.
Since: 3.14

</description>
<parameters>
<parameter name="GTK_SOURCE_FILE_SAVER_ERROR_INVALID_CHARS">
<parameter_description> The buffer contains invalid
characters.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_FILE_SAVER_ERROR_EXTERNALLY_MODIFIED">
<parameter_description> The file is externally
modified.
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceFileSaverFlags">
<description>
Flags to define the behavior of a #GtkSourceFileSaver.
Since: 3.14

</description>
<parameters>
<parameter name="GTK_SOURCE_FILE_SAVER_FLAGS_NONE">
<parameter_description> No flags.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_FILE_SAVER_FLAGS_IGNORE_INVALID_CHARS">
<parameter_description> Ignore invalid characters.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_FILE_SAVER_FLAGS_IGNORE_MODIFICATION_TIME">
<parameter_description> Save file despite external modifications.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_FILE_SAVER_FLAGS_CREATE_BACKUP">
<parameter_description> Create a backup before saving the file.
</parameter_description>
</parameter>
</parameters>
</enum>

<signal name="GtkSourceGutterRenderer::activate">
<description>
The ::activate signal is emitted when the renderer is
activated.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> the #GtkSourceGutterRenderer who emits the signal
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="area">
<parameter_description> a #GdkRectangle
</parameter_description>
</parameter>
<parameter name="event">
<parameter_description> the event that caused the activation
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceGutterRenderer::query-activatable">
<description>
The ::query-activatable signal is emitted when the renderer
can possibly be activated.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> the #GtkSourceGutterRenderer who emits the signal
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="area">
<parameter_description> a #GdkRectangle
</parameter_description>
</parameter>
<parameter name="event">
<parameter_description> the #GdkEvent that is causing the activatable query
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceGutterRenderer::query-data">
<description>
The ::query-data signal is emitted when the renderer needs
to be filled with data just before a cell is drawn. This can
be used by general renderer implementations to allow render
data to be filled in externally.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> the #GtkSourceGutterRenderer who emits the signal
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="state">
<parameter_description> the renderer state
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceGutterRenderer::query-tooltip">
<description>
The ::query-tooltip signal is emitted when the renderer can
show a tooltip.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> the #GtkSourceGutterRenderer who emits the signal
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="area">
<parameter_description> a #GdkRectangle
</parameter_description>
</parameter>
<parameter name="x">
<parameter_description> the x position (in window coordinates)
</parameter_description>
</parameter>
<parameter name="y">
<parameter_description> the y position (in window coordinates)
</parameter_description>
</parameter>
<parameter name="tooltip">
<parameter_description> a #GtkTooltip
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceGutterRenderer::queue-draw">
<description>
The ::queue-draw signal is emitted when the renderer needs
to be redrawn. Use gtk_source_gutter_renderer_queue_draw()
to emit this signal from an implementation of the
#GtkSourceGutterRenderer interface.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> the #GtkSourceGutterRenderer who emits the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<enum name="GtkSourceGutterRendererAlignmentMode">
<description>
The alignment mode of the renderer, when a cell spans multiple lines (due to
text wrapping).

</description>
<parameters>
<parameter name="GTK_SOURCE_GUTTER_RENDERER_ALIGNMENT_MODE_CELL">
<parameter_description> The full cell.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_GUTTER_RENDERER_ALIGNMENT_MODE_FIRST">
<parameter_description> The first line.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_GUTTER_RENDERER_ALIGNMENT_MODE_LAST">
<parameter_description> The last line.
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceGutterRendererState">
<description>

</description>
<parameters>
<parameter name="GTK_SOURCE_GUTTER_RENDERER_STATE_NORMAL">
<parameter_description> normal state
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_GUTTER_RENDERER_STATE_CURSOR">
<parameter_description> area in the renderer represents the
line on which the insert cursor is currently positioned
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_GUTTER_RENDERER_STATE_PRELIT">
<parameter_description> the mouse pointer is currently
over the activatable area of the renderer
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_GUTTER_RENDERER_STATE_SELECTED">
<parameter_description> area in the renderer represents
a line in the buffer which contains part of the selection
</parameter_description>
</parameter>
</parameters>
</enum>

<signal name="GtkSourceMarkAttributes::query-tooltip-markup">
<description>
The code should connect to this signal to provide a tooltip for given
@mark. The tooltip can contain a markup.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> The #GtkSourceMarkAttributes which emits the signal.
</parameter_description>
</parameter>
<parameter name="mark">
<parameter_description> The #GtkSourceMark.
</parameter_description>
</parameter>
</parameters>
<return> A tooltip. The string should be freed with
g_free() when done with it.
</return>
</signal>

<signal name="GtkSourceMarkAttributes::query-tooltip-text">
<description>
The code should connect to this signal to provide a tooltip for given
@mark. The tooltip should be just a plain text.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> The #GtkSourceMarkAttributes which emits the signal.
</parameter_description>
</parameter>
<parameter name="mark">
<parameter_description> The #GtkSourceMark.
</parameter_description>
</parameter>
</parameters>
<return> A tooltip. The string should be freed with
g_free() when done with it.
</return>
</signal>

<enum name="GtkSourceNewlineType">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="GTK_SOURCE_NEWLINE_TYPE_LF">
<parameter_description> line feed, used on UNIX.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_NEWLINE_TYPE_CR">
<parameter_description> carriage return, used on Mac.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_NEWLINE_TYPE_CR_LF">
<parameter_description> carriage return followed by a line feed, used
on Windows.
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceSmartHomeEndType">
<description>

</description>
<parameters>
<parameter name="GTK_SOURCE_SMART_HOME_END_DISABLED">
<parameter_description> smart-home-end disabled.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_SMART_HOME_END_BEFORE">
<parameter_description> move to the first/last
non-whitespace character on the first press of the HOME/END keys and
to the beginning/end of the line on the second press.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_SMART_HOME_END_AFTER">
<parameter_description> move to the beginning/end of the
line on the first press of the HOME/END keys and to the first/last
non-whitespace character on the second press.
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_SMART_HOME_END_ALWAYS">
<parameter_description> always move to the first/last
non-whitespace character when the HOME/END keys are pressed.
</parameter_description>
</parameter>
</parameters>
</enum>

<enum name="GtkSourceSortFlags">
<description>
Since: 3.18

</description>
<parameters>
<parameter name="GTK_SOURCE_SORT_FLAGS_NONE">
<parameter_description> no flags specified
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_SORT_FLAGS_CASE_SENSITIVE">
<parameter_description> case sensitive sort
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_SORT_FLAGS_REVERSE_ORDER">
<parameter_description> sort in reverse order
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_SORT_FLAGS_REMOVE_DUPLICATES">
<parameter_description> remove duplicates
</parameter_description>
</parameter>
</parameters>
</enum>

<signal name="GtkSourceUndoManager::can-redo-changed">
<description>
Emitted when the ability to redo has changed.

Since: 2.10


</description>
<parameters>
<parameter name="manager">
<parameter_description> The #GtkSourceUndoManager
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceUndoManager::can-undo-changed">
<description>
Emitted when the ability to undo has changed.

Since: 2.10


</description>
<parameters>
<parameter name="manager">
<parameter_description> The #GtkSourceUndoManager
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::change-case">
<description>
Keybinding signal to change case of the text at the current cursor position.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView
</parameter_description>
</parameter>
<parameter name="case_type">
<parameter_description> the case to use
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::change-number">
<description>
Keybinding signal to edit a number at the current cursor position.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView
</parameter_description>
</parameter>
<parameter name="count">
<parameter_description> the number to add to the number at the current position
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::join-lines">
<description>
Keybinding signal to join the lines currently selected.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::line-mark-activated">
<description>
Emitted when a line mark has been activated (for instance when there
was a button press in the line marks gutter). You can use @iter to
determine on which line the activation took place.

</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="event">
<parameter_description> the #GdkEvent that activated the event
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::move-lines">
<description>
The ::move-lines signal is a keybinding which gets emitted
when the user initiates moving a line. The default binding key
is Alt+Up/Down arrow. And moves the currently selected lines,
or the current line by @count. For the moment, only
@count of -1 or 1 is valid.

Since: 2.10


</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView which received the signal
</parameter_description>
</parameter>
<parameter name="copy">
<parameter_description> %TRUE if the line should be copied,
%FALSE if it should be moved
</parameter_description>
</parameter>
<parameter name="count">
<parameter_description> the number of lines to move over.
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::move-to-matching-bracket">
<description>
Keybinding signal to move the cursor to the matching bracket.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView
</parameter_description>
</parameter>
<parameter name="extend_selection">
<parameter_description> %TRUE if the move should extend the selection
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::move-words">
<description>
The ::move-words signal is a keybinding which gets emitted
when the user initiates moving a word. The default binding key
is Alt+Left/Right Arrow and moves the current selection, or the current
word by one word.

Since: 3.0

</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView which received the signal
</parameter_description>
</parameter>
<parameter name="count">
<parameter_description> the number of words to move over
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::show-completion">
<description>
The ::show-completion signal is a key binding signal which gets
emitted when the user requests a completion, by pressing
&lt;keycombo&gt;&lt;keycap&gt;Control&lt;/keycap&gt;&lt;keycap&gt;space&lt;/keycap&gt;&lt;/keycombo&gt;.

This will create a #GtkSourceCompletionContext with the activation
type as %GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED.

Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to activate the completion by
another means, for example with another key binding or a menu entry.

</description>
<parameters>
<parameter name="view">
<parameter_description> The #GtkSourceView who emits the signal
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<signal name="GtkSourceView::smart-home-end">
<description>
Emitted when a the cursor was moved according to the smart home
end setting. The signal is emitted after the cursor is moved, but
during the GtkTextView::move-cursor action. This can be used to find
out whether the cursor was moved by a normal home/end or by a smart
home/end.

Since: 3.0

</description>
<parameters>
<parameter name="view">
<parameter_description> the #GtkSourceView
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="count">
<parameter_description> the count
</parameter_description>
</parameter>
</parameters>
<return></return>
</signal>

<enum name="GtkSourceViewGutterPosition">
<description>

</description>
<parameters>
<parameter name="GTK_SOURCE_VIEW_GUTTER_POSITION_LINES">
<parameter_description> the gutter position of the lines
renderer
</parameter_description>
</parameter>
<parameter name="GTK_SOURCE_VIEW_GUTTER_POSITION_MARKS">
<parameter_description> the gutter position of the marks
renderer
</parameter_description>
</parameter>
</parameters>
</enum>

<function name="add_invalid">
<description>
Inserts segment into the list of invalid segments.
Called whenever new invalid segment is created or when
a segment is marked invalid.

</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="segment">
<parameter_description> segment.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="all_analyzed">
<description>

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return> whether everything is analyzed (but it doesn't care about the tags).
</return>
</function>

<function name="analyze_line">
<description>
Finds contexts at the line and updates the syntax tree on it.


</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="state">
<parameter_description> the state at the beginning of line.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> the line.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> a child of @state around start of line, to make it faster.
</parameter_description>
</parameter>
</parameters>
<return> starting state at the next line.
</return>
</function>

<function name="ancestor_context_ends_here">
<description>
Verifies if some ancestor context ends at the current position.
This function only checks conetxts and does not modify the tree,
it's used by ancestor_ends_here().


</description>
<parameters>
<parameter name="state">
<parameter_description> current context.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> the line to analyze.
</parameter_description>
</parameter>
<parameter name="line_pos">
<parameter_description> the position inside @line, bytes.
</parameter_description>
</parameter>
</parameters>
<return> the ancestor context that terminates here or %NULL.
</return>
</function>

<function name="ancestor_ends_here">
<description>
Verifies if some ancestor context ends at given position. If
state changed and @new_state is not %NULL, then the new state is stored
in @new_state, and descendants of @new_state are closed, so the
terminating segment becomes current state.


</description>
<parameters>
<parameter name="state">
<parameter_description> current state.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> the line to analyze.
</parameter_description>
</parameter>
<parameter name="line_pos">
<parameter_description> the position inside @line, bytes.
</parameter_description>
</parameter>
<parameter name="new_state">
<parameter_description> where to store the new state.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if an ancestor ends at the given position.
</return>
</function>

<function name="apply_match">
<description>
Moves @line_pos after the matched text. @line_pos is not
updated and the function returns %FALSE if the match cannot be
applied because an ancestor ends in the middle of the matched
text.

If the match can be applied the function applies the appropriate
sub patterns.


</description>
<parameters>
<parameter name="state">
<parameter_description> the current state of the parser.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> the line to analyze.
</parameter_description>
</parameter>
<parameter name="line_pos">
<parameter_description> position in the line, bytes.
</parameter_description>
</parameter>
<parameter name="regex">
<parameter_description> regex that matched.
</parameter_description>
</parameter>
<parameter name="where">
<parameter_description> kind of sub patterns to apply.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the match can be applied.
</return>
</function>

<function name="apply_sub_patterns">
<description>
Applies sub patterns of kind @where to the matched text.

</description>
<parameters>
<parameter name="contextstate">
<parameter_description> a #Context.
</parameter_description>
</parameter>
<parameter name="line_starts_at">
<parameter_description> beginning offset of the line.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> the line to analyze.
</parameter_description>
</parameter>
<parameter name="line_pos">
<parameter_description> the position inside @line.
</parameter_description>
</parameter>
<parameter name="line_length">
<parameter_description> the length of @line.
</parameter_description>
</parameter>
<parameter name="regex">
<parameter_description> regex that matched.
</parameter_description>
</parameter>
<parameter name="where">
<parameter_description> kind of sub patterns to apply.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="can_apply_match">
<description>
See apply_match(), this function is a helper function
called from where, it doesn't modify syntax tree.


</description>
<parameters>
<parameter name="state">
<parameter_description> the current state of the parser.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> the line to analyze.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> start position of match, bytes.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> where to put end of match, bytes.
</parameter_description>
</parameter>
<parameter name="where">
<parameter_description> kind of sub patterns to apply.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the match can be applied.
</return>
</function>

<function name="check_line_end">
<description>
Closes the contexts that cannot contain end of lines if needed.
Updates hint if new state is different from @state.


</description>
<parameters>
<parameter name="state">
<parameter_description> current state.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> child of @state used in analyze_line() and next_segment().
</parameter_description>
</parameter>
</parameters>
<return> the new state.
</return>
</function>

<function name="child_starts_here">
<description>
Verifies if a context of the type in @curr_definition starts at
@line_pos in @line. If the contexts start here @new_state and
@line_pos are updated.


</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="state">
<parameter_description> current state.
</parameter_description>
</parameter>
<parameter name="child_def">
<parameter_description> the child.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> line to analyze.
</parameter_description>
</parameter>
<parameter name="line_pos">
<parameter_description> the position inside @line, bytes.
</parameter_description>
</parameter>
<parameter name="new_state">
<parameter_description> where to store the new state.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the context starts here.
</return>
</function>

<function name="container_context_starts_here">
<description>
See child_starts_here().

</description>
<parameters>
</parameters>
<return></return>
</function>

<function name="context_freeze">
<description>
Recursively increments reference count in context and its children,
and marks them, so context_thaw is able to correctly decrement
reference count.
This function is for update_syntax: we want to preserve existing
contexts when possible, and update_syntax erases contexts from
reanalyzed lines; so to avoid destructing and recreating contexts
every time, we need to increment reference count on existing contexts,
and decrement it when we are done with analysis, so no more needed
contexts go away. Keeping a list of referenced contexts is painful
or slow, so we just reference all contexts present at the moment.

Note this is not reentrant, context_freeze()/context_thaw() pair is called
only from update_syntax().

</description>
<parameters>
<parameter name="context">
<parameter_description> the context.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="context_is_pure_container">
<description>
Checks whether context is a container with no start regex.
References to such contexts are implicitly translated to
wildcard references (context_id:*).

</description>
<parameters>
<parameter name="def">
<parameter_description> context definition.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="context_thaw">
<description>
Recursively decrements reference count in context and its children,
if it was incremented by context_freeze().

</description>
<parameters>
<parameter name="context">
<parameter_description> the context.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="context_unref">
<description>
Decreases reference count and removes @context
from the tree when it drops to zero.

</description>
<parameters>
<parameter name="context">
<parameter_description> the context.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="create_reg_all">
<description>
Creates regular expression for all possible transitions: it
combines terminating regex, terminating regexes of parent
contexts if those can terminate this one, and start regexes
of child contexts.

It takes as an argument actual context or a context definition. In
case when context end depends on start (\%{foo@start} references),
it must use the context, definition is not enough. If there are no
those references, then the reg_all is created right in the definition
when no contexts exist yet. This is why this function has its funny
arguments.


</description>
<parameters>
<parameter name="context">
<parameter_description> context.
</parameter_description>
</parameter>
<parameter name="definition">
<parameter_description> context definition.
</parameter_description>
</parameter>
</parameters>
<return> resulting regex or %NULL when pcre failed to compile the regex.
</return>
</function>

<function name="create_segment">
<description>
Creates a new segment and inserts it into the tree.


</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="parent">
<parameter_description> parent segment (%NULL for the root segment).
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> context for this segment (%NULL for invalid segments).
</parameter_description>
</parameter>
<parameter name="start_at">
<parameter_description> start offset, characters.
</parameter_description>
</parameter>
<parameter name="end_at">
<parameter_description> end offset, characters.
</parameter_description>
</parameter>
<parameter name="is_start">
<parameter_description> is_start flag.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> a segment somewhere near new one, to omtimize search.
</parameter_description>
</parameter>
</parameters>
<return> newly created segment.
</return>
</function>

<function name="delete_range_">
<description>
Updates segment tree after deletion: removes segments at deleted
interval, updates tree offsets, etc.
It's called only from update_tree().

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> the start of deleted area.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> the end of deleted area.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="destroy_tags_hash">
<description>
Destroys syntax tags cache.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="disable_syntax_analysis">
<description>
Dsiables highlighting in case of errors (currently if highlighting
a single line took too long, so that highlighting doesn't freeze
text editor).

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="enable_highlight">
<description>
Whether to highlight (i.e. apply tags) analyzed area.
Note that this does not turn on/off the analyzis stuff,
it affects only text tags.

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="enable">
<parameter_description> whether to enable highlighting.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="ensure_highlighted">
<description>
Updates text tags in reanalyzed parts of given area.
It applies tags according to whatever is in the syntax
tree currently, so highlighting may not be correct
(gtk_source_context_engine_update_highlight is the method
that actually ensures correct highlighting).

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> the beginning of the region to highlight.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> the end of the region to highlight.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="erase_segments">
<description>
Erases all non-toplevel segments in the interval
[@start, @end]. Its action on the tree is roughly
equivalent to segment_erase_range_(ce-&gt;priv-&gt;root_segment, start, end)
(but that does not accept toplevel segment).

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> start offset of region to erase, characters.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> end offset of region to erase, characters.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> segment around @start to make it faster.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="find_insertion_place">
<description>
After text is inserted, a new invalid segment is created and inserted
into the tree. This function finds an appropriate position for the new
segment. To make it faster, it uses hint and calls
find_insertion_place_forward_ or find_insertion_place_backward_ depending
on position of offset relative to hint.
There is no return value, it always succeeds (or crashes).

</description>
<parameters>
<parameter name="segment">
<parameter_description> the (grand)parent segment the new one should be inserted into.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> offset at which text is inserted.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> segment from which to start search (to avoid
walking whole tree).
</parameter_description>
</parameter>
<parameter name="parent">
<parameter_description> initialized with the parent of new segment.
</parameter_description>
</parameter>
<parameter name="prev">
<parameter_description> initialized with the previous sibling of new segment.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> a segment somewhere near insertion place to optimize search.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="find_insertion_place_backward_">
<description>
Auxiliary function used in find_insertion_place().

</description>
<parameters>
<parameter name="segment">
<parameter_description> the (grand)parent segment the new one should be inserted into.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> offset at which text is inserted.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> segment from which to start search (to avoid
walking whole tree).
</parameter_description>
</parameter>
<parameter name="parent">
<parameter_description> initialized with the parent of new segment.
</parameter_description>
</parameter>
<parameter name="prev">
<parameter_description> initialized with the previous sibling of new segment.
</parameter_description>
</parameter>
<parameter name="next">
<parameter_description> initialized with the next sibling of new segment.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="find_insertion_place_forward_">
<description>
Auxiliary function used in find_insertion_place().

</description>
<parameters>
<parameter name="segment">
<parameter_description> the (grand)parent segment the new one should be inserted into.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> offset at which text is inserted.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> segment from which to start search (to avoid
walking whole tree).
</parameter_description>
</parameter>
<parameter name="parent">
<parameter_description> initialized with the parent of new segment.
</parameter_description>
</parameter>
<parameter name="prev">
<parameter_description> initialized with the previous sibling of new segment.
</parameter_description>
</parameter>
<parameter name="next">
<parameter_description> initialized with the next sibling of new segment.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="find_segment_position">
<description>
Finds siblings of a new segment to be created at interval
(start_at, end_at). It uses hint to avoid walking whole
parent-&gt;children list.

</description>
<parameters>
<parameter name="parent">
<parameter_description> parent segment (not %NULL).
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> segment somewhere near new segment position.
</parameter_description>
</parameter>
<parameter name="start_at">
<parameter_description> start offset.
</parameter_description>
</parameter>
<parameter name="end_at">
<parameter_description> end offset.
</parameter_description>
</parameter>
<parameter name="prev">
<parameter_description> location to return previous sibling.
</parameter_description>
</parameter>
<parameter name="next">
<parameter_description> location to return next sibling.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="first_update_callback">
<description>
Same as idle_worker, except: it runs once, and install idle_worker
if not everything was analyzed at once.

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="fix_offset_delete_one_">
<description>

</description>
<parameters>
<parameter name="offset">
<parameter_description> segment.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> start of deleted text.
</parameter_description>
</parameter>
<parameter name="length">
<parameter_description> length of deleted text.
</parameter_description>
</parameter>
</parameters>
<return> new offset depending on location of @offset
relative to deleted text.
Called only from fix_offsets_delete_().
</return>
</function>

<function name="fix_offsets_delete_">
<description>
Recursively updates offsets after deleting text. To be called
only from delete_range_().

</description>
<parameters>
<parameter name="segment">
<parameter_description> segment.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> start offset.
</parameter_description>
</parameter>
<parameter name="length">
<parameter_description> length of deleted text.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> some segment somewhere near deleted text to optimize search.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="fix_offsets_insert_">
<description>
Recursively updates offsets after inserting text. To be called
only from insert_range().

</description>
<parameters>
<parameter name="segment">
<parameter_description> segment.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> start offset.
</parameter_description>
</parameter>
<parameter name="delta">
<parameter_description> length of inserted text.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="get_invalid_at">
<description>
Finds invalid segment adjacent to offset (i.e. such that start &lt;= offset &lt;= end),
if any.


</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> the offset.
</parameter_description>
</parameter>
</parameters>
<return> invalid segment or %NULL.
</return>
</function>

<function name="get_invalid_line">
<description>

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return> first invalid line, or -1.
</return>
</function>

<function name="get_invalid_segment">
<description>

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return> first invalid segment, or %NULL.
</return>
</function>

<function name="get_line_info">
<description>
Retrieves line text from the buffer, finds line terminator and fills
@line structure.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> #GtkTextBuffer.
</parameter_description>
</parameter>
<parameter name="line_start">
<parameter_description> iterator pointing to the beginning of line.
</parameter_description>
</parameter>
<parameter name="line_end">
<parameter_description> iterator pointing to the beginning of next line or to the end
of this line if it's the last line in @buffer.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> #LineInfo structure to be filled.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="get_segment_at_offset">
<description>
Finds the deepest segment &quot;at @offset&quot;.
More precisely, it returns toplevel segment if
@offset is equal to length of buffer; or non-zero-length
segment which contains character at @offset; or zero-length
segment at @offset. In case when there are several zero-length
segments, it returns the first one.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSoucreContextEngine.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> segment to start search from or %NULL.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> the offset, characters.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_backward_iter_to_source_mark">
<description>
Moves @iter to the position of the previous #GtkSourceMark of the given
category. Returns %TRUE if @iter was moved. If @category is NULL, the
previous source mark can be of any category.

Since: 2.2

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> an iterator.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> category to search for, or %NULL
</parameter_description>
</parameter>
</parameters>
<return> whether @iter was moved.

</return>
</function>

<function name="gtk_source_buffer_begin_not_undoable_action">
<description>
Marks the beginning of a not undoable action on the buffer,
disabling the undo manager.  Typically you would call this function
before initially setting the contents of the buffer (e.g. when
loading a file in a text editor).

You may nest gtk_source_buffer_begin_not_undoable_action() /
gtk_source_buffer_end_not_undoable_action() blocks.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_can_redo">
<description>
Determines whether a source buffer can redo the last action
(i.e. if the last operation was an undo).


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if a redo is possible.
</return>
</function>

<function name="gtk_source_buffer_can_undo">
<description>
Determines whether a source buffer can undo the last action.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if it's possible to undo the last action.
</return>
</function>

<function name="gtk_source_buffer_change_case">
<description>
Changes the case of the text between the specified iterators.

Since: 3.12

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="case_type">
<parameter_description> how to change the case.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_create_source_mark">
<description>
Creates a source mark in the @buffer of category @category.  A source mark is
a #GtkTextMark but organised into categories. Depending on the category
a pixbuf can be specified that will be displayed along the line of the mark.

Like a #GtkTextMark, a #GtkSourceMark can be anonymous if the
passed @name is %NULL.  Also, the buffer owns the marks so you
shouldn't unreference it.

Marks always have left gravity and are moved to the beginning of
the line when the user deletes the line they were in.

Typical uses for a source mark are bookmarks, breakpoints, current
executing instruction indication in a source file, etc..

Since: 2.2

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="name">
<parameter_description> the name of the mark, or %NULL.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a string defining the mark category.
</parameter_description>
</parameter>
<parameter name="where">
<parameter_description> location to place the mark.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceMark, owned by the buffer.

</return>
</function>

<function name="gtk_source_buffer_create_source_tag">
<description>
In short, this is the same function as gtk_text_buffer_create_tag(), but
instead of creating a #GtkTextTag, this function creates a #GtkSourceTag.

This function creates a #GtkSourceTag and adds it to the tag table for
@buffer.  Equivalent to calling gtk_text_tag_new() 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.

If @tag_name is %NULL, the tag is anonymous.

If @tag_name is non-%NULL, a tag called @tag_name must not already
exist in the tag table for this buffer.

The @first_property_name argument and subsequent arguments are a list
of properties to set on the tag, as with g_object_set().

Since: 3.20

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer
</parameter_description>
</parameter>
<parameter name="tag_name">
<parameter_description> name of the new tag, or %NULL
</parameter_description>
</parameter>
<parameter name="first_property_name">
<parameter_description> name of first property to set, or %NULL
</parameter_description>
</parameter>
<parameter name="Varargs">
<parameter_description> %NULL-terminated list of property names and values
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceTag.
</return>
</function>

<function name="gtk_source_buffer_end_not_undoable_action">
<description>
Marks the end of a not undoable action on the buffer.  When the
last not undoable block is closed through the call to this
function, the list of undo actions is cleared and the undo manager
is re-enabled.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_ensure_highlight">
<description>
Forces buffer to analyze and highlight the given area synchronously.

&lt;note&gt;
&lt;para&gt;
This is a potentially slow operation and should be used only
when you need to make sure that some text not currently
visible is highlighted, for instance before printing.
&lt;/para&gt;
&lt;/note&gt;

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> start of the area to highlight.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> end of the area to highlight.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_forward_iter_to_source_mark">
<description>
Moves @iter to the position of the next #GtkSourceMark of the given
@category. Returns %TRUE if @iter was moved. If @category is NULL, the
next source mark can be of any category.

Since: 2.2

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> an iterator.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> category to search for, or %NULL
</parameter_description>
</parameter>
</parameters>
<return> whether @iter was moved.

</return>
</function>

<function name="gtk_source_buffer_get_context_classes_at_iter">
<description>
Get all defined context classes at @iter.

See the #GtkSourceBuffer description for the list of default context classes.

Since: 2.10

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return> a new %NULL
terminated array of context class names.
Use g_strfreev() to free the array if it is no longer needed.

</return>
</function>

<function name="gtk_source_buffer_get_highlight_matching_brackets">
<description>
Determines whether bracket match highlighting is activated for the
source buffer.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the source buffer will highlight matching
brackets.
</return>
</function>

<function name="gtk_source_buffer_get_highlight_syntax">
<description>
Determines whether syntax highlighting is activated in the source
buffer.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if syntax highlighting is enabled, %FALSE otherwise.
</return>
</function>

<function name="gtk_source_buffer_get_implicit_trailing_newline">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> whether the @buffer has an implicit trailing newline.
</return>
</function>

<function name="gtk_source_buffer_get_language">
<description>
Returns the #GtkSourceLanguage associated with the buffer,
see gtk_source_buffer_set_language().  The returned object should not be
unreferenced by the user.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceLanguage associated
with the buffer, or %NULL.
</return>
</function>

<function name="gtk_source_buffer_get_max_undo_levels">
<description>
Determines the number of undo levels the buffer will track for buffer edits.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> the maximum number of possible undo levels or -1 if no limit is set.
</return>
</function>

<function name="gtk_source_buffer_get_source_marks_at_iter">
<description>
Returns the list of marks of the given category at @iter. If @category
is %NULL it returns all marks at @iter.

Since: 2.2

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> an iterator.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> category to search for, or %NULL
</parameter_description>
</parameter>
</parameters>
<return>
a newly allocated #GSList.

</return>
</function>

<function name="gtk_source_buffer_get_source_marks_at_line">
<description>
Returns the list of marks of the given category at @line.
If @category is %NULL, all marks at @line are returned.

Since: 2.2

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> a line number.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> category to search for, or %NULL
</parameter_description>
</parameter>
</parameters>
<return>
a newly allocated #GSList.

</return>
</function>

<function name="gtk_source_buffer_get_style_scheme">
<description>
Returns the #GtkSourceStyleScheme associated with the buffer,
see gtk_source_buffer_set_style_scheme().
The returned object should not be unreferenced by the user.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceStyleScheme
associated with the buffer, or %NULL.
</return>
</function>

<function name="gtk_source_buffer_get_undo_manager">
<description>
Returns the #GtkSourceUndoManager associated with the buffer,
see gtk_source_buffer_set_undo_manager().  The returned object should not be
unreferenced by the user.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceUndoManager associated
with the buffer, or %NULL.
</return>
</function>

<function name="gtk_source_buffer_iter_backward_to_context_class_toggle">
<description>
Moves backward to the next toggle (on or off) of the context class. If no
matching context class toggles are found, returns %FALSE, otherwise %TRUE.
Does not return toggles located at @iter, only toggles after @iter. Sets
@iter to the location of the toggle, or to the end of the buffer if no
toggle is found.

See the #GtkSourceBuffer description for the list of default context classes.

Since: 2.10

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="context_class">
<parameter_description> the context class.
</parameter_description>
</parameter>
</parameters>
<return> whether we found a context class toggle before @iter

</return>
</function>

<function name="gtk_source_buffer_iter_forward_to_context_class_toggle">
<description>
Moves forward to the next toggle (on or off) of the context class. If no
matching context class toggles are found, returns %FALSE, otherwise %TRUE.
Does not return toggles located at @iter, only toggles after @iter. Sets
@iter to the location of the toggle, or to the end of the buffer if no
toggle is found.

See the #GtkSourceBuffer description for the list of default context classes.

Since: 2.10

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="context_class">
<parameter_description> the context class.
</parameter_description>
</parameter>
</parameters>
<return> whether we found a context class toggle after @iter

</return>
</function>

<function name="gtk_source_buffer_iter_has_context_class">
<description>
Check if the class @context_class is set on @iter.

See the #GtkSourceBuffer description for the list of default context classes.

Since: 2.10

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="context_class">
<parameter_description> class to search for.
</parameter_description>
</parameter>
</parameters>
<return> whether @iter has the context class.
</return>
</function>

<function name="gtk_source_buffer_join_lines">
<description>
Joins the lines of text between the specified iterators.

Since: 3.16

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_new">
<description>
Creates a new source buffer.


</description>
<parameters>
<parameter name="table">
<parameter_description> a #GtkTextTagTable, or %NULL to create a new one.
</parameter_description>
</parameter>
</parameters>
<return> a new source buffer.
</return>
</function>

<function name="gtk_source_buffer_new_with_language">
<description>
Creates a new source buffer using the highlighting patterns in
@language.  This is equivalent to creating a new source buffer with
a new tag table and then calling gtk_source_buffer_set_language().


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return> a new source buffer which will highlight text
according to the highlighting patterns in @language.
</return>
</function>

<function name="gtk_source_buffer_redo">
<description>
Redoes the last undo operation.  Use gtk_source_buffer_can_redo()
to check whether a call to this function will have any effect.

This function emits the #GtkSourceBuffer::redo signal.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_remove_source_marks">
<description>
Remove all marks of @category between @start and @end from the buffer.
If @category is NULL, all marks in the range will be removed.

Since: 2.2

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> category to search for, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_highlight_matching_brackets">
<description>
Controls the bracket match highlighting function in the buffer.  If
activated, when you position your cursor over a bracket character
(a parenthesis, a square bracket, etc.) the matching opening or
closing bracket character will be highlighted.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="highlight">
<parameter_description> %TRUE if you want matching brackets highlighted.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_highlight_syntax">
<description>
Controls whether syntax is highlighted in the buffer.

If @highlight is %TRUE, the text will be highlighted according to the syntax
patterns specified in the #GtkSourceLanguage set with
gtk_source_buffer_set_language().

If @highlight is %FALSE, syntax highlighting is disabled and all the
#GtkTextTag objects that have been added by the syntax highlighting engine
are removed from the buffer.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="highlight">
<parameter_description> %TRUE to enable syntax highlighting, %FALSE to disable it.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_implicit_trailing_newline">
<description>
Sets whether the @buffer has an implicit trailing newline.

If an explicit trailing newline is present in a #GtkTextBuffer, #GtkTextView
shows it as an empty line. This is generally not what the user expects.

If @implicit_trailing_newline is %TRUE (the default value):
- when a #GtkSourceFileLoader loads the content of a file into the @buffer,
the trailing newline (if present in the file) is not inserted into the
@buffer.
- when a #GtkSourceFileSaver saves the content of the @buffer into a file, a
trailing newline is added to the file.

On the other hand, if @implicit_trailing_newline is %FALSE, the file's
content is not modified when loaded into the @buffer, and the @buffer's
content is not modified when saved into a file.

Since: 3.14

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="implicit_trailing_newline">
<parameter_description> the new value.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_language">
<description>
Associates a #GtkSourceLanguage with the buffer.

Note that a #GtkSourceLanguage affects not only the syntax highlighting, but
also the [context classes][context-classes]. If you want to disable just the
syntax highlighting, see gtk_source_buffer_set_highlight_syntax().

The buffer holds a reference to @language.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage to set, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_max_undo_levels">
<description>
Sets the number of undo levels for user actions the buffer will
track.  If the number of user actions exceeds the limit set by this
function, older actions will be discarded.

If @max_undo_levels is -1, the undo/redo is unlimited.

If @max_undo_levels is 0, the undo/redo is disabled.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="max_undo_levels">
<parameter_description> the desired maximum number of undo levels.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_style_scheme">
<description>
Sets a #GtkSourceStyleScheme to be used by the buffer and the view.

Note that a #GtkSourceStyleScheme affects not only the syntax highlighting,
but also other #GtkSourceView features such as highlighting the current line,
matching brackets, the line numbers, etc.

Instead of setting a %NULL @scheme, it is better to disable syntax
highlighting with gtk_source_buffer_set_highlight_syntax(), and setting the
#GtkSourceStyleScheme with the &quot;classic&quot; or &quot;tango&quot; ID, because those two
style schemes follow more closely the GTK+ theme (for example for the
background color).

The buffer holds a reference to @scheme.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_undo_manager">
<description>
Set the buffer undo manager. If @manager is %NULL the default undo manager
will be set.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="manager">
<parameter_description> A #GtkSourceUndoManager or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_sort_lines">
<description>
Sort the lines of text between the specified iterators.

Since: 3.18

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="flags">
<parameter_description> #GtkSourceSortFlags specifying how the sort should behave
</parameter_description>
</parameter>
<parameter name="column">
<parameter_description> sort considering the text starting at the given column
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_undo">
<description>
Undoes the last user action which modified the buffer.  Use
gtk_source_buffer_can_undo() to check whether a call to this
function will have any effect.

This function emits the #GtkSourceBuffer::undo signal.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_check_version">
<description>
Like GTK_SOURCE_CHECK_VERSION, but the check for gtk_source_check_version is
at runtime instead of compile time. This is useful for compiling
against older versions of GtkSourceView, but using features from newer
versions.

Since: 3.20

</description>
<parameters>
<parameter name="major">
<parameter_description> the major version to check
</parameter_description>
</parameter>
<parameter name="minor">
<parameter_description> the minor version to check
</parameter_description>
</parameter>
<parameter name="micro">
<parameter_description> the micro version to check
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the version of the GtkSourceView currently loaded
is the same as or newer than the passed-in version.

</return>
</function>

<function name="gtk_source_completion_add_provider">
<description>
Add a new #GtkSourceCompletionProvider to the completion object. This will
add a reference @provider, so make sure to unref your own copy when you
no longer need it.


</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @provider was successfully added, otherwise if @error
is provided, it will be set with the error and %FALSE is returned.
</return>
</function>

<function name="gtk_source_completion_block_interactive">
<description>
Block interactive completion. This can be used to disable interactive
completion when inserting or deleting text from the buffer associated with
the completion. Use gtk_source_completion_unblock_interactive() to enable
interactive completion again.

This function may be called multiple times. It will continue to block
interactive completion until gtk_source_completion_unblock_interactive()
has been called the same number of times.

</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_context_add_proposals">
<description>
Providers can use this function to add proposals to the completion. They
can do so asynchronously by means of the @finished argument. Providers must
ensure that they always call this function with @finished set to %TRUE
once each population (even if no proposals need to be added).
Population occurs when the gtk_source_completion_provider_populate()
function is called.

</description>
<parameters>
<parameter name="context">
<parameter_description> a #GtkSourceCompletionContext.
</parameter_description>
</parameter>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="proposals">
<parameter_description> The list of proposals to add.
</parameter_description>
</parameter>
<parameter name="finished">
<parameter_description> Whether the provider is finished adding proposals.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_context_get_activation">
<description>
Get the context activation.


</description>
<parameters>
<parameter name="context">
<parameter_description> a #GtkSourceCompletionContext.
</parameter_description>
</parameter>
</parameters>
<return> The context activation.
</return>
</function>

<function name="gtk_source_completion_context_get_iter">
<description>
Get the iter at which the completion was invoked. Providers can use this
to determine how and if to match proposals.


</description>
<parameters>
<parameter name="context">
<parameter_description> a #GtkSourceCompletionContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @iter is correctly set, %FALSE otherwise.
</return>
</function>

<function name="gtk_source_completion_create_context">
<description>
Create a new #GtkSourceCompletionContext for @completion. The position where
the completion occurs can be specified by @position. If @position is %NULL,
the current cursor position will be used.


</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
<parameter name="position">
<parameter_description> a #GtkTextIter, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceCompletionContext.
The reference being returned is a 'floating' reference,
so if you invoke gtk_source_completion_show() with this context
you don't need to unref it.
</return>
</function>

<function name="gtk_source_completion_get_info_window">
<description>
The info widget is the window where the completion displays optional extra
information of the proposal.


</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
</parameters>
<return> The #GtkSourceCompletionInfo window
associated with @completion.
</return>
</function>

<function name="gtk_source_completion_get_providers">
<description>
Get list of providers registered on @completion. The returned list is owned
by the completion and should not be freed.


</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
</parameters>
<return>
list of #GtkSourceCompletionProvider.
</return>
</function>

<function name="gtk_source_completion_get_view">
<description>
The #GtkSourceView associated with @completion, or %NULL if the view has been
destroyed.


</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
</parameters>
<return>
The #GtkSourceView associated with @completion, or %NULL.
</return>
</function>

<function name="gtk_source_completion_hide">
<description>
Hides the completion if it is active (visible).

</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_info_get_widget">
<description>
Get the current content widget.

Deprecated: 3.8: Use gtk_bin_get_child() instead.

</description>
<parameters>
<parameter name="info">
<parameter_description> a #GtkSourceCompletionInfo.
</parameter_description>
</parameter>
</parameters>
<return> The current content widget.

</return>
</function>

<function name="gtk_source_completion_info_move_to_iter">
<description>
Moves the #GtkSourceCompletionInfo to @iter. If @iter is %NULL @info is
moved to the cursor position. Moving will respect the #GdkGravity setting
of the info window and will ensure the line at @iter is not occluded by
the window.

</description>
<parameters>
<parameter name="info">
<parameter_description> a #GtkSourceCompletionInfo.
</parameter_description>
</parameter>
<parameter name="view">
<parameter_description> a #GtkTextView on which the info window should be positioned.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_info_new">
<description>

</description>
<parameters>
</parameters>
<return> a new GtkSourceCompletionInfo.
</return>
</function>

<function name="gtk_source_completion_info_set_widget">
<description>
Sets the content widget of the info window. See that the previous widget will
lose a reference and it can be destroyed, so if you do not want this to
happen you must use g_object_ref() before calling this method.

Deprecated: 3.8: Use gtk_container_add() instead. If there is already a child
widget, remove it with gtk_container_remove().

</description>
<parameters>
<parameter name="info">
<parameter_description> a #GtkSourceCompletionInfo.
</parameter_description>
</parameter>
<parameter name="widget">
<parameter_description> a #GtkWidget.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_item_new">
<description>
Create a new #GtkSourceCompletionItem with label @label, icon @icon and
extra information @info. Both @icon and @info can be %NULL in which case
there will be no icon shown and no extra information available.


</description>
<parameters>
<parameter name="label">
<parameter_description> The item label.
</parameter_description>
</parameter>
<parameter name="text">
<parameter_description> The item text.
</parameter_description>
</parameter>
<parameter name="icon">
<parameter_description> The item icon.
</parameter_description>
</parameter>
<parameter name="info">
<parameter_description> The item extra information.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceCompletionItem.
</return>
</function>

<function name="gtk_source_completion_item_new_from_stock">
<description>
Creates a new #GtkSourceCompletionItem from a stock item. If @label is %NULL,
the stock label will be used.

Deprecated: 3.10: Use gtk_source_completion_item_new() instead.

</description>
<parameters>
<parameter name="label">
<parameter_description> The item label.
</parameter_description>
</parameter>
<parameter name="text">
<parameter_description> The item text.
</parameter_description>
</parameter>
<parameter name="stock">
<parameter_description> The stock icon.
</parameter_description>
</parameter>
<parameter name="info">
<parameter_description> The item extra information.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceCompletionItem.
</return>
</function>

<function name="gtk_source_completion_item_new_with_markup">
<description>
Create a new #GtkSourceCompletionItem with markup label @markup, icon
@icon and extra information @info. Both @icon and @info can be %NULL in
which case there will be no icon shown and no extra information available.


</description>
<parameters>
<parameter name="markup">
<parameter_description> The item markup label.
</parameter_description>
</parameter>
<parameter name="text">
<parameter_description> The item text.
</parameter_description>
</parameter>
<parameter name="icon">
<parameter_description> The item icon.
</parameter_description>
</parameter>
<parameter name="info">
<parameter_description> The item extra information.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceCompletionItem.
</return>
</function>

<function name="gtk_source_completion_move_window">
<description>
Move the completion window to a specific iter.

Deprecated: 3.8: Use gtk_source_completion_provider_get_start_iter() instead.

</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_new">
<description>
Creates a new #GtkSourceCompletion associated with @view.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceCompletion.
</return>
</function>

<function name="gtk_source_completion_proposal_changed">
<description>
Emits the &quot;changed&quot; signal on @proposal. This should be called by
implementations whenever the name, icon or info of the proposal has
changed.

</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_proposal_equal">
<description>
Get whether two proposal objects are the same.  This is used to (together
with gtk_source_completion_proposal_hash()) to match proposals in the
completion model. By default, it uses direct equality (g_direct_equal()).


</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
<parameter name="other">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @proposal and @object are the same proposal
</return>
</function>

<function name="gtk_source_completion_proposal_get_gicon">
<description>
Gets the #GIcon for the icon of @proposal.

Since: 3.18

</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> A #GIcon with the icon of @proposal.

</return>
</function>

<function name="gtk_source_completion_proposal_get_icon">
<description>
Gets the #GdkPixbuf for the icon of @proposal.


</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> A #GdkPixbuf with the icon of @proposal.
</return>
</function>

<function name="gtk_source_completion_proposal_get_icon_name">
<description>
Gets the icon name of @proposal.

Since: 3.18

</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> The icon name of @proposal.

</return>
</function>

<function name="gtk_source_completion_proposal_get_info">
<description>
Gets extra information associated to the proposal. This information will be
used to present the user with extra, detailed information about the
selected proposal. The returned string must be freed with g_free().


</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> a newly-allocated string containing
extra information of @proposal or %NULL if no extra information is associated
to @proposal.
</return>
</function>

<function name="gtk_source_completion_proposal_get_label">
<description>
Gets the label of @proposal. The label is shown in the list of proposals as
plain text. If you need any markup (such as bold or italic text), you have
to implement gtk_source_completion_proposal_get_markup(). The returned string
must be freed with g_free().


</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the label of @proposal.
</return>
</function>

<function name="gtk_source_completion_proposal_get_markup">
<description>
Gets the label of @proposal with markup. The label is shown in the list of
proposals and may contain markup. This will be used instead of
gtk_source_completion_proposal_get_label() if implemented. The returned string
must be freed with g_free().


</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the label of @proposal with markup.
</return>
</function>

<function name="gtk_source_completion_proposal_get_text">
<description>
Gets the text of @proposal. The text that is inserted into
the text buffer when the proposal is activated by the default activation.
You are free to implement a custom activation handler in the provider and
not implement this function. For more information, see
gtk_source_completion_provider_activate_proposal(). The returned string must
be freed with g_free().


</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the text of @proposal.
</return>
</function>

<function name="gtk_source_completion_proposal_hash">
<description>
Get the hash value of @proposal. This is used to (together with
gtk_source_completion_proposal_equal()) to match proposals in the completion
model. By default, it uses a direct hash (g_direct_hash()).


</description>
<parameters>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> The hash value of @proposal.
</return>
</function>

<function name="gtk_source_completion_provider_activate_proposal">
<description>
Activate @proposal at @iter. When this functions returns %FALSE, the default
activation of @proposal will take place which replaces the word at @iter
with the text of @proposal (see gtk_source_completion_proposal_get_text()).

Here is how the default activation selects the boundaries of the word to
replace. The end of the word is @iter. For the start of the word, it depends
on whether a start iter is defined for @proposal (see
gtk_source_completion_provider_get_start_iter()). If a start iter is defined,
the start of the word is the start iter. Else, the word (as long as possible)
will contain only alphanumerical and the &quot;_&quot; characters.


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE to indicate that the proposal activation has been handled,
%FALSE otherwise.
</return>
</function>

<function name="gtk_source_completion_provider_get_activation">
<description>
Get with what kind of activation the provider should be activated.


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
</parameters>
<return> a combination of #GtkSourceCompletionActivation.
</return>
</function>

<function name="gtk_source_completion_provider_get_gicon">
<description>
Gets the #GIcon for the icon of @provider.

Since: 3.18

</description>
<parameters>
<parameter name="provider">
<parameter_description> The #GtkSourceCompletionProvider
</parameter_description>
</parameter>
</parameters>
<return> The icon to be used for the provider,
or %NULL if the provider does not have a special icon.

</return>
</function>

<function name="gtk_source_completion_provider_get_icon">
<description>
Get the #GdkPixbuf for the icon of the @provider.


</description>
<parameters>
<parameter name="provider">
<parameter_description> The #GtkSourceCompletionProvider
</parameter_description>
</parameter>
</parameters>
<return> The icon to be used for the provider,
or %NULL if the provider does not have a special icon.
</return>
</function>

<function name="gtk_source_completion_provider_get_icon_name">
<description>
Gets the icon name of @provider.

Since: 3.18

</description>
<parameters>
<parameter name="provider">
<parameter_description> The #GtkSourceCompletionProvider
</parameter_description>
</parameter>
</parameters>
<return> The icon name to be used for the provider,
or %NULL if the provider does not have a special icon.

</return>
</function>

<function name="gtk_source_completion_provider_get_info_widget">
<description>
Get a customized info widget to show extra information of a proposal.
This allows for customized widgets on a proposal basis, although in general
providers will have the same custom widget for all their proposals and
@proposal can be ignored. The implementation of this function is optional.

If this function is not implemented, the default widget is a #GtkLabel. The
return value of gtk_source_completion_proposal_get_info() is used as the
content of the #GtkLabel.

&lt;note&gt;
&lt;para&gt;
If implemented, gtk_source_completion_provider_update_info()
&lt;emphasis&gt;must&lt;/emphasis&gt; also be implemented.
&lt;/para&gt;
&lt;/note&gt;


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="proposal">
<parameter_description> a currently selected #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
</parameters>
<return> a custom #GtkWidget to show extra
information about @proposal, or %NULL if the provider does not have a special
info widget.
</return>
</function>

<function name="gtk_source_completion_provider_get_interactive_delay">
<description>
Get the delay in milliseconds before starting interactive completion for
this provider. A value of -1 indicates to use the default value as set
by the #GtkSourceCompletion:auto-complete-delay property.


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
</parameters>
<return> the interactive delay in milliseconds.
</return>
</function>

<function name="gtk_source_completion_provider_get_name">
<description>
Get the name of the provider. This should be a translatable name for
display to the user. For example: _(&quot;Document word completion provider&quot;). The
returned string must be freed with g_free().


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the name of the provider.
</return>
</function>

<function name="gtk_source_completion_provider_get_priority">
<description>
Get the provider priority. The priority determines the order in which
proposals appear in the completion popup. Higher priorities are sorted
before lower priorities. The default priority is 0.


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
</parameters>
<return> the provider priority.
</return>
</function>

<function name="gtk_source_completion_provider_get_start_iter">
<description>
Get the #GtkTextIter at which the completion for @proposal starts. When
implemented, this information is used to position the completion window
accordingly when a proposal is selected in the completion window. The
@proposal text inside the completion window is aligned on @iter.

If this function is not implemented, the word boundary is taken to position
the completion window. See gtk_source_completion_provider_activate_proposal()
for an explanation on the word boundaries.

When the @proposal is activated, the default handler uses @iter as the start
of the word to replace. See
gtk_source_completion_provider_activate_proposal() for more information.


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> a #GtkSourceCompletionContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @iter was set for @proposal, %FALSE otherwise.
</return>
</function>

<function name="gtk_source_completion_provider_match">
<description>
Get whether the provider match the context of completion detailed in
@context.


</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> a #GtkSourceCompletionContext.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @provider matches the completion context, %FALSE otherwise.
</return>
</function>

<function name="gtk_source_completion_provider_populate">
<description>
Populate @context with proposals from @provider added with the
gtk_source_completion_context_add_proposals() function.

</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> a #GtkSourceCompletionContext.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_provider_update_info">
<description>
Update extra information shown in @info for @proposal.

&lt;note&gt;
&lt;para&gt;
This function &lt;emphasis&gt;must&lt;/emphasis&gt; be implemented when
gtk_source_completion_provider_get_info_widget() is implemented.
&lt;/para&gt;
&lt;/note&gt;

</description>
<parameters>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="proposal">
<parameter_description> a #GtkSourceCompletionProposal.
</parameter_description>
</parameter>
<parameter name="info">
<parameter_description> a #GtkSourceCompletionInfo.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_remove_provider">
<description>
Remove @provider from the completion.


</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
<parameter name="provider">
<parameter_description> a #GtkSourceCompletionProvider.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @provider was successfully removed, otherwise if @error
is provided, it will be set with the error and %FALSE is returned.
</return>
</function>

<function name="gtk_source_completion_show">
<description>
Starts a new completion with the specified #GtkSourceCompletionContext and
a list of potential candidate providers for completion.

It can be convenient for showing a completion on-the-fly, without the need to
add or remove providers to the #GtkSourceCompletion.

Another solution is to add providers with
gtk_source_completion_add_provider(), and implement
gtk_source_completion_provider_match() for each provider.


</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
<parameter name="providers">
<parameter_description>
a list of #GtkSourceCompletionProvider, or %NULL.
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> The #GtkSourceCompletionContext
with which to start the completion.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if it was possible to the show completion window.
</return>
</function>

<function name="gtk_source_completion_unblock_interactive">
<description>
Unblock interactive completion. This can be used after using
gtk_source_completion_block_interactive() to enable interactive completion
again.

</description>
<parameters>
<parameter name="completion">
<parameter_description> a #GtkSourceCompletion.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_words_new">
<description>

</description>
<parameters>
<parameter name="name">
<parameter_description> The name for the provider, or %NULL.
</parameter_description>
</parameter>
<parameter name="icon">
<parameter_description> A specific icon for the provider, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceCompletionWords provider
</return>
</function>

<function name="gtk_source_completion_words_register">
<description>
Registers @buffer in the @words provider.

</description>
<parameters>
<parameter name="words">
<parameter_description> a #GtkSourceCompletionWords
</parameter_description>
</parameter>
<parameter name="buffer">
<parameter_description> a #GtkTextBuffer
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_words_unregister">
<description>
Unregisters @buffer from the @words provider.

</description>
<parameters>
<parameter name="words">
<parameter_description> a #GtkSourceCompletionWords
</parameter_description>
</parameter>
<parameter name="buffer">
<parameter_description> a #GtkTextBuffer
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_context_engine_attach_buffer">
<description>
Detaches engine from previous buffer, and attaches to @buffer if
it's not %NULL.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="buffer">
<parameter_description> buffer.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_context_engine_set_style_scheme">
<description>
GtkSourceEngine::set_style_scheme method.
Sets current style scheme, updates tag styles and everything.

</description>
<parameters>
<parameter name="engine">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="scheme">
<parameter_description> #GtkSourceStyleScheme to set.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_context_engine_text_deleted">
<description>
Called from GtkTextBuffer::delete_range.

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> the start of deleted text.
</parameter_description>
</parameter>
<parameter name="length">
<parameter_description> the length (in characters) of deleted text.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_context_engine_text_inserted">
<description>
Called from GtkTextBuffer::insert_text.

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="start_offset">
<parameter_description> the start of inserted text.
</parameter_description>
</parameter>
<parameter name="end_offset">
<parameter_description> the end of inserted text.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_context_engine_update_highlight">
<description>
GtkSourceEngine::update_highlight method.

Makes sure the area is analyzed and highlighted. If @synchronous
is %FALSE, then it queues idle worker.

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> start of area to update.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> start of area to update.
</parameter_description>
</parameter>
<parameter name="synchronous">
<parameter_description> whether it should block until everything
is analyzed/highlighted.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_encoding_copy">
<description>
Used by language bindings.

Since: 3.14

</description>
<parameters>
<parameter name="enc">
<parameter_description> a #GtkSourceEncoding.
</parameter_description>
</parameter>
</parameters>
<return> a copy of @enc.
</return>
</function>

<function name="gtk_source_encoding_free">
<description>
Used by language bindings.

Since: 3.14

</description>
<parameters>
<parameter name="enc">
<parameter_description> a #GtkSourceEncoding.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_encoding_get_all">
<description>
Gets all encodings.

Since: 3.14

</description>
<parameters>
</parameters>
<return> a list of
all #GtkSourceEncoding's. Free with g_slist_free().
</return>
</function>

<function name="gtk_source_encoding_get_charset">
<description>
Gets the character set of the #GtkSourceEncoding, such as &quot;UTF-8&quot; or
&quot;ISO-8859-1&quot;.

Since: 3.14

</description>
<parameters>
<parameter name="enc">
<parameter_description> a #GtkSourceEncoding.
</parameter_description>
</parameter>
</parameters>
<return> the character set of the #GtkSourceEncoding.
</return>
</function>

<function name="gtk_source_encoding_get_current">
<description>
Gets the #GtkSourceEncoding for the current locale. See also g_get_charset().

Since: 3.14

</description>
<parameters>
</parameters>
<return> the current locale encoding.
</return>
</function>

<function name="gtk_source_encoding_get_default_candidates">
<description>
Gets the list of default candidate encodings to try when loading a file. See
gtk_source_file_loader_set_candidate_encodings().

This function returns a different list depending on the current locale (i.e.
language, country and default encoding). The UTF-8 encoding and the current
locale encoding are guaranteed to be present in the returned list.

Since: 3.18

</description>
<parameters>
</parameters>
<return> the list of
default candidate encodings. Free with g_slist_free().
</return>
</function>

<function name="gtk_source_encoding_get_from_charset">
<description>
Gets a #GtkSourceEncoding from a character set such as &quot;UTF-8&quot; or
&quot;ISO-8859-1&quot;.

Since: 3.14

</description>
<parameters>
<parameter name="charset">
<parameter_description> a character set.
</parameter_description>
</parameter>
</parameters>
<return> the corresponding #GtkSourceEncoding, or %NULL
if not found.
</return>
</function>

<function name="gtk_source_encoding_get_name">
<description>
Gets the name of the #GtkSourceEncoding such as &quot;Unicode&quot; or &quot;Western&quot;.

Since: 3.14

</description>
<parameters>
<parameter name="enc">
<parameter_description> a #GtkSourceEncoding.
</parameter_description>
</parameter>
</parameters>
<return> the name of the #GtkSourceEncoding.
</return>
</function>

<function name="gtk_source_encoding_get_utf8">
<description>
Since: 3.14

</description>
<parameters>
</parameters>
<return> the UTF-8 encoding.
</return>
</function>

<function name="gtk_source_encoding_to_string">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="enc">
<parameter_description> a #GtkSourceEncoding.
</parameter_description>
</parameter>
</parameters>
<return> a string representation. Free with g_free() when no longer needed.
</return>
</function>

<function name="gtk_source_file_check_file_on_disk">
<description>
Checks synchronously the file on disk, to know whether the file is externally
modified, or has been deleted, and whether the file is read-only.

#GtkSourceFile doesn't create a #GFileMonitor to track those properties, so
this function needs to be called instead. Creating lots of #GFileMonitor's
would take lots of resources.

Since this function is synchronous, it is advised to call it only on local
files. See gtk_source_file_is_local().

Since: 3.18

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_get_compression_type">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> the compression type.
</return>
</function>

<function name="gtk_source_file_get_encoding">
<description>
The encoding is initially %NULL. After a successful file loading or saving
operation, the encoding is non-%NULL.

Since: 3.14

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> the character encoding.
</return>
</function>

<function name="gtk_source_file_get_location">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> the #GFile.
</return>
</function>

<function name="gtk_source_file_get_newline_type">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> the newline type.
</return>
</function>

<function name="gtk_source_file_is_deleted">
<description>
Returns whether the file has been deleted. If the
#GtkSourceFile:location is %NULL, returns %FALSE.

To have an up-to-date value, you must first call
gtk_source_file_check_file_on_disk().

Since: 3.18

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> whether the file has been deleted.
</return>
</function>

<function name="gtk_source_file_is_externally_modified">
<description>
Returns whether the file is externally modified. If the
#GtkSourceFile:location is %NULL, returns %FALSE.

To have an up-to-date value, you must first call
gtk_source_file_check_file_on_disk().

Since: 3.18

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> whether the file is externally modified.
</return>
</function>

<function name="gtk_source_file_is_local">
<description>
Returns whether the file is local. If the #GtkSourceFile:location is %NULL,
returns %FALSE.

Since: 3.18

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> whether the file is local.
</return>
</function>

<function name="gtk_source_file_is_readonly">
<description>
Returns whether the file is read-only. If the
#GtkSourceFile:location is %NULL, returns %FALSE.

To have an up-to-date value, you must first call
gtk_source_file_check_file_on_disk().

Since: 3.18

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> whether the file is read-only.
</return>
</function>

<function name="gtk_source_file_loader_get_buffer">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceBuffer to load the contents into.
</return>
</function>

<function name="gtk_source_file_loader_get_compression_type">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
</parameters>
<return> the detected compression type.
</return>
</function>

<function name="gtk_source_file_loader_get_encoding">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
</parameters>
<return> the detected file encoding.
</return>
</function>

<function name="gtk_source_file_loader_get_file">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceFile.
</return>
</function>

<function name="gtk_source_file_loader_get_input_stream">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
</parameters>
<return> the #GInputStream to load, or %NULL
if a #GFile is used.
</return>
</function>

<function name="gtk_source_file_loader_get_location">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
</parameters>
<return> the #GFile to load, or %NULL
if an input stream is used.
</return>
</function>

<function name="gtk_source_file_loader_get_newline_type">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
</parameters>
<return> the detected newline type.
</return>
</function>

<function name="gtk_source_file_loader_load_async">
<description>
Loads asynchronously the file or input stream contents into the
#GtkSourceBuffer. See the #GAsyncResult documentation to know how to use this
function.

Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
<parameter name="io_priority">
<parameter_description> the I/O priority of the request. E.g. %G_PRIORITY_LOW,
%G_PRIORITY_DEFAULT or %G_PRIORITY_HIGH.
</parameter_description>
</parameter>
<parameter name="cancellable">
<parameter_description> optional #GCancellable object, %NULL to ignore.
</parameter_description>
</parameter>
<parameter name="progress_callback">
<parameter_description> function to call back with
progress information, or %NULL if progress information is not needed.
</parameter_description>
</parameter>
<parameter name="progress_callback_data">
<parameter_description> user data to pass to @progress_callback.
</parameter_description>
</parameter>
<parameter name="progress_callback_notify">
<parameter_description> function to call on
@progress_callback_data when the @progress_callback is no longer needed, or
%NULL.
</parameter_description>
</parameter>
<parameter name="callback">
<parameter_description> a #GAsyncReadyCallback to call when the request is
satisfied.
</parameter_description>
</parameter>
<parameter name="user_data">
<parameter_description> user data to pass to @callback.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_loader_load_finish">
<description>
Finishes a file loading started with gtk_source_file_loader_load_async().

If the contents has been loaded, the following #GtkSourceFile properties will
be updated: the location, the encoding, the newline type and the compression
type.

Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
<parameter name="result">
<parameter_description> a #GAsyncResult.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether the contents has been loaded successfully.
</return>
</function>

<function name="gtk_source_file_loader_new">
<description>
Creates a new #GtkSourceFileLoader object. The contents is read from the
#GtkSourceFile's location. If not already done, call
gtk_source_file_set_location() before calling this constructor. The previous
location is anyway not needed, because as soon as the file loading begins,
the @buffer is emptied.

Since: 3.14

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the #GtkSourceBuffer to load the contents into.
</parameter_description>
</parameter>
<parameter name="file">
<parameter_description> the #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceFileLoader object.
</return>
</function>

<function name="gtk_source_file_loader_new_from_stream">
<description>
Creates a new #GtkSourceFileLoader object. The contents is read from @stream.

Since: 3.14

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the #GtkSourceBuffer to load the contents into.
</parameter_description>
</parameter>
<parameter name="file">
<parameter_description> the #GtkSourceFile.
</parameter_description>
</parameter>
<parameter name="stream">
<parameter_description> the #GInputStream to load, e.g. stdin.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceFileLoader object.
</return>
</function>

<function name="gtk_source_file_loader_set_candidate_encodings">
<description>
Sets the candidate encodings for the file loading. The encodings are tried in
the same order as the list.

For convenience, @candidate_encodings can contain duplicates. Only the first
occurrence of a duplicated encoding is kept in the list.

By default the candidate encodings are (in that order in the list):
1. If set, the #GtkSourceFile's encoding as returned by
gtk_source_file_get_encoding().
2. The default candidates as returned by
gtk_source_encoding_get_default_candidates().

Since: 3.14

</description>
<parameters>
<parameter name="loader">
<parameter_description> a #GtkSourceFileLoader.
</parameter_description>
</parameter>
<parameter name="candidate_encodings">
<parameter_description> a list of
#GtkSourceEncoding&lt;!-- --&gt;s.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_new">
<description>
Since: 3.14

</description>
<parameters>
</parameters>
<return> a new #GtkSourceFile object.
</return>
</function>

<function name="gtk_source_file_saver_get_buffer">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceBuffer to save.
</return>
</function>

<function name="gtk_source_file_saver_get_compression_type">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
</parameters>
<return> the compression type.
</return>
</function>

<function name="gtk_source_file_saver_get_encoding">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
</parameters>
<return> the encoding.
</return>
</function>

<function name="gtk_source_file_saver_get_file">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceFile.
</return>
</function>

<function name="gtk_source_file_saver_get_flags">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
</parameters>
<return> the flags.
</return>
</function>

<function name="gtk_source_file_saver_get_location">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
</parameters>
<return> the #GFile where to save the buffer to.
</return>
</function>

<function name="gtk_source_file_saver_get_newline_type">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
</parameters>
<return> the newline type.
</return>
</function>

<function name="gtk_source_file_saver_new">
<description>
Creates a new #GtkSourceFileSaver object. The @buffer will be saved to the
#GtkSourceFile's location.

This constructor is suitable for a simple &quot;save&quot; operation, when the @file
already contains a non-%NULL #GtkSourceFile:location.

Since: 3.14

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the #GtkSourceBuffer to save.
</parameter_description>
</parameter>
<parameter name="file">
<parameter_description> the #GtkSourceFile.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceFileSaver object.
</return>
</function>

<function name="gtk_source_file_saver_new_with_target">
<description>
Creates a new #GtkSourceFileSaver object with a target location. When the
file saving is finished successfully, @target_location is set to the @file's
#GtkSourceFile:location property. If an error occurs, the previous valid
location is still available in #GtkSourceFile.

This constructor is suitable for a &quot;save as&quot; operation, or for saving a new
buffer for the first time.

Since: 3.14

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the #GtkSourceBuffer to save.
</parameter_description>
</parameter>
<parameter name="file">
<parameter_description> the #GtkSourceFile.
</parameter_description>
</parameter>
<parameter name="target_location">
<parameter_description> the #GFile where to save the buffer to.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceFileSaver object.
</return>
</function>

<function name="gtk_source_file_saver_save_async">
<description>
Saves asynchronously the buffer into the file. See the #GAsyncResult
documentation to know how to use this function.

Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
<parameter name="io_priority">
<parameter_description> the I/O priority of the request. E.g. %G_PRIORITY_LOW,
%G_PRIORITY_DEFAULT or %G_PRIORITY_HIGH.
</parameter_description>
</parameter>
<parameter name="cancellable">
<parameter_description> optional #GCancellable object, %NULL to ignore.
</parameter_description>
</parameter>
<parameter name="progress_callback">
<parameter_description> function to call back with
progress information, or %NULL if progress information is not needed.
</parameter_description>
</parameter>
<parameter name="progress_callback_data">
<parameter_description> user data to pass to @progress_callback.
</parameter_description>
</parameter>
<parameter name="progress_callback_notify">
<parameter_description> function to call on
@progress_callback_data when the @progress_callback is no longer needed, or
%NULL.
</parameter_description>
</parameter>
<parameter name="callback">
<parameter_description> a #GAsyncReadyCallback to call when the request is
satisfied.
</parameter_description>
</parameter>
<parameter name="user_data">
<parameter_description> user data to pass to @callback.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_saver_save_finish">
<description>
Finishes a file saving started with gtk_source_file_saver_save_async().

If the file has been saved successfully, the following #GtkSourceFile
properties will be updated: the location, the encoding, the newline type and
the compression type.

Since the 3.20 version, gtk_text_buffer_set_modified() is called with %FALSE
if the file has been saved successfully.

Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
<parameter name="result">
<parameter_description> a #GAsyncResult.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether the file was saved successfully.
</return>
</function>

<function name="gtk_source_file_saver_set_compression_type">
<description>
Sets the compression type. By default the compression type is taken from the
#GtkSourceFile.

Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
<parameter name="compression_type">
<parameter_description> the new compression type.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_saver_set_encoding">
<description>
Sets the encoding. If @encoding is %NULL, the UTF-8 encoding will be set.
By default the encoding is taken from the #GtkSourceFile.

Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
<parameter name="encoding">
<parameter_description> the new encoding, or %NULL for UTF-8.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_saver_set_flags">
<description>
Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
<parameter name="flags">
<parameter_description> the new flags.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_saver_set_newline_type">
<description>
Sets the newline type. By default the newline type is taken from the
#GtkSourceFile.

Since: 3.14

</description>
<parameters>
<parameter name="saver">
<parameter_description> a #GtkSourceFileSaver.
</parameter_description>
</parameter>
<parameter name="newline_type">
<parameter_description> the new newline type.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_set_location">
<description>
Sets the location.

Since: 3.14

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
<parameter name="location">
<parameter_description> the new #GFile, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_file_set_mount_operation_factory">
<description>
Sets a #GtkSourceMountOperationFactory function that will be called when a
#GMountOperation must be created. This is useful for creating a
#GtkMountOperation with the parent #GtkWindow.

If a mount operation factory isn't set, g_mount_operation_new() will be
called.

Since: 3.14

</description>
<parameters>
<parameter name="file">
<parameter_description> a #GtkSourceFile.
</parameter_description>
</parameter>
<parameter name="callback">
<parameter_description> a #GtkSourceMountOperationFactory to call when a
#GMountOperation is needed.
</parameter_description>
</parameter>
<parameter name="user_data">
<parameter_description> the data to pass to the @callback function.
</parameter_description>
</parameter>
<parameter name="notify">
<parameter_description> function to call on @user_data when the @callback is no
longer needed, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_get_major_version">
<description>
Returns the major version number of the GtkSourceView library.
(e.g. in GtkSourceView version 3.20.0 this is 3.)

This function is in the library, so it represents the GtkSourceView library
your code is running against. Contrast with the #GTK_SOURCE_MAJOR_VERSION
macro, which represents the major version of the GtkSourceView headers you
have included when compiling your code.

Since: 3.20

</description>
<parameters>
</parameters>
<return> the major version number of the GtkSourceView library

</return>
</function>

<function name="gtk_source_get_micro_version">
<description>
Returns the micro version number of the GtkSourceView library.
(e.g. in GtkSourceView version 3.20.0 this is 0.)

This function is in the library, so it represents the GtkSourceView library
your code is running against. Contrast with the #GTK_SOURCE_MICRO_VERSION
macro, which represents the micro version of the GtkSourceView headers you
have included when compiling your code.

Since: 3.20

</description>
<parameters>
</parameters>
<return> the micro version number of the GtkSourceView library

</return>
</function>

<function name="gtk_source_get_minor_version">
<description>
Returns the minor version number of the GtkSourceView library.
(e.g. in GtkSourceView version 3.20.0 this is 20.)

This function is in the library, so it represents the GtkSourceView library
your code is running against. Contrast with the #GTK_SOURCE_MINOR_VERSION
macro, which represents the minor version of the GtkSourceView headers you
have included when compiling your code.

Since: 3.20

</description>
<parameters>
</parameters>
<return> the minor version number of the GtkSourceView library

</return>
</function>

<function name="gtk_source_gutter_get_padding">
<description>
Deprecated: 3.12: Use gtk_source_gutter_renderer_get_padding() instead.

</description>
<parameters>
<parameter name="gutter">
<parameter_description>
</parameter_description>
</parameter>
<parameter name="xpad">
<parameter_description>
</parameter_description>
</parameter>
<parameter name="ypad">
<parameter_description>
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_get_renderer_at_pos">
<description>
Finds the #GtkSourceGutterRenderer at (x, y).


</description>
<parameters>
<parameter name="gutter">
<parameter_description> A #GtkSourceGutter.
</parameter_description>
</parameter>
<parameter name="x">
<parameter_description> The x position to get identified.
</parameter_description>
</parameter>
<parameter name="y">
<parameter_description> The y position to get identified.
</parameter_description>
</parameter>
</parameters>
<return> the renderer at (x, y) or %NULL.
</return>
</function>

<function name="gtk_source_gutter_get_window">
<description>
Get the #GdkWindow of the gutter. The window will only be available when the
gutter has at least one, non-zero width, cell renderer packed.

Since: 2.8
Deprecated: 3.12: Use gtk_text_view_get_window() instead.

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter.
</parameter_description>
</parameter>
</parameters>
<return> the #GdkWindow of the gutter, or %NULL
if the gutter has no window.

</return>
</function>

<function name="gtk_source_gutter_insert">
<description>
Insert @renderer into the gutter. If @renderer is yet unowned then gutter
claims its ownership. Otherwise just increases renderer's reference count.
@renderer cannot be already inserted to another gutter.

Since: 3.0


</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter.
</parameter_description>
</parameter>
<parameter name="renderer">
<parameter_description> a gutter renderer (must inherit from #GtkSourceGutterRenderer).
</parameter_description>
</parameter>
<parameter name="position">
<parameter_description> the renderer position.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if operation succeeded. Otherwise %FALSE.

</return>
</function>

<function name="gtk_source_gutter_queue_draw">
<description>
Invalidates the drawable area of the gutter. You can use this to force a
redraw of the gutter if something has changed and needs to be redrawn.

Since: 2.8

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_remove">
<description>
Removes @renderer from @gutter.

Since: 2.8

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter.
</parameter_description>
</parameter>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_activate">
<description>
Emits the #GtkSourceGutterRenderer::activate signal of the renderer. This is
called from #GtkSourceGutter and should never have to be called manually.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter at the start of the line where the renderer is activated
</parameter_description>
</parameter>
<parameter name="area">
<parameter_description> a #GdkRectangle of the cell area where the renderer is activated
</parameter_description>
</parameter>
<parameter name="event">
<parameter_description> the event that triggered the activation
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_begin">
<description>
Called when drawing a region begins. The region to be drawn is indicated
by @start and @end. The purpose is to allow the implementation to precompute
some state before the draw method is called for each cell.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="cr">
<parameter_description> a #cairo_t
</parameter_description>
</parameter>
<parameter name="background_area">
<parameter_description> a #GdkRectangle
</parameter_description>
</parameter>
<parameter name="cell_area">
<parameter_description> a #GdkRectangle
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_draw">
<description>
Main renderering method. Implementations should implement this method to draw
onto the cairo context. The @background_area indicates the total area of the
cell to be drawn. The @cell_area indicates the area where content can be
drawn (text, images, etc).

The @background_area is the @cell_area plus the padding on each side (two
times the #GtkSourceGutterRenderer:xpad horizontally and two times the
#GtkSourceGutterRenderer:ypad vertically, so that the @cell_area is centered
inside @background_area).

The @state argument indicates the current state of the renderer and should
be taken into account to properly draw the different possible states
(cursor, prelit, selected) if appropriate.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="cr">
<parameter_description> the cairo render context
</parameter_description>
</parameter>
<parameter name="background_area">
<parameter_description> a #GdkRectangle indicating the total area to be drawn
</parameter_description>
</parameter>
<parameter name="cell_area">
<parameter_description> a #GdkRectangle indicating the area to draw content
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter
</parameter_description>
</parameter>
<parameter name="state">
<parameter_description> a #GtkSourceGutterRendererState
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_end">
<description>
Called when drawing a region of lines has ended.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_get_alignment">
<description>
Get the x-alignment and y-alignment of the gutter renderer.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="xalign">
<parameter_description> return location for the x-alignment,
or %NULL to ignore.
</parameter_description>
</parameter>
<parameter name="yalign">
<parameter_description> return location for the y-alignment,
or %NULL to ignore.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_get_alignment_mode">
<description>
Get the alignment mode. The alignment mode describes the manner in which the
renderer is aligned (see :xalign and :yalign).


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
</parameters>
<return> a #GtkSourceGutterRendererAlignmentMode

</return>
</function>

<function name="gtk_source_gutter_renderer_get_background">
<description>
Get the background color of the renderer.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="color">
<parameter_description> return value for a #GdkRGBA
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the background color is set, %FALSE otherwise

</return>
</function>

<function name="gtk_source_gutter_renderer_get_padding">
<description>
Get the x-padding and y-padding of the gutter renderer.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="xpad">
<parameter_description> return location for the x-padding,
or %NULL to ignore.
</parameter_description>
</parameter>
<parameter name="ypad">
<parameter_description> return location for the y-padding,
or %NULL to ignore.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_get_size">
<description>
Get the size of the renderer.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
</parameters>
<return> the size of the renderer.

</return>
</function>

<function name="gtk_source_gutter_renderer_get_view">
<description>
Get the view associated to the gutter renderer


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
</parameters>
<return> a #GtkTextView

</return>
</function>

<function name="gtk_source_gutter_renderer_get_visible">
<description>
Get whether the gutter renderer is visible.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the renderer is visible, %FALSE otherwise

</return>
</function>

<function name="gtk_source_gutter_renderer_get_window_type">
<description>
Get the #GtkTextWindowType associated with the gutter renderer.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
</parameters>
<return> a #GtkTextWindowType

</return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_get_gicon">
<description>
Get the gicon of the renderer


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererPixbuf
</parameter_description>
</parameter>
</parameters>
<return> a #GIcon

</return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_get_pixbuf">
<description>
Get the pixbuf of the renderer.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererPixbuf
</parameter_description>
</parameter>
</parameters>
<return> a #GdkPixbuf

</return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_get_stock_id">
<description>
Deprecated: 3.10: Don't use this function.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererPixbuf
</parameter_description>
</parameter>
</parameters>
<return> the stock id.
</return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_new">
<description>
Create a new #GtkSourceGutterRendererPixbuf.


</description>
<parameters>
</parameters>
<return> A #GtkSourceGutterRenderer

</return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_set_gicon">
<description>

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererPixbuf
</parameter_description>
</parameter>
<parameter name="icon">
<parameter_description> the icon, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_set_icon_name">
<description>

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererPixbuf
</parameter_description>
</parameter>
<parameter name="icon_name">
<parameter_description> the icon name, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_set_pixbuf">
<description>

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererPixbuf
</parameter_description>
</parameter>
<parameter name="pixbuf">
<parameter_description> the pixbuf, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_pixbuf_set_stock_id">
<description>
Deprecated: 3.10: Don't use this function.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererPixbuf
</parameter_description>
</parameter>
<parameter name="stock_id">
<parameter_description> the stock id
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_query_activatable">
<description>
Get whether the renderer is activatable at the location in @event. This is
called from #GtkSourceGutter to determine whether a renderer is activatable
using the mouse pointer.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter at the start of the line to be activated
</parameter_description>
</parameter>
<parameter name="area">
<parameter_description> a #GdkRectangle of the cell area to be activated
</parameter_description>
</parameter>
<parameter name="event">
<parameter_description> the event that triggered the query
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the renderer can be activated, %FALSE otherwise

</return>
</function>

<function name="gtk_source_gutter_renderer_query_data">
<description>
Emit the #GtkSourceGutterRenderer::query-data signal. This function is called
to query for data just before rendering a cell. This is called from the
#GtkSourceGutter.  Implementations can override the default signal handler or
can connect a signal handler externally to the
#GtkSourceGutterRenderer::query-data signal.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="state">
<parameter_description> a #GtkSourceGutterRendererState.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_query_tooltip">
<description>
Emits the #GtkSourceGutterRenderer::query-tooltip signal. This function is
called from #GtkSourceGutter. Implementations can override the default signal
handler or can connect to the signal externally.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
<parameter name="area">
<parameter_description> a #GdkRectangle.
</parameter_description>
</parameter>
<parameter name="x">
<parameter_description> The x position of the tooltip.
</parameter_description>
</parameter>
<parameter name="y">
<parameter_description> The y position of the tooltip.
</parameter_description>
</parameter>
<parameter name="tooltip">
<parameter_description> a #GtkTooltip.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the tooltip has been set, %FALSE otherwise
</return>
</function>

<function name="gtk_source_gutter_renderer_queue_draw">
<description>
Emits the #GtkSourceGutterRenderer::queue-draw signal of the renderer. Call
this from an implementation to inform that the renderer has changed such that
it needs to redraw.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_set_alignment">
<description>
Set the alignment of the gutter renderer. Both @xalign and @yalign can be
-1, which means the values will not be changed (this allows changing only
one of the values).

@xalign is the horizontal alignment. Set to 0 for a left alignment. 1 for a
right alignment. And 0.5 for centering the cells. @yalign is the vertical
alignment. Set to 0 for a top alignment. 1 for a bottom alignment.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="xalign">
<parameter_description> the x-alignment
</parameter_description>
</parameter>
<parameter name="yalign">
<parameter_description> the y-alignment
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_set_alignment_mode">
<description>
Set the alignment mode. The alignment mode describes the manner in which the
renderer is aligned (see :xalign and :yalign).


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="mode">
<parameter_description> a #GtkSourceGutterRendererAlignmentMode
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_set_background">
<description>
Set the background color of the renderer. If @color is set to %NULL, the
renderer will not have a background color.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="color">
<parameter_description> a #GdkRGBA or %NULL
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_set_padding">
<description>
Set the padding of the gutter renderer. Both @xpad and @ypad can be
-1, which means the values will not be changed (this allows changing only
one of the values).

@xpad is the left and right padding. @ypad is the top and bottom padding.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="xpad">
<parameter_description> the x-padding
</parameter_description>
</parameter>
<parameter name="ypad">
<parameter_description> the y-padding
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_set_size">
<description>
Sets the size of the renderer. A value of -1 specifies that the size
is to be determined dynamically.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="size">
<parameter_description> the size
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_set_visible">
<description>
Set whether the gutter renderer is visible.


</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRenderer
</parameter_description>
</parameter>
<parameter name="visible">
<parameter_description> the visibility
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_text_measure">
<description>
Measures the text provided using the pango layout used by the
#GtkSourceGutterRendererText.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererText.
</parameter_description>
</parameter>
<parameter name="text">
<parameter_description> the text to measure.
</parameter_description>
</parameter>
<parameter name="width">
<parameter_description> location to store the width of the text in pixels,
or %NULL.
</parameter_description>
</parameter>
<parameter name="height">
<parameter_description> location to store the height of the text in
pixels, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_text_measure_markup">
<description>
Measures the pango markup provided using the pango layout used by the
#GtkSourceGutterRendererText.

</description>
<parameters>
<parameter name="renderer">
<parameter_description> a #GtkSourceGutterRendererText.
</parameter_description>
</parameter>
<parameter name="markup">
<parameter_description> the pango markup to measure.
</parameter_description>
</parameter>
<parameter name="width">
<parameter_description> location to store the width of the text in pixels,
or %NULL.
</parameter_description>
</parameter>
<parameter name="height">
<parameter_description> location to store the height of the text in
pixels, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_renderer_text_new">
<description>
Create a new #GtkSourceGutterRendererText.


</description>
<parameters>
</parameters>
<return> A #GtkSourceGutterRenderer

</return>
</function>

<function name="gtk_source_gutter_reorder">
<description>
Reorders @renderer in @gutter to new @position.

Since: 2.8

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutterRenderer.
</parameter_description>
</parameter>
<parameter name="renderer">
<parameter_description> a #GtkCellRenderer.
</parameter_description>
</parameter>
<parameter name="position">
<parameter_description> the new renderer position.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_set_padding">
<description>
Deprecated: 3.12: Use gtk_source_gutter_renderer_set_padding() instead.

</description>
<parameters>
<parameter name="gutter">
<parameter_description>
</parameter_description>
</parameter>
<parameter name="xpad">
<parameter_description>
</parameter_description>
</parameter>
<parameter name="ypad">
<parameter_description>
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_language_get_globs">
<description>
Returns the globs associated to this language. This is just
an utility wrapper around gtk_source_language_get_metadata() to
retrieve the &quot;globs&quot; metadata property and split it into an array.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return>
a newly-allocated %NULL terminated array containing the globs or %NULL
if no globs are found.
The returned array must be freed with g_strfreev().
</return>
</function>

<function name="gtk_source_language_get_hidden">
<description>
Returns whether the language should be hidden from the user.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the language should be hidden, %FALSE otherwise.
</return>
</function>

<function name="gtk_source_language_get_id">
<description>
Returns the ID of the language. The ID is not locale-dependent.
The returned string is owned by @language and should not be freed
or modified.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return> the ID of @language.
</return>
</function>

<function name="gtk_source_language_get_metadata">
<description>

</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
<parameter name="name">
<parameter_description> metadata property name.
</parameter_description>
</parameter>
</parameters>
<return> value of property @name stored in
the metadata of @language or %NULL if language does not contain the
specified metadata property.
The returned string is owned by @language and should not be freed
or modified.
</return>
</function>

<function name="gtk_source_language_get_mime_types">
<description>
Returns the mime types associated to this language. This is just
an utility wrapper around gtk_source_language_get_metadata() to
retrieve the &quot;mimetypes&quot; metadata property and split it into an
array.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return>
a newly-allocated %NULL terminated array containing the mime types
or %NULL if no mime types are found.
The returned array must be freed with g_strfreev().
</return>
</function>

<function name="gtk_source_language_get_name">
<description>
Returns the localized name of the language.
The returned string is owned by @language and should not be freed
or modified.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return> the name of @language.
</return>
</function>

<function name="gtk_source_language_get_section">
<description>
Returns the localized section of the language.
Each language belong to a section (ex. HTML belogs to the
Markup section).
The returned string is owned by @language and should not be freed
or modified.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return> the section of @language.
</return>
</function>

<function name="gtk_source_language_get_style_fallback">
<description>
Returns the ID of the style to use if the specified @style_id
is not present in the current style scheme.

Since: 3.4

</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
<parameter name="style_id">
<parameter_description> a style ID.
</parameter_description>
</parameter>
</parameters>
<return> the ID of the style to use if the
specified @style_id is not present in the current style scheme or %NULL
if the style has no fallback defined.
The returned string is owned by the @language and must not be modified.

</return>
</function>

<function name="gtk_source_language_get_style_ids">
<description>
Returns the ids of the styles defined by this @language.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return>
a newly-allocated %NULL terminated array containing ids of the
styles defined by this @language or %NULL if no style is defined.
The returned array must be freed with g_strfreev().
</return>
</function>

<function name="gtk_source_language_get_style_name">
<description>
Returns the name of the style with ID @style_id defined by this @language.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
<parameter name="style_id">
<parameter_description> a style ID.
</parameter_description>
</parameter>
</parameters>
<return> the name of the style with ID @style_id
defined by this @language or %NULL if the style has no name or there is no
style with ID @style_id defined by this @language.
The returned string is owned by the @language and must not be modified.
</return>
</function>

<function name="gtk_source_language_manager_get_default">
<description>
Returns the default #GtkSourceLanguageManager instance.


</description>
<parameters>
</parameters>
<return> a #GtkSourceLanguageManager.
Return value is owned by GtkSourceView library and must not be unref'ed.
</return>
</function>

<function name="gtk_source_language_manager_get_language">
<description>
Gets the #GtkSourceLanguage identified by the given @id in the language
manager.


</description>
<parameters>
<parameter name="lm">
<parameter_description> a #GtkSourceLanguageManager.
</parameter_description>
</parameter>
<parameter name="id">
<parameter_description> a language id.
</parameter_description>
</parameter>
</parameters>
<return> a #GtkSourceLanguage, or %NULL
if there is no language identified by the given @id. Return value is
owned by @lm and should not be freed.
</return>
</function>

<function name="gtk_source_language_manager_get_language_ids">
<description>
Returns the ids of the available languages.


</description>
<parameters>
<parameter name="lm">
<parameter_description> a #GtkSourceLanguageManager.
</parameter_description>
</parameter>
</parameters>
<return>
a %NULL-terminated array of strings containing the ids of the available
languages or %NULL if no language is available.
The array is sorted alphabetically according to the language name.
The array is owned by @lm and must not be modified.
</return>
</function>

<function name="gtk_source_language_manager_get_search_path">
<description>
Gets the list directories where @lm looks for language files.


</description>
<parameters>
<parameter name="lm">
<parameter_description> a #GtkSourceLanguageManager.
</parameter_description>
</parameter>
</parameters>
<return> %NULL-terminated array
containg a list of language files directories.
The array is owned by @lm and must not be modified.
</return>
</function>

<function name="gtk_source_language_manager_guess_language">
<description>
Picks a #GtkSourceLanguage for given file name and content type,
according to the information in lang files. Either @filename or
@content_type may be %NULL. This function can be used as follows:

&lt;informalexample&gt;&lt;programlisting&gt;
GtkSourceLanguage *lang;
lang = gtk_source_language_manager_guess_language (filename, NULL);
gtk_source_buffer_set_language (buffer, lang);
&lt;/programlisting&gt;&lt;/informalexample&gt;

or

&lt;informalexample&gt;&lt;programlisting&gt;
GtkSourceLanguage *lang = NULL;
gboolean result_uncertain;
gchar *content_type;

content_type = g_content_type_guess (filename, NULL, 0, &amp;result_uncertain);
if (result_uncertain)
{
g_free (content_type);
content_type = NULL;
}

lang = gtk_source_language_manager_guess_language (manager, filename, content_type);
gtk_source_buffer_set_language (buffer, lang);

g_free (content_type);
&lt;/programlisting&gt;&lt;/informalexample&gt;

etc. Use gtk_source_language_get_mime_types() and gtk_source_language_get_globs()
if you need full control over file -&gt; language mapping.

Since: 2.4

</description>
<parameters>
<parameter name="lm">
<parameter_description> a #GtkSourceLanguageManager.
</parameter_description>
</parameter>
<parameter name="filename">
<parameter_description> a filename in Glib filename encoding, or %NULL.
</parameter_description>
</parameter>
<parameter name="content_type">
<parameter_description> a content type (as in GIO API), or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> a #GtkSourceLanguage, or %NULL if there
is no suitable language for given @filename and/or @content_type. Return
value is owned by @lm and should not be freed.

</return>
</function>

<function name="gtk_source_language_manager_new">
<description>
Creates a new language manager. If you do not need more than one language
manager or a private language manager instance then use
gtk_source_language_manager_get_default() instead.


</description>
<parameters>
</parameters>
<return> a new #GtkSourceLanguageManager.
</return>
</function>

<function name="gtk_source_language_manager_set_search_path">
<description>
Sets the list of directories where the @lm looks for
language files.
If @dirs is %NULL, the search path is reset to default.

&lt;note&gt;
&lt;para&gt;
At the moment this function can be called only before the
language files are loaded for the first time. In practice
to set a custom search path for a #GtkSourceLanguageManager,
you have to call this function right after creating it.
&lt;/para&gt;
&lt;/note&gt;

</description>
<parameters>
<parameter name="lm">
<parameter_description> a #GtkSourceLanguageManager.
</parameter_description>
</parameter>
<parameter name="dirs">
<parameter_description>
a %NULL-terminated array of strings or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_map_get_view">
<description>
Gets the #GtkSourceMap:view property, which is the view this widget is mapping.

Since: 3.18

</description>
<parameters>
<parameter name="map">
<parameter_description> a #GtkSourceMap.
</parameter_description>
</parameter>
</parameters>
<return> a #GtkSourceView or %NULL.

</return>
</function>

<function name="gtk_source_map_new">
<description>
Creates a new #GtkSourceMap.

Since: 3.18

</description>
<parameters>
</parameters>
<return> a new #GtkSourceMap.

</return>
</function>

<function name="gtk_source_map_set_view">
<description>
Sets the view that @map will be doing the mapping to.

Since: 3.18

</description>
<parameters>
<parameter name="map">
<parameter_description> a #GtkSourceMap
</parameter_description>
</parameter>
<parameter name="view">
<parameter_description> a #GtkSourceView
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_mark_attributes_get_background">
<description>
Stores background color in @background.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="background">
<parameter_description> a #GdkRGBA.
</parameter_description>
</parameter>
</parameters>
<return> whether background color for @attributes was set.
</return>
</function>

<function name="gtk_source_mark_attributes_get_gicon">
<description>
Gets a #GIcon to be used as a base for rendered icon. Note that the icon can
be %NULL if it wasn't set earlier.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
</parameters>
<return> An icon. The icon belongs to @attributes and should
not be unreffed.
</return>
</function>

<function name="gtk_source_mark_attributes_get_icon_name">
<description>
Gets a name of an icon to be used as a base for rendered icon. Note that the
icon name can be %NULL if it wasn't set earlier.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
</parameters>
<return> An icon name. The string belongs to @attributes and
should not be freed.
</return>
</function>

<function name="gtk_source_mark_attributes_get_pixbuf">
<description>
Gets a #GdkPixbuf to be used as a base for rendered icon. Note that the
pixbuf can be %NULL if it wasn't set earlier.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
</parameters>
<return> A pixbuf. The pixbuf belongs to @attributes and
should not be unreffed.
</return>
</function>

<function name="gtk_source_mark_attributes_get_stock_id">
<description>
Gets a stock id of an icon used by this attributes. Note that the stock id can
be %NULL if it wasn't set earlier.

Deprecated: 3.10: Don't use this function.

</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
</parameters>
<return> Stock id. Returned string is owned by @attributes and
shouldn't be freed.

</return>
</function>

<function name="gtk_source_mark_attributes_get_tooltip_markup">
<description>
Queries for a tooltip by emitting
a #GtkSourceMarkAttributes::query-tooltip-markup signal. The tooltip may contain
a markup.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="mark">
<parameter_description> a #GtkSourceMark.
</parameter_description>
</parameter>
</parameters>
<return> A tooltip. The returned string should be freed by
using g_free() when done with it.
</return>
</function>

<function name="gtk_source_mark_attributes_get_tooltip_text">
<description>
Queries for a tooltip by emitting
a #GtkSourceMarkAttributes::query-tooltip-text signal. The tooltip is a plain
text.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="mark">
<parameter_description> a #GtkSourceMark.
</parameter_description>
</parameter>
</parameters>
<return> A tooltip. The returned string should be freed by
using g_free() when done with it.
</return>
</function>

<function name="gtk_source_mark_attributes_new">
<description>
Creates a new source mark attributes.


</description>
<parameters>
</parameters>
<return> a new source mark attributes.
</return>
</function>

<function name="gtk_source_mark_attributes_render_icon">
<description>
Renders an icon of given size. The base of the icon is set by the last call
to one of: gtk_source_mark_attributes_set_pixbuf(),
gtk_source_mark_attributes_set_gicon(),
gtk_source_mark_attributes_set_icon_name() or
gtk_source_mark_attributes_set_stock_id(). @size cannot be lower than 1.


</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="widget">
<parameter_description> widget of which style settings may be used.
</parameter_description>
</parameter>
<parameter name="size">
<parameter_description> size of the rendered icon.
</parameter_description>
</parameter>
</parameters>
<return> A rendered pixbuf. The pixbuf belongs to @attributes
and should not be unreffed.
</return>
</function>

<function name="gtk_source_mark_attributes_set_background">
<description>
Sets background color to the one given in @background.

</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="background">
<parameter_description> a #GdkRGBA.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_mark_attributes_set_gicon">
<description>
Sets an icon to be used as a base for rendered icon.

</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="gicon">
<parameter_description> a #GIcon to be used.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_mark_attributes_set_icon_name">
<description>
Sets a name of an icon to be used as a base for rendered icon.

</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="icon_name">
<parameter_description> name of an icon to be used.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_mark_attributes_set_pixbuf">
<description>
Sets a pixbuf to be used as a base for rendered icon.

</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="pixbuf">
<parameter_description> a #GdkPixbuf to be used.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_mark_attributes_set_stock_id">
<description>
Sets stock id to be used as a base for rendered icon.

Deprecated: 3.10: Don't use this function.

</description>
<parameters>
<parameter name="attributes">
<parameter_description> a #GtkSourceMarkAttributes.
</parameter_description>
</parameter>
<parameter name="stock_id">
<parameter_description> a stock id.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_mark_get_category">
<description>
Returns the mark category.

Since: 2.2

</description>
<parameters>
<parameter name="mark">
<parameter_description> a #GtkSourceMark.
</parameter_description>
</parameter>
</parameters>
<return> the category of the #GtkSourceMark.

</return>
</function>

<function name="gtk_source_mark_new">
<description>
Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark().
If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved
by name using gtk_text_buffer_get_mark().
Normally marks are created using the utility function
gtk_source_buffer_create_source_mark().

Since: 2.2

</description>
<parameters>
<parameter name="name">
<parameter_description> Name of the #GtkSourceMark, can be NULL when not using a name
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> is used to classify marks according to common characteristics
(e.g. all the marks representing a bookmark could belong to the &quot;bookmark&quot;
category, or all the marks representing a compilation error could belong to
&quot;error&quot; category).
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceMark that can be added using gtk_text_buffer_add_mark().

</return>
</function>

<function name="gtk_source_mark_next">
<description>
Returns the next #GtkSourceMark in the buffer or %NULL if the mark
was not added to a buffer. If there is no next mark, %NULL will be returned.

If @category is %NULL, looks for marks of any category.

Since: 2.2

</description>
<parameters>
<parameter name="mark">
<parameter_description> a #GtkSourceMark.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a string specifying the mark category, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> the next #GtkSourceMark, or %NULL.

</return>
</function>

<function name="gtk_source_mark_prev">
<description>
Returns the previous #GtkSourceMark in the buffer or %NULL if the mark
was not added to a buffer. If there is no previous mark, %NULL is returned.

If @category is %NULL, looks for marks of any category

Since: 2.2

</description>
<parameters>
<parameter name="mark">
<parameter_description> a #GtkSourceMark.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a string specifying the mark category, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> the previous #GtkSourceMark, or %NULL.

</return>
</function>

<function name="gtk_source_print_compositor_draw_page">
<description>
Draw page @page_nr for printing on the the Cairo context encapsuled in @context.

This method has been designed to be called in the handler of the #GtkPrintOperation::draw_page signal
as shown in the following example:

&lt;informalexample&gt;&lt;programlisting&gt;
// Signal handler for the GtkPrintOperation::draw_page signal

static void
draw_page (GtkPrintOperation *operation,
GtkPrintContext   *context,
gint               page_nr,
gpointer           user_data)
{
GtkSourcePrintCompositor *compositor;

compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);

gtk_source_print_compositor_draw_page (compositor,
context,
page_nr);
}
&lt;/programlisting&gt;&lt;/informalexample&gt;

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> the #GtkPrintContext encapsulating the context information that is required when
drawing the page for printing.
</parameter_description>
</parameter>
<parameter name="page_nr">
<parameter_description> the number of the page to print.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_get_body_font_name">
<description>
Returns the name of the font used to print the text body. The returned string
must be freed with g_free().

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the name of the font used to print the
text body.

</return>
</function>

<function name="gtk_source_print_compositor_get_bottom_margin">
<description>
Gets the bottom margin in units of @unit.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the unit for the return value.
</parameter_description>
</parameter>
</parameters>
<return> the bottom margin.

</return>
</function>

<function name="gtk_source_print_compositor_get_buffer">
<description>
Gets the #GtkSourceBuffer associated with the compositor. The returned
object reference is owned by the compositor object and
should not be unreferenced.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceBuffer associated with the compositor.

</return>
</function>

<function name="gtk_source_print_compositor_get_footer_font_name">
<description>
Returns the name of the font used to print the page footer.
The returned string must be freed with g_free().

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the name of the font used to print
the page footer.

</return>
</function>

<function name="gtk_source_print_compositor_get_header_font_name">
<description>
Returns the name of the font used to print the page header.
The returned string must be freed with g_free().

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the name of the font used to print
the page header.

</return>
</function>

<function name="gtk_source_print_compositor_get_highlight_syntax">
<description>
Determines whether the printed text will be highlighted according to the
buffer rules.  Note that highlighting will happen
only if the buffer to print has highlighting activated.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the printed output will be highlighted.

</return>
</function>

<function name="gtk_source_print_compositor_get_left_margin">
<description>
Gets the left margin in units of @unit.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the unit for the return value.
</parameter_description>
</parameter>
</parameters>
<return> the left margin

</return>
</function>

<function name="gtk_source_print_compositor_get_line_numbers_font_name">
<description>
Returns the name of the font used to print line numbers on the left margin.
The returned string must be freed with g_free().

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> a new string containing the name of the font used to print
line numbers on the left margin.

</return>
</function>

<function name="gtk_source_print_compositor_get_n_pages">
<description>
Returns the number of pages in the document or &lt;code&gt;-1&lt;/code&gt; if the
document has not been completely paginated.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> the number of pages in the document or &lt;code&gt;-1&lt;/code&gt; if the
document has not been completely paginated.

</return>
</function>

<function name="gtk_source_print_compositor_get_pagination_progress">
<description>
Returns the current fraction of the document pagination that has been completed.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> a fraction from 0.0 to 1.0 inclusive.

</return>
</function>

<function name="gtk_source_print_compositor_get_print_footer">
<description>
Determines if a footer is set to be printed for each page.  A
footer will be printed if this function returns %TRUE
&lt;emphasis&gt;and&lt;/emphasis&gt; some format strings have been specified
with gtk_source_print_compositor_set_footer_format().

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the footer is set to be printed.

</return>
</function>

<function name="gtk_source_print_compositor_get_print_header">
<description>
Determines if a header is set to be printed for each page.  A
header will be printed if this function returns %TRUE
&lt;emphasis&gt;and&lt;/emphasis&gt; some format strings have been specified
with gtk_source_print_compositor_set_header_format().

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the header is set to be printed.

</return>
</function>

<function name="gtk_source_print_compositor_get_print_line_numbers">
<description>
Returns the interval used for line number printing.  If the
value is 0, no line numbers will be printed.  The default value is
1 (i.e. numbers printed in all lines).

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> the interval of printed line numbers.

</return>
</function>

<function name="gtk_source_print_compositor_get_right_margin">
<description>
Gets the right margin in units of @unit.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the unit for the return value.
</parameter_description>
</parameter>
</parameters>
<return> the right margin.

</return>
</function>

<function name="gtk_source_print_compositor_get_tab_width">
<description>
Returns the width of tabulation in characters for printed text.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> width of tab.

</return>
</function>

<function name="gtk_source_print_compositor_get_top_margin">
<description>
Gets the top margin in units of @unit.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the unit for the return value.
</parameter_description>
</parameter>
</parameters>
<return> the top margin.

</return>
</function>

<function name="gtk_source_print_compositor_get_wrap_mode">
<description>
Gets the line wrapping mode for the printed text.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
</parameters>
<return> the line wrap mode.

</return>
</function>

<function name="gtk_source_print_compositor_new">
<description>
Creates a new print compositor that can be used to print @buffer.

Since: 2.2

</description>
<parameters>
<parameter name="buffer">
<parameter_description> the #GtkSourceBuffer to print.
</parameter_description>
</parameter>
</parameters>
<return> a new print compositor object.

</return>
</function>

<function name="gtk_source_print_compositor_new_from_view">
<description>
Creates a new print compositor that can be used to print the buffer
associated with @view.
This constructor sets some configuration properties to make the
printed output match @view as much as possible.  The properties set are
#GtkSourcePrintCompositor:tab-width, #GtkSourcePrintCompositor:highlight-syntax,
#GtkSourcePrintCompositor:wrap-mode, #GtkSourcePrintCompositor:body-font-name and
#GtkSourcePrintCompositor:print-line-numbers.

Since: 2.2

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView to get configuration from.
</parameter_description>
</parameter>
</parameters>
<return> a new print compositor object.

</return>
</function>

<function name="gtk_source_print_compositor_paginate">
<description>
Paginate the document associated with the @compositor.

In order to support non-blocking pagination, document is paginated in small chunks.
Each time gtk_source_print_compositor_paginate() is invoked, a chunk of the document
is paginated. To paginate the entire document, gtk_source_print_compositor_paginate()
must be invoked multiple times.
It returns %TRUE if the document has been completely paginated, otherwise it returns %FALSE.

This method has been designed to be invoked in the handler of the #GtkPrintOperation::paginate signal,
as shown in the following example:

&lt;informalexample&gt;&lt;programlisting&gt;
// Signal handler for the GtkPrintOperation::paginate signal

static gboolean
paginate (GtkPrintOperation *operation,
GtkPrintContext   *context,
gpointer           user_data)
{
GtkSourcePrintCompositor *compositor;

compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);

if (gtk_source_print_compositor_paginate (compositor, context))
{
gint n_pages;

n_pages = gtk_source_print_compositor_get_n_pages (compositor);
gtk_print_operation_set_n_pages (operation, n_pages);

return TRUE;
}

return FALSE;
}
&lt;/programlisting&gt;&lt;/informalexample&gt;

If you don't need to do pagination in chunks, you can simply do it all in the
#GtkPrintOperation::begin-print handler, and set the number of pages from there, like
in the following example:

&lt;informalexample&gt;&lt;programlisting&gt;
// Signal handler for the GtkPrintOperation::begin-print signal

static void
begin_print (GtkPrintOperation *operation,
GtkPrintContext   *context,
gpointer           user_data)
{
GtkSourcePrintCompositor *compositor;
gint n_pages;

compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);

while (!gtk_source_print_compositor_paginate (compositor, context));

n_pages = gtk_source_print_compositor_get_n_pages (compositor);
gtk_print_operation_set_n_pages (operation, n_pages);
}
&lt;/programlisting&gt;&lt;/informalexample&gt;

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> the #GtkPrintContext whose parameters (e.g. paper size, print margins, etc.)
are used by the the @compositor to paginate the document.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the document has been completely paginated, %FALSE otherwise.

</return>
</function>

<function name="gtk_source_print_compositor_set_body_font_name">
<description>
Sets the default font for the printed text.

@font_name should be a
string representation of a font description Pango can understand.
(e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
for a description of the format of the string representation.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="font_name">
<parameter_description> the name of the default font for the body text.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_bottom_margin">
<description>
Sets the bottom margin used by @compositor.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="margin">
<parameter_description> the new bottom margin in units of @unit.
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the units for @margin.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_footer_font_name">
<description>
Sets the font for printing the page footer. If
%NULL is supplied, the default font (i.e. the one being used for the
text) will be used instead.

@font_name should be a
string representation of a font description Pango can understand.
(e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
for a description of the format of the string representation.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="font_name">
<parameter_description> the name of the font for the footer text, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_footer_format">
<description>
See gtk_source_print_compositor_set_header_format() for more information
about the parameters.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="separator">
<parameter_description> %TRUE if you want a separator line to be printed.
</parameter_description>
</parameter>
<parameter name="left">
<parameter_description> a format string to print on the left of the footer.
</parameter_description>
</parameter>
<parameter name="center">
<parameter_description> a format string to print on the center of the footer.
</parameter_description>
</parameter>
<parameter name="right">
<parameter_description> a format string to print on the right of the footer.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_header_font_name">
<description>
Sets the font for printing the page header. If
%NULL is supplied, the default font (i.e. the one being used for the
text) will be used instead.

@font_name should be a
string representation of a font description Pango can understand.
(e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
for a description of the format of the string representation.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="font_name">
<parameter_description> the name of the font for header text, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_header_format">
<description>
Sets strftime like header format strings, to be printed on the
left, center and right of the top of each page.  The strings may
include strftime(3) codes which will be expanded at print time.
A subset of strftime() codes are accepted, see g_date_time_format()
for more details on the accepted format specifiers.
Additionally the following format specifiers are accepted:
- #N: the page number
- #Q: the page count.

@separator specifies if a solid line should be drawn to separate
the header from the document text.

If %NULL is given for any of the three arguments, that particular
string will not be printed.

For the header to be printed, in
addition to specifying format strings, you need to enable header
printing with gtk_source_print_compositor_set_print_header().

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="separator">
<parameter_description> %TRUE if you want a separator line to be printed.
</parameter_description>
</parameter>
<parameter name="left">
<parameter_description> a format string to print on the left of the header.
</parameter_description>
</parameter>
<parameter name="center">
<parameter_description> a format string to print on the center of the header.
</parameter_description>
</parameter>
<parameter name="right">
<parameter_description> a format string to print on the right of the header.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_highlight_syntax">
<description>
Sets whether the printed text will be highlighted according to the
buffer rules.  Both color and font style are applied.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="highlight">
<parameter_description> whether syntax should be highlighted.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_left_margin">
<description>
Sets the left margin used by @compositor.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="margin">
<parameter_description> the new left margin in units of @unit.
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the units for @margin.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_line_numbers_font_name">
<description>
Sets the font for printing line numbers on the left margin.  If
%NULL is supplied, the default font (i.e. the one being used for the
text) will be used instead.

@font_name should be a
string representation of a font description Pango can understand.
(e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
for a description of the format of the string representation.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="font_name">
<parameter_description> the name of the font for line numbers, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_print_footer">
<description>
Sets whether you want to print a footer in each page.  The
footer consists of three pieces of text and an optional line
separator, configurable with
gtk_source_print_compositor_set_footer_format().

Note that by default the footer format is unspecified, and if it's
empty it will not be printed, regardless of this setting.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="print">
<parameter_description> %TRUE if you want the footer to be printed.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_print_header">
<description>
Sets whether you want to print a header in each page.  The
header consists of three pieces of text and an optional line
separator, configurable with
gtk_source_print_compositor_set_header_format().

Note that by default the header format is unspecified, and if it's
empty it will not be printed, regardless of this setting.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="print">
<parameter_description> %TRUE if you want the header to be printed.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_print_line_numbers">
<description>
Sets the interval for printed line numbers.  If @interval is 0 no
numbers will be printed.  If greater than 0, a number will be
printed every @interval lines (i.e. 1 will print all line numbers).

Maximum accepted value for @interval is 100.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="interval">
<parameter_description> interval for printed line numbers.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_right_margin">
<description>
Sets the right margin used by @compositor.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="margin">
<parameter_description> the new right margin in units of @unit.
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the units for @margin.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_tab_width">
<description>
Sets the width of tabulation in characters for printed text.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="width">
<parameter_description> width of tab in characters.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_top_margin">
<description>
Sets the top margin used by @compositor.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="margin">
<parameter_description> the new top margin in units of @unit
</parameter_description>
</parameter>
<parameter name="unit">
<parameter_description> the units for @margin
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_print_compositor_set_wrap_mode">
<description>
Sets the line wrapping mode for the printed text.

This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.

Since: 2.2

</description>
<parameters>
<parameter name="compositor">
<parameter_description> a #GtkSourcePrintCompositor.
</parameter_description>
</parameter>
<parameter name="wrap_mode">
<parameter_description> a #GtkWrapMode.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_regex_new">
<description>
Creates a new regex.


</description>
<parameters>
<parameter name="pattern">
<parameter_description> the regular expression.
</parameter_description>
</parameter>
<parameter name="flags">
<parameter_description> compile options for @pattern.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> location to store the error occuring, or %NULL to ignore errors.
</parameter_description>
</parameter>
</parameters>
<return> a newly-allocated #GtkSourceRegex.
</return>
</function>

<function name="gtk_source_region_add">
<description>
Adds the subregion delimited by @_start and @_end to @region.

Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion.
</parameter_description>
</parameter>
<parameter name="_start">
<parameter_description> the start of the subregion.
</parameter_description>
</parameter>
<parameter name="_end">
<parameter_description> the end of the subregion.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_region_get_bounds">
<description>
Gets the @start and @end bounds of the @region.

Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> iterator to initialize with the start of @region,
or %NULL.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> iterator to initialize with the end of @region,
or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @start and @end have been set successfully (if non-%NULL),
or %FALSE if the @region is empty.
</return>
</function>

<function name="gtk_source_region_get_buffer">
<description>
Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkTextBuffer.
</return>
</function>

<function name="gtk_source_region_get_start_region_iter">
<description>
Initializes a #GtkSourceRegionIter to the first subregion of @region. If
@region is empty, @iter will be initialized to the end iterator.

Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> iterator to initialize to the first subregion.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_region_intersect">
<description>
Computes the intersection between @region and the subregion delimited by
@_start and @_end.

Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion.
</parameter_description>
</parameter>
<parameter name="_start">
<parameter_description> the start of the subregion.
</parameter_description>
</parameter>
<parameter name="_end">
<parameter_description> the end of the subregion.
</parameter_description>
</parameter>
</parameters>
<return> the intersection as a new
#GtkSourceRegion.
</return>
</function>

<function name="gtk_source_region_is_empty">
<description>
Returns whether the @region is empty. A %NULL @region is considered empty.

Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether the @region is empty.
</return>
</function>

<function name="gtk_source_region_iter_get_subregion">
<description>
Gets the subregion at this iterator.

Since: 3.22

</description>
<parameters>
<parameter name="iter">
<parameter_description> a #GtkSourceRegionIter.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> iterator to initialize with the subregion start, or %NULL.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> iterator to initialize with the subregion end, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @start and @end have been set successfully (if non-%NULL),
or %FALSE if @iter is the end iterator or if the region is empty.
</return>
</function>

<function name="gtk_source_region_iter_is_end">
<description>
Since: 3.22

</description>
<parameters>
<parameter name="iter">
<parameter_description> a #GtkSourceRegionIter.
</parameter_description>
</parameter>
</parameters>
<return> whether @iter is the end iterator.
</return>
</function>

<function name="gtk_source_region_iter_next">
<description>
Moves @iter to the next subregion.

Since: 3.22

</description>
<parameters>
<parameter name="iter">
<parameter_description> a #GtkSourceRegionIter.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @iter moved and is dereferenceable, or %FALSE if @iter has
been set to the end iterator.
</return>
</function>

<function name="gtk_source_region_new">
<description>
Since: 3.22

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkTextBuffer.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceRegion object for @buffer.
</return>
</function>

<function name="gtk_source_region_subtract">
<description>
Subtracts the subregion delimited by @_start and @_end from @region.

Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion.
</parameter_description>
</parameter>
<parameter name="_start">
<parameter_description> the start of the subregion.
</parameter_description>
</parameter>
<parameter name="_end">
<parameter_description> the end of the subregion.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_region_to_string">
<description>
Gets a string represention of @region, for debugging purposes.

The returned string contains the character offsets of the subregions. It
doesn't include a newline character at the end of the string.

Since: 3.22

</description>
<parameters>
<parameter name="region">
<parameter_description> a #GtkSourceRegion.
</parameter_description>
</parameter>
</parameters>
<return> a string represention of @region. Free
with g_free() when no longer needed.
</return>
</function>

<function name="gtk_source_search_context_backward">
<description>
Synchronous backward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.

Since: 3.10
Deprecated: 3.22: Use gtk_source_search_context_backward2() instead.

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> start of search.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_backward2">
<description>
Synchronous backward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.

The difference with gtk_source_search_context_backward() is that the
@has_wrapped_around out parameter has been added for convenience.

If the #GtkSourceSearchSettings:wrap-around property is %FALSE, this function
doesn't try to wrap around.

The @has_wrapped_around out parameter is set independently of whether a match
is found. So if this function returns %FALSE, @has_wrapped_around will have
the same value as the #GtkSourceSearchSettings:wrap-around property.

Since: 3.22

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> start of search.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="has_wrapped_around">
<parameter_description> return location to know whether the
search has wrapped around, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_backward_async">
<description>
The asynchronous version of gtk_source_search_context_backward2().

See the documentation of gtk_source_search_context_backward2() for more
details.

See the #GAsyncResult documentation to know how to use this function.

If the operation is cancelled, the @callback will only be called if
@cancellable was not %NULL. gtk_source_search_context_backward_async() takes
ownership of @cancellable, so you can unref it after calling this function.

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> start of search.
</parameter_description>
</parameter>
<parameter name="cancellable">
<parameter_description> a #GCancellable, or %NULL.
</parameter_description>
</parameter>
<parameter name="callback">
<parameter_description> a #GAsyncReadyCallback to call when the operation is finished.
</parameter_description>
</parameter>
<parameter name="user_data">
<parameter_description> the data to pass to the @callback function.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_context_backward_finish">
<description>
Finishes a backward search started with
gtk_source_search_context_backward_async().

Since: 3.10
Deprecated: 3.22: Use gtk_source_search_context_backward_finish2() instead.

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="result">
<parameter_description> a #GAsyncResult.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_backward_finish2">
<description>
Finishes a backward search started with
gtk_source_search_context_backward_async().

See the documentation of gtk_source_search_context_backward2() for more
details.

Since: 3.22

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="result">
<parameter_description> a #GAsyncResult.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="has_wrapped_around">
<parameter_description> return location to know whether the
search has wrapped around, or %NULL.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_forward">
<description>
Synchronous forward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.

Since: 3.10
Deprecated: 3.22: Use gtk_source_search_context_forward2() instead.

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> start of search.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_forward2">
<description>
Synchronous forward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.

The difference with gtk_source_search_context_forward() is that the
@has_wrapped_around out parameter has been added for convenience.

If the #GtkSourceSearchSettings:wrap-around property is %FALSE, this function
doesn't try to wrap around.

The @has_wrapped_around out parameter is set independently of whether a match
is found. So if this function returns %FALSE, @has_wrapped_around will have
the same value as the #GtkSourceSearchSettings:wrap-around property.

Since: 3.22

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> start of search.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="has_wrapped_around">
<parameter_description> return location to know whether the
search has wrapped around, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_forward_async">
<description>
The asynchronous version of gtk_source_search_context_forward2().

See the documentation of gtk_source_search_context_forward2() for more
details.

See the #GAsyncResult documentation to know how to use this function.

If the operation is cancelled, the @callback will only be called if
@cancellable was not %NULL. gtk_source_search_context_forward_async() takes
ownership of @cancellable, so you can unref it after calling this function.

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> start of search.
</parameter_description>
</parameter>
<parameter name="cancellable">
<parameter_description> a #GCancellable, or %NULL.
</parameter_description>
</parameter>
<parameter name="callback">
<parameter_description> a #GAsyncReadyCallback to call when the operation is finished.
</parameter_description>
</parameter>
<parameter name="user_data">
<parameter_description> the data to pass to the @callback function.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_context_forward_finish">
<description>
Finishes a forward search started with
gtk_source_search_context_forward_async().

Since: 3.10
Deprecated: 3.22: Use gtk_source_search_context_forward_finish2() instead.

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="result">
<parameter_description> a #GAsyncResult.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_forward_finish2">
<description>
Finishes a forward search started with
gtk_source_search_context_forward_async().

See the documentation of gtk_source_search_context_forward2() for more
details.

Since: 3.22

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="result">
<parameter_description> a #GAsyncResult.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> return location for start of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> return location for end of match, or %NULL.
</parameter_description>
</parameter>
<parameter name="has_wrapped_around">
<parameter_description> return location to know whether the
search has wrapped around, or %NULL.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> a #GError, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</return>
</function>

<function name="gtk_source_search_context_get_buffer">
<description>
Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
</parameters>
<return> the associated buffer.
</return>
</function>

<function name="gtk_source_search_context_get_highlight">
<description>
Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
</parameters>
<return> whether to highlight the search occurrences.
</return>
</function>

<function name="gtk_source_search_context_get_match_style">
<description>
Since: 3.16

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceStyle to apply on search matches.

</return>
</function>

<function name="gtk_source_search_context_get_occurrence_position">
<description>
Gets the position of a search occurrence. If the buffer is not already fully
scanned, the position may be unknown, and -1 is returned. If 0 is returned,
it means that this part of the buffer has already been scanned, and that
@match_start and @match_end don't delimit an occurrence.

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> the start of the occurrence.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> the end of the occurrence.
</parameter_description>
</parameter>
</parameters>
<return> the position of the search occurrence. The first occurrence has the
position 1 (not 0). Returns 0 if @match_start and @match_end don't delimit
an occurrence. Returns -1 if the position is not yet known.

</return>
</function>

<function name="gtk_source_search_context_get_occurrences_count">
<description>
Gets the total number of search occurrences. If the buffer is not already
fully scanned, the total number of occurrences is unknown, and -1 is
returned.

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
</parameters>
<return> the total number of search occurrences, or -1 if unknown.
</return>
</function>

<function name="gtk_source_search_context_get_regex_error">
<description>
Regular expression patterns must follow certain rules. If
#GtkSourceSearchSettings:search-text breaks a rule, the error can be retrieved
with this function. The error domain is #G_REGEX_ERROR.

Free the return value with g_error_free().

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
</parameters>
<return> the #GError, or %NULL if the pattern is valid.
</return>
</function>

<function name="gtk_source_search_context_get_settings">
<description>
Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
</parameters>
<return> the search settings.
</return>
</function>

<function name="gtk_source_search_context_new">
<description>
Creates a new search context, associated with @buffer, and customized with
@settings. If @settings is %NULL, a new #GtkSourceSearchSettings object will
be created, that you can retrieve with
gtk_source_search_context_get_settings().

Since: 3.10

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> a new search context.
</return>
</function>

<function name="gtk_source_search_context_replace">
<description>
Replaces a search match by another text. If @match_start and @match_end
doesn't correspond to a search match, %FALSE is returned.

For a regular expression replacement, you can check if @replace is valid by
calling g_regex_check_replacement(). The @replace text can contain
backreferences; read the g_regex_replace() documentation for more details.

Since: 3.10
Deprecated: 3.22: Use gtk_source_search_context_replace2() instead.

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> the start of the match to replace.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> the end of the match to replace.
</parameter_description>
</parameter>
<parameter name="replace">
<parameter_description> the replacement text.
</parameter_description>
</parameter>
<parameter name="replace_length">
<parameter_description> the length of @replace in bytes, or -1.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> location to a #GError, or %NULL to ignore errors.
</parameter_description>
</parameter>
</parameters>
<return> whether the match has been replaced.
</return>
</function>

<function name="gtk_source_search_context_replace2">
<description>
Replaces a search match by another text. If @match_start and @match_end
doesn't correspond to a search match, %FALSE is returned.

Unlike with gtk_source_search_context_replace(), the @match_start and
@match_end iters are revalidated to point to the replacement text boundaries.

For a regular expression replacement, you can check if @replace is valid by
calling g_regex_check_replacement(). The @replace text can contain
backreferences; read the g_regex_replace() documentation for more details.

Since: 3.22

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="match_start">
<parameter_description> the start of the match to replace.
</parameter_description>
</parameter>
<parameter name="match_end">
<parameter_description> the end of the match to replace.
</parameter_description>
</parameter>
<parameter name="replace">
<parameter_description> the replacement text.
</parameter_description>
</parameter>
<parameter name="replace_length">
<parameter_description> the length of @replace in bytes, or -1.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> location to a #GError, or %NULL to ignore errors.
</parameter_description>
</parameter>
</parameters>
<return> whether the match has been replaced.
</return>
</function>

<function name="gtk_source_search_context_replace_all">
<description>
Replaces all search matches by another text. It is a synchronous function, so
it can block the user interface.

For a regular expression replacement, you can check if @replace is valid by
calling g_regex_check_replacement(). The @replace text can contain
backreferences; read the g_regex_replace() documentation for more details.

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="replace">
<parameter_description> the replacement text.
</parameter_description>
</parameter>
<parameter name="replace_length">
<parameter_description> the length of @replace in bytes, or -1.
</parameter_description>
</parameter>
<parameter name="error">
<parameter_description> location to a #GError, or %NULL to ignore errors.
</parameter_description>
</parameter>
</parameters>
<return> the number of replaced matches.
</return>
</function>

<function name="gtk_source_search_context_set_highlight">
<description>
Enables or disables the search occurrences highlighting.

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="highlight">
<parameter_description> the setting.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_context_set_match_style">
<description>
Set the style to apply on search matches. If @match_style is %NULL, default
theme's scheme 'match-style' will be used.
To enable or disable the search highlighting, use
gtk_source_search_context_set_highlight().

Since: 3.16

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="match_style">
<parameter_description> a #GtkSourceStyle, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_context_set_settings">
<description>
Associate a #GtkSourceSearchSettings with the search context. If @settings is
%NULL, a new one will be created.

The search context holds a reference to @settings.

Since: 3.10

</description>
<parameters>
<parameter name="search">
<parameter_description> a #GtkSourceSearchContext.
</parameter_description>
</parameter>
<parameter name="settings">
<parameter_description> the new #GtkSourceSearchSettings, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_settings_get_at_word_boundaries">
<description>
Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
</parameters>
<return> whether to search at word boundaries.
</return>
</function>

<function name="gtk_source_search_settings_get_case_sensitive">
<description>
Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
</parameters>
<return> whether the search is case sensitive.
</return>
</function>

<function name="gtk_source_search_settings_get_regex_enabled">
<description>
Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
</parameters>
<return> whether to search by regular expressions.
</return>
</function>

<function name="gtk_source_search_settings_get_search_text">
<description>
Gets the text to search. The return value must not be freed.

You may be interested to call gtk_source_utils_escape_search_text() after
this function.

Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
</parameters>
<return> the text to search, or %NULL if the search is disabled.
</return>
</function>

<function name="gtk_source_search_settings_get_wrap_around">
<description>
Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
</parameters>
<return> whether to wrap around the search.
</return>
</function>

<function name="gtk_source_search_settings_new">
<description>
Creates a new search settings object.

Since: 3.10

</description>
<parameters>
</parameters>
<return> a new search settings object.
</return>
</function>

<function name="gtk_source_search_settings_set_at_word_boundaries">
<description>
Change whether the search is done at word boundaries. If @at_word_boundaries
is %TRUE, a search match must start and end a word. The match can span
multiple words. See also gtk_text_iter_starts_word() and
gtk_text_iter_ends_word().

Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
<parameter name="at_word_boundaries">
<parameter_description> the setting.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_settings_set_case_sensitive">
<description>
Enables or disables the case sensitivity for the search.

Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
<parameter name="case_sensitive">
<parameter_description> the setting.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_settings_set_regex_enabled">
<description>
Enables or disables whether to search by regular expressions.
If enabled, the #GtkSourceSearchSettings:search-text property contains the
pattern of the regular expression.

#GtkSourceSearchContext uses #GRegex when regex search is enabled. See the
[Regular expression syntax](https://developer.gnome.org/glib/stable/glib-regex-syntax.html)
page in the GLib reference manual.

Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
<parameter name="regex_enabled">
<parameter_description> the setting.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_settings_set_search_text">
<description>
Sets the text to search. If @text is %NULL or is empty, the search will be
disabled. A copy of @text will be made, so you can safely free @text after
a call to this function.

You may be interested to call gtk_source_utils_unescape_search_text() before
this function.

Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
<parameter name="search_text">
<parameter_description> the nul-terminated text to search, or %NULL to disable the search.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_search_settings_set_wrap_around">
<description>
Enables or disables the wrap around search. If @wrap_around is %TRUE, the
forward search continues at the beginning of the buffer if no search
occurrences are found. Similarly, the backward search continues to search at
the end of the buffer.

Since: 3.10

</description>
<parameters>
<parameter name="settings">
<parameter_description> a #GtkSourceSearchSettings.
</parameter_description>
</parameter>
<parameter name="wrap_around">
<parameter_description> the setting.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_style_apply">
<description>
This function modifies the #GtkTextTag properties that are related to the
#GtkSourceStyle properties. Other #GtkTextTag properties are left untouched.

If @style is non-%NULL, applies @style to @tag.

If @style is %NULL, the related *-set properties of #GtkTextTag are set to
%FALSE.

Since: 3.22

</description>
<parameters>
<parameter name="style">
<parameter_description> a #GtkSourceStyle to apply, or %NULL.
</parameter_description>
</parameter>
<parameter name="tag">
<parameter_description> a #GtkTextTag to apply styles to.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_style_copy">
<description>
Creates a copy of @style, that is a new #GtkSourceStyle instance which
has the same attributes set.

Since: 2.0

</description>
<parameters>
<parameter name="style">
<parameter_description> a #GtkSourceStyle structure to copy.
</parameter_description>
</parameter>
</parameters>
<return> copy of @style, call g_object_unref()
when you are done with it.

</return>
</function>

<function name="gtk_source_style_scheme_chooser_button_new">
<description>
Creates a new #GtkSourceStyleSchemeChooserButton.

Since: 3.16

</description>
<parameters>
</parameters>
<return> a new #GtkSourceStyleSchemeChooserButton.

</return>
</function>

<function name="gtk_source_style_scheme_chooser_get_style_scheme">
<description>
Gets the currently-selected scheme.

Since: 3.16

</description>
<parameters>
<parameter name="chooser">
<parameter_description> a #GtkSourceStyleSchemeChooser
</parameter_description>
</parameter>
</parameters>
<return> the currently-selected scheme.

</return>
</function>

<function name="gtk_source_style_scheme_chooser_set_style_scheme">
<description>
Sets the scheme.

Since: 3.16

</description>
<parameters>
<parameter name="chooser">
<parameter_description> a #GtkSourceStyleSchemeChooser
</parameter_description>
</parameter>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_style_scheme_chooser_widget_new">
<description>
Creates a new #GtkSourceStyleSchemeChooserWidget.

Since: 3.16

</description>
<parameters>
</parameters>
<return> a new  #GtkSourceStyleSchemeChooserWidget.

</return>
</function>

<function name="gtk_source_style_scheme_get_authors">
<description>
Since: 2.0

</description>
<parameters>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme.
</parameter_description>
</parameter>
</parameters>
<return> a
%NULL-terminated array containing the @scheme authors or %NULL if
no author is specified by the style scheme.

</return>
</function>

<function name="gtk_source_style_scheme_get_description">
<description>
Since: 2.0

</description>
<parameters>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme.
</parameter_description>
</parameter>
</parameters>
<return> @scheme description (if defined), or %NULL.

</return>
</function>

<function name="gtk_source_style_scheme_get_filename">
<description>
Since: 2.0

</description>
<parameters>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme.
</parameter_description>
</parameter>
</parameters>
<return> @scheme file name if the scheme was created
parsing a style scheme file or %NULL in the other cases.

</return>
</function>

<function name="gtk_source_style_scheme_get_id">
<description>
Since: 2.0

</description>
<parameters>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme.
</parameter_description>
</parameter>
</parameters>
<return> @scheme id.

</return>
</function>

<function name="gtk_source_style_scheme_get_name">
<description>
Since: 2.0

</description>
<parameters>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme.
</parameter_description>
</parameter>
</parameters>
<return> @scheme name.

</return>
</function>

<function name="gtk_source_style_scheme_get_style">
<description>
Since: 2.0

</description>
<parameters>
<parameter name="scheme">
<parameter_description> a #GtkSourceStyleScheme.
</parameter_description>
</parameter>
<parameter name="style_id">
<parameter_description> id of the style to retrieve.
</parameter_description>
</parameter>
</parameters>
<return> style which corresponds to @style_id in
the @scheme, or %NULL when no style with this name found.  It is owned by
@scheme and may not be unref'ed.

</return>
</function>

<function name="gtk_source_style_scheme_manager_append_search_path">
<description>
Appends @path to the list of directories where the @manager looks for
style scheme files.
See gtk_source_style_scheme_manager_set_search_path() for details.

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceStyleSchemeManager.
</parameter_description>
</parameter>
<parameter name="path">
<parameter_description> a directory or a filename.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_style_scheme_manager_force_rescan">
<description>
Mark any currently cached information about the available style scehems
as invalid. All the available style schemes will be reloaded next time
the @manager is accessed.

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceStyleSchemeManager.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_style_scheme_manager_get_default">
<description>
Returns the default #GtkSourceStyleSchemeManager instance.


</description>
<parameters>
</parameters>
<return> a #GtkSourceStyleSchemeManager. Return value
is owned by GtkSourceView library and must not be unref'ed.
</return>
</function>

<function name="gtk_source_style_scheme_manager_get_scheme">
<description>
Looks up style scheme by id.


</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceStyleSchemeManager.
</parameter_description>
</parameter>
<parameter name="scheme_id">
<parameter_description> style scheme id to find.
</parameter_description>
</parameter>
</parameters>
<return> a #GtkSourceStyleScheme object. Returned value is owned by
@manager and must not be unref'ed.
</return>
</function>

<function name="gtk_source_style_scheme_manager_get_scheme_ids">
<description>
Returns the ids of the available style schemes.


</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceStyleSchemeManager.
</parameter_description>
</parameter>
</parameters>
<return>
a %NULL-terminated array of strings containing the ids of the available
style schemes or %NULL if no style scheme is available.
The array is sorted alphabetically according to the scheme name.
The array is owned by the @manager and must not be modified.
</return>
</function>

<function name="gtk_source_style_scheme_manager_get_search_path">
<description>
Returns the current search path for the @manager.
See gtk_source_style_scheme_manager_set_search_path() for details.


</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceStyleSchemeManager.
</parameter_description>
</parameter>
</parameters>
<return> a %NULL-terminated array
of string containing the search path.
The array is owned by the @manager and must not be modified.
</return>
</function>

<function name="gtk_source_style_scheme_manager_new">
<description>
Creates a new style manager. If you do not need more than one style
manager then use gtk_source_style_scheme_manager_get_default() instead.


</description>
<parameters>
</parameters>
<return> a new #GtkSourceStyleSchemeManager.
</return>
</function>

<function name="gtk_source_style_scheme_manager_prepend_search_path">
<description>
Prepends @path to the list of directories where the @manager looks
for style scheme files.
See gtk_source_style_scheme_manager_set_search_path() for details.

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceStyleSchemeManager.
</parameter_description>
</parameter>
<parameter name="path">
<parameter_description> a directory or a filename.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_style_scheme_manager_set_search_path">
<description>
Sets the list of directories where the @manager looks for
style scheme files.
If @path is %NULL, the search path is reset to default.

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceStyleSchemeManager.
</parameter_description>
</parameter>
<parameter name="path">
<parameter_description>
a %NULL-terminated array of strings or %NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_tag_new">
<description>
Creates a #GtkSourceTag. Configure the tag using object arguments,
i.e. using g_object_set().

For usual cases, gtk_source_buffer_create_source_tag() is more convenient to
use.

Since: 3.20

</description>
<parameters>
<parameter name="name">
<parameter_description> tag name, or %NULL.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceTag.
</return>
</function>

<function name="gtk_source_undo_manager_begin_not_undoable_action">
<description>
Begin a not undoable action on the buffer. All changes between this call
and the call to gtk_source_undo_manager_end_not_undoable_action() cannot
be undone. This function should be re-entrant.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_undo_manager_can_redo">
<description>
Get whether there are redo operations available.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if there are redo operations available, %FALSE otherwise

</return>
</function>

<function name="gtk_source_undo_manager_can_redo_changed">
<description>
Emits the #GtkSourceUndoManager::can-redo-changed signal.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_undo_manager_can_undo">
<description>
Get whether there are undo operations available.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if there are undo operations available, %FALSE otherwise

</return>
</function>

<function name="gtk_source_undo_manager_can_undo_changed">
<description>
Emits the #GtkSourceUndoManager::can-undo-changed signal.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_undo_manager_end_not_undoable_action">
<description>
Ends a not undoable action on the buffer.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_undo_manager_redo">
<description>
Perform a single redo. Calling this function when there are no redo operations
available is an error. Use gtk_source_undo_manager_can_redo() to find out
if there are redo operations available.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_undo_manager_undo">
<description>
Perform a single undo. Calling this function when there are no undo operations
available is an error. Use gtk_source_undo_manager_can_undo() to find out
if there are undo operations available.

Since: 2.10

</description>
<parameters>
<parameter name="manager">
<parameter_description> a #GtkSourceUndoManager.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_utils_escape_search_text">
<description>
Use this function to escape the following characters: `\n`, `\r`, `\t` and `\`.

For a regular expression search, use g_regex_escape_string() instead.

One possible use case is to take the #GtkTextBuffer's selection and put it in a
search entry. The selection can contain tabulations, newlines, etc. So it's
better to escape those special characters to better fit in the search entry.

See also: gtk_source_utils_unescape_search_text().

&lt;warning&gt;
Warning: the escape and unescape functions are not reciprocal! For example,
escape (unescape (\)) = \\. So avoid cycles such as: search entry -&gt; unescape
-&gt; search settings -&gt; escape -&gt; search entry. The original search entry text
may be modified.
&lt;/warning&gt;

Since: 3.10

</description>
<parameters>
<parameter name="text">
<parameter_description> the text to escape.
</parameter_description>
</parameter>
</parameters>
<return> the escaped @text.
</return>
</function>

<function name="gtk_source_utils_unescape_search_text">
<description>
Use this function before gtk_source_search_settings_set_search_text(), to
unescape the following sequences of characters: `\n`, `\r`, `\t` and `\\`.
The purpose is to easily write those characters in a search entry.

Note that unescaping the search text is not needed for regular expression
searches.

See also: gtk_source_utils_escape_search_text().

Since: 3.10

</description>
<parameters>
<parameter name="text">
<parameter_description> the text to unescape.
</parameter_description>
</parameter>
</parameters>
<return> the unescaped @text.
</return>
</function>

<function name="gtk_source_view_get_auto_indent">
<description>
Returns whether auto-indentation of text is enabled.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if auto indentation is enabled.
</return>
</function>

<function name="gtk_source_view_get_background_pattern">
<description>
Returns the #GtkSourceBackgroundPatternType specifying if and how
the background pattern should be displayed for this @view.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceBackgroundPatternType.
</return>
</function>

<function name="gtk_source_view_get_completion">
<description>
Gets the #GtkSourceCompletion associated with @view.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return>
the #GtkSourceCompletion associated with @view.
</return>
</function>

<function name="gtk_source_view_get_draw_spaces">
<description>
Returns the #GtkSourceDrawSpacesFlags specifying if and how spaces
should be displayed for this @view.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceDrawSpacesFlags, 0 if no spaces should be drawn.
</return>
</function>

<function name="gtk_source_view_get_gutter">
<description>
Returns the #GtkSourceGutter object associated with @window_type for @view.
Only GTK_TEXT_WINDOW_LEFT and GTK_TEXT_WINDOW_RIGHT are supported,
respectively corresponding to the left and right gutter. The line numbers
and mark category icons are rendered in the left gutter.

Since: 2.8


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="window_type">
<parameter_description> the gutter window type.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceGutter.
</return>
</function>

<function name="gtk_source_view_get_highlight_current_line">
<description>
Returns whether the current line is highlighted.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the current line is highlighted.
</return>
</function>

<function name="gtk_source_view_get_indent_on_tab">
<description>
Returns whether when the tab key is pressed the current selection
should get indented instead of replaced with the \t character.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the selection is indented when tab is pressed.
</return>
</function>

<function name="gtk_source_view_get_indent_width">
<description>
Returns the number of spaces to use for each step of indent.
See gtk_source_view_set_indent_width() for details.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> indent width.
</return>
</function>

<function name="gtk_source_view_get_insert_spaces_instead_of_tabs">
<description>
Returns whether when inserting a tabulator character it should
be replaced by a group of space characters.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if spaces are inserted instead of tabs.
</return>
</function>

<function name="gtk_source_view_get_mark_attributes">
<description>
Gets attributes and priority for the @category.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> the category.
</parameter_description>
</parameter>
<parameter name="priority">
<parameter_description> place where priority of the category will be stored.
</parameter_description>
</parameter>
</parameters>
<return> #GtkSourceMarkAttributes for the @category.
The object belongs to @view, so it must not be unreffed.
</return>
</function>

<function name="gtk_source_view_get_right_margin_position">
<description>
Gets the position of the right margin in the given @view.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> the position of the right margin.
</return>
</function>

<function name="gtk_source_view_get_show_line_marks">
<description>
Returns whether line marks are displayed beside the text.

Since: 2.2

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the line marks are displayed.

</return>
</function>

<function name="gtk_source_view_get_show_line_numbers">
<description>
Returns whether line numbers are displayed beside the text.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the line numbers are displayed.
</return>
</function>

<function name="gtk_source_view_get_show_right_margin">
<description>
Returns whether a right margin is displayed.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the right margin is shown.
</return>
</function>

<function name="gtk_source_view_get_smart_backspace">
<description>
Returns %TRUE if pressing the Backspace key will try to delete spaces
up to the previous tab stop.

Since: 3.18

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if smart Backspace handling is enabled.

</return>
</function>

<function name="gtk_source_view_get_smart_home_end">
<description>
Returns a #GtkSourceSmartHomeEndType end value specifying
how the cursor will move when HOME and END keys are pressed.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> a #GtkSourceSmartHomeEndType value.
</return>
</function>

<function name="gtk_source_view_get_tab_width">
<description>
Returns the width of tabulation in characters.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
</parameters>
<return> width of tab.
</return>
</function>

<function name="gtk_source_view_get_visual_column">
<description>
Determines the visual column at @iter taking into consideration the
#GtkSourceView:tab-width of @view.


</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> a position in @view.
</parameter_description>
</parameter>
</parameters>
<return> the visual column at @iter.
</return>
</function>

<function name="gtk_source_view_indent_lines">
<description>
Insert one indentation level at the beginning of the
specified lines.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> #GtkTextIter of the first line to indent
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> #GtkTextIter of the last line to indent
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_new">
<description>
Creates a new #GtkSourceView.

By default, an empty #GtkSourceBuffer will be lazily created and can be
retrieved with gtk_text_view_get_buffer().

If you want to specify your own buffer, either override the
#GtkTextViewClass create_buffer factory method, or use
gtk_source_view_new_with_buffer().


</description>
<parameters>
</parameters>
<return> a new #GtkSourceView.
</return>
</function>

<function name="gtk_source_view_new_with_buffer">
<description>
Creates a new #GtkSourceView widget displaying the buffer
@buffer. One buffer can be shared among many widgets.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> a new #GtkSourceView.
</return>
</function>

<function name="gtk_source_view_set_auto_indent">
<description>
If %TRUE auto-indentation of text is enabled.

When Enter is pressed to create a new line, the auto-indentation inserts the
same indentation as the previous line. This is &lt;emphasis&gt;not&lt;/emphasis&gt; a
&quot;smart indentation&quot; where an indentation level is added or removed depending
on the context.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="enable">
<parameter_description> whether to enable auto indentation.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_background_pattern">
<description>
Set if and how the background pattern should be displayed.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="background_pattern">
<parameter_description> the #GtkSourceBackgroundPatternType.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_draw_spaces">
<description>
Set if and how the spaces should be visualized. Specifying @flags as 0 will
disable display of spaces.

For a finer-grained method, there is also the GtkSourceTag's
#GtkSourceTag:draw-spaces property.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="flags">
<parameter_description> #GtkSourceDrawSpacesFlags specifing how white spaces should
be displayed
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_highlight_current_line">
<description>
If @highlight is %TRUE the current line will be highlighted.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="highlight">
<parameter_description> whether to highlight the current line.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_indent_on_tab">
<description>
If %TRUE, when the tab key is pressed when several lines are selected, the
selected lines are indented of one level instead of being replaced with a \t
character. Shift+Tab unindents the selection.

If the first or last line is not selected completely, it is also indented or
unindented.

When the selection doesn't span several lines, the tab key always replaces
the selection with a normal \t character.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="enable">
<parameter_description> whether to indent a block when tab is pressed.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_indent_width">
<description>
Sets the number of spaces to use for each step of indent when the tab key is
pressed. If @width is -1, the value of the #GtkSourceView:tab-width property
will be used.

The #GtkSourceView:indent-width interacts with the
#GtkSourceView:insert-spaces-instead-of-tabs property and
#GtkSourceView:tab-width. An example will be clearer: if the
#GtkSourceView:indent-width is 4 and
#GtkSourceView:tab-width is 8 and
#GtkSourceView:insert-spaces-instead-of-tabs is %FALSE, then pressing the tab
key at the beginning of a line will insert 4 spaces. So far so good. Pressing
the tab key a second time will remove the 4 spaces and insert a \t character
instead (since #GtkSourceView:tab-width is 8). On the other hand, if
#GtkSourceView:insert-spaces-instead-of-tabs is %TRUE, the second tab key
pressed will insert 4 more spaces for a total of 8 spaces in the
#GtkTextBuffer.

The test-widget program (available in the GtkSourceView repository) may be
useful to better understand the indentation settings (enable the space
drawing!).

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="width">
<parameter_description> indent width in characters.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_insert_spaces_instead_of_tabs">
<description>
If %TRUE a tab key pressed is replaced by a group of space characters. Of
course it is still possible to insert a real \t programmatically with the
#GtkTextBuffer API.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="enable">
<parameter_description> whether to insert spaces instead of tabs.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_mark_attributes">
<description>
Sets attributes and priority for the @category.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> the category.
</parameter_description>
</parameter>
<parameter name="attributes">
<parameter_description> mark attributes.
</parameter_description>
</parameter>
<parameter name="priority">
<parameter_description> priority of the category.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_right_margin_position">
<description>
Sets the position of the right margin in the given @view.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="pos">
<parameter_description> the width in characters where to position the right margin.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_show_line_marks">
<description>
If %TRUE line marks will be displayed beside the text.

Since: 2.2

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="show">
<parameter_description> whether line marks should be displayed.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_show_line_numbers">
<description>
If %TRUE line numbers will be displayed beside the text.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="show">
<parameter_description> whether line numbers should be displayed.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_show_right_margin">
<description>
If %TRUE a right margin is displayed.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="show">
<parameter_description> whether to show a right margin.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_smart_backspace">
<description>
When set to %TRUE, pressing the Backspace key will try to delete spaces
up to the previous tab stop.

Since: 3.18

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="smart_backspace">
<parameter_description> whether to enable smart Backspace handling.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_smart_home_end">
<description>
Set the desired movement of the cursor when HOME and END keys
are pressed.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="smart_home_end">
<parameter_description> the desired behavior among #GtkSourceSmartHomeEndType.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_tab_width">
<description>
Sets the width of tabulation in characters. The #GtkTextBuffer still contains
\t characters, but they can take a different visual width in a #GtkSourceView
widget.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="width">
<parameter_description> width of tab in characters.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_unindent_lines">
<description>
Removes one indentation level at the beginning of the
specified lines.

Since: 3.16

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> #GtkTextIter of the first line to indent
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> #GtkTextIter of the last line to indent
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="idle_worker">
<description>
Analyzes a batch in idle. Stops when
whole buffer is analyzed.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="insert_range">
<description>
Updates segment tree after insertion: it updates tree
offsets as appropriate, and inserts a new invalid segment
or extends existing invalid segment as @offset, so
after the call segment [@offset, @offset + @length) is marked
invalid in the tree.
It may be safely called with length == 0 at any moment
to invalidate some offset (and it's used here and there).

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> the start of new segment.
</parameter_description>
</parameter>
<parameter name="length">
<parameter_description> the length of the segment.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="install_first_update">
<description>
Schedules first_update_callback call.
Always safe to call.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="install_idle_worker">
<description>
Schedules reanalyzing buffer in idle.
Always safe to call.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="invalidate_region">
<description>
Adds the area to the invalid region and queues highlighting.
@length may be negative which means deletion; positive
means insertion; 0 means &quot;something happened here&quot;, it's
treated as zero-length insertion.

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> the start of invalidated area.
</parameter_description>
</parameter>
<parameter name="length">
<parameter_description> the length of the area.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="line_info_destroy">
<description>
Destroys data allocated by get_line_info().

</description>
<parameters>
<parameter name="line">
<parameter_description> #LineInfo.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="next_segment">
<description>
Verifies if a context starts or ends in @line at @line_pos of after it.
If the contexts starts or ends here @new_state and @line_pos are updated.


</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="state">
<parameter_description> current state.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> analyzed line.
</parameter_description>
</parameter>
<parameter name="line_pos">
<parameter_description> position inside @line, bytes.
</parameter_description>
</parameter>
<parameter name="new_state">
<parameter_description> where to store the new state.
</parameter_description>
</parameter>
<parameter name="hint">
<parameter_description> child of @state used to optimize tree operations.
</parameter_description>
</parameter>
</parameters>
<return> %FALSE is there are no more contexts in @line.
</return>
</function>

<function name="remove_invalid">
<description>
Removes segment from the list of invalid segments;
Called when an invalid segment is destroyed (invalid
segments never become valid).

</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="segment">
<parameter_description> segment.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="resolve_reference">
<description>
Checks whether all children of a context definition refer to valid
contexts. Called from _gtk_source_context_data_finish_parse.

</description>
<parameters>
</parameters>
<return></return>
</function>

<function name="segment_add_subpattern">
<description>
Prepends subpattern to subpatterns list in the segment.

</description>
<parameters>
<parameter name="state">
<parameter_description> the segment.
</parameter_description>
</parameter>
<parameter name="sp">
<parameter_description> subpattern.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_cmp">
<description>
Compares segments by their offset, used to sort list of invalid segments.


</description>
<parameters>
<parameter name="s1">
<parameter_description> first segment.
</parameter_description>
</parameter>
<parameter name="s2">
<parameter_description> second segment.
</parameter_description>
</parameter>
</parameters>
<return> an integer like strcmp() does.
</return>
</function>

<function name="segment_destroy">
<description>
Recursively frees given segment. It removes the segment
from ce structure, but it doesn't update parent and
siblings. segment_remove() is the function that takes
care of everything.

</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> the segment to destroy.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_ends_here">
<description>
Checks whether given segment ends at pos. Unlike
child_starts_here() it doesn't modify tree, it merely
calls regex_match() for the end regex.

</description>
<parameters>
<parameter name="state">
<parameter_description> the segment.
</parameter_description>
</parameter>
<parameter name="line">
<parameter_description> analyzed line.
</parameter_description>
</parameter>
<parameter name="pos">
<parameter_description> the position inside @line, bytes.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_erase_range_">
<description>
Recurisvely removes segments from [@start, @end] interval
starting from @segment. If @segment belongs to the range,
or it's a zero-length segment at @end offset, and it's not
the toplevel segment, then it's removed from the tree.
If @segment intersects with the range (unless it's the toplevel
segment), then its ends are adjusted appropriately, and it's
split into two if it completely contains the range.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="segment">
<parameter_description> the segment.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> start offset of range to erase, characters.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> end offset of range to erase, characters.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_extend">
<description>
Updates end offset in the segment and its ancestors.

</description>
<parameters>
<parameter name="state">
<parameter_description> the semgent.
</parameter_description>
</parameter>
<parameter name="end_at">
<parameter_description> new end offset, characters.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_make_invalid_">
<description>
Invalidates segment. Called only from insert_range().

</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="segment">
<parameter_description> segment to invalidate.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_merge">
<description>
Merges adjacent segments @first and @second given
their contexts are equal.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="first">
<parameter_description> first segment.
</parameter_description>
</parameter>
<parameter name="second">
<parameter_description> second segment.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_new">
<description>
Creates a new segment structure. It doesn't take care about
parent or siblings, create_segment() is the function to
create new segments in the tree.


</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="parent">
<parameter_description> parent segment (%NULL for the root segment).
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> context for this segment (%NULL for invalid segments).
</parameter_description>
</parameter>
<parameter name="start_at">
<parameter_description> start offset in the buffer, characters.
</parameter_description>
</parameter>
<parameter name="end_at">
<parameter_description> end offset in the buffer, characters.
</parameter_description>
</parameter>
<parameter name="is_start">
<parameter_description> is_start flag.
</parameter_description>
</parameter>
</parameters>
<return> newly created segment.
</return>
</function>

<function name="segment_remove">
<description>
Removes the segment from syntax tree and frees it.
It correctly updates parent's children list, not
like segment_destroy() where caller has to take care
of tree integrity.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSoucreContextEngine.
</parameter_description>
</parameter>
<parameter name="segment">
<parameter_description> segment to remove.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="segment_tree_zero_len">
<description>
Erases syntax tree and sets root segment length to zero.
It's a shortcut for case when all the text is deleted from
the buffer.

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSoucreContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="simple_context_starts_here">
<description>
See child_starts_here().

</description>
<parameters>
</parameters>
<return></return>
</function>

<function name="simple_segment_split_">
<description>
Creates a new invalid segment and inserts it in the middle
of the given one. Called from insert_range() to mark inserted
text.


</description>
<parameters>
<parameter name="ce">
<parameter_description> the engine.
</parameter_description>
</parameter>
<parameter name="segment">
<parameter_description> segment to split.
</parameter_description>
</parameter>
<parameter name="offset">
<parameter_description> offset at which text insertion occurred.
</parameter_description>
</parameter>
</parameters>
<return> new invalid segment.
</return>
</function>

<function name="sub_pattern_free">
<description>
Calls g_free on subpattern, was useful for debugging.

</description>
<parameters>
<parameter name="sp">
<parameter_description> subppatern.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="sub_pattern_new">
<description>
Creates new subpattern and adds it to the segment's
subpatterns list.


</description>
<parameters>
<parameter name="segment">
<parameter_description> the segment.
</parameter_description>
</parameter>
<parameter name="start_at">
<parameter_description> start offset of the subpattern.
</parameter_description>
</parameter>
<parameter name="end_at">
<parameter_description> end offset of the subpattern.
</parameter_description>
</parameter>
<parameter name="sp_def">
<parameter_description> the subppatern definition.
</parameter_description>
</parameter>
</parameters>
<return> new subpattern.
</return>
</function>

<function name="update_syntax">
<description>
Updates syntax tree. If @end is not %NULL, then it analyzes
(reanalyzes invalid areas in) region from start of buffer
to @end. Otherwise, it analyzes batch of text starting at
first invalid line.
In order to avoid blocking ui it uses a timer and stops
when time elapsed is greater than @time, so analyzed region is
not necessarily what's requested (unless @time is 0).

</description>
<parameters>
<parameter name="ce">
<parameter_description> #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> desired end of region to analyze or %NULL.
</parameter_description>
</parameter>
<parameter name="time">
<parameter_description> maximal amount of time in milliseconds allowed to spend here
or 0 for 'unlimited'.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="update_tree">
<description>
Modifies syntax tree according to data in invalid_region.

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

</root>
