### Constructor

# Gtk TextView new_with_buffer

#### Declaration [src]

    GtkWidget*
    gtk_text_view_new_with_buffer (
      GtkTextBuffer* buffer
    )

#### Description [src]

Creates a new `GtkTextView` widget displaying the buffer `buffer`.

One buffer can be shared among many widgets. `buffer` may be `NULL` to create a default buffer, in which case this function is equivalent to `gtk_text_view_new()`. The text view adds its own reference count to the buffer; it does not take over an existing reference.

#### Parameters

`buffer`

  Type: `GtkTextBuffer`

  A `GtkTextBuffer`.

  The data is owned by the caller of the function.

#### Return value

Type: `GtkWidget`

A new `GtkTextView`.

The data is owned by the called function.