Gtk.TextView.new_with_buffer

function new_with_buffer(buffer:Gtk.TextBuffer):Gtk.Widget {
    // Gjs wrapper for gtk_text_view_new_with_buffer()
}

Creates a new Gtk.TextView 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.TextView.new. The text view adds its own reference count to the buffer; it does not take over an existing reference.

buffer

a Gtk.TextBuffer

Returns

a new Gtk.TextView.