Foundry.TextBuffer

g Foundry.TextBuffer Foundry.TextBuffer GObject.GInterface GObject.GInterface GObject.GInterface->Foundry.TextBuffer

Implementations:

Foundry.SimpleTextBuffer

Methods

add_commit_notify (flags, commit_notify, *user_data)

apply_edit (edit)

dup_contents ()

dup_language_id ()

emit_changed ()

get_change_count ()

get_iter_at_offset (iter, offset)

get_start_iter (iter)

remove_commit_notify (commit_notify_handler)

settle ()

Virtual Methods

do_add_commit_notify (flags, commit_notify, *user_data)

do_apply_edit (edit)

do_dup_contents ()

do_dup_language_id ()

do_get_change_count ()

do_iter_init (iter)

do_remove_commit_notify (commit_notify_handler)

do_settle ()

Properties

Name

Type

Flags

Short Description

context

Foundry.Context

r/w/co

language-id

str

r

Signals

None

Fields

None

Class Details

class Foundry.TextBuffer
Bases:

GObject.GInterface

Structure:

Foundry.TextBufferInterface

add_commit_notify(flags, commit_notify, *user_data)
Parameters:
Returns:

a non-zero commit handler id if supported; otherwise zero.

Return type:

int

Adds a new commit notify handler.

If the implementation does not support this, zero is returned.

New in version 1.1.

apply_edit(edit)
Parameters:

edit (Foundry.TextEdit) –

Return type:

bool

dup_contents()
Returns:

a GLib.Bytes or None

Return type:

GLib.Bytes or None

Gets the contents of the buffer as a [struct`GLib`.Bytes].

dup_language_id()
Return type:

str or None

Gets the GtkSourceView-style identifier for the language of the buffer such as “c” or “js”.

emit_changed()
get_change_count()
Return type:

int

Gets the number of changes that have occurred to buffer.

This is generally just a monotonic number.

get_iter_at_offset(iter, offset)
Parameters:
get_start_iter(iter)
Parameters:

iter (Foundry.TextIter) –

remove_commit_notify(commit_notify_handler)
Parameters:

commit_notify_handler (int) – the previously registered non-zero commit handler

Remove a commit notify handler.

New in version 1.1.

settle()
Returns:

a Dex.Future

Return type:

Dex.Future

Gets a Dex.Future that will resolve after short delay when changes have completed.

do_add_commit_notify(flags, commit_notify, *user_data) virtual
Parameters:
Returns:

a non-zero commit handler id if supported; otherwise zero.

Return type:

int

Adds a new commit notify handler.

If the implementation does not support this, zero is returned.

New in version 1.1.

do_apply_edit(edit) virtual
Parameters:

edit (Foundry.TextEdit) –

Return type:

bool

do_dup_contents() virtual
Returns:

a GLib.Bytes or None

Return type:

GLib.Bytes or None

Gets the contents of the buffer as a [struct`GLib`.Bytes].

do_dup_language_id() virtual
Return type:

str or None

Gets the GtkSourceView-style identifier for the language of the buffer such as “c” or “js”.

do_get_change_count() virtual
Return type:

int

Gets the number of changes that have occurred to buffer.

This is generally just a monotonic number.

do_iter_init(iter) virtual
Parameters:

iter (Foundry.TextIter) –

do_remove_commit_notify(commit_notify_handler) virtual
Parameters:

commit_notify_handler (int) – the previously registered non-zero commit handler

Remove a commit notify handler.

New in version 1.1.

do_settle() virtual
Returns:

a Dex.Future

Return type:

Dex.Future

Gets a Dex.Future that will resolve after short delay when changes have completed.

Property Details

Foundry.TextBuffer.props.context
Name:

context

Type:

Foundry.Context

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foundry.TextBuffer.props.language_id
Name:

language-id

Type:

str

Default Value:

None

Flags:

READABLE