### Interface

# Foundry TextBuffer

#### Description

    interface Foundry.TextBuffer : GObject.Object

No description available.

#### Prerequisite

In order to implement TextBuffer, your type must inherit from`GObject`.

#### Implementations

- FoundrySimpleTextBuffer

#### Instance methods

###### foundry_text_buffer_add_commit_notify

Adds a new commit notify handler.

since: 1.1

###### foundry_text_buffer_apply_edit

No description available.

###### foundry_text_buffer_dup_contents

Gets the contents of the buffer as a `GBytes`.

###### foundry_text_buffer_dup_language_id

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

###### foundry_text_buffer_emit_changed

No description available.

###### foundry_text_buffer_get_change_count

Gets the number of changes that have occurred to `buffer`.

###### foundry_text_buffer_get_iter_at_offset

No description available.

###### foundry_text_buffer_get_start_iter

No description available.

###### foundry_text_buffer_remove_commit_notify

Remove a commit notify handler.

since: 1.1

###### foundry_text_buffer_settle

Gets a `DexFuture` that will resolve after short delay when changes have completed.

#### Properties

###### Foundry.TextBuffer:context

No description available.

###### Foundry.TextBuffer:language-id

No description available.

#### Interface structure

    struct FoundryTextBufferInterface {
      GTypeInterface parent_iface;
      GBytes* (* dup_contents) (
        FoundryTextBuffer* self
      );
      char* (* dup_language_id) (
        FoundryTextBuffer* self
      );
      DexFuture* (* settle) (
        FoundryTextBuffer* self
      );
      gboolean (* apply_edit) (
        FoundryTextBuffer* self,
        FoundryTextEdit* edit
      );
      void (* iter_init) (
        FoundryTextBuffer* self,
        FoundryTextIter* iter
      );
      gint64 (* get_change_count) (
        FoundryTextBuffer* self
      );
      guint (* add_commit_notify) (
        FoundryTextBuffer* self,
        FoundryTextBufferNotifyFlags flags,
        FoundryTextBufferCommitNotify commit_notify,
        gpointer user_data,
        GDestroyNotify destroy
      );
      void (* remove_commit_notify) (
        FoundryTextBuffer* self,
        guint commit_notify_handler
      );

    }

No description available.

###### Interface members

`parent_iface`

    GTypeInterface

| No description available.

`dup_contents`

    GBytes* (* dup_contents) (
        FoundryTextBuffer* self
      )

| No description available.

`dup_language_id`

    char* (* dup_language_id) (
        FoundryTextBuffer* self
      )

| No description available.

`settle`

    DexFuture* (* settle) (
        FoundryTextBuffer* self
      )

| No description available.

`apply_edit`

    gboolean (* apply_edit) (
        FoundryTextBuffer* self,
        FoundryTextEdit* edit
      )

| No description available.

`iter_init`

    void (* iter_init) (
        FoundryTextBuffer* self,
        FoundryTextIter* iter
      )

| No description available.

`get_change_count`

    gint64 (* get_change_count) (
        FoundryTextBuffer* self
      )

| No description available.

`add_commit_notify`

    guint (* add_commit_notify) (
        FoundryTextBuffer* self,
        FoundryTextBufferNotifyFlags flags,
        FoundryTextBufferCommitNotify commit_notify,
        gpointer user_data,
        GDestroyNotify destroy
      )

| No description available.

`remove_commit_notify`

    void (* remove_commit_notify) (
        FoundryTextBuffer* self,
        guint commit_notify_handler
      )

| No description available.

#### Virtual methods

###### Foundry.TextBuffer.add_commit_notify

Adds a new commit notify handler.

since: 1.1

###### Foundry.TextBuffer.apply_edit

No description available.

###### Foundry.TextBuffer.dup_contents

Gets the contents of the buffer as a `GBytes`.

###### Foundry.TextBuffer.dup_language_id

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

###### Foundry.TextBuffer.get_change_count

Gets the number of changes that have occurred to `buffer`.

###### Foundry.TextBuffer.iter_init

No description available.

###### Foundry.TextBuffer.remove_commit_notify

Remove a commit notify handler.

since: 1.1

###### Foundry.TextBuffer.settle

Gets a `DexFuture` that will resolve after short delay when changes have completed.