5

I recently made my first steps in X11 programming in Haskell and now I want to draw texts using Cairo/Pango. I found some C tutorials and it seems as I need to create an Xlib surface using cairo_xlib_surface_create().
There is a Haskell wrapper for Cairo but a wrapper for this functions seems to be missing.
However, there still seems to be a way to draw directly on X11 windows with Cairo since the documentation for the surface mentions an Xlib backend.
But I can't find any further information.

Joey
  • 344,408
  • 85
  • 689
  • 683
CAS
  • 51
  • 3

1 Answers1

0

The documentation says

Note the Haskell bindings do not support all the possible cairo backends because it would require bindings for the associated technology (eg X11, glitz, etc) however bindings to other backends may be implemented externally. For example, Gtk2Hs provides a binding to the backend for X11 (and win32 on Windows).

So it seems that you have to either use gtk2hs, or ffi the required binding yourself.

n. m. could be an AI
  • 112,515
  • 14
  • 128
  • 243