gi-cairo-connector

Haskell GI friendly bindings to the Cairo library


Keywords
lgpl, library, Propose Tags , GI.Cairo.Render.Connector
License
LGPL-2.1-only
Install
cabal install gi-cairo-connector-0.1.1

Documentation

gi-cairo-render

Linux Build Status Haskell

Introduction

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:

  1. 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 on gtk2hs-buildtools, but only on upstream c2hs. Therefore it is less likely to break when cabal or ghc are upgraded.
  2. A library gi-cairo-connector which is used to provide the glue code to plug gi-cairo-render inside gi-cairo, i.e. to actually call gi-cairo-render from GTK+.