diff --git a/gtk4/text_view.c b/gtk4/text_view.c
index 00d9699..0c7363f 100644
--- a/gtk4/text_view.c
+++ b/gtk4/text_view.c
@@ -55,13 +55,20 @@ GtkWidget ** kc3_gtk4_text_view_new_with_buffer (GtkWidget **dest,
return dest;
}
+void kc3_gtk4_text_view_set_monospace (GtkTextView **text_view,
+ bool monospace)
+{
+ assert(text_view);
+ gtk_text_view_set_monospace(GTK_TEXT_VIEW(*text_view), monospace);
+}
+
void kc3_gtk4_text_view_set_text (GtkTextView **text_view,
s_str *text)
{
GtkTextBuffer *buffer;
assert(text_view);
assert(dest);
- if (! (buffer = gtk_text_view_get_buffer(*text_view))) {
+ if (! (buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(*text_view)))) {
err_puts("kc3_gtk4_text_view_set_text: gtk_text_view_get_buffer");
assert(! "kc3_gtk4_text_view_set_text: gtk_text_view_get_buffer");
return;
diff --git a/lib/kc3/0.1/gtk4/text_view.kc3 b/lib/kc3/0.1/gtk4/text_view.kc3
index 5d80659..2f35452 100644
--- a/lib/kc3/0.1/gtk4/text_view.kc3
+++ b/lib/kc3/0.1/gtk4/text_view.kc3
@@ -7,6 +7,8 @@ defmodule Gtk4.TextView do
def get_text = cfn Str "kc3_gtk4_text_view_get_text" (Ptr, Result)
+ def set_monospace = cfn Void "gtk_text_view_set_monospace" (Ptr, Bool)
+
def set_text = cfn Void "kc3_gtk4_text_view_set_text" (Ptr, Str)
end