no pattern
grid pattern
there is no bracket to match.
matching a bracket
failed because the maximum range was reached.
a matching bracket was not found.
a matching bracket was found.
Creates a new source buffer.
a new source buffer.
a #GtkTextTagTable, or %NULL to create a new one.
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().
a new source buffer which will highlight text
according to the highlighting patterns in @language.
a #GtkSourceLanguage.
Redoes the last undo operation. Use gtk_source_buffer_can_redo()
to check whether a call to this function will have any effect.
This function emits the #GtkSourceBuffer::redo signal.
a #GtkSourceBuffer.
Undoes the last user action which modified the buffer. Use
gtk_source_buffer_can_undo() to check whether a call to this
function will have any effect.
This function emits the #GtkSourceBuffer::undo signal.
a #GtkSourceBuffer.
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.
whether @iter was moved.
a #GtkSourceBuffer.
an iterator.
category to search for, or %NULL
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.
a #GtkSourceBuffer.
Determines whether a source buffer can redo the last action
(i.e. if the last operation was an undo).
%TRUE if a redo is possible.
a #GtkSourceBuffer.
Determines whether a source buffer can undo the last action.
%TRUE if it's possible to undo the last action.
a #GtkSourceBuffer.
Changes the case of the text between the specified iterators.
a #GtkSourceBuffer.
how to change the case.
a #GtkTextIter.
a #GtkTextIter.
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..
a new #GtkSourceMark, owned by the buffer.
a #GtkSourceBuffer.
the name of the mark, or %NULL.
a string defining the mark category.
location to place the mark.
In short, this is the same function as gtk_text_buffer_create_tag(), but
instead of creating a #GtkTextTag, this function creates a #GtkSourceTag.
This function creates a #GtkSourceTag and adds it to the tag table for
@buffer. Equivalent to calling gtk_text_tag_new() and then adding the tag to
the buffer’s tag table. The returned tag is owned by the buffer’s tag table,
so the ref count will be equal to one.
If @tag_name is %NULL, the tag is anonymous.
If @tag_name is non-%NULL, a tag called @tag_name must not already
exist in the tag table for this buffer.
The @first_property_name argument and subsequent arguments are a list
of properties to set on the tag, as with g_object_set().
a new #GtkSourceTag.
a #GtkSourceBuffer
name of the new tag, or %NULL
name of first property to set, or %NULL
%NULL-terminated list of property names and values
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.
a #GtkSourceBuffer.
Forces buffer to analyze and highlight the given area synchronously.
<note>
<para>
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.
</para>
</note>
a #GtkSourceBuffer.
start of the area to highlight.
end of the area to highlight.
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.
whether @iter was moved.
a #GtkSourceBuffer.
an iterator.
category to search for, or %NULL
Get all defined context classes at @iter.
See the #GtkSourceBuffer description for the list of default context classes.
a new %NULL
terminated array of context class names.
Use g_strfreev() to free the array if it is no longer needed.
a #GtkSourceBuffer.
a #GtkTextIter.
Determines whether bracket match highlighting is activated for the
source buffer.
%TRUE if the source buffer will highlight matching
brackets.
a #GtkSourceBuffer.
Determines whether syntax highlighting is activated in the source
buffer.
%TRUE if syntax highlighting is enabled, %FALSE otherwise.
a #GtkSourceBuffer.
whether the @buffer has an implicit trailing newline.
a #GtkSourceBuffer.
Returns the #GtkSourceLanguage associated with the buffer,
see gtk_source_buffer_set_language(). The returned object should not be
unreferenced by the user.
the #GtkSourceLanguage associated
with the buffer, or %NULL.
a #GtkSourceBuffer.
Determines the number of undo levels the buffer will track for buffer edits.
the maximum number of possible undo levels or -1 if no limit is set.
a #GtkSourceBuffer.
Returns the list of marks of the given category at @iter. If @category
is %NULL it returns all marks at @iter.
a newly allocated #GSList.
a #GtkSourceBuffer.
an iterator.
category to search for, or %NULL
Returns the list of marks of the given category at @line.
If @category is %NULL, all marks at @line are returned.
a newly allocated #GSList.
a #GtkSourceBuffer.
a line number.
category to search for, or %NULL
Returns the #GtkSourceStyleScheme associated with the buffer,
see gtk_source_buffer_set_style_scheme().
The returned object should not be unreferenced by the user.
the #GtkSourceStyleScheme
associated with the buffer, or %NULL.
a #GtkSourceBuffer.
Returns the #GtkSourceUndoManager associated with the buffer,
see gtk_source_buffer_set_undo_manager(). The returned object should not be
unreferenced by the user.
the #GtkSourceUndoManager associated
with the buffer, or %NULL.
a #GtkSourceBuffer.
Moves backward to the next toggle (on or off) of the context class. If no
matching context class toggles are found, returns %FALSE, otherwise %TRUE.
Does not return toggles located at @iter, only toggles after @iter. Sets
@iter to the location of the toggle, or to the end of the buffer if no
toggle is found.
See the #GtkSourceBuffer description for the list of default context classes.
whether we found a context class toggle before @iter
a #GtkSourceBuffer.
a #GtkTextIter.
the context class.
Moves forward to the next toggle (on or off) of the context class. If no
matching context class toggles are found, returns %FALSE, otherwise %TRUE.
Does not return toggles located at @iter, only toggles after @iter. Sets
@iter to the location of the toggle, or to the end of the buffer if no
toggle is found.
See the #GtkSourceBuffer description for the list of default context classes.
whether we found a context class toggle after @iter
a #GtkSourceBuffer.
a #GtkTextIter.
the context class.
Check if the class @context_class is set on @iter.
See the #GtkSourceBuffer description for the list of default context classes.
whether @iter has the context class.
a #GtkSourceBuffer.
a #GtkTextIter.
class to search for.
Joins the lines of text between the specified iterators.
a #GtkSourceBuffer.
a #GtkTextIter.
a #GtkTextIter.
Redoes the last undo operation. Use gtk_source_buffer_can_redo()
to check whether a call to this function will have any effect.
This function emits the #GtkSourceBuffer::redo signal.
a #GtkSourceBuffer.
Remove all marks of @category between @start and @end from the buffer.
If @category is NULL, all marks in the range will be removed.
a #GtkSourceBuffer.
a #GtkTextIter.
a #GtkTextIter.
category to search for, or %NULL.
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.
a #GtkSourceBuffer.
%TRUE if you want matching brackets highlighted.
Controls whether syntax is highlighted in the buffer.
If @highlight is %TRUE, the text will be highlighted according to the syntax
patterns specified in the #GtkSourceLanguage set with
gtk_source_buffer_set_language().
If @highlight is %FALSE, syntax highlighting is disabled and all the
#GtkTextTag objects that have been added by the syntax highlighting engine
are removed from the buffer.
a #GtkSourceBuffer.
%TRUE to enable syntax highlighting, %FALSE to disable it.
Sets whether the @buffer has an implicit trailing newline.
If an explicit trailing newline is present in a #GtkTextBuffer, #GtkTextView
shows it as an empty line. This is generally not what the user expects.
If @implicit_trailing_newline is %TRUE (the default value):
- when a #GtkSourceFileLoader loads the content of a file into the @buffer,
the trailing newline (if present in the file) is not inserted into the
@buffer.
- when a #GtkSourceFileSaver saves the content of the @buffer into a file, a
trailing newline is added to the file.
On the other hand, if @implicit_trailing_newline is %FALSE, the file's
content is not modified when loaded into the @buffer, and the @buffer's
content is not modified when saved into a file.
a #GtkSourceBuffer.
the new value.
Associates a #GtkSourceLanguage with the buffer.
Note that a #GtkSourceLanguage affects not only the syntax highlighting, but
also the [context classes][context-classes]. If you want to disable just the
syntax highlighting, see gtk_source_buffer_set_highlight_syntax().
The buffer holds a reference to @language.
a #GtkSourceBuffer.
a #GtkSourceLanguage to set, or %NULL.
Sets the number of undo levels for user actions the buffer will
track. If the number of user actions exceeds the limit set by this
function, older actions will be discarded.
If @max_undo_levels is -1, the undo/redo is unlimited.
If @max_undo_levels is 0, the undo/redo is disabled.
a #GtkSourceBuffer.
the desired maximum number of undo levels.
Sets a #GtkSourceStyleScheme to be used by the buffer and the view.
Note that a #GtkSourceStyleScheme affects not only the syntax highlighting,
but also other #GtkSourceView features such as highlighting the current line,
matching brackets, the line numbers, etc.
Instead of setting a %NULL @scheme, it is better to disable syntax
highlighting with gtk_source_buffer_set_highlight_syntax(), and setting the
#GtkSourceStyleScheme with the "classic" or "tango" ID, because those two
style schemes follow more closely the GTK+ theme (for example for the
background color).
The buffer holds a reference to @scheme.
a #GtkSourceBuffer.
a #GtkSourceStyleScheme or %NULL.
Set the buffer undo manager. If @manager is %NULL the default undo manager
will be set.
a #GtkSourceBuffer.
A #GtkSourceUndoManager or %NULL.
Sort the lines of text between the specified iterators.
a #GtkSourceBuffer.
a #GtkTextIter.
a #GtkTextIter.
#GtkSourceSortFlags specifying how the sort should behave
sort considering the text starting at the given column
Undoes the last user action which modified the buffer. Use
gtk_source_buffer_can_undo() to check whether a call to this
function will have any effect.
This function emits the #GtkSourceBuffer::undo signal.
a #GtkSourceBuffer.
Whether to highlight matching brackets in the buffer.
Whether to highlight syntax in the buffer.
Whether the buffer has an implicit trailing newline. See
gtk_source_buffer_set_implicit_trailing_newline().
Number of undo levels for the buffer. -1 means no limit. This property
will only affect the default undo manager.
Style scheme. It contains styles for syntax highlighting, optionally
foreground, background, cursor color, current line color, and matching
brackets style.
@iter is set to a valid iterator pointing to the matching bracket
if @state is %GTK_SOURCE_BRACKET_MATCH_FOUND. Otherwise @iter is
meaningless.
The signal is emitted only when the @state changes, typically when
the cursor moves.
A use-case for this signal is to show messages in a #GtkStatusbar.
if found, the location of the matching bracket.
state of bracket matching.
The ::highlight-updated signal is emitted when the syntax
highlighting and [context classes][context-classes] are updated in a
certain region of the @buffer.
the start of the updated region
the end of the updated region
The ::redo signal is emitted to redo the last undo operation.
The ::source-mark-updated signal is emitted each time
a mark is added to, moved or removed from the @buffer.
the #GtkSourceMark
The ::undo signal is emitted to undo the last user action which
modified the buffer.
a #GtkSourceBuffer.
a #GtkSourceBuffer.
change case to lowercase.
change case to uppercase.
toggle case of each character.
capitalize each word.
Hides the completion if it is active (visible).
a #GtkSourceCompletion.
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.
%TRUE if @provider was successfully added, otherwise if @error
is provided, it will be set with the error and %FALSE is returned.
a #GtkSourceCompletion.
a #GtkSourceCompletionProvider.
Block interactive completion. This can be used to disable interactive
completion when inserting or deleting text from the buffer associated with
the completion. Use gtk_source_completion_unblock_interactive() to enable
interactive completion again.
This function may be called multiple times. It will continue to block
interactive completion until gtk_source_completion_unblock_interactive()
has been called the same number of times.
a #GtkSourceCompletion.
Create a new #GtkSourceCompletionContext for @completion. The position where
the completion occurs can be specified by @position. If @position is %NULL,
the current cursor position will be used.
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.
a #GtkSourceCompletion.
a #GtkTextIter, or %NULL.
The info widget is the window where the completion displays optional extra
information of the proposal.
The #GtkSourceCompletionInfo window
associated with @completion.
a #GtkSourceCompletion.
Get list of providers registered on @completion. The returned list is owned
by the completion and should not be freed.
list of #GtkSourceCompletionProvider.
a #GtkSourceCompletion.
The #GtkSourceView associated with @completion, or %NULL if the view has been
destroyed.
The #GtkSourceView associated with
@completion, or %NULL.
a #GtkSourceCompletion.
Hides the completion if it is active (visible).
a #GtkSourceCompletion.
Move the completion window to a specific iter.
Use gtk_source_completion_provider_get_start_iter() instead.
a #GtkSourceCompletion.
a #GtkTextIter.
Remove @provider from the completion.
%TRUE if @provider was successfully removed, otherwise if @error
is provided, it will be set with the error and %FALSE is returned.
a #GtkSourceCompletion.
a #GtkSourceCompletionProvider.
Starts a new completion with the specified #GtkSourceCompletionContext and
a list of potential candidate providers for completion.
It can be convenient for showing a completion on-the-fly, without the need to
add or remove providers to the #GtkSourceCompletion.
Another solution is to add providers with
gtk_source_completion_add_provider(), and implement
gtk_source_completion_provider_match() for each provider.
%TRUE if it was possible to the show completion window.
a #GtkSourceCompletion.
a list of #GtkSourceCompletionProvider, or %NULL.
The #GtkSourceCompletionContext
with which to start the completion.
Unblock interactive completion. This can be used after using
gtk_source_completion_block_interactive() to enable interactive completion
again.
a #GtkSourceCompletion.
Number of keyboard accelerators to show for the first proposals. For
example, to activate the first proposal, the user can press
<keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo>.
Determines the popup delay (in milliseconds) at which the completion
will be shown for interactive completion.
The scroll page size of the proposals in the completion window. In
other words, when <keycap>PageDown</keycap> or
<keycap>PageUp</keycap> is pressed, the selected
proposal becomes the one which is located one page size backward or
forward.
See also the #GtkSourceCompletion::move-cursor signal.
The scroll page size of the provider pages in the completion window.
See the #GtkSourceCompletion::move-page signal.
Determines whether the visibility of the info window should be
saved when the completion is hidden, and restored when the completion
is shown again.
Determines whether the first proposal should be selected when the
completion is first shown.
Determines whether provider headers should be shown in the proposal
list. It can be useful to disable when there is only one provider.
Determines whether provider and proposal icons should be shown in
the completion popup.
The #GtkSourceView bound to the completion object.
The #GtkSourceCompletion::activate-proposal signal is a
keybinding signal which gets emitted when the user initiates
a proposal activation.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the proposal
activation programmatically.
Emitted when the completion window is hidden. The default handler
will actually hide the window.
The #GtkSourceCompletion::move-cursor signal is a keybinding
signal which gets emitted when the user initiates a cursor
movement.
The <keycap>Up</keycap>, <keycap>Down</keycap>,
<keycap>PageUp</keycap>, <keycap>PageDown</keycap>,
<keycap>Home</keycap> and <keycap>End</keycap> keys are bound to the
normal behavior expected by those keys.
When @step is equal to %GTK_SCROLL_PAGES, the page size is defined by
the #GtkSourceCompletion:proposal-page-size property. It is used for
the <keycap>PageDown</keycap> and <keycap>PageUp</keycap> keys.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The #GtkScrollStep by which to move the cursor
The amount of steps to move the cursor
The #GtkSourceCompletion::move-page signal is a keybinding
signal which gets emitted when the user initiates a page
movement (i.e. switches between provider pages).
<keycombo><keycap>Control</keycap><keycap>Left</keycap></keycombo>
is for going to the previous provider.
<keycombo><keycap>Control</keycap><keycap>Right</keycap></keycombo>
is for going to the next provider.
<keycombo><keycap>Control</keycap><keycap>Home</keycap></keycombo>
is for displaying all the providers.
<keycombo><keycap>Control</keycap><keycap>End</keycap></keycombo>
is for going to the last provider.
When @step is equal to #GTK_SCROLL_PAGES, the page size is defined by
the #GtkSourceCompletion:provider-page-size property.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the page selection
programmatically.
The #GtkScrollStep by which to move the page
The amount of steps to move the page
Emitted just before starting to populate the completion with providers.
You can use this signal to add additional attributes in the context.
The #GtkSourceCompletionContext for the current completion
Emitted when the completion window is shown. The default handler
will actually show the window.
None.
Interactive activation. By
default, it occurs on each insertion in the #GtkTextBuffer. This can be
blocked temporarily with gtk_source_completion_block_interactive().
User requested activation.
By default, it occurs when the user presses
<keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.
a #GtkSourceCompletion.
Providers can use this function to add proposals to the completion. They
can do so asynchronously by means of the @finished argument. Providers must
ensure that they always call this function with @finished set to %TRUE
once each population (even if no proposals need to be added).
Population occurs when the gtk_source_completion_provider_populate()
function is called.
a #GtkSourceCompletionContext.
a #GtkSourceCompletionProvider.
The list of proposals to add.
Whether the provider is finished adding proposals.
Get the context activation.
The context activation.
a #GtkSourceCompletionContext.
Get the iter at which the completion was invoked. Providers can use this
to determine how and if to match proposals.
%TRUE if @iter is correctly set, %FALSE otherwise.
a #GtkSourceCompletionContext.
a #GtkTextIter.
The completion activation
The #GtkSourceCompletion associated with the context.
The #GtkTextIter at which the completion is invoked.
Emitted when the current population of proposals has been cancelled.
Providers adding proposals asynchronously should connect to this signal
to know when to cancel running proposal queries.
An error code used with %GTK_SOURCE_COMPLETION_ERROR in a #GError returned
from a completion-related function.
The #GtkSourceCompletionProvider
is already bound to the #GtkSourceCompletion object.
The #GtkSourceCompletionProvider is
not bound to the #GtkSourceCompletion object.
a new GtkSourceCompletionInfo.
Get the current content widget.
Use gtk_bin_get_child() instead.
The current content widget.
a #GtkSourceCompletionInfo.
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.
a #GtkSourceCompletionInfo.
a #GtkTextView on which the info window should be positioned.
a #GtkTextIter.
Sets the content widget of the info window. See that the previous widget will
lose a reference and it can be destroyed, so if you do not want this to
happen you must use g_object_ref() before calling this method.
Use gtk_container_add() instead. If there is already a child
widget, remove it with gtk_container_remove().
a #GtkSourceCompletionInfo.
a #GtkWidget.
This signal is emitted before any "show" management. You can connect
to this signal if you want to change some properties or position
before the real "show".
This signal should not be used.
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.
Use gtk_source_completion_item_new2() instead.
a new #GtkSourceCompletionItem.
The item label.
The item text.
The item icon.
The item extra information.
Creates a new #GtkSourceCompletionItem from a stock item. If @label is %NULL,
the stock label will be used.
Use gtk_source_completion_item_new2() instead.
a new #GtkSourceCompletionItem.
The item label.
The item text.
The stock icon.
The item extra information.
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.
Use gtk_source_completion_item_new2() instead.
a new #GtkSourceCompletionItem.
The item markup label.
The item text.
The item icon.
The item extra information.
Creates a new #GtkSourceCompletionItem. The desired properties need to be set
afterwards.
a new #GtkSourceCompletionItem.
a #GtkSourceCompletionItem.
the #GIcon, or %NULL.
a #GtkSourceCompletionItem.
the #GdkPixbuf, or %NULL.
a #GtkSourceCompletionItem.
the icon name, or %NULL.
a #GtkSourceCompletionItem.
the info, or %NULL.
a #GtkSourceCompletionItem.
the label, or %NULL.
a #GtkSourceCompletionItem.
the markup, or %NULL.
a #GtkSourceCompletionItem.
the text, or %NULL.
The #GIcon for the icon to be shown for this proposal.
The #GdkPixbuf for the icon to be shown for this proposal.
The icon name for the icon to be shown for this proposal.
Optional extra information to be shown for this proposal.
Label to be shown for this proposal.
Label with markup to be shown for this proposal.
Proposal text.
Emits the "changed" signal on @proposal. This should be called by
implementations whenever the name, icon or info of the proposal has
changed.
a #GtkSourceCompletionProposal.
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()).
%TRUE if @proposal and @object are the same proposal
a #GtkSourceCompletionProposal.
a #GtkSourceCompletionProposal.
Gets the #GIcon for the icon of @proposal.
A #GIcon with the icon of @proposal.
a #GtkSourceCompletionProposal.
Gets the #GdkPixbuf for the icon of @proposal.
A #GdkPixbuf with the icon of @proposal.
a #GtkSourceCompletionProposal.
Gets the icon name of @proposal.
The icon name of @proposal.
a #GtkSourceCompletionProposal.
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().
a newly-allocated string containing
extra information of @proposal or %NULL if no extra information is associated
to @proposal.
a #GtkSourceCompletionProposal.
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().
a new string containing the label of @proposal.
a #GtkSourceCompletionProposal.
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().
a new string containing the label of @proposal with markup.
a #GtkSourceCompletionProposal.
Gets the text of @proposal. The text that is inserted into
the text buffer when the proposal is activated by the default activation.
You are free to implement a custom activation handler in the provider and
not implement this function. For more information, see
gtk_source_completion_provider_activate_proposal(). The returned string must
be freed with g_free().
a new string containing the text of @proposal.
a #GtkSourceCompletionProposal.
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()).
The hash value of @proposal.
a #GtkSourceCompletionProposal.
Emits the "changed" signal on @proposal. This should be called by
implementations whenever the name, icon or info of the proposal has
changed.
a #GtkSourceCompletionProposal.
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()).
%TRUE if @proposal and @object are the same proposal
a #GtkSourceCompletionProposal.
a #GtkSourceCompletionProposal.
Gets the #GIcon for the icon of @proposal.
A #GIcon with the icon of @proposal.
a #GtkSourceCompletionProposal.
Gets the #GdkPixbuf for the icon of @proposal.
A #GdkPixbuf with the icon of @proposal.
a #GtkSourceCompletionProposal.
Gets the icon name of @proposal.
The icon name of @proposal.
a #GtkSourceCompletionProposal.
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().
a newly-allocated string containing
extra information of @proposal or %NULL if no extra information is associated
to @proposal.
a #GtkSourceCompletionProposal.
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().
a new string containing the label of @proposal.
a #GtkSourceCompletionProposal.
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().
a new string containing the label of @proposal with markup.
a #GtkSourceCompletionProposal.
Gets the text of @proposal. The text that is inserted into
the text buffer when the proposal is activated by the default activation.
You are free to implement a custom activation handler in the provider and
not implement this function. For more information, see
gtk_source_completion_provider_activate_proposal(). The returned string must
be freed with g_free().
a new string containing the text of @proposal.
a #GtkSourceCompletionProposal.
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()).
The hash value of @proposal.
a #GtkSourceCompletionProposal.
Emitted when the proposal has changed. The completion popup
will react to this by updating the shown information.
The virtual function table for #GtkSourceCompletionProposal.
The parent interface.
a new string containing the label of @proposal.
a #GtkSourceCompletionProposal.
a new string containing the label of @proposal with markup.
a #GtkSourceCompletionProposal.
a new string containing the text of @proposal.
a #GtkSourceCompletionProposal.
A #GdkPixbuf with the icon of @proposal.
a #GtkSourceCompletionProposal.
The icon name of @proposal.
a #GtkSourceCompletionProposal.
A #GIcon with the icon of @proposal.
a #GtkSourceCompletionProposal.
a newly-allocated string containing
extra information of @proposal or %NULL if no extra information is associated
to @proposal.
a #GtkSourceCompletionProposal.
The hash value of @proposal.
a #GtkSourceCompletionProposal.
%TRUE if @proposal and @object are the same proposal
a #GtkSourceCompletionProposal.
a #GtkSourceCompletionProposal.
a #GtkSourceCompletionProposal.
Activate @proposal at @iter. When this functions returns %FALSE, the default
activation of @proposal will take place which replaces the word at @iter
with the text of @proposal (see gtk_source_completion_proposal_get_text()).
Here is how the default activation selects the boundaries of the word to
replace. The end of the word is @iter. For the start of the word, it depends
on whether a start iter is defined for @proposal (see
gtk_source_completion_provider_get_start_iter()). If a start iter is defined,
the start of the word is the start iter. Else, the word (as long as possible)
will contain only alphanumerical and the "_" characters.
%TRUE to indicate that the proposal activation has been handled,
%FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionProposal.
a #GtkTextIter.
Get with what kind of activation the provider should be activated.
a combination of #GtkSourceCompletionActivation.
a #GtkSourceCompletionProvider.
Gets the #GIcon for the icon of @provider.
The icon to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
Get the #GdkPixbuf for the icon of the @provider.
The icon to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
Gets the icon name of @provider.
The icon name to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
Get a customized info widget to show extra information of a proposal.
This allows for customized widgets on a proposal basis, although in general
providers will have the same custom widget for all their proposals and
@proposal can be ignored. The implementation of this function is optional.
If this function is not implemented, the default widget is a #GtkLabel. The
return value of gtk_source_completion_proposal_get_info() is used as the
content of the #GtkLabel.
<note>
<para>
If implemented, gtk_source_completion_provider_update_info()
<emphasis>must</emphasis> also be implemented.
</para>
</note>
a custom #GtkWidget to show extra
information about @proposal, or %NULL if the provider does not have a special
info widget.
a #GtkSourceCompletionProvider.
a currently selected #GtkSourceCompletionProposal.
Get the delay in milliseconds before starting interactive completion for
this provider. A value of -1 indicates to use the default value as set
by the #GtkSourceCompletion:auto-complete-delay property.
the interactive delay in milliseconds.
a #GtkSourceCompletionProvider.
Get the name of the provider. This should be a translatable name for
display to the user. For example: _("Document word completion provider"). The
returned string must be freed with g_free().
a new string containing the name of the provider.
a #GtkSourceCompletionProvider.
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.
the provider priority.
a #GtkSourceCompletionProvider.
Get the #GtkTextIter at which the completion for @proposal starts. When
implemented, this information is used to position the completion window
accordingly when a proposal is selected in the completion window. The
@proposal text inside the completion window is aligned on @iter.
If this function is not implemented, the word boundary is taken to position
the completion window. See gtk_source_completion_provider_activate_proposal()
for an explanation on the word boundaries.
When the @proposal is activated, the default handler uses @iter as the start
of the word to replace. See
gtk_source_completion_provider_activate_proposal() for more information.
%TRUE if @iter was set for @proposal, %FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
a #GtkSourceCompletionProposal.
a #GtkTextIter.
Get whether the provider match the context of completion detailed in
@context.
%TRUE if @provider matches the completion context, %FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
Populate @context with proposals from @provider added with the
gtk_source_completion_context_add_proposals() function.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
Update extra information shown in @info for @proposal.
<note>
<para>
This function <emphasis>must</emphasis> be implemented when
gtk_source_completion_provider_get_info_widget() is implemented.
</para>
</note>
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionProposal.
a #GtkSourceCompletionInfo.
Activate @proposal at @iter. When this functions returns %FALSE, the default
activation of @proposal will take place which replaces the word at @iter
with the text of @proposal (see gtk_source_completion_proposal_get_text()).
Here is how the default activation selects the boundaries of the word to
replace. The end of the word is @iter. For the start of the word, it depends
on whether a start iter is defined for @proposal (see
gtk_source_completion_provider_get_start_iter()). If a start iter is defined,
the start of the word is the start iter. Else, the word (as long as possible)
will contain only alphanumerical and the "_" characters.
%TRUE to indicate that the proposal activation has been handled,
%FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionProposal.
a #GtkTextIter.
Get with what kind of activation the provider should be activated.
a combination of #GtkSourceCompletionActivation.
a #GtkSourceCompletionProvider.
Gets the #GIcon for the icon of @provider.
The icon to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
Get the #GdkPixbuf for the icon of the @provider.
The icon to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
Gets the icon name of @provider.
The icon name to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
Get a customized info widget to show extra information of a proposal.
This allows for customized widgets on a proposal basis, although in general
providers will have the same custom widget for all their proposals and
@proposal can be ignored. The implementation of this function is optional.
If this function is not implemented, the default widget is a #GtkLabel. The
return value of gtk_source_completion_proposal_get_info() is used as the
content of the #GtkLabel.
<note>
<para>
If implemented, gtk_source_completion_provider_update_info()
<emphasis>must</emphasis> also be implemented.
</para>
</note>
a custom #GtkWidget to show extra
information about @proposal, or %NULL if the provider does not have a special
info widget.
a #GtkSourceCompletionProvider.
a currently selected #GtkSourceCompletionProposal.
Get the delay in milliseconds before starting interactive completion for
this provider. A value of -1 indicates to use the default value as set
by the #GtkSourceCompletion:auto-complete-delay property.
the interactive delay in milliseconds.
a #GtkSourceCompletionProvider.
Get the name of the provider. This should be a translatable name for
display to the user. For example: _("Document word completion provider"). The
returned string must be freed with g_free().
a new string containing the name of the provider.
a #GtkSourceCompletionProvider.
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.
the provider priority.
a #GtkSourceCompletionProvider.
Get the #GtkTextIter at which the completion for @proposal starts. When
implemented, this information is used to position the completion window
accordingly when a proposal is selected in the completion window. The
@proposal text inside the completion window is aligned on @iter.
If this function is not implemented, the word boundary is taken to position
the completion window. See gtk_source_completion_provider_activate_proposal()
for an explanation on the word boundaries.
When the @proposal is activated, the default handler uses @iter as the start
of the word to replace. See
gtk_source_completion_provider_activate_proposal() for more information.
%TRUE if @iter was set for @proposal, %FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
a #GtkSourceCompletionProposal.
a #GtkTextIter.
Get whether the provider match the context of completion detailed in
@context.
%TRUE if @provider matches the completion context, %FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
Populate @context with proposals from @provider added with the
gtk_source_completion_context_add_proposals() function.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
Update extra information shown in @info for @proposal.
<note>
<para>
This function <emphasis>must</emphasis> be implemented when
gtk_source_completion_provider_get_info_widget() is implemented.
</para>
</note>
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionProposal.
a #GtkSourceCompletionInfo.
The virtual function table for #GtkSourceCompletionProvider.
The parent interface.
a new string containing the name of the provider.
a #GtkSourceCompletionProvider.
The icon to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
The icon name to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
The icon to be used for the provider,
or %NULL if the provider does not have a special icon.
The #GtkSourceCompletionProvider
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
%TRUE if @provider matches the completion context, %FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
a combination of #GtkSourceCompletionActivation.
a #GtkSourceCompletionProvider.
a custom #GtkWidget to show extra
information about @proposal, or %NULL if the provider does not have a special
info widget.
a #GtkSourceCompletionProvider.
a currently selected #GtkSourceCompletionProposal.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionProposal.
a #GtkSourceCompletionInfo.
%TRUE if @iter was set for @proposal, %FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionContext.
a #GtkSourceCompletionProposal.
a #GtkTextIter.
%TRUE to indicate that the proposal activation has been handled,
%FALSE otherwise.
a #GtkSourceCompletionProvider.
a #GtkSourceCompletionProposal.
a #GtkTextIter.
the interactive delay in milliseconds.
a #GtkSourceCompletionProvider.
the provider priority.
a #GtkSourceCompletionProvider.
a new #GtkSourceCompletionWords provider
The name for the provider, or %NULL.
A specific icon for the provider, or %NULL.
Registers @buffer in the @words provider.
a #GtkSourceCompletionWords
a #GtkTextBuffer
Unregisters @buffer from the @words provider.
a #GtkSourceCompletionWords
a #GtkTextBuffer
The type of activation.
plain text.
gzip compression.
GtkSourceDrawSpacesFlags determine what kind of spaces whould be drawn. If none
of GTK_SOURCE_DRAW_SPACES_LEADING, GTK_SOURCE_DRAW_SPACES_TEXT or
GTK_SOURCE_DRAW_SPACES_TRAILING is specified, whitespaces at any position in
the line will be drawn (i.e. it has the same effect as specifying all of them).
Use #GtkSourceSpaceTypeFlags and
#GtkSourceSpaceLocationFlags instead.
whether the space character should be drawn.
whether the tab character should be drawn.
whether the line breaks should be drawn. If
the #GtkSourceBuffer:implicit-trailing-newline property is %TRUE, a line
break is also drawn at the end of the buffer.
whether the non-breaking whitespaces should be drawn.
whether leading whitespaces should be drawn.
whether whitespaces inside text should be drawn.
whether trailing whitespaces should be drawn.
wheter all kind of spaces should be drawn.
Used by language bindings.
a copy of @enc.
a #GtkSourceEncoding.
Used by language bindings.
a #GtkSourceEncoding.
Gets the character set of the #GtkSourceEncoding, such as "UTF-8" or
"ISO-8859-1".
the character set of the #GtkSourceEncoding.
a #GtkSourceEncoding.
Gets the name of the #GtkSourceEncoding such as "Unicode" or "Western".
the name of the #GtkSourceEncoding.
a #GtkSourceEncoding.
a string representation. Free with g_free() when no longer needed.
a #GtkSourceEncoding.
Gets all encodings.
a list of
all #GtkSourceEncoding's. Free with g_slist_free().
Gets the #GtkSourceEncoding for the current locale. See also g_get_charset().
the current locale encoding.
Gets the list of default candidate encodings to try when loading a file. See
gtk_source_file_loader_set_candidate_encodings().
This function returns a different list depending on the current locale (i.e.
language, country and default encoding). The UTF-8 encoding and the current
locale encoding are guaranteed to be present in the returned list.
the list of
default candidate encodings. Free with g_slist_free().
Gets a #GtkSourceEncoding from a character set such as "UTF-8" or
"ISO-8859-1".
the corresponding #GtkSourceEncoding, or %NULL
if not found.
a character set.
the UTF-8 encoding.
a new #GtkSourceFile object.
Checks synchronously the file on disk, to know whether the file is externally
modified, or has been deleted, and whether the file is read-only.
#GtkSourceFile doesn't create a #GFileMonitor to track those properties, so
this function needs to be called instead. Creating lots of #GFileMonitor's
would take lots of resources.
Since this function is synchronous, it is advised to call it only on local
files. See gtk_source_file_is_local().
a #GtkSourceFile.
the compression type.
a #GtkSourceFile.
The encoding is initially %NULL. After a successful file loading or saving
operation, the encoding is non-%NULL.
the character encoding.
a #GtkSourceFile.
the #GFile.
a #GtkSourceFile.
the newline type.
a #GtkSourceFile.
Returns whether the file has been deleted. If the
#GtkSourceFile:location is %NULL, returns %FALSE.
To have an up-to-date value, you must first call
gtk_source_file_check_file_on_disk().
whether the file has been deleted.
a #GtkSourceFile.
Returns whether the file is externally modified. If the
#GtkSourceFile:location is %NULL, returns %FALSE.
To have an up-to-date value, you must first call
gtk_source_file_check_file_on_disk().
whether the file is externally modified.
a #GtkSourceFile.
Returns whether the file is local. If the #GtkSourceFile:location is %NULL,
returns %FALSE.
whether the file is local.
a #GtkSourceFile.
Returns whether the file is read-only. If the
#GtkSourceFile:location is %NULL, returns %FALSE.
To have an up-to-date value, you must first call
gtk_source_file_check_file_on_disk().
whether the file is read-only.
a #GtkSourceFile.
Sets the location.
a #GtkSourceFile.
the new #GFile, or %NULL.
Sets a #GtkSourceMountOperationFactory function that will be called when a
#GMountOperation must be created. This is useful for creating a
#GtkMountOperation with the parent #GtkWindow.
If a mount operation factory isn't set, g_mount_operation_new() will be
called.
a #GtkSourceFile.
a #GtkSourceMountOperationFactory to call when a
#GMountOperation is needed.
the data to pass to the @callback function.
function to call on @user_data when the @callback is no
longer needed, or %NULL.
The compression type.
The character encoding, initially %NULL. After a successful file
loading or saving operation, the encoding is non-%NULL.
The location.
The line ending type.
Whether the file is read-only or not. The value of this property is
not updated automatically (there is no file monitors).
Creates a new #GtkSourceFileLoader object. The contents is read from the
#GtkSourceFile's location. If not already done, call
gtk_source_file_set_location() before calling this constructor. The previous
location is anyway not needed, because as soon as the file loading begins,
the @buffer is emptied.
a new #GtkSourceFileLoader object.
the #GtkSourceBuffer to load the contents into.
the #GtkSourceFile.
Creates a new #GtkSourceFileLoader object. The contents is read from @stream.
a new #GtkSourceFileLoader object.
the #GtkSourceBuffer to load the contents into.
the #GtkSourceFile.
the #GInputStream to load, e.g. stdin.
the #GtkSourceBuffer to load the contents into.
a #GtkSourceFileLoader.
the detected compression type.
a #GtkSourceFileLoader.
the detected file encoding.
a #GtkSourceFileLoader.
the #GtkSourceFile.
a #GtkSourceFileLoader.
the #GInputStream to load, or %NULL
if a #GFile is used.
a #GtkSourceFileLoader.
the #GFile to load, or %NULL
if an input stream is used.
a #GtkSourceFileLoader.
the detected newline type.
a #GtkSourceFileLoader.
Loads asynchronously the file or input stream contents into the
#GtkSourceBuffer. See the #GAsyncResult documentation to know how to use this
function.
a #GtkSourceFileLoader.
the I/O priority of the request. E.g. %G_PRIORITY_LOW,
%G_PRIORITY_DEFAULT or %G_PRIORITY_HIGH.
optional #GCancellable object, %NULL to ignore.
function to call back with
progress information, or %NULL if progress information is not needed.
user data to pass to @progress_callback.
function to call on
@progress_callback_data when the @progress_callback is no longer needed, or
%NULL.
a #GAsyncReadyCallback to call when the request is
satisfied.
user data to pass to @callback.
Finishes a file loading started with gtk_source_file_loader_load_async().
If the contents has been loaded, the following #GtkSourceFile properties will
be updated: the location, the encoding, the newline type and the compression
type.
whether the contents has been loaded successfully.
a #GtkSourceFileLoader.
a #GAsyncResult.
Sets the candidate encodings for the file loading. The encodings are tried in
the same order as the list.
For convenience, @candidate_encodings can contain duplicates. Only the first
occurrence of a duplicated encoding is kept in the list.
By default the candidate encodings are (in that order in the list):
1. If set, the #GtkSourceFile's encoding as returned by
gtk_source_file_get_encoding().
2. The default candidates as returned by
gtk_source_encoding_get_default_candidates().
a #GtkSourceFileLoader.
a list of
#GtkSourceEncoding<!-- -->s.
The #GtkSourceBuffer to load the contents into. The
#GtkSourceFileLoader object has a weak reference to the buffer.
The #GtkSourceFile. The #GtkSourceFileLoader object has a weak
reference to the file.
The #GInputStream to load. Useful for reading stdin. If this property
is set, the #GtkSourceFileLoader:location property is ignored.
The #GFile to load. If the #GtkSourceFileLoader:input-stream is
%NULL, by default the location is taken from the #GtkSourceFile at
construction time.
An error code used with the %GTK_SOURCE_FILE_LOADER_ERROR domain.
The file is too big.
It is not
possible to detect the encoding automatically.
There was an encoding
conversion error and it was needed to use a fallback character.
Creates a new #GtkSourceFileSaver object. The @buffer will be saved to the
#GtkSourceFile's location.
This constructor is suitable for a simple "save" operation, when the @file
already contains a non-%NULL #GtkSourceFile:location.
a new #GtkSourceFileSaver object.
the #GtkSourceBuffer to save.
the #GtkSourceFile.
Creates a new #GtkSourceFileSaver object with a target location. When the
file saving is finished successfully, @target_location is set to the @file's
#GtkSourceFile:location property. If an error occurs, the previous valid
location is still available in #GtkSourceFile.
This constructor is suitable for a "save as" operation, or for saving a new
buffer for the first time.
a new #GtkSourceFileSaver object.
the #GtkSourceBuffer to save.
the #GtkSourceFile.
the #GFile where to save the buffer to.
the #GtkSourceBuffer to save.
a #GtkSourceFileSaver.
the compression type.
a #GtkSourceFileSaver.
the encoding.
a #GtkSourceFileSaver.
the #GtkSourceFile.
a #GtkSourceFileSaver.
the flags.
a #GtkSourceFileSaver.
the #GFile where to save the buffer to.
a #GtkSourceFileSaver.
the newline type.
a #GtkSourceFileSaver.
Saves asynchronously the buffer into the file. See the #GAsyncResult
documentation to know how to use this function.
a #GtkSourceFileSaver.
the I/O priority of the request. E.g. %G_PRIORITY_LOW,
%G_PRIORITY_DEFAULT or %G_PRIORITY_HIGH.
optional #GCancellable object, %NULL to ignore.
function to call back with
progress information, or %NULL if progress information is not needed.
user data to pass to @progress_callback.
function to call on
@progress_callback_data when the @progress_callback is no longer needed, or
%NULL.
a #GAsyncReadyCallback to call when the request is
satisfied.
user data to pass to @callback.
Finishes a file saving started with gtk_source_file_saver_save_async().
If the file has been saved successfully, the following #GtkSourceFile
properties will be updated: the location, the encoding, the newline type and
the compression type.
Since the 3.20 version, gtk_text_buffer_set_modified() is called with %FALSE
if the file has been saved successfully.
whether the file was saved successfully.
a #GtkSourceFileSaver.
a #GAsyncResult.
Sets the compression type. By default the compression type is taken from the
#GtkSourceFile.
a #GtkSourceFileSaver.
the new compression type.
Sets the encoding. If @encoding is %NULL, the UTF-8 encoding will be set.
By default the encoding is taken from the #GtkSourceFile.
a #GtkSourceFileSaver.
the new encoding, or %NULL for UTF-8.
a #GtkSourceFileSaver.
the new flags.
Sets the newline type. By default the newline type is taken from the
#GtkSourceFile.
a #GtkSourceFileSaver.
the new newline type.
The #GtkSourceBuffer to save. The #GtkSourceFileSaver object has a
weak reference to the buffer.
The compression type.
The file's encoding.
The #GtkSourceFile. The #GtkSourceFileSaver object has a weak
reference to the file.
File saving flags.
The #GFile where to save the buffer. By default the location is taken
from the #GtkSourceFile at construction time.
The newline type.
An error code used with the %GTK_SOURCE_FILE_SAVER_ERROR domain.
The buffer contains invalid
characters.
The file is externally
modified.
Flags to define the behavior of a #GtkSourceFileSaver.
No flags.
Ignore invalid characters.
Save file despite external modifications.
Create a backup before saving the file.
Use gtk_source_gutter_renderer_get_padding() instead.
Finds the #GtkSourceGutterRenderer at (x, y).
the renderer at (x, y) or %NULL.
A #GtkSourceGutter.
The x position to get identified.
The y position to get identified.
the associated #GtkSourceView.
a #GtkSourceGutter.
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.
Use gtk_text_view_get_window() instead.
the #GdkWindow of the gutter, or %NULL
if the gutter has no window.
a #GtkSourceGutter.
the #GtkTextWindowType of @gutter.
a #GtkSourceGutter.
Insert @renderer into the gutter. If @renderer is yet unowned then gutter
claims its ownership. Otherwise just increases renderer's reference count.
@renderer cannot be already inserted to another gutter.
%TRUE if operation succeeded. Otherwise %FALSE.
a #GtkSourceGutter.
a gutter renderer (must inherit from #GtkSourceGutterRenderer).
the renderer position.
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.
a #GtkSourceGutter.
Removes @renderer from @gutter.
a #GtkSourceGutter.
a #GtkSourceGutterRenderer.
Reorders @renderer in @gutter to new @position.
a #GtkSourceGutterRenderer.
a #GtkCellRenderer.
the new renderer position.
Use gtk_source_gutter_renderer_set_padding() instead.
The #GtkSourceView of the gutter.
The text window type on which the window is placed.
The x-padding.
Use the #GtkSourceGutterRenderer's
#GtkSourceGutterRenderer:xpad property instead.
The y-padding.
Use the #GtkSourceGutterRenderer's
#GtkSourceGutterRenderer:ypad property instead.
Emits the #GtkSourceGutterRenderer::activate signal of the renderer. This is
called from #GtkSourceGutter and should never have to be called manually.
a #GtkSourceGutterRenderer
a #GtkTextIter at the start of the line where the renderer is activated
a #GdkRectangle of the cell area where the renderer is activated
the event that triggered the activation
Called when drawing a region begins. The region to be drawn is indicated
by @start and @end. The purpose is to allow the implementation to precompute
some state before the draw method is called for each cell.
a #GtkSourceGutterRenderer
a #cairo_t
a #GdkRectangle
a #GdkRectangle
a #GtkTextIter
a #GtkTextIter
This is called when the text buffer changes for @renderer.
a #GtkSourceGutterRenderer.
the old #GtkTextBuffer.
This is called when the text view changes for @renderer.
a #GtkSourceGutterRenderer.
the old #GtkTextView.
Main renderering method. Implementations should implement this method to draw
onto the cairo context. The @background_area indicates the total area of the
cell to be drawn. The @cell_area indicates the area where content can be
drawn (text, images, etc).
The @background_area is the @cell_area plus the padding on each side (two
times the #GtkSourceGutterRenderer:xpad horizontally and two times the
#GtkSourceGutterRenderer:ypad vertically, so that the @cell_area is centered
inside @background_area).
The @state argument indicates the current state of the renderer and should
be taken into account to properly draw the different possible states
(cursor, prelit, selected) if appropriate.
a #GtkSourceGutterRenderer
the cairo render context
a #GdkRectangle indicating the total area to be drawn
a #GdkRectangle indicating the area to draw content
a #GtkTextIter
a #GtkTextIter
a #GtkSourceGutterRendererState
Called when drawing a region of lines has ended.
a #GtkSourceGutterRenderer
Get whether the renderer is activatable at the location in @event. This is
called from #GtkSourceGutter to determine whether a renderer is activatable
using the mouse pointer.
%TRUE if the renderer can be activated, %FALSE otherwise
a #GtkSourceGutterRenderer
a #GtkTextIter at the start of the line to be activated
a #GdkRectangle of the cell area to be activated
the event that triggered the query
Emit the #GtkSourceGutterRenderer::query-data signal. This function is called
to query for data just before rendering a cell. This is called from the
#GtkSourceGutter. Implementations can override the default signal handler or
can connect a signal handler externally to the
#GtkSourceGutterRenderer::query-data signal.
a #GtkSourceGutterRenderer.
a #GtkTextIter.
a #GtkTextIter.
a #GtkSourceGutterRendererState.
Emits the #GtkSourceGutterRenderer::query-tooltip signal. This function is
called from #GtkSourceGutter. Implementations can override the default signal
handler or can connect to the signal externally.
%TRUE if the tooltip has been set, %FALSE otherwise
a #GtkSourceGutterRenderer.
a #GtkTextIter.
a #GdkRectangle.
The x position of the tooltip.
The y position of the tooltip.
a #GtkTooltip.
Emits the #GtkSourceGutterRenderer::queue-draw signal of the renderer. Call
this from an implementation to inform that the renderer has changed such that
it needs to redraw.
a #GtkSourceGutterRenderer
Emits the #GtkSourceGutterRenderer::activate signal of the renderer. This is
called from #GtkSourceGutter and should never have to be called manually.
a #GtkSourceGutterRenderer
a #GtkTextIter at the start of the line where the renderer is activated
a #GdkRectangle of the cell area where the renderer is activated
the event that triggered the activation
Called when drawing a region begins. The region to be drawn is indicated
by @start and @end. The purpose is to allow the implementation to precompute
some state before the draw method is called for each cell.
a #GtkSourceGutterRenderer
a #cairo_t
a #GdkRectangle
a #GdkRectangle
a #GtkTextIter
a #GtkTextIter
Main renderering method. Implementations should implement this method to draw
onto the cairo context. The @background_area indicates the total area of the
cell to be drawn. The @cell_area indicates the area where content can be
drawn (text, images, etc).
The @background_area is the @cell_area plus the padding on each side (two
times the #GtkSourceGutterRenderer:xpad horizontally and two times the
#GtkSourceGutterRenderer:ypad vertically, so that the @cell_area is centered
inside @background_area).
The @state argument indicates the current state of the renderer and should
be taken into account to properly draw the different possible states
(cursor, prelit, selected) if appropriate.
a #GtkSourceGutterRenderer
the cairo render context
a #GdkRectangle indicating the total area to be drawn
a #GdkRectangle indicating the area to draw content
a #GtkTextIter
a #GtkTextIter
a #GtkSourceGutterRendererState
Called when drawing a region of lines has ended.
a #GtkSourceGutterRenderer
Get the x-alignment and y-alignment of the gutter renderer.
a #GtkSourceGutterRenderer
return location for the x-alignment,
or %NULL to ignore.
return location for the y-alignment,
or %NULL to ignore.
Get the alignment mode. The alignment mode describes the manner in which the
renderer is aligned (see :xalign and :yalign).
a #GtkSourceGutterRendererAlignmentMode
a #GtkSourceGutterRenderer
Get the background color of the renderer.
%TRUE if the background color is set, %FALSE otherwise
a #GtkSourceGutterRenderer
return value for a #GdkRGBA
Get the x-padding and y-padding of the gutter renderer.
a #GtkSourceGutterRenderer
return location for the x-padding,
or %NULL to ignore.
return location for the y-padding,
or %NULL to ignore.
Get the size of the renderer.
the size of the renderer.
a #GtkSourceGutterRenderer
Get the view associated to the gutter renderer
a #GtkTextView
a #GtkSourceGutterRenderer
Get whether the gutter renderer is visible.
%TRUE if the renderer is visible, %FALSE otherwise
a #GtkSourceGutterRenderer
Get the #GtkTextWindowType associated with the gutter renderer.
a #GtkTextWindowType
a #GtkSourceGutterRenderer
Get whether the renderer is activatable at the location in @event. This is
called from #GtkSourceGutter to determine whether a renderer is activatable
using the mouse pointer.
%TRUE if the renderer can be activated, %FALSE otherwise
a #GtkSourceGutterRenderer
a #GtkTextIter at the start of the line to be activated
a #GdkRectangle of the cell area to be activated
the event that triggered the query
Emit the #GtkSourceGutterRenderer::query-data signal. This function is called
to query for data just before rendering a cell. This is called from the
#GtkSourceGutter. Implementations can override the default signal handler or
can connect a signal handler externally to the
#GtkSourceGutterRenderer::query-data signal.
a #GtkSourceGutterRenderer.
a #GtkTextIter.
a #GtkTextIter.
a #GtkSourceGutterRendererState.
Emits the #GtkSourceGutterRenderer::query-tooltip signal. This function is
called from #GtkSourceGutter. Implementations can override the default signal
handler or can connect to the signal externally.
%TRUE if the tooltip has been set, %FALSE otherwise
a #GtkSourceGutterRenderer.
a #GtkTextIter.
a #GdkRectangle.
The x position of the tooltip.
The y position of the tooltip.
a #GtkTooltip.
Emits the #GtkSourceGutterRenderer::queue-draw signal of the renderer. Call
this from an implementation to inform that the renderer has changed such that
it needs to redraw.
a #GtkSourceGutterRenderer
Set the alignment of the gutter renderer. Both @xalign and @yalign can be
-1, which means the values will not be changed (this allows changing only
one of the values).
@xalign is the horizontal alignment. Set to 0 for a left alignment. 1 for a
right alignment. And 0.5 for centering the cells. @yalign is the vertical
alignment. Set to 0 for a top alignment. 1 for a bottom alignment.
a #GtkSourceGutterRenderer
the x-alignment
the y-alignment
Set the alignment mode. The alignment mode describes the manner in which the
renderer is aligned (see :xalign and :yalign).
a #GtkSourceGutterRenderer
a #GtkSourceGutterRendererAlignmentMode
Set the background color of the renderer. If @color is set to %NULL, the
renderer will not have a background color.
a #GtkSourceGutterRenderer
a #GdkRGBA or %NULL
Set the padding of the gutter renderer. Both @xpad and @ypad can be
-1, which means the values will not be changed (this allows changing only
one of the values).
@xpad is the left and right padding. @ypad is the top and bottom padding.
a #GtkSourceGutterRenderer
the x-padding
the y-padding
Sets the size of the renderer. A value of -1 specifies that the size
is to be determined dynamically.
a #GtkSourceGutterRenderer
the size
Set whether the gutter renderer is visible.
a #GtkSourceGutterRenderer
the visibility
The alignment mode of the renderer. This can be used to indicate
that in the case a cell spans multiple lines (due to text wrapping)
the alignment should work on either the full cell, the first line
or the last line.
The view on which the renderer is placed.
The visibility of the renderer.
The window type of the view on which the renderer is placed (left,
or right).
The horizontal alignment of the renderer. Set to 0 for a left
alignment. 1 for a right alignment. And 0.5 for centering the cells.
A value lower than 0 doesn't modify the alignment.
The left and right padding of the renderer.
The vertical alignment of the renderer. Set to 0 for a top
alignment. 1 for a bottom alignment. And 0.5 for centering the cells.
A value lower than 0 doesn't modify the alignment.
The top and bottom padding of the renderer.
The ::activate signal is emitted when the renderer is
activated.
a #GtkTextIter
a #GdkRectangle
the event that caused the activation
The ::query-activatable signal is emitted when the renderer
can possibly be activated.
a #GtkTextIter
a #GdkRectangle
the #GdkEvent that is causing the activatable query
The ::query-data signal is emitted when the renderer needs
to be filled with data just before a cell is drawn. This can
be used by general renderer implementations to allow render
data to be filled in externally.
a #GtkTextIter
a #GtkTextIter
the renderer state
The ::query-tooltip signal is emitted when the renderer can
show a tooltip.
a #GtkTextIter
a #GdkRectangle
the x position (in window coordinates)
the y position (in window coordinates)
a #GtkTooltip
The ::queue-draw signal is emitted when the renderer needs
to be redrawn. Use gtk_source_gutter_renderer_queue_draw()
to emit this signal from an implementation of the
#GtkSourceGutterRenderer interface.
The alignment mode of the renderer, when a cell spans multiple lines (due to
text wrapping).
The full cell.
The first line.
The last line.
a #GtkSourceGutterRenderer
a #cairo_t
a #GdkRectangle
a #GdkRectangle
a #GtkTextIter
a #GtkTextIter
a #GtkSourceGutterRenderer
the cairo render context
a #GdkRectangle indicating the total area to be drawn
a #GdkRectangle indicating the area to draw content
a #GtkTextIter
a #GtkTextIter
a #GtkSourceGutterRendererState
a #GtkSourceGutterRenderer
a #GtkSourceGutterRenderer.
the old #GtkTextView.
a #GtkSourceGutterRenderer.
the old #GtkTextBuffer.
%TRUE if the renderer can be activated, %FALSE otherwise
a #GtkSourceGutterRenderer
a #GtkTextIter at the start of the line to be activated
a #GdkRectangle of the cell area to be activated
the event that triggered the query
a #GtkSourceGutterRenderer
a #GtkTextIter at the start of the line where the renderer is activated
a #GdkRectangle of the cell area where the renderer is activated
the event that triggered the activation
a #GtkSourceGutterRenderer
%TRUE if the tooltip has been set, %FALSE otherwise
a #GtkSourceGutterRenderer.
a #GtkTextIter.
a #GdkRectangle.
The x position of the tooltip.
The y position of the tooltip.
a #GtkTooltip.
a #GtkSourceGutterRenderer.
a #GtkTextIter.
a #GtkTextIter.
a #GtkSourceGutterRendererState.
Create a new #GtkSourceGutterRendererPixbuf.
A #GtkSourceGutterRenderer
Get the gicon of the renderer
a #GIcon
a #GtkSourceGutterRendererPixbuf
Get the pixbuf of the renderer.
a #GdkPixbuf
a #GtkSourceGutterRendererPixbuf
Don't use this function.
the stock id.
a #GtkSourceGutterRendererPixbuf
a #GtkSourceGutterRendererPixbuf
the icon, or %NULL.
a #GtkSourceGutterRendererPixbuf
the icon name, or %NULL.
a #GtkSourceGutterRendererPixbuf
the pixbuf, or %NULL.
Don't use this function.
a #GtkSourceGutterRendererPixbuf
the stock id
The stock id.
Don't use this property.
normal state
area in the renderer represents the
line on which the insert cursor is currently positioned
the mouse pointer is currently
over the activatable area of the renderer
area in the renderer represents
a line in the buffer which contains part of the selection
Create a new #GtkSourceGutterRendererText.
A #GtkSourceGutterRenderer
Measures the text provided using the pango layout used by the
#GtkSourceGutterRendererText.
a #GtkSourceGutterRendererText.
the text to measure.
location to store the width of the text in pixels,
or %NULL.
location to store the height of the text in
pixels, or %NULL.
Measures the pango markup provided using the pango layout used by the
#GtkSourceGutterRendererText.
a #GtkSourceGutterRendererText.
the pango markup to measure.
location to store the width of the text in pixels,
or %NULL.
location to store the height of the text in
pixels, or %NULL.
Returns the globs associated to this language. This is just
an utility wrapper around gtk_source_language_get_metadata() to
retrieve the "globs" metadata property and split it into an array.
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().
a #GtkSourceLanguage.
Returns whether the language should be hidden from the user.
%TRUE if the language should be hidden, %FALSE otherwise.
a #GtkSourceLanguage
Returns the ID of the language. The ID is not locale-dependent.
The returned string is owned by @language and should not be freed
or modified.
the ID of @language.
a #GtkSourceLanguage.
value of property @name stored in
the metadata of @language or %NULL if language does not contain the
specified metadata property.
The returned string is owned by @language and should not be freed
or modified.
a #GtkSourceLanguage.
metadata property name.
Returns the mime types associated to this language. This is just
an utility wrapper around gtk_source_language_get_metadata() to
retrieve the "mimetypes" metadata property and split it into an
array.
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().
a #GtkSourceLanguage.
Returns the localized name of the language.
The returned string is owned by @language and should not be freed
or modified.
the name of @language.
a #GtkSourceLanguage.
Returns the localized section of the language.
Each language belong to a section (ex. HTML belogs to the
Markup section).
The returned string is owned by @language and should not be freed
or modified.
the section of @language.
a #GtkSourceLanguage.
Returns the ID of the style to use if the specified @style_id
is not present in the current style scheme.
the ID of the style to use if the
specified @style_id is not present in the current style scheme or %NULL
if the style has no fallback defined.
The returned string is owned by the @language and must not be modified.
a #GtkSourceLanguage.
a style ID.
Returns the ids of the styles defined by this @language.
a newly-allocated %NULL terminated array containing ids of the
styles defined by this @language or %NULL if no style is defined.
The returned array must be freed with g_strfreev().
a #GtkSourceLanguage.
Returns the name of the style with ID @style_id defined by this @language.
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.
a #GtkSourceLanguage.
a style ID.
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.
a new #GtkSourceLanguageManager.
Returns the default #GtkSourceLanguageManager instance.
a #GtkSourceLanguageManager.
Return value is owned by GtkSourceView library and must not be unref'ed.
Gets the #GtkSourceLanguage identified by the given @id in the language
manager.
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.
a #GtkSourceLanguageManager.
a language id.
Returns the ids of the available languages.
a %NULL-terminated array of strings containing the ids of the available
languages or %NULL if no language is available.
The array is sorted alphabetically according to the language name.
The array is owned by @lm and must not be modified.
a #GtkSourceLanguageManager.
Gets the list directories where @lm looks for language files.
%NULL-terminated array
containg a list of language files directories.
The array is owned by @lm and must not be modified.
a #GtkSourceLanguageManager.
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:
<informalexample><programlisting>
GtkSourceLanguage *lang;
lang = gtk_source_language_manager_guess_language (filename, NULL);
gtk_source_buffer_set_language (buffer, lang);
</programlisting></informalexample>
or
<informalexample><programlisting>
GtkSourceLanguage *lang = NULL;
gboolean result_uncertain;
gchar *content_type;
content_type = g_content_type_guess (filename, NULL, 0, &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);
</programlisting></informalexample>
etc. Use gtk_source_language_get_mime_types() and gtk_source_language_get_globs()
if you need full control over file -> language mapping.
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.
a #GtkSourceLanguageManager.
a filename in Glib filename encoding, or %NULL.
a content type (as in GIO API), or %NULL.
Sets the list of directories where the @lm looks for
language files.
If @dirs is %NULL, the search path is reset to default.
<note>
<para>
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.
</para>
</note>
a #GtkSourceLanguageManager.
a %NULL-terminated array of strings or %NULL.
Creates a new #GtkSourceMap.
a new #GtkSourceMap.
Gets the #GtkSourceMap:view property, which is the view this widget is mapping.
a #GtkSourceView or %NULL.
a #GtkSourceMap.
Sets the view that @map will be doing the mapping to.
a #GtkSourceMap
a #GtkSourceView
Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark().
If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved
by name using gtk_text_buffer_get_mark().
Normally marks are created using the utility function
gtk_source_buffer_create_source_mark().
a new #GtkSourceMark that can be added using gtk_text_buffer_add_mark().
Name of the #GtkSourceMark, can be NULL when not using a name
is used to classify marks according to common characteristics
(e.g. all the marks representing a bookmark could belong to the "bookmark"
category, or all the marks representing a compilation error could belong to
"error" category).
Returns the mark category.
the category of the #GtkSourceMark.
a #GtkSourceMark.
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.
the next #GtkSourceMark, or %NULL.
a #GtkSourceMark.
a string specifying the mark category, or %NULL.
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
the previous #GtkSourceMark, or %NULL.
a #GtkSourceMark.
a string specifying the mark category, or %NULL.
The category of the #GtkSourceMark, classifies the mark and controls
which pixbuf is used and with which priority it is drawn.
Creates a new source mark attributes.
a new source mark attributes.
Stores background color in @background.
whether background color for @attributes was set.
a #GtkSourceMarkAttributes.
a #GdkRGBA.
Gets a #GIcon to be used as a base for rendered icon. Note that the icon can
be %NULL if it wasn't set earlier.
An icon. The icon belongs to @attributes and should
not be unreffed.
a #GtkSourceMarkAttributes.
Gets a name of an icon to be used as a base for rendered icon. Note that the
icon name can be %NULL if it wasn't set earlier.
An icon name. The string belongs to @attributes and
should not be freed.
a #GtkSourceMarkAttributes.
Gets a #GdkPixbuf to be used as a base for rendered icon. Note that the
pixbuf can be %NULL if it wasn't set earlier.
A pixbuf. The pixbuf belongs to @attributes and
should not be unreffed.
a #GtkSourceMarkAttributes.
Gets a stock id of an icon used by this attributes. Note that the stock id can
be %NULL if it wasn't set earlier.
Don't use this function.
Stock id. Returned string is owned by @attributes and
shouldn't be freed.
a #GtkSourceMarkAttributes.
Queries for a tooltip by emitting
a #GtkSourceMarkAttributes::query-tooltip-markup signal. The tooltip may contain
a markup.
A tooltip. The returned string should be freed by
using g_free() when done with it.
a #GtkSourceMarkAttributes.
a #GtkSourceMark.
Queries for a tooltip by emitting
a #GtkSourceMarkAttributes::query-tooltip-text signal. The tooltip is a plain
text.
A tooltip. The returned string should be freed by
using g_free() when done with it.
a #GtkSourceMarkAttributes.
a #GtkSourceMark.
Renders an icon of given size. The base of the icon is set by the last call
to one of: gtk_source_mark_attributes_set_pixbuf(),
gtk_source_mark_attributes_set_gicon(),
gtk_source_mark_attributes_set_icon_name() or
gtk_source_mark_attributes_set_stock_id(). @size cannot be lower than 1.
A rendered pixbuf. The pixbuf belongs to @attributes
and should not be unreffed.
a #GtkSourceMarkAttributes.
widget of which style settings may be used.
size of the rendered icon.
Sets background color to the one given in @background.
a #GtkSourceMarkAttributes.
a #GdkRGBA.
Sets an icon to be used as a base for rendered icon.
a #GtkSourceMarkAttributes.
a #GIcon to be used.
Sets a name of an icon to be used as a base for rendered icon.
a #GtkSourceMarkAttributes.
name of an icon to be used.
Sets a pixbuf to be used as a base for rendered icon.
a #GtkSourceMarkAttributes.
a #GdkPixbuf to be used.
Sets stock id to be used as a base for rendered icon.
Don't use this function.
a #GtkSourceMarkAttributes.
a stock id.
A color used for background of a line.
A #GIcon that may be a base of a rendered icon.
An icon name that may be a base of a rendered icon.
A #GdkPixbuf that may be a base of a rendered icon.
A stock id that may be a base of a rendered icon.
Don't use this property.
The code should connect to this signal to provide a tooltip for given
@mark. The tooltip can contain a markup.
A tooltip. The string should be freed with
g_free() when done with it.
The #GtkSourceMark.
The code should connect to this signal to provide a tooltip for given
@mark. The tooltip should be just a plain text.
A tooltip. The string should be freed with
g_free() when done with it.
The #GtkSourceMark.
Type definition for a function that will be called to create a
#GMountOperation. This is useful for creating a #GtkMountOperation.
a #GtkSourceFile.
user data
line feed, used on UNIX.
carriage return, used on Mac.
carriage return followed by a line feed, used
on Windows.
Creates a new print compositor that can be used to print @buffer.
a new print compositor object.
the #GtkSourceBuffer to print.
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.
a new print compositor object.
a #GtkSourceView to get configuration from.
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:
<informalexample><programlisting>
// 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);
}
</programlisting></informalexample>
a #GtkSourcePrintCompositor.
the #GtkPrintContext encapsulating the context information that is required when
drawing the page for printing.
the number of the page to print.
Returns the name of the font used to print the text body. The returned string
must be freed with g_free().
a new string containing the name of the font used to print the
text body.
a #GtkSourcePrintCompositor.
Gets the bottom margin in units of @unit.
the bottom margin.
a #GtkSourcePrintCompositor.
the unit for the return value.
Gets the #GtkSourceBuffer associated with the compositor. The returned
object reference is owned by the compositor object and
should not be unreferenced.
the #GtkSourceBuffer associated with the compositor.
a #GtkSourcePrintCompositor.
Returns the name of the font used to print the page footer.
The returned string must be freed with g_free().
a new string containing the name of the font used to print
the page footer.
a #GtkSourcePrintCompositor.
Returns the name of the font used to print the page header.
The returned string must be freed with g_free().
a new string containing the name of the font used to print
the page header.
a #GtkSourcePrintCompositor.
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.
%TRUE if the printed output will be highlighted.
a #GtkSourcePrintCompositor.
Gets the left margin in units of @unit.
the left margin
a #GtkSourcePrintCompositor.
the unit for the return value.
Returns the name of the font used to print line numbers on the left margin.
The returned string must be freed with g_free().
a new string containing the name of the font used to print
line numbers on the left margin.
a #GtkSourcePrintCompositor.
Returns the number of pages in the document or <code>-1</code> if the
document has not been completely paginated.
the number of pages in the document or <code>-1</code> if the
document has not been completely paginated.
a #GtkSourcePrintCompositor.
Returns the current fraction of the document pagination that has been completed.
a fraction from 0.0 to 1.0 inclusive.
a #GtkSourcePrintCompositor.
Determines if a footer is set to be printed for each page. A
footer will be printed if this function returns %TRUE
<emphasis>and</emphasis> some format strings have been specified
with gtk_source_print_compositor_set_footer_format().
%TRUE if the footer is set to be printed.
a #GtkSourcePrintCompositor.
Determines if a header is set to be printed for each page. A
header will be printed if this function returns %TRUE
<emphasis>and</emphasis> some format strings have been specified
with gtk_source_print_compositor_set_header_format().
%TRUE if the header is set to be printed.
a #GtkSourcePrintCompositor.
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).
the interval of printed line numbers.
a #GtkSourcePrintCompositor.
Gets the right margin in units of @unit.
the right margin.
a #GtkSourcePrintCompositor.
the unit for the return value.
Returns the width of tabulation in characters for printed text.
width of tab.
a #GtkSourcePrintCompositor.
Gets the top margin in units of @unit.
the top margin.
a #GtkSourcePrintCompositor.
the unit for the return value.
Gets the line wrapping mode for the printed text.
the line wrap mode.
a #GtkSourcePrintCompositor.
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:
<informalexample><programlisting>
// 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;
}
</programlisting></informalexample>
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:
<informalexample><programlisting>
// 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);
}
</programlisting></informalexample>
%TRUE if the document has been completely paginated, %FALSE otherwise.
a #GtkSourcePrintCompositor.
the #GtkPrintContext whose parameters (e.g. paper size, print margins, etc.)
are used by the the @compositor to paginate the document.
Sets the default font for the printed text.
@font_name should be a
string representation of a font description Pango can understand.
(e.g. "Monospace 10"). 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.
a #GtkSourcePrintCompositor.
the name of the default font for the body text.
Sets the bottom margin used by @compositor.
a #GtkSourcePrintCompositor.
the new bottom margin in units of @unit.
the units for @margin.
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. "Monospace 10"). 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.
a #GtkSourcePrintCompositor.
the name of the font for the footer text, or %NULL.
See gtk_source_print_compositor_set_header_format() for more information
about the parameters.
a #GtkSourcePrintCompositor.
%TRUE if you want a separator line to be printed.
a format string to print on the left of the footer.
a format string to print on the center of the footer.
a format string to print on the right of the footer.
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. "Monospace 10"). 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.
a #GtkSourcePrintCompositor.
the name of the font for header text, or %NULL.
Sets strftime like header format strings, to be printed on the
left, center and right of the top of each page. The strings may
include strftime(3) codes which will be expanded at print time.
A subset of strftime() codes are accepted, see g_date_time_format()
for more details on the accepted format specifiers.
Additionally the following format specifiers are accepted:
- #N: the page number
- #Q: the page count.
@separator specifies if a solid line should be drawn to separate
the header from the document text.
If %NULL is given for any of the three arguments, that particular
string will not be printed.
For the header to be printed, in
addition to specifying format strings, you need to enable header
printing with gtk_source_print_compositor_set_print_header().
This function cannot be called anymore after the first call to the
gtk_source_print_compositor_paginate() function.
a #GtkSourcePrintCompositor.
%TRUE if you want a separator line to be printed.
a format string to print on the left of the header.
a format string to print on the center of the header.
a format string to print on the right of the header.
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.
a #GtkSourcePrintCompositor.
whether syntax should be highlighted.
Sets the left margin used by @compositor.
a #GtkSourcePrintCompositor.
the new left margin in units of @unit.
the units for @margin.
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. "Monospace 10"). 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.
a #GtkSourcePrintCompositor.
the name of the font for line numbers, or %NULL.
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.
a #GtkSourcePrintCompositor.
%TRUE if you want the footer to be printed.
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.
a #GtkSourcePrintCompositor.
%TRUE if you want the header to be printed.
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.
a #GtkSourcePrintCompositor.
interval for printed line numbers.
Sets the right margin used by @compositor.
a #GtkSourcePrintCompositor.
the new right margin in units of @unit.
the units for @margin.
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.
a #GtkSourcePrintCompositor.
width of tab in characters.
Sets the top margin used by @compositor.
a #GtkSourcePrintCompositor.
the new top margin in units of @unit
the units for @margin
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.
a #GtkSourcePrintCompositor.
a #GtkWrapMode.
Name of the font used for the text body.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See pango_font_description_from_string()
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
The GtkSourceBuffer object to print.
Name of the font used to print page footer.
If this property is unspecified, the text body font is used.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See pango_font_description_from_string()
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
Name of the font used to print page header.
If this property is unspecified, the text body font is used.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See pango_font_description_from_string()
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
Whether to print the document with highlighted syntax.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
Name of the font used to print line numbers on the left margin.
If this property is unspecified, the text body font is used.
Accepted values are strings representing a font description Pango can understand.
(e.g. "Monospace 10"). See pango_font_description_from_string()
for a description of the format of the string representation.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
The number of pages in the document or <code>-1</code> if the
document has not been completely paginated.
Whether to print a footer in each page.
Note that by default the footer format is unspecified, and if it is
unspecified the footer will not be printed, regardless of the value of
this property.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
Whether to print a header in each page.
Note that by default the header format is unspecified, and if it is
unspecified the header will not be printed, regardless of the value of
this property.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
Interval of printed line numbers. If this property is set to 0 no
numbers will be printed. If greater than 0, a number will be
printed every "print-line-numbers" lines (i.e. 1 will print all line numbers).
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
Width of a tab character expressed in spaces.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
Whether to wrap lines never, at word boundaries, or at character boundaries.
The value of this property cannot be changed anymore after the first
call to the gtk_source_print_compositor_paginate() function.
a new #GtkSourceRegion object for @buffer.
a #GtkTextBuffer.
Adds @region_to_add to @region. @region_to_add is not modified.
a #GtkSourceRegion.
the #GtkSourceRegion to add to @region, or %NULL.
Adds the subregion delimited by @_start and @_end to @region.
a #GtkSourceRegion.
the start of the subregion.
the end of the subregion.
Gets the @start and @end bounds of the @region.
%TRUE if @start and @end have been set successfully (if non-%NULL),
or %FALSE if the @region is empty.
a #GtkSourceRegion.
iterator to initialize with the start of @region,
or %NULL.
iterator to initialize with the end of @region,
or %NULL.
the #GtkTextBuffer.
a #GtkSourceRegion.
Initializes a #GtkSourceRegionIter to the first subregion of @region. If
@region is empty, @iter will be initialized to the end iterator.
a #GtkSourceRegion.
iterator to initialize to the first subregion.
Returns the intersection between @region1 and @region2. @region1 and
@region2 are not modified.
the intersection as a #GtkSourceRegion
object.
a #GtkSourceRegion, or %NULL.
a #GtkSourceRegion, or %NULL.
Returns the intersection between @region and the subregion delimited by
@_start and @_end. @region is not modified.
the intersection as a new
#GtkSourceRegion.
a #GtkSourceRegion.
the start of the subregion.
the end of the subregion.
Returns whether the @region is empty. A %NULL @region is considered empty.
whether the @region is empty.
a #GtkSourceRegion, or %NULL.
Subtracts @region_to_subtract from @region. @region_to_subtract is not
modified.
a #GtkSourceRegion.
the #GtkSourceRegion to subtract from
@region, or %NULL.
Subtracts the subregion delimited by @_start and @_end from @region.
a #GtkSourceRegion.
the start of the subregion.
the end of the subregion.
Gets a string represention of @region, for debugging purposes.
The returned string contains the character offsets of the subregions. It
doesn't include a newline character at the end of the string.
a string represention of @region. Free
with g_free() when no longer needed.
a #GtkSourceRegion.
The #GtkTextBuffer. The #GtkSourceRegion has a weak reference to the
buffer.
#GtkSourceRegionIter is an opaque datatype; ignore all its fields.
Initialize the iter with gtk_source_region_get_start_region_iter().
Gets the subregion at this iterator.
%TRUE if @start and @end have been set successfully (if non-%NULL),
or %FALSE if @iter is the end iterator or if the region is empty.
a #GtkSourceRegionIter.
iterator to initialize with the subregion start, or %NULL.
iterator to initialize with the subregion end, or %NULL.
whether @iter is the end iterator.
a #GtkSourceRegionIter.
Moves @iter to the next subregion.
%TRUE if @iter moved and is dereferenceable, or %FALSE if @iter has
been set to the end iterator.
a #GtkSourceRegionIter.
Creates a new search context, associated with @buffer, and customized with
@settings. If @settings is %NULL, a new #GtkSourceSearchSettings object will
be created, that you can retrieve with
gtk_source_search_context_get_settings().
a new search context.
a #GtkSourceBuffer.
a #GtkSourceSearchSettings, or %NULL.
Synchronous backward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.
Use gtk_source_search_context_backward2() instead.
whether a match was found.
a #GtkSourceSearchContext.
start of search.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
Synchronous backward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.
The difference with gtk_source_search_context_backward() is that the
@has_wrapped_around out parameter has been added for convenience.
If the #GtkSourceSearchSettings:wrap-around property is %FALSE, this function
doesn't try to wrap around.
The @has_wrapped_around out parameter is set independently of whether a match
is found. So if this function returns %FALSE, @has_wrapped_around will have
the same value as the #GtkSourceSearchSettings:wrap-around property.
whether a match was found.
a #GtkSourceSearchContext.
start of search.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
return location to know whether the
search has wrapped around, or %NULL.
The asynchronous version of gtk_source_search_context_backward2().
See the documentation of gtk_source_search_context_backward2() for more
details.
See the #GAsyncResult documentation to know how to use this function.
If the operation is cancelled, the @callback will only be called if
@cancellable was not %NULL. gtk_source_search_context_backward_async() takes
ownership of @cancellable, so you can unref it after calling this function.
a #GtkSourceSearchContext.
start of search.
a #GCancellable, or %NULL.
a #GAsyncReadyCallback to call when the operation is finished.
the data to pass to the @callback function.
Finishes a backward search started with
gtk_source_search_context_backward_async().
Use gtk_source_search_context_backward_finish2() instead.
whether a match was found.
a #GtkSourceSearchContext.
a #GAsyncResult.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
Finishes a backward search started with
gtk_source_search_context_backward_async().
See the documentation of gtk_source_search_context_backward2() for more
details.
whether a match was found.
a #GtkSourceSearchContext.
a #GAsyncResult.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
return location to know whether the
search has wrapped around, or %NULL.
Synchronous forward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.
Use gtk_source_search_context_forward2() instead.
whether a match was found.
a #GtkSourceSearchContext.
start of search.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
Synchronous forward search. It is recommended to use the asynchronous
functions instead, to not block the user interface. However, if you are sure
that the @buffer is small, this function is more convenient to use.
The difference with gtk_source_search_context_forward() is that the
@has_wrapped_around out parameter has been added for convenience.
If the #GtkSourceSearchSettings:wrap-around property is %FALSE, this function
doesn't try to wrap around.
The @has_wrapped_around out parameter is set independently of whether a match
is found. So if this function returns %FALSE, @has_wrapped_around will have
the same value as the #GtkSourceSearchSettings:wrap-around property.
whether a match was found.
a #GtkSourceSearchContext.
start of search.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
return location to know whether the
search has wrapped around, or %NULL.
The asynchronous version of gtk_source_search_context_forward2().
See the documentation of gtk_source_search_context_forward2() for more
details.
See the #GAsyncResult documentation to know how to use this function.
If the operation is cancelled, the @callback will only be called if
@cancellable was not %NULL. gtk_source_search_context_forward_async() takes
ownership of @cancellable, so you can unref it after calling this function.
a #GtkSourceSearchContext.
start of search.
a #GCancellable, or %NULL.
a #GAsyncReadyCallback to call when the operation is finished.
the data to pass to the @callback function.
Finishes a forward search started with
gtk_source_search_context_forward_async().
Use gtk_source_search_context_forward_finish2() instead.
whether a match was found.
a #GtkSourceSearchContext.
a #GAsyncResult.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
Finishes a forward search started with
gtk_source_search_context_forward_async().
See the documentation of gtk_source_search_context_forward2() for more
details.
whether a match was found.
a #GtkSourceSearchContext.
a #GAsyncResult.
return location for start of match, or %NULL.
return location for end of match, or %NULL.
return location to know whether the
search has wrapped around, or %NULL.
the associated buffer.
a #GtkSourceSearchContext.
whether to highlight the search occurrences.
a #GtkSourceSearchContext.
the #GtkSourceStyle to apply on search matches.
a #GtkSourceSearchContext.
Gets the position of a search occurrence. If the buffer is not already fully
scanned, the position may be unknown, and -1 is returned. If 0 is returned,
it means that this part of the buffer has already been scanned, and that
@match_start and @match_end don't delimit an occurrence.
the position of the search occurrence. The first occurrence has the
position 1 (not 0). Returns 0 if @match_start and @match_end don't delimit
an occurrence. Returns -1 if the position is not yet known.
a #GtkSourceSearchContext.
the start of the occurrence.
the end of the occurrence.
Gets the total number of search occurrences. If the buffer is not already
fully scanned, the total number of occurrences is unknown, and -1 is
returned.
the total number of search occurrences, or -1 if unknown.
a #GtkSourceSearchContext.
Regular expression patterns must follow certain rules. If
#GtkSourceSearchSettings:search-text breaks a rule, the error can be retrieved
with this function. The error domain is #G_REGEX_ERROR.
Free the return value with g_error_free().
the #GError, or %NULL if the pattern is valid.
a #GtkSourceSearchContext.
the search settings.
a #GtkSourceSearchContext.
Replaces a search match by another text. If @match_start and @match_end
doesn't correspond to a search match, %FALSE is returned.
For a regular expression replacement, you can check if @replace is valid by
calling g_regex_check_replacement(). The @replace text can contain
backreferences; read the g_regex_replace() documentation for more details.
Use gtk_source_search_context_replace2() instead.
whether the match has been replaced.
a #GtkSourceSearchContext.
the start of the match to replace.
the end of the match to replace.
the replacement text.
the length of @replace in bytes, or -1.
Replaces a search match by another text. If @match_start and @match_end
doesn't correspond to a search match, %FALSE is returned.
Unlike with gtk_source_search_context_replace(), the @match_start and
@match_end iters are revalidated to point to the replacement text boundaries.
For a regular expression replacement, you can check if @replace is valid by
calling g_regex_check_replacement(). The @replace text can contain
backreferences; read the g_regex_replace() documentation for more details.
whether the match has been replaced.
a #GtkSourceSearchContext.
the start of the match to replace.
the end of the match to replace.
the replacement text.
the length of @replace in bytes, or -1.
Replaces all search matches by another text. It is a synchronous function, so
it can block the user interface.
For a regular expression replacement, you can check if @replace is valid by
calling g_regex_check_replacement(). The @replace text can contain
backreferences; read the g_regex_replace() documentation for more details.
the number of replaced matches.
a #GtkSourceSearchContext.
the replacement text.
the length of @replace in bytes, or -1.
Enables or disables the search occurrences highlighting.
a #GtkSourceSearchContext.
the setting.
Set the style to apply on search matches. If @match_style is %NULL, default
theme's scheme 'match-style' will be used.
To enable or disable the search highlighting, use
gtk_source_search_context_set_highlight().
a #GtkSourceSearchContext.
a #GtkSourceStyle, or %NULL.
Associate a #GtkSourceSearchSettings with the search context. If @settings is
%NULL, a new one will be created.
The search context holds a reference to @settings.
The #GtkSourceSearchContext:settings property will become a
construct-only property in a future version. Create a new
#GtkSourceSearchContext instead, or change the #GtkSourceSearchSettings
properties. When the #GtkSourceSearchContext:settings property will become
construct-only, it will be possible to simplify some code that needed to
listen to the notify::settings signal.
a #GtkSourceSearchContext.
the new #GtkSourceSearchSettings, or %NULL.
The #GtkSourceBuffer associated to the search context.
Highlight the search occurrences.
A #GtkSourceStyle, or %NULL for theme's scheme default style.
The total number of search occurrences. If the search is disabled,
the value is 0. If the buffer is not already fully scanned, the value
is -1.
If the regex search pattern doesn't follow all the rules, this
property will be set. If the pattern is valid, the value is %NULL.
Free with g_error_free().
The #GtkSourceSearchSettings associated to the search context.
Creates a new search settings object.
a new search settings object.
whether to search at word boundaries.
a #GtkSourceSearchSettings.
whether the search is case sensitive.
a #GtkSourceSearchSettings.
whether to search by regular expressions.
a #GtkSourceSearchSettings.
Gets the text to search. The return value must not be freed.
You may be interested to call gtk_source_utils_escape_search_text() after
this function.
the text to search, or %NULL if the search is disabled.
a #GtkSourceSearchSettings.
whether to wrap around the search.
a #GtkSourceSearchSettings.
Change whether the search is done at word boundaries. If @at_word_boundaries
is %TRUE, a search match must start and end a word. The match can span
multiple words. See also gtk_text_iter_starts_word() and
gtk_text_iter_ends_word().
a #GtkSourceSearchSettings.
the setting.
Enables or disables the case sensitivity for the search.
a #GtkSourceSearchSettings.
the setting.
Enables or disables whether to search by regular expressions.
If enabled, the #GtkSourceSearchSettings:search-text property contains the
pattern of the regular expression.
#GtkSourceSearchContext uses #GRegex when regex search is enabled. See the
[Regular expression syntax](https://developer.gnome.org/glib/stable/glib-regex-syntax.html)
page in the GLib reference manual.
a #GtkSourceSearchSettings.
the setting.
Sets the text to search. If @search_text is %NULL or is empty, the search
will be disabled. A copy of @search_text will be made, so you can safely free
@search_text after a call to this function.
You may be interested to call gtk_source_utils_unescape_search_text() before
this function.
a #GtkSourceSearchSettings.
the nul-terminated text to search, or %NULL to disable the search.
Enables or disables the wrap around search. If @wrap_around is %TRUE, the
forward search continues at the beginning of the buffer if no search
occurrences are found. Similarly, the backward search continues to search at
the end of the buffer.
a #GtkSourceSearchSettings.
the setting.
If %TRUE, a search match must start and end a word. The match can
span multiple words.
Whether the search is case sensitive.
Search by regular expressions with
#GtkSourceSearchSettings:search-text as the pattern.
A search string, or %NULL if the search is disabled. If the regular
expression search is enabled, #GtkSourceSearchSettings:search-text is
the pattern.
For a forward search, continue at the beginning of the buffer if no
search occurrence is found. For a backward search, continue at the
end of the buffer.
smart-home-end disabled.
move to the first/last
non-whitespace character on the first press of the HOME/END keys and
to the beginning/end of the line on the second press.
move to the beginning/end of the
line on the first press of the HOME/END keys and to the first/last
non-whitespace character on the second press.
always move to the first/last
non-whitespace character when the HOME/END keys are pressed.
no flags specified
case sensitive sort
sort in reverse order
remove duplicates
Creates a new #GtkSourceSpaceDrawer object. Useful for storing space drawing
settings independently of a #GtkSourceView.
a new #GtkSourceSpaceDrawer.
Binds the #GtkSourceSpaceDrawer:matrix property to a #GSettings key.
The #GSettings key must be of the same type as the
#GtkSourceSpaceDrawer:matrix property, that is, `"au"`.
The g_settings_bind() function cannot be used, because the default GIO
mapping functions don't support #GVariant properties (maybe it will be
supported by a future GIO version, in which case this function can be
deprecated).
a #GtkSourceSpaceDrawer object.
a #GSettings object.
the @settings key to bind.
flags for the binding.
whether the #GtkSourceSpaceDrawer:matrix property is enabled.
a #GtkSourceSpaceDrawer.
Gets the value of the #GtkSourceSpaceDrawer:matrix property, as a #GVariant.
An empty array can be returned in case the matrix is a zero matrix.
The gtk_source_space_drawer_get_types_for_locations() function may be more
convenient to use.
the #GtkSourceSpaceDrawer:matrix value as a new floating #GVariant
instance.
a #GtkSourceSpaceDrawer.
If only one location is specified, this function returns what kind of
white spaces are drawn at that location. The value is retrieved from the
#GtkSourceSpaceDrawer:matrix property.
If several locations are specified, this function returns the logical AND for
those locations. Which means that if a certain kind of white space is present
in the return value, then that kind of white space is drawn at all the
specified @locations.
a combination of #GtkSourceSpaceTypeFlags.
a #GtkSourceSpaceDrawer.
one or several #GtkSourceSpaceLocationFlags.
Sets whether the #GtkSourceSpaceDrawer:matrix property is enabled.
a #GtkSourceSpaceDrawer.
the new value.
Sets a new value to the #GtkSourceSpaceDrawer:matrix property, as a
#GVariant. If @matrix is %NULL, then an empty array is set.
If @matrix is floating, it is consumed.
The gtk_source_space_drawer_set_types_for_locations() function may be more
convenient to use.
a #GtkSourceSpaceDrawer.
the new matrix value, or %NULL.
Modifies the #GtkSourceSpaceDrawer:matrix property at the specified
@locations.
a #GtkSourceSpaceDrawer.
one or several #GtkSourceSpaceLocationFlags.
a combination of #GtkSourceSpaceTypeFlags.
Whether the #GtkSourceSpaceDrawer:matrix property is enabled.
The :matrix property is a #GVariant property to specify where and
what kind of white spaces to draw.
The #GVariant is of type `"au"`, an array of unsigned integers. Each
integer is a combination of #GtkSourceSpaceTypeFlags. There is one
integer for each #GtkSourceSpaceLocationFlags, in the same order as
they are defined in the enum (%GTK_SOURCE_SPACE_LOCATION_NONE and
%GTK_SOURCE_SPACE_LOCATION_ALL are not taken into account).
If the array is shorter than the number of locations, then the value
for the missing locations will be %GTK_SOURCE_SPACE_TYPE_NONE.
By default, %GTK_SOURCE_SPACE_TYPE_ALL is set for all locations.
#GtkSourceSpaceLocationFlags contains flags for white space locations.
If a line contains only white spaces (no text), the white spaces match both
%GTK_SOURCE_SPACE_LOCATION_LEADING and %GTK_SOURCE_SPACE_LOCATION_TRAILING.
No flags.
Leading white spaces on a line, i.e. the
indentation.
White spaces inside a line of text.
Trailing white spaces on a line.
White spaces anywhere.
#GtkSourceSpaceTypeFlags contains flags for white space types.
No flags.
Space character.
Tab character.
Line break character. If the
#GtkSourceBuffer:implicit-trailing-newline property is %TRUE,
#GtkSourceSpaceDrawer also draws a line break at the end of the buffer.
Non-breaking space character.
All white spaces.
This function modifies the #GtkTextTag properties that are related to the
#GtkSourceStyle properties. Other #GtkTextTag properties are left untouched.
If @style is non-%NULL, applies @style to @tag.
If @style is %NULL, the related *-set properties of #GtkTextTag are set to
%FALSE.
a #GtkSourceStyle to apply, or %NULL.
a #GtkTextTag to apply styles to.
Creates a copy of @style, that is a new #GtkSourceStyle instance which
has the same attributes set.
copy of @style, call g_object_unref()
when you are done with it.
a #GtkSourceStyle structure to copy.
Use pango-underline.
a
%NULL-terminated array containing the @scheme authors or %NULL if
no author is specified by the style scheme.
a #GtkSourceStyleScheme.
@scheme description (if defined), or %NULL.
a #GtkSourceStyleScheme.
@scheme file name if the scheme was created
parsing a style scheme file or %NULL in the other cases.
a #GtkSourceStyleScheme.
@scheme id.
a #GtkSourceStyleScheme.
@scheme name.
a #GtkSourceStyleScheme.
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.
a #GtkSourceStyleScheme.
id of the style to retrieve.
Style scheme description, a translatable string to present to the user.
Style scheme filename or %NULL.
Style scheme id, a unique string used to identify the style scheme
in #GtkSourceStyleSchemeManager.
Style scheme name, a translatable string to present to the user.
Gets the currently-selected scheme.
the currently-selected scheme.
a #GtkSourceStyleSchemeChooser
Sets the scheme.
a #GtkSourceStyleSchemeChooser
a #GtkSourceStyleScheme
Gets the currently-selected scheme.
the currently-selected scheme.
a #GtkSourceStyleSchemeChooser
Sets the scheme.
a #GtkSourceStyleSchemeChooser
a #GtkSourceStyleScheme
The :style-scheme property contains the currently selected style
scheme. The property can be set to change
the current selection programmatically.
Creates a new #GtkSourceStyleSchemeChooserButton.
a new #GtkSourceStyleSchemeChooserButton.
the currently-selected scheme.
a #GtkSourceStyleSchemeChooser
a #GtkSourceStyleSchemeChooser
a #GtkSourceStyleScheme
Creates a new #GtkSourceStyleSchemeChooserWidget.
a new #GtkSourceStyleSchemeChooserWidget.
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.
a new #GtkSourceStyleSchemeManager.
Returns the default #GtkSourceStyleSchemeManager instance.
a #GtkSourceStyleSchemeManager. Return value
is owned by GtkSourceView library and must not be unref'ed.
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.
a #GtkSourceStyleSchemeManager.
a directory or a filename.
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.
a #GtkSourceStyleSchemeManager.
Looks up style scheme by id.
a #GtkSourceStyleScheme object. Returned value is owned by
@manager and must not be unref'ed.
a #GtkSourceStyleSchemeManager.
style scheme id to find.
Returns the ids of the available style schemes.
a %NULL-terminated array of strings containing the ids of the available
style schemes or %NULL if no style scheme is available.
The array is sorted alphabetically according to the scheme name.
The array is owned by the @manager and must not be modified.
a #GtkSourceStyleSchemeManager.
Returns the current search path for the @manager.
See gtk_source_style_scheme_manager_set_search_path() for details.
a %NULL-terminated array
of string containing the search path.
The array is owned by the @manager and must not be modified.
a #GtkSourceStyleSchemeManager.
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.
a #GtkSourceStyleSchemeManager.
a directory or a filename.
Sets the list of directories where the @manager looks for
style scheme files.
If @path is %NULL, the search path is reset to default.
a #GtkSourceStyleSchemeManager.
a %NULL-terminated array of strings or %NULL.
Creates a #GtkSourceTag. Configure the tag using object arguments,
i.e. using g_object_set().
For usual cases, gtk_source_buffer_create_source_tag() is more convenient to
use.
a new #GtkSourceTag.
tag name, or %NULL.
Whether to draw white spaces. This property takes precedence over the value
defined by the GtkSourceSpaceDrawer's #GtkSourceSpaceDrawer:matrix property
(only where the tag is applied).
Setting this property also changes #GtkSourceTag:draw-spaces-set to
%TRUE.
Whether the #GtkSourceTag:draw-spaces property is set and must be
taken into account.
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.
a #GtkSourceUndoManager.
Get whether there are redo operations available.
%TRUE if there are redo operations available, %FALSE otherwise
a #GtkSourceUndoManager.
Emits the #GtkSourceUndoManager::can-redo-changed signal.
a #GtkSourceUndoManager.
Get whether there are undo operations available.
%TRUE if there are undo operations available, %FALSE otherwise
a #GtkSourceUndoManager.
Emits the #GtkSourceUndoManager::can-undo-changed signal.
a #GtkSourceUndoManager.
Ends a not undoable action on the buffer.
a #GtkSourceUndoManager.
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.
a #GtkSourceUndoManager.
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.
a #GtkSourceUndoManager.
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.
a #GtkSourceUndoManager.
Get whether there are redo operations available.
%TRUE if there are redo operations available, %FALSE otherwise
a #GtkSourceUndoManager.
Emits the #GtkSourceUndoManager::can-redo-changed signal.
a #GtkSourceUndoManager.
Get whether there are undo operations available.
%TRUE if there are undo operations available, %FALSE otherwise
a #GtkSourceUndoManager.
Emits the #GtkSourceUndoManager::can-undo-changed signal.
a #GtkSourceUndoManager.
Ends a not undoable action on the buffer.
a #GtkSourceUndoManager.
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.
a #GtkSourceUndoManager.
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.
a #GtkSourceUndoManager.
Emitted when the ability to redo has changed.
Emitted when the ability to undo has changed.
%TRUE if there are undo operations available, %FALSE otherwise
a #GtkSourceUndoManager.
%TRUE if there are redo operations available, %FALSE otherwise
a #GtkSourceUndoManager.
a #GtkSourceUndoManager.
a #GtkSourceUndoManager.
a #GtkSourceUndoManager.
a #GtkSourceUndoManager.
a #GtkSourceUndoManager.
a #GtkSourceUndoManager.
Creates a new #GtkSourceView.
By default, an empty #GtkSourceBuffer will be lazily created and can be
retrieved with gtk_text_view_get_buffer().
If you want to specify your own buffer, either override the
#GtkTextViewClass create_buffer factory method, or use
gtk_source_view_new_with_buffer().
a new #GtkSourceView.
Creates a new #GtkSourceView widget displaying the buffer
@buffer. One buffer can be shared among many widgets.
a new #GtkSourceView.
a #GtkSourceBuffer.
Returns whether auto-indentation of text is enabled.
%TRUE if auto indentation is enabled.
a #GtkSourceView.
Returns the #GtkSourceBackgroundPatternType specifying if and how
the background pattern should be displayed for this @view.
the #GtkSourceBackgroundPatternType.
a #GtkSourceView
Gets the #GtkSourceCompletion associated with @view. The returned object is
guaranteed to be the same for the lifetime of @view. Each #GtkSourceView
object has a different #GtkSourceCompletion.
the #GtkSourceCompletion associated with @view.
a #GtkSourceView.
Returns the #GtkSourceDrawSpacesFlags specifying if and how spaces
should be displayed for this @view.
Use gtk_source_space_drawer_get_types_for_locations()
instead.
the #GtkSourceDrawSpacesFlags, 0 if no spaces should be drawn.
a #GtkSourceView
Returns the #GtkSourceGutter object associated with @window_type for @view.
Only GTK_TEXT_WINDOW_LEFT and GTK_TEXT_WINDOW_RIGHT are supported,
respectively corresponding to the left and right gutter. The line numbers
and mark category icons are rendered in the left gutter.
the #GtkSourceGutter.
a #GtkSourceView.
the gutter window type.
Returns whether the current line is highlighted.
%TRUE if the current line is highlighted.
a #GtkSourceView.
Returns whether when the tab key is pressed the current selection
should get indented instead of replaced with the \t character.
%TRUE if the selection is indented when tab is pressed.
a #GtkSourceView.
Returns the number of spaces to use for each step of indent.
See gtk_source_view_set_indent_width() for details.
indent width.
a #GtkSourceView.
Returns whether when inserting a tabulator character it should
be replaced by a group of space characters.
%TRUE if spaces are inserted instead of tabs.
a #GtkSourceView.
Gets attributes and priority for the @category.
#GtkSourceMarkAttributes for the @category.
The object belongs to @view, so it must not be unreffed.
a #GtkSourceView.
the category.
place where priority of the category will be stored.
Gets the position of the right margin in the given @view.
the position of the right margin.
a #GtkSourceView.
Returns whether line marks are displayed beside the text.
%TRUE if the line marks are displayed.
a #GtkSourceView.
Returns whether line numbers are displayed beside the text.
%TRUE if the line numbers are displayed.
a #GtkSourceView.
Returns whether a right margin is displayed.
%TRUE if the right margin is shown.
a #GtkSourceView.
Returns %TRUE if pressing the Backspace key will try to delete spaces
up to the previous tab stop.
%TRUE if smart Backspace handling is enabled.
a #GtkSourceView.
Returns a #GtkSourceSmartHomeEndType end value specifying
how the cursor will move when HOME and END keys are pressed.
a #GtkSourceSmartHomeEndType value.
a #GtkSourceView.
Gets the #GtkSourceSpaceDrawer associated with @view. The returned object is
guaranteed to be the same for the lifetime of @view. Each #GtkSourceView
object has a different #GtkSourceSpaceDrawer.
the #GtkSourceSpaceDrawer associated with @view.
a #GtkSourceView.
Returns the width of tabulation in characters.
width of tab.
a #GtkSourceView.
Determines the visual column at @iter taking into consideration the
#GtkSourceView:tab-width of @view.
the visual column at @iter.
a #GtkSourceView.
a position in @view.
Inserts one indentation level at the beginning of the specified lines. The
empty lines are not indented.
a #GtkSourceView.
#GtkTextIter of the first line to indent
#GtkTextIter of the last line to indent
If %TRUE auto-indentation of text is enabled.
When Enter is pressed to create a new line, the auto-indentation inserts the
same indentation as the previous line. This is <emphasis>not</emphasis> a
"smart indentation" where an indentation level is added or removed depending
on the context.
a #GtkSourceView.
whether to enable auto indentation.
Set if and how the background pattern should be displayed.
a #GtkSourceView.
the #GtkSourceBackgroundPatternType.
Set if and how the spaces should be visualized. Specifying @flags as 0 will
disable display of spaces.
For a finer-grained method, there is also the GtkSourceTag's
#GtkSourceTag:draw-spaces property.
Use gtk_source_space_drawer_set_types_for_locations()
instead.
a #GtkSourceView.
#GtkSourceDrawSpacesFlags specifing how white spaces should
be displayed
If @highlight is %TRUE the current line will be highlighted.
a #GtkSourceView.
whether to highlight the current line.
If %TRUE, when the tab key is pressed when several lines are selected, the
selected lines are indented of one level instead of being replaced with a \t
character. Shift+Tab unindents the selection.
If the first or last line is not selected completely, it is also indented or
unindented.
When the selection doesn't span several lines, the tab key always replaces
the selection with a normal \t character.
a #GtkSourceView.
whether to indent a block when tab is pressed.
Sets the number of spaces to use for each step of indent when the tab key is
pressed. If @width is -1, the value of the #GtkSourceView:tab-width property
will be used.
The #GtkSourceView:indent-width interacts with the
#GtkSourceView:insert-spaces-instead-of-tabs property and
#GtkSourceView:tab-width. An example will be clearer: if the
#GtkSourceView:indent-width is 4 and
#GtkSourceView:tab-width is 8 and
#GtkSourceView:insert-spaces-instead-of-tabs is %FALSE, then pressing the tab
key at the beginning of a line will insert 4 spaces. So far so good. Pressing
the tab key a second time will remove the 4 spaces and insert a \t character
instead (since #GtkSourceView:tab-width is 8). On the other hand, if
#GtkSourceView:insert-spaces-instead-of-tabs is %TRUE, the second tab key
pressed will insert 4 more spaces for a total of 8 spaces in the
#GtkTextBuffer.
The test-widget program (available in the GtkSourceView repository) may be
useful to better understand the indentation settings (enable the space
drawing!).
a #GtkSourceView.
indent width in characters.
If %TRUE a tab key pressed is replaced by a group of space characters. Of
course it is still possible to insert a real \t programmatically with the
#GtkTextBuffer API.
a #GtkSourceView.
whether to insert spaces instead of tabs.
Sets attributes and priority for the @category.
a #GtkSourceView.
the category.
mark attributes.
priority of the category.
Sets the position of the right margin in the given @view.
a #GtkSourceView.
the width in characters where to position the right margin.
If %TRUE line marks will be displayed beside the text.
a #GtkSourceView.
whether line marks should be displayed.
If %TRUE line numbers will be displayed beside the text.
a #GtkSourceView.
whether line numbers should be displayed.
If %TRUE a right margin is displayed.
a #GtkSourceView.
whether to show a right margin.
When set to %TRUE, pressing the Backspace key will try to delete spaces
up to the previous tab stop.
a #GtkSourceView.
whether to enable smart Backspace handling.
Set the desired movement of the cursor when HOME and END keys
are pressed.
a #GtkSourceView.
the desired behavior among #GtkSourceSmartHomeEndType.
Sets the width of tabulation in characters. The #GtkTextBuffer still contains
\t characters, but they can take a different visual width in a #GtkSourceView
widget.
a #GtkSourceView.
width of tab in characters.
Removes one indentation level at the beginning of the
specified lines.
a #GtkSourceView.
#GtkTextIter of the first line to indent
#GtkTextIter of the last line to indent
Draw a specific background pattern on the view.
The completion object associated with the view
Set if and how the spaces should be visualized.
For a finer-grained method, there is also the GtkSourceTag's
#GtkSourceTag:draw-spaces property.
Use the #GtkSourceSpaceDrawer:matrix property
instead.
Width of an indentation step expressed in number of spaces.
Position of the right margin.
Whether to display line mark pixbufs
Whether to display line numbers
Whether to display the right margin.
Whether smart Backspace should be used.
Set the behavior of the HOME and END keys.
The #GtkSourceSpaceDrawer object associated with the view.
Width of a tab character expressed in number of spaces.
Keybinding signal to change case of the text at the current cursor position.
the case to use
Keybinding signal to edit a number at the current cursor position.
the number to add to the number at the current position
Keybinding signal to join the lines currently selected.
Emitted when a line mark has been activated (for instance when there
was a button press in the line marks gutter). You can use @iter to
determine on which line the activation took place.
a #GtkTextIter
the #GdkEvent that activated the event
The ::move-lines signal is a keybinding which gets emitted
when the user initiates moving a line. The default binding key
is Alt+Up/Down arrow. And moves the currently selected lines,
or the current line by @count. For the moment, only
@count of -1 or 1 is valid.
The @copy parameter is deprecated, it has never been used by
GtkSourceView (the value is always %FALSE) and was buggy.
%TRUE if the line should be copied, %FALSE if it should be
moved. This parameter is deprecated and will be removed in a later
version, it should be always %FALSE.
the number of lines to move over. Only 1 and -1 are
supported.
Keybinding signal to move the cursor to the matching bracket.
%TRUE if the move should extend the selection
The ::move-words signal is a keybinding which gets emitted
when the user initiates moving a word. The default binding key
is Alt+Left/Right Arrow and moves the current selection, or the current
word by one word.
the number of words to move over
The ::show-completion signal is a key binding signal which gets
emitted when the user requests a completion, by pressing
<keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.
This will create a #GtkSourceCompletionContext with the activation
type as %GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to activate the completion by
another means, for example with another key binding or a menu entry.
Emitted when a the cursor was moved according to the smart home
end setting. The signal is emitted after the cursor is moved, but
during the GtkTextView::move-cursor action. This can be used to find
out whether the cursor was moved by a normal home/end or by a smart
home/end.
a #GtkTextIter
the count
the gutter position of the lines
renderer
the gutter position of the marks
renderer
Gets all encodings.
a list of
all #GtkSourceEncoding's. Free with g_slist_free().
Gets the #GtkSourceEncoding for the current locale. See also g_get_charset().
the current locale encoding.
Gets the list of default candidate encodings to try when loading a file. See
gtk_source_file_loader_set_candidate_encodings().
This function returns a different list depending on the current locale (i.e.
language, country and default encoding). The UTF-8 encoding and the current
locale encoding are guaranteed to be present in the returned list.
the list of
default candidate encodings. Free with g_slist_free().
Gets a #GtkSourceEncoding from a character set such as "UTF-8" or
"ISO-8859-1".
the corresponding #GtkSourceEncoding, or %NULL
if not found.
a character set.
the UTF-8 encoding.
Use this function to escape the following characters: `\n`, `\r`, `\t` and `\`.
For a regular expression search, use g_regex_escape_string() instead.
One possible use case is to take the #GtkTextBuffer's selection and put it in a
search entry. The selection can contain tabulations, newlines, etc. So it's
better to escape those special characters to better fit in the search entry.
See also: gtk_source_utils_unescape_search_text().
<warning>
Warning: the escape and unescape functions are not reciprocal! For example,
escape (unescape (\)) = \\. So avoid cycles such as: search entry -> unescape
-> search settings -> escape -> search entry. The original search entry text
may be modified.
</warning>
the escaped @text.
the text to escape.
Use this function before gtk_source_search_settings_set_search_text(), to
unescape the following sequences of characters: `\n`, `\r`, `\t` and `\\`.
The purpose is to easily write those characters in a search entry.
Note that unescaping the search text is not needed for regular expression
searches.
See also: gtk_source_utils_escape_search_text().
the unescaped @text.
the text to unescape.