Sign up

GTK2 -> GTK3: How to replace gdk.Drawable

I know I have to use Cairo, but have not found any comprehensible example yet.

Anybody done it?

Re: GTK2 -> GTK3: How to replace gdk.Drawable

On 11/01/2013 06:00 AM, Steve Teale wrote:

I know I have to use Cairo, but have not found any comprehensible example yet.

Anybody done it?

I've updated the demo from gdk.Drawable to Cairo, i think the biggest
difference was that i couldn't draw incrementally. So i had to draw to
an ImageSurface and fill the Context with it on every redraw.

Cairo:
https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestIdle.d

gdk.Drawable:
https://github.com/gtkd-developers/GtkD/blob/Gtk2/demos/gtkD/TestWindow/TestIdle.d

Anything specific you want to know?

Re: GTK2 -> GTK3: How to replace gdk.Drawable

Cairo:
https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestIdle.d

gdk.Drawable:
https://github.com/gtkd-developers/GtkD/blob/Gtk2/demos/gtkD/TestWindow/TestIdle.d

Anything specific you want to know?

I think I worked it out. But I have another question. When I link I am getting undefined reference from gtkd-2 to
dthrow. I built the library with gdc, but am using dmd to compile the app. This is on Ubuntu 12.04.

Do I need to build the lib with dmd, and if so, what changes should I make to the make file?

Re: GTK2 -> GTK3: How to replace gdk.Drawable

dthrow. I built the library with gdc, but am using dmd to compile the app. This is on Ubuntu 12.04.

Do I need to build the lib with dmd, and if so, what changes should I make to the make file?

That is dthrow underscore d underscore throw.

Re: GTK2 -> GTK3: How to replace gdk.Drawable

On 11/02/2013 10:50 AM, Steve Teale wrote:

dthrow. I built the library with gdc, but am using dmd to compile the app. This is on Ubuntu 12.04.

Do I need to build the lib with dmd, and if so, what changes should I make to the make file?

That is dthrow underscore d underscore throw.

Yes, the lib needs to be build with the same compiler as the app.

If both are installed the make file should default to dmd, but you can
tell it witch compiler to use by specifying the DC variable:

make DC="dmd"