Skip to content

Haskell GI friendly bindings to the Cairo library

License

Notifications You must be signed in to change notification settings

taffybar/gi-cairo-render

 
 

Repository files navigation

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+.

About

Haskell GI friendly bindings to the Cairo library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 98.9%
  • Other 1.1%