Added escaping of Gtk markup in gtk/gtk.markup.lisp
[cl-gtk2.git] / gtk / gtk.markup.lisp
diff --git a/gtk/gtk.markup.lisp b/gtk/gtk.markup.lisp
new file mode 100644 (file)
index 0000000..b574a9b
--- /dev/null
@@ -0,0 +1,11 @@
+(in-package :gtk)
+
+(defcfun |g_markup_escape_text| :string
+  (raw  :string)
+  (size :int))
+
+(defun markup-escape-text (raw)
+  (cffi:with-foreign-string (s raw)
+    (|g_markup_escape_text| s (length raw))))
+
+(export 'markup-escape-text)