[gegl] bin: add a html renderer utility function



commit f2c9d7db81557e3e640513b9a7065651f6f39349
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Mar 4 11:25:28 2019 +0100

    bin: add a html renderer utility function
    
    Links in the provided html like thus: <a href="next">bar</a> runs the
    command 'next' in the internal commandline.

 bin/lua/init.lua | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/bin/lua/init.lua b/bin/lua/init.lua
index 853d5696d..97bdb64f6 100644
--- a/bin/lua/init.lua
+++ b/bin/lua/init.lua
@@ -166,3 +166,12 @@ function contrasty_stroke()
   cr:set_line_width (y1)
   cr:stroke ()
 end
+
+function html(xhtml)
+  mrg:xml_render(nil, function(event, link)
+           ffi.C.argvs_eval(link)
+  end,
+  NULL, xhtml)
+end
+
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]