[cairo] Gtkmm widget for GtkCairo

Rick L Vinyard Jr rvinyard at cs.nmsu.edu
Fri Apr 22 15:34:06 PDT 2005

On Fri, 2005-04-22 at 10:05 +0200, Øyvind Kolås wrote:
> On 4/22/05, Rick L Vinyard Jr <rvinyard at cs.nmsu.edu> wrote:
> > If anyone is interested I have wrapped the gtkcairo library using
> > gmmproc into a library named gtkcairomm that provides a
> > Cairo::DrawingArea widget for use with gtkmm.
> If it is possible to integrate this into the build enviroment of
> GtkCairo in a clean way, that will build it if gtkmm is present, and
> ignore it at other times, it would be a welcome addition.

Actually, the way it gets wrapped is as a separate library,
libgtkcairomm. That way the GtkCairo library wouldn't need to know about
gtkmm and builds only for gtk+.

> It would also be possible to import the library into CVS, please be
> aware the gtkcairo is a transient solution while we wait for native
> integration in gtk+.

That's actually the intent in wrapping it in gtkcairomm. To suffice
until gtk+ has a widget and hence gtkmm, yet still provide a native
gtkmm widget that can be inherited from in C++.

I'd be happy to provide a tarball to import into CVS, or to set up a
sourceforge project; whichever is more appropriate.

> >Is there any  interest in setting up something similar to gtkmm using gmmproc?
> One of the nice consequences of a C++ wrapper for cairo would be that
> it makes automatic generation of bindings using SWIG easy. This would
> make it possible to automatically make OO bindings for a lot of higher
> level languages. The main problem with this approach is that you often
> have to settle with a binding that doesn't fell fully native for the
> language in question.
> I'm not experienced with bolting C++ on top of C, but my experience
> with the ruby binding is that the size of the cairo API is small
> enough to warrant manual binding to make the integration be as neat as
> possible.

If there is interest is wrapping the library via something like gmmproc
I might be able to help get things set up. I'm not sure what the
implications are of using something like gmmproc. I think one of the key
items would be whether a cairo C object inherits from gobject.


Rick L. Vinyard, Jr.

More information about the cairo mailing list