Interface

GtkSource-5GtkSourceBufferSignalSignatures

interface SignalSignatures {
    "apply-tag": (
        arg0: Gtk.TextTag,
        arg1: Gtk.TextIter,
        arg2: Gtk.TextIter,
    ) => void;
    "begin-user-action": () => void;
    "bracket-matched": (
        arg0: Gtk.TextIter,
        arg1: GtkSource.BracketMatchType,
    ) => void;
    changed: () => void;
    "cursor-moved": () => void;
    "delete-range": (arg0: Gtk.TextIter, arg1: Gtk.TextIter) => void;
    "end-user-action": () => void;
    "highlight-updated": (arg0: Gtk.TextIter, arg1: Gtk.TextIter) => void;
    "insert-child-anchor": (
        arg0: Gtk.TextIter,
        arg1: Gtk.TextChildAnchor,
    ) => void;
    "insert-paintable": (arg0: Gtk.TextIter, arg1: Gdk.Paintable) => void;
    "insert-text": (arg0: Gtk.TextIter, arg1: string, arg2: number) => void;
    "mark-deleted": (arg0: Gtk.TextMark) => void;
    "mark-set": (arg0: Gtk.TextIter, arg1: Gtk.TextMark) => void;
    "modified-changed": () => void;
    notify: (arg0: GObject.ParamSpec) => void;
    "notify::can-redo": (pspec: GObject.ParamSpec) => void;
    "notify::can-undo": (pspec: GObject.ParamSpec) => void;
    "notify::cursor-position": (pspec: GObject.ParamSpec) => void;
    "notify::enable-undo": (pspec: GObject.ParamSpec) => void;
    "notify::has-selection": (pspec: GObject.ParamSpec) => void;
    "notify::highlight-matching-brackets": (pspec: GObject.ParamSpec) => void;
    "notify::highlight-syntax": (pspec: GObject.ParamSpec) => void;
    "notify::implicit-trailing-newline": (pspec: GObject.ParamSpec) => void;
    "notify::language": (pspec: GObject.ParamSpec) => void;
    "notify::loading": (pspec: GObject.ParamSpec) => void;
    "notify::style-scheme": (pspec: GObject.ParamSpec) => void;
    "notify::tag-table": (pspec: GObject.ParamSpec) => void;
    "notify::text": (pspec: GObject.ParamSpec) => void;
    "paste-done": (arg0: Gdk.Clipboard) => void;
    redo: () => void;
    "remove-tag": (
        arg0: Gtk.TextTag,
        arg1: Gtk.TextIter,
        arg2: Gtk.TextIter,
    ) => void;
    "source-mark-updated": (arg0: Gtk.TextMark) => void;
    undo: () => void;
}

Hierarchy (View Summary)

Index

Properties

"bracket-matched": (
    arg0: Gtk.TextIter,
    arg1: GtkSource.BracketMatchType,
) => void

iter is set to a valid iterator pointing to the matching bracket if state is GtkSource.BracketMatchType.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 Gtk.Statusbar.

"cursor-moved": () => void

The "cursor-moved" signal is emitted when then insertion mark has moved.

"highlight-updated": (arg0: Gtk.TextIter, arg1: Gtk.TextIter) => void

The ::highlight-updated signal is emitted when the syntax highlighting and context classes are updated in a certain region of the buffer.

"notify::can-redo": (pspec: GObject.ParamSpec) => void
"notify::can-undo": (pspec: GObject.ParamSpec) => void
"notify::cursor-position": (pspec: GObject.ParamSpec) => void
"notify::enable-undo": (pspec: GObject.ParamSpec) => void
"notify::has-selection": (pspec: GObject.ParamSpec) => void
"notify::highlight-matching-brackets": (pspec: GObject.ParamSpec) => void
"notify::highlight-syntax": (pspec: GObject.ParamSpec) => void
"notify::implicit-trailing-newline": (pspec: GObject.ParamSpec) => void
"notify::language": (pspec: GObject.ParamSpec) => void
"notify::loading": (pspec: GObject.ParamSpec) => void
"notify::style-scheme": (pspec: GObject.ParamSpec) => void
"notify::tag-table": (pspec: GObject.ParamSpec) => void
"notify::text": (pspec: GObject.ParamSpec) => void
"source-mark-updated": (arg0: Gtk.TextMark) => void

The ::source-mark-updated signal is emitted each time a mark is added to, moved or removed from the buffer.

Properties - Inherited from Gtk

"apply-tag": (arg0: Gtk.TextTag, arg1: Gtk.TextIter, arg2: Gtk.TextIter) => void

Emitted to apply a tag to a range of text in a Gtk.TextBuffer.

Applying actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them).

See also: Gtk.TextBuffer.apply_tag, Gtk.TextBuffer.insert_with_tags, Gtk.TextBuffer.insert_range.

"begin-user-action": () => void
changed: () => void

Emitted when the content of a Gtk.TextBuffer has changed.

"delete-range": (arg0: Gtk.TextIter, arg1: Gtk.TextIter) => void

Emitted to delete a range from a Gtk.TextBuffer.

Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them). The default signal handler revalidates the start and end iters to both point to the location where text was deleted. Handlers which run after the default handler (see g_signal_connect_after()) do not have access to the deleted text.

See also: Gtk.TextBuffer.delete.

"end-user-action": () => void
"insert-child-anchor": (arg0: Gtk.TextIter, arg1: Gtk.TextChildAnchor) => void

Emitted to insert a Gtk.TextChildAnchor in a Gtk.TextBuffer.

Insertion actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to be placed after the inserted anchor.

See also: Gtk.TextBuffer.insert_child_anchor.

"insert-paintable": (arg0: Gtk.TextIter, arg1: Gdk.Paintable) => void

Emitted to insert a Gdk.Paintable in a Gtk.TextBuffer.

Insertion actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to be placed after the inserted paintable.

See also: Gtk.TextBuffer.insert_paintable.

"insert-text": (arg0: Gtk.TextIter, arg1: string, arg2: number) => void

Emitted to insert text in a Gtk.TextBuffer.

Insertion actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to point to the end of the inserted text.

See also: Gtk.TextBuffer.insert, Gtk.TextBuffer.insert_range.

"mark-deleted": (arg0: Gtk.TextMark) => void

Emitted as notification after a Gtk.TextMark is deleted.

See also: Gtk.TextBuffer.delete_mark.

"mark-set": (arg0: Gtk.TextIter, arg1: Gtk.TextMark) => void

Emitted as notification after a Gtk.TextMark is set.

See also: Gtk.TextBuffer.create_mark, Gtk.TextBuffer.move_mark.

"modified-changed": () => void

Emitted when the modified bit of a Gtk.TextBuffer flips.

See also: Gtk.TextBuffer.set_modified.

notify: (arg0: GObject.ParamSpec) => void

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with GObject.ParamFlags.EXPLICIT_NOTIFY, then any call to g_object_set_property() results in ::notify being emitted, even if the new value is the same as the old. If they did pass GObject.ParamFlags.EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

g_signal_connect (text_view->buffer, "notify::paste-target-list",
G_CALLBACK (gtk_text_view_target_list_notify),
text_view)

It is important to note that you must use [canonical parameter names][class@GObject.ParamSpec#parameter-names] as detail strings for the notify signal.

"paste-done": (arg0: Gdk.Clipboard) => void

Emitted after paste operation has been completed.

This is useful to properly scroll the view to the end of the pasted text. See Gtk.TextBuffer.paste_clipboard for more details.

redo: () => void

Emitted when a request has been made to redo the previously undone operation.

"remove-tag": (
    arg0: Gtk.TextTag,
    arg1: Gtk.TextIter,
    arg2: Gtk.TextIter,
) => void

Emitted to remove all occurrences of tag from a range of text in a Gtk.TextBuffer.

Removal actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them).

See also: Gtk.TextBuffer.remove_tag.

undo: () => void

Emitted when a request has been made to undo the previous operation or set of operations that have been grouped together.