On Sunday, 14 September 2014 at 13:30:28 UTC, Paul Z. Barsan
wrote:
Hello,
I want to use a cairo XlibSurface for painting in a project of
mine and I don't know what bindings should I use. I've started
with deimos.cairo which has a C-style syntax and works well on
my linux machine. After I heard about dub, I switched to this
build system and I ran into problems:
First of all, the cairo version in the dub registry is
different from the deimos version. CairoD (dub pkg) has support
for more surfaces and provides D-style wrappers but I get
compile-time errors. When I try to get an instance of
XlibSurface I get an "undefined identifier XlibSurface"
error.At a closer inspection, I see that CAIRO_HAS_XLIB_SURFACE
is set to false in cairo/c/config.d even though I have a cairo
library with xlib support. I'm sure about this because I've
checked the headers in /usr/include/cairo/cairo-features.h.
Looking into the deimos version, I see that the
CairoHasXlibSurface flag is set to true. As a conclusion, I
think that both config.d(cairod) and features.d(deimos.cairo)
should be generated while building the liibraries to mirror the
cairo-features.h header.
A second problem with cairoD from dub registry is that it
depends uppon std.c.linux.X11.* which doesn't exist on my
machine. I have libphobos-devel 2.066.0-1 installed and I've
looked into my dir structure but I've failed to find something
related to X11. I've also looked in the online docs
http://dlang.org/library/std/c/linux/tipc.html and the X11
bindings are not there. I suppose that X11 bindings went from
phobos to deimos and now deimos ussage is depprecated because
of dub. So the dub version of cairo bindings should use the dub
version of libX11, but they don't.
I want to use cairoD for dub but at this point it seems to be
unusable.I can live with a C-Style syntax but I want to have
cross-platform support and the deimos version has only the xlib
surface.Aiming for a long term project, I want to know which
version of cairo bindings are going to be continued ? What do
you recommend ?
use gtkd they have a cairo binding