Added escaping of Gtk markup in gtk/gtk.markup.lisp
authorJan Moringen <scymtym@gmx.net>
Sat, 5 Feb 2011 22:38:39 +0000 (23:38 +0100)
committerJan Moringen <scymtym@gmx.net>
Sat, 5 Feb 2011 22:38:39 +0000 (23:38 +0100)
gtk/cl-gtk2-gtk.asd
gtk/gtk.markup.lisp [new file with mode: 0644]

index 5345dcb..6eaf650 100644 (file)
@@ -68,6 +68,7 @@
                (:file "gtk.clipboard")
                (:file "gtk.info-bar")
               (:file "gtk.spinner")
+              (:file "gtk.markup")
 
                (:file "gtk.main-loop-events")
 
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)