Re: Printing
Duncan Coutts <duncan.coutts <at> worc.ox.ac.uk>
2007-05-03 10:32:09 GMT
On Thu, 2007-05-03 at 20:52 +1200, Toby Allsopp wrote:
> Does gtk2hs provide any way to print (e.g. on paper)? There seem to
> be PDF and PS Cairo backends that are commented out of the build; what
> is the status of these?
Our cairo binding currently only support cario api version 1.0. It would
be a great self-contained project for someone to update them to the
current 1.4 and get the other backends working.
If I recall correctly, since cairo 1.2 the pd and pdf backends are fully
supported upstream where as in 1.0 they were marked experimental and
usually not enable, which is why they are commented out in our binding.
The other thing that'll help printing is if we bind the GtkPrint stuff
which is new in Gtk+ 2.10. Unfortunately this looks like it needs some
work on the Gtk2Hs code generator. You see at the moment we use some
scripts written by the Gtk# developers to scan the Gtk+ header files and
generate an xml description of the Gtk+ API. We then have a Haskell
program which reads the xml and generates .chs modules. Unfortunately
the Gtk# folk are not very good at keeping up with the latest Gtk+
releases. I think the right thing to do is to switch to use a different
set of scripts that other language bindings (like pygtk and gtkmm) use.
Someone is working on the .def file format parser for that but it'll
take a little while.
So if anyone has any free time we have plenty for you to do!
Just
ask, or just get stuck in.
Duncan
(Continue reading)