This is a fork of the cairo Haskell module for use in conjunction with Haskell GI. It can also be used without Haskell GI with fewer dependencies than the original module.
Originally, accessing GTK+ from within Haskell used gtk2hs. These were hand written bindings, providing a higher abstraction over the underlying GTK API. The problems are, that changes inside GTK+ have to be mirrored in Haskell, which makes maintaining the module increasingly difficult. The Haskell GI module tries to simplify the maintanance by using auto generated bindings from GObject introspection data.
There is, however, nearly no GObject introspection data for cairo, as cairo is not based on the GObject data model. So the corresponding gi-cairo library, contains nearly no useful functions except creating a GI.Cairo.Context
.
This library provides:
- A library
gi-cairo-render
, which is a fork of the old cairo library with the same API, but fewer dependencies. Especially it does not depend ongtk2hs-buildtools
, but only on upstream c2hs. Therefore it is less likely to break whencabal
orghc
are upgraded. - A library
gi-cairo-connector
which is used to provide the glue code to pluggi-cairo-render
insidegi-cairo
, i.e. to actually callgi-cairo-render
from GTK+.