<root>
<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="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="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> The new #GtkSourceCompletionItem.

</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 doesn't contain that metadata property.
The returned string is owned by @language and should not be freed
or modified.
</return>
</function>

<function name="gtk_source_view_set_mark_category_priority">
<description>
Set the @priority for the given mark @category. When there are
multiple marks on the same line, marks of categories with
higher priorities will be drawn on top.

Since: 2.2

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="priority">
<parameter_description> the priority for the category
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_get_mark_category_pixbuf">
<description>
Gets the pixbuf which is associated with the given mark @category.

Since: 2.2

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
</parameters>
<return> the associated #GdkPixbuf, or %NULL if not found.

</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_completion_info_set_sizing">
<description>
Set sizing information for the info window. If @shrink_width or
@shrink_height is %TRUE, the info window will try to resize to fit the
window contents, with a maximum size given by @width and @height. Setting
@width or @height to -1 removes the maximum size of respectively the width
and height of the window.


</description>
<parameters>
<parameter name="info">
<parameter_description> A #GtkSourceCompletionInfo
</parameter_description>
</parameter>
<parameter name="width">
<parameter_description> The maximum/requested width of the window (-1 to default)
</parameter_description>
</parameter>
<parameter name="height">
<parameter_description> The maximum/requested height of the window (-1 to default)
</parameter_description>
</parameter>
<parameter name="shrink_width">
<parameter_description> Whether to shrink the width of the window to fit its contents
</parameter_description>
</parameter>
<parameter name="shrink_height">
<parameter_description> Whether to shrink the height of the window to fit its
contents
</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="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="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_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_completion_provider_update_info">
<description>
Update extra information shown in @info for @proposal. This should be
implemented if your provider sets a custom info widget for @proposal.
This function MUST be implemented when 
#gtk_source_completion_provider_get_info_widget is implemented.

</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_provider_populate">
<description>
Populate @context with proposals from @provider


</description>
<parameters>
<parameter name="provider">
<parameter_description> The #GtkSourceCompletionProvider
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> The #GtkSourceCompletionContext
</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="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="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_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_view_set_mark_category_tooltip_markup_func">
<description>
See gtk_source_view_set_mark_category_tooltip_func() for more information.

Since: 2.8

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="markup_func">
<parameter_description> a #GtkSourceViewMarkTooltipFunc or %NULL.
</parameter_description>
</parameter>
<parameter name="user_data">
<parameter_description> user data which will be passed to @func.
</parameter_description>
</parameter>
<parameter name="user_data_notify">
<parameter_description>a function to free the memory allocated for @user_data 
or %NULL if you do not want to supply such a function.
</parameter_description>
</parameter>
</parameters>
<return></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_completion_utils_move_to_iter">
<description>

</description>
<parameters>
<parameter name="window">
<parameter_description> the #GtkWindow to move
</parameter_description>
</parameter>
<parameter name="view">
<parameter_description> the view 
</parameter_description>
</parameter>
<parameter name="iter">
<parameter_description> the iter to move @window to
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_auto_indent">
<description>
If %TRUE auto indentation of text is enabled.


</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="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="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="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_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="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="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="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="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>

<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_context_engine_update_highlight">
<description>
GtkSourceEngine::update_highlight method.

Makes sure the area is analyzed and highlighted. If @asynchronous
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_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="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="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="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="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> The new #GtkSourceCompletionItem.

</return>
</function>

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

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></return>
</function>

<function name="gtk_source_iter_backward_search">
<description>
Same as gtk_text_iter_backward_search(), but supports case insensitive
searching.


</description>
<parameters>
<parameter name="iter">
<parameter_description> a #GtkTextIter where the search begins.
</parameter_description>
</parameter>
<parameter name="str">
<parameter_description> search string.
</parameter_description>
</parameter>
<parameter name="flags">
<parameter_description> bitmask of flags affecting the 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="limit">
<parameter_description> location of last possible @match_start, or %NULL for start of buffer.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</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_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_style_scheme_manager_set_search_path">
<description>
Sets the list of directories where the @manager looks for
style scheme files.
If @dirs 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_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.  You can specify the
style with the gtk_source_buffer_set_bracket_match_style()
function.

</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_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="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="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_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="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> (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="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="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="highlight_region">
<description>
Highlights the specified region.

</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="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="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="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.
All strftime() codes are accepted, with the addition of %N for the
page number and %Q for 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_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, no limit is set.

A new action is started whenever the function
gtk_text_buffer_begin_user_action() is called.  In general, this
happens whenever the user presses any key which modifies the
buffer, but the undo manager will try to merge similar consecutive
actions, such as multiple character insertions into one action.
But, inserting a newline does start a new action.

</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="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="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="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="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_view_set_mark_category_pixbuf">
<description>
Associates a given @pixbuf with a given mark @category.
If @pixbuf is #NULL, the pixbuf is unset.

Deprecated: Use #gtk_source_view_set_mark_category_icon_from_pixbuf instead

Since: 2.2

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="pixbuf">
<parameter_description> a #GdkPixbuf or #NULL.
</parameter_description>
</parameter>
</parameters>
<return></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_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  %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_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_buffer_get_context_classes_at_iter">
<description>
Get all defined context classes at @iter.

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_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="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="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="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_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="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="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_utils_get_word_iter">
<description>

</description>
<parameters>
<parameter name="source_buffer">
<parameter_description> The #GtkSourceBuffer
</parameter_description>
</parameter>
<parameter name="start_word">
<parameter_description> if != NULL then assign it the start position of the word
</parameter_description>
</parameter>
<parameter name="end_word">
<parameter_description> if != NULL then assing it the end position of the word
</parameter_description>
</parameter>
</parameters>
<return> the current word
</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_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="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="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_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_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_buffer_get_undo_manager">
<description>
Get the undo manager associated with the buffer.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> A #GtkSourceBuffer
</parameter_description>
</parameter>
</parameters>
<return> A #GtkSourceUndoManager

</return>
</function>

<function name="gtk_source_style_scheme_set_style">
<description>
Since: 2.0

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

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


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

<function name="gtk_source_print_compositor_set_footer_format">
<description>
Sets strftime like header format strings, to be printed on the
left, center and right of the bottom of each page. The strings may
include strftime(3) codes which will be expanded at print time.
All strftime() codes are accepted, with the addition of %N for the
page number and %Q for the page count.

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

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

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

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 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_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_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 implemented, #gtk_source_completion_provider_update_info MUST also be
implemented. If not implemented, the default 
#gtk_source_completion_proposal_get_info will be used to display extra
information about a #GtkSourceCompletionProposal.


</description>
<parameters>
<parameter name="provider">
<parameter_description> The #GtkSourceCompletionProvider
</parameter_description>
</parameter>
<parameter name="proposal">
<parameter_description> The currently selected #GtkSourceCompletionProposal
</parameter_description>
</parameter>
</parameters>
<return> a custom #GtkWidget to show extra information about @proposal.
</return>
</function>

<function name="gtk_source_completion_utils_replace_current_word">
<description>
Replaces the current word in the #GtkSourceBuffer with the new word

</description>
<parameters>
<parameter name="source_buffer">
<parameter_description> The #GtkSourceBuffer
</parameter_description>
</parameter>
<parameter name="text">
<parameter_description> The text to be inserted instead of the current word
</parameter_description>
</parameter>
</parameters>
<return></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).


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return> the section of @language.
The returned string is owned by @language and should not be freed
or modified.
</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.

</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_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 moved.

</return>
</function>

<function name="gtk_source_view_set_indent_width">
<description>
Sets the number of spaces to use for each step of indent.
If @width is -1, the value of the GtkSourceView::tab-width property
will be used.

</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="simple_context_starts_here">
<description>
See child_starts_here().

</description>
<parameters>
</parameters>
<return></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 #GtkSourceSmartHomeEndTypeend value.
</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.

Actions are defined as groups of operations between a call to
gtk_text_buffer_begin_user_action() and
gtk_text_buffer_end_user_action(), or sequences of similar edits
(inserts or deletes) on the same line.

</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return></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="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="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_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="find_insertion_place_backward_">
<description>
Auxiliary function used in find_insertion_place().

</description>
<parameters>
<parameter name="segment">
<parameter_description> (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="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_view_set_mark_category_tooltip_func">
<description>
Set a #GtkSourceViewMarkTooltipFunc used to set tooltip on marks from the
given mark @category.
If you also specified a function with
gtk_source_view_set_mark_category_tooltip_markup_func()  the markup 
variant takes precedence.

&lt;informalexample&gt;&lt;programlisting&gt;&lt;![CDATA[
static gchar *
tooltip_func (GtkSourceMark *mark,
gpointer       user_data)
{
gchar *text;

text = get_tooltip_for_mark (mark, user_data);

return text;
}

...

GtkSourceView *view;

gtk_source_view_set_mark_category_tooltip_func (view, &quot;other-mark&quot;,
tooltip_func,
NULL, NULL);
]]&gt;&lt;/programlisting&gt;&lt;/informalexample&gt;

Since: 2.8

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="func">
<parameter_description> a #GtkSourceViewMarkTooltipFunc or %NULL.
</parameter_description>
</parameter>
<parameter name="user_data">
<parameter_description> user data which will be passed to @func.
</parameter_description>
</parameter>
<parameter name="user_data_notify">
<parameter_description>a function to free the memory allocated for @user_data 
or %NULL if you do not want to supply such a function.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_get_view">
<description>
The #GtkSourceView associated with @completion.


</description>
<parameters>
<parameter name="completion">
<parameter_description> A #GtkSourceCompletion
</parameter_description>
</parameter>
</parameters>
<return> The #GtkSourceView associated with @completion.
</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_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_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></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="container_context_starts_here">
<description>
See child_starts_here().

</description>
<parameters>
</parameters>
<return></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="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="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="gtk_source_completion_proposal_get_icon">
<description>
Gets the icon of @proposal.


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

<function name="gtk_source_view_get_mark_category_background">
<description>
Gets the background color associated with given @category.

Since: 2.4

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="dest">
<parameter_description> destination #GdkColor structure to fill in.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if background color for @category was set
and @dest is set to a valid color, or %FALSE otherwise.

</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> The #GtkSourceCompletionProvider
</parameter_description>
</parameter>
</parameters>
<return> A new string containing the name of the provider.
</return>
</function>

<function name="refresh_range">
<description>
Marks the area as updated - notifies view about it, and adds it to
refresh_region if @modify_refresh_region is %TRUE (update_syntax may
process huge area though actually updated is couple of lines, so in
that case update_syntax() takes care of refresh_region, and this
function only notifies the view).

</description>
<parameters>
<parameter name="ce">
<parameter_description> a #GtkSourceContextEngine.
</parameter_description>
</parameter>
<parameter name="start">
<parameter_description> the beginning of updated area.
</parameter_description>
</parameter>
<parameter name="end">
<parameter_description> the end of updated area.
</parameter_description>
</parameter>
<parameter name="modify_refresh_region">
<parameter_description> whether updated area should be added to
refresh_region.
</parameter_description>
</parameter>
</parameters>
<return></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 gutter corresponding to
GTK_TEXT_WINDOW_LEFT.

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_completion_info_get_widget">
<description>
Get the current content widget.


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

</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_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_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_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_view_set_mark_category_icon_from_stock">
<description>
Sets the icon to be used for @category to the stock item @stock_id.
If @stock_id is #NULL, the icon is unset.

Since: 2.8

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="stock_id">
<parameter_description> the stock id or #NULL.
</parameter_description>
</parameter>
</parameters>
<return></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="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="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_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_completion_item_new_from_stock">
<description>
Creates a new #GtkSourceCompletionItem from a stock item. If @label is %NULL, 
the stock label will be used.


</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> the newly constructed #GtkSourceCompletionItem.

</return>
</function>

<function name="gtk_source_gutter_set_cell_data_func">
<description>
Sets the #GtkSourceGutterDataFunc to use for @renderer. This function is
used to setup the cell renderer properties for rendering the current cell.

Since: 2.8

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter
</parameter_description>
</parameter>
<parameter name="renderer">
<parameter_description> a #GtkCellRenderer
</parameter_description>
</parameter>
<parameter name="func">
<parameter_description> the #GtkSourceGutterDataFunc to use
</parameter_description>
</parameter>
<parameter name="func_data">
<parameter_description> the user data for @func
</parameter_description>
</parameter>
<parameter name="destroy">
<parameter_description> the destroy notification for @func_data
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<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="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_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_info_new">
<description>

</description>
<parameters>
</parameters>
<return> The new GtkSourceCompletionInfo.

</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
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_gutter_set_cell_size_func">
<description>
Sets the #GtkSourceGutterSizeFunc to use for @renderer. This function is
used to setup the cell renderer properties for measuring the maximum size
of the cell.

Since: 2.8

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter
</parameter_description>
</parameter>
<parameter name="renderer">
<parameter_description> a #GtkCellRenderer
</parameter_description>
</parameter>
<parameter name="func">
<parameter_description> the #GtkSourceGutterSizeFunc to use
</parameter_description>
</parameter>
<parameter name="func_data">
<parameter_description> the user data for @func
</parameter_description>
</parameter>
<parameter name="destroy">
<parameter_description> the destroy notification for @func_data
</parameter_description>
</parameter>
</parameters>
<return></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> The #GtkSourceCompletionProvider
</parameter_description>
</parameter>
<parameter name="context">
<parameter_description> The #GtkSourceCompletionContext
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if @provider matches the completion context, %FALSE otherwise
</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="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="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="sub_pattern_to_int">
<description>
Tries to convert @name to a number and assumes
it's a name if that fails. Used for references in
subpattern contexts (e.g. \%{1@start} or \%{blah@start}).

</description>
<parameters>
<parameter name="name">
<parameter_description> the string from lang file.
</parameter_description>
</parameter>
</parameters>
<return></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_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="regex_resolve">
<description>
If the regular expression does not contain references to the start
regular expression, the functions increases the reference count
of @regex and returns it.

If the regular expression contains references to the start regular
expression in the form &quot;\%{start_sub_pattern@start}&quot;, it replaces
them (they are extracted from @start_regex and @matched_text) and
returns the new regular expression.


</description>
<parameters>
<parameter name="regex">
<parameter_description> a #Regex.
</parameter_description>
</parameter>
<parameter name="start_regex">
<parameter_description> a #Regex.
</parameter_description>
</parameter>
<parameter name="matched_text">
<parameter_description> the text matched against @start_regex.
</parameter_description>
</parameter>
</parameters>
<return> a #Regex.
</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.

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_view_set_draw_spaces">
<description>
Set if and how the spaces should be visualized. Specifying @flags as 0 will
disable display of spaces.

</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="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="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="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="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_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="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="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 #GtkSourceStyleSchemeManager.
</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_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_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_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_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="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="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_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_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_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_language_get_name">
<description>
Returns the localized name of the language.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return> the name of @language.
The returned string is owned by @language and should not be freed
or modified.
</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="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_completion_info_set_widget">
<description>
Sets the content widget of the info window. If @widget does not fit within
the size requirements of the window, a #GtkScrolledWindow will automatically
be created and added to the window.


</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_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 #GtkSourceLanguageManager.
</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="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="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="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="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_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="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="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_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_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_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> #GtkSourceLanguage associated with the buffer, or %NULL.
</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 moved.

</return>
</function>

<function name="gtk_source_completion_utils_is_separator">
<description>
A separator is a character like (, an space etc. An _ is not a separator


</description>
<parameters>
<parameter name="ch">
<parameter_description> The character to check
</parameter_description>
</parameter>
</parameters>
<return> TRUE if @ch is a separator
</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.

Since: 1.8

</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="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="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="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="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_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_view_set_highlight_current_line">
<description>
If @show is %TRUE the current line is highlighted.

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView
</parameter_description>
</parameter>
<parameter name="show">
<parameter_description> whether to highlight the current line
</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="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. 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="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="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="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="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_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.


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

<function name="gtk_source_gutter_insert">
<description>
Inserts @renderer into @gutter at @position.

Since: 2.8

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter
</parameter_description>
</parameter>
<parameter name="renderer">
<parameter_description> a #GtkCellRenderer
</parameter_description>
</parameter>
<parameter name="position">
<parameter_description> the renderers position
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_create_context">
<description>
Create a new #GtkSourceCompletionContext for @completion. The position at
which the completion using the new context will consider completion can
be provider 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
</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_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.

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_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_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_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 new string containing extra information of @proposal or %NULL if
no extra information is associated to @proposal.
</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_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_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_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_buffer_get_style_scheme">
<description>
Returns the #GtkSourceStyleScheme currently used in @buffer.


</description>
<parameters>
<parameter name="buffer">
<parameter_description> a #GtkSourceBuffer.
</parameter_description>
</parameter>
</parameters>
<return> the #GtkSourceStyleScheme set by
gtk_source_buffer_set_style_scheme(), or %NULL.
</return>
</function>

<function name="gtk_source_completion_utils_get_word">
<description>

</description>
<parameters>
<parameter name="source_buffer">
<parameter_description> The #GtkSourceBuffer
</parameter_description>
</parameter>
</parameters>
<return> the current word
</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="gtk_source_iter_find_matching_bracket">
<description>
Tries to match the bracket character currently at @iter with its
opening/closing counterpart, and if found moves @iter to the position
where it was found.

@iter must be a #GtkTextIter belonging to a #GtkSourceBuffer.


</description>
<parameters>
<parameter name="iter">
<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE if the matching bracket was found and the @iter
iter moved.
</return>
</function>

<function name="gtk_source_view_new">
<description>
Creates a new #GtkSourceView. An empty default buffer will be
created for you. If you want to specify your own buffer, consider
gtk_source_view_new_with_buffer().


</description>
<parameters>
</parameters>
<return> a new #GtkSourceView
</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="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="gtk_source_view_set_mark_category_icon_from_pixbuf">
<description>
Sets the icon to be used for @category to @pixbuf.
If @pixbuf is #NULL, the icon is unset.

Since: 2.8

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="pixbuf">
<parameter_description> a #GdkPixbuf or #NULL.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_buffer_set_style_scheme">
<description>
Sets style scheme used by the buffer. If @scheme is %NULL no
style scheme is used.

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

<function name="gtk_source_completion_provider_get_start_iter">
<description>
Get the #GtkTextIter at which the completion for @proposal starts. When
implemented, the completion can use this information to position the
completion window accordingly when a proposal is selected in the completion
window.


</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_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 string containing the ids of the
available languages or %NULL if no language is available. The array
is owned by @lm and must not be modified.
</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="find_insertion_place_forward_">
<description>
Auxiliary function used in find_insertion_place().

</description>
<parameters>
<parameter name="segment">
<parameter_description> (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="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="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="disable_highlighting">
<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="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_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.
</return>
</function>

<function name="gtk_source_view_get_mark_category_priority">
<description>
Gets the priority which is associated with the given @category.

Since: 2.2

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
</parameters>
<return> the priority or if @category
exists but no priority was set, it defaults to 0.

</return>
</function>

<function name="gtk_source_view_set_mark_category_background">
<description>
Sets given background @color for mark @category.
If @color is #NULL, the background color is unset.

Since: 2.4

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="color">
<parameter_description> background color or %NULL to unset it.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="find_single_byte_escape">
<description>
Checks whether pattern contains \C escape sequence,
which means &quot;single byte&quot; in pcre and naturally leads
to crash if used for highlighting.

</description>
<parameters>
<parameter name="string">
<parameter_description> the pattern.
</parameter_description>
</parameter>
</parameters>
<return></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_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_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="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="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_language_get_id">
<description>
Returns the ID of the language. The ID is not locale-dependent.


</description>
<parameters>
<parameter name="language">
<parameter_description> a #GtkSourceLanguage.
</parameter_description>
</parameter>
</parameters>
<return> the ID of @language.
The returned string is owned by @language and should not be freed
or modified.
</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 language 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_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_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_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="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="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="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_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 string containing the ids of the
available style schemes or %NULL if no style scheme is available. The array
is owned by the @manager 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_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_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_undo_manager_default_merge_action">
<description>
This function tries to merge the undo action at the top of
the stack with a new undo action. So when we undo for example
typing, we can undo the whole word and not each letter by itself.


</description>
<parameters>
<parameter name="um">
<parameter_description> a #GtkSourceUndoManagerDefault.
</parameter_description>
</parameter>
<parameter name="undo_action">
<parameter_description> a #GtkSourceUndoAction.
</parameter_description>
</parameter>
</parameters>
<return> %TRUE is merge was sucessful, %FALSE otherwise.
</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 label of @proposal.


</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_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_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_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_completion_show">
<description>
Starts a new completion with the specified #GtkSourceCompletionContext and
a list of potential candidate providers for completion.


</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_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_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_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> The #GtkSourceCompletion
</parameter_description>
</parameter>
</parameters>
<return> list of #GtkSourceCompletionProvider
</return>
</function>

<function name="gtk_source_iter_forward_search">
<description>
Searches forward for @str. Any match is returned by setting
@match_start to the first character of the match and @match_end to the
first character after the match. The search will not continue past
@limit. Note that a search is a linear or O(n) operation, so you
may wish to use @limit to avoid locking up your UI on large
buffers.

If the #GTK_SOURCE_SEARCH_VISIBLE_ONLY flag is present, the match may
have invisible text interspersed in @str. i.e. @str will be a
possibly-noncontiguous subsequence of the matched range. similarly,
if you specify #GTK_SOURCE_SEARCH_TEXT_ONLY, the match may have
pixbufs or child widgets mixed inside the matched range. If these
flags are not given, the match must be exact; the special 0xFFFC
character in @str will match embedded pixbufs or child widgets.
If you specify the #GTK_SOURCE_SEARCH_CASE_INSENSITIVE flag, the text will
be matched regardless of what case it is in.

Same as gtk_text_iter_forward_search(), but supports case insensitive
searching.


</description>
<parameters>
<parameter name="iter">
<parameter_description> start of search.
</parameter_description>
</parameter>
<parameter name="str">
<parameter_description> a search string.
</parameter_description>
</parameter>
<parameter name="flags">
<parameter_description> flags affecting how the search is done.
</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="limit">
<parameter_description> bound for the search, or %NULL for the end of the buffer.
</parameter_description>
</parameter>
</parameters>
<return> whether a match was found.
</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_he">
<parameter_description> the desired behavior among #GtkSourceSmartHomeEndType.
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_completion_utils_get_pos_at_cursor">
<description>

</description>
<parameters>
<parameter name="window">
<parameter_description> the #GtkWindow to move
</parameter_description>
</parameter>
<parameter name="view">
<parameter_description> the view 
</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 and there is a selection, the
selected text is indented of one level instead of being replaced with
the \t characters. Shift+Tab unindents the selection.

Since: 1.8

</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_completion_provider_get_icon">
<description>
Get 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="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 #Regex.
</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="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 #GtkTextView.
</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_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

</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_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_completion_move_window">
<description>
Move the completion window to a specific iter.


</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_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_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_view_set_insert_spaces_instead_of_tabs">
<description>
If %TRUE any tabulator character inserted is replaced by a group
of space characters.


</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_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_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_gutter_reorder">
<description>
Reorders @renderer in @gutter to new @position.

Since: 2.8

</description>
<parameters>
<parameter name="gutter">
<parameter_description> a #GtkSourceGutter
</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_buffer_set_language">
<description>
Associate a #GtkSourceLanguage with the source buffer. If @language is
not-%NULL and syntax highlighting is enabled (see gtk_source_buffer_set_highlight_syntax()),
the syntax patterns defined in @language will be used to highlight the text
contained in the buffer. If @language is %NULL, the text contained in the
buffer is not highlighted.

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="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="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="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_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_set_mark_category_icon_from_icon_name">
<description>
Sets the icon to be used for @category to the named theme item @name.
If @name is #NULL, the icon is unset.

Since: 2.8

</description>
<parameters>
<parameter name="view">
<parameter_description> a #GtkSourceView.
</parameter_description>
</parameter>
<parameter name="category">
<parameter_description> a mark category.
</parameter_description>
</parameter>
<parameter name="name">
<parameter_description> the themed icon name or #NULL.
</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="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 #GtkCellRenderer
</parameter_description>
</parameter>
</parameters>
<return></return>
</function>

<function name="gtk_source_view_set_tab_width">
<description>
Sets the width of tabulation in characters.

</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_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_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_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).


</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_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_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 #GtkSourceCompletion::auto-complete-delay.


</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_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="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="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_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>

</root>
