FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gtk+ 3.x support.

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Sat Mar 24, 2012 10:21 am    Post subject: Gtk+ 3.x support. Reply with quote

I've been thinking on how to add support for Gtk 3.x to GtkD, i can think of three ways to add the support all with pros and cons.
And i would like to know what your preferred way to add support would be.

1. Add gtk3 (gtk3, gdk3 and gsourceview3) packages to gtkD, then the user would eighter import gtk or gtk3, depending on which they want to use.
But this will only work correctly if gtkD is build as a static library, because when build as a shared library the static constructors of the unused packages will also run.

2. Just update GtkD to the 3.x series, and try to load the 2.x libs when the 3.x ones aren't available. Now with the update to 3.x a lot of functions that were deprecated in 2.x are going to be removed, breaking backwards compatibility.
These functions aren't currently marked with the deprecated keyword in GtkD but only in the documentation.
One problem is that Gtk 3.x isn't available on Windows which is currently stuck at 2.24 (I don't know which version as available for OSX), while loading the libraries from the 2.x series will work you can't use any of the new functionality from the 3.x series, while you loose the deprecated functions from 2.x.

3. Branch of the current gtkD which is at the latest 2.x version, and update the trunk to the 3.x series. And release 2 versions one for the 2.x series that would only receive bug fixes, and one for the 3.x series that would be updated for new Gtk+ releases.
Back to top
View user's profile Send private message
Jordi Sayol



Joined: 14 Nov 2011
Posts: 14

PostPosted: Sat Mar 24, 2012 11:54 am    Post subject: Reply with quote

I vote for no. 3
Back to top
View user's profile Send private message
Jordi Sayol



Joined: 14 Nov 2011
Posts: 14

PostPosted: Sun Mar 25, 2012 12:40 am    Post subject: Reply with quote

If we do no. 3, will there be any problem to have both gtkd version present in the same system?

And used together in the same project as well?
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Mon Mar 26, 2012 2:40 pm    Post subject: Reply with quote

Jordi Sayol wrote:
If we do no. 3, will there be any problem to have both gtkd version present in the same system?

And used together in the same project as well?


For the shares libs that wouldn't be a problem, they are already properly versioned. For the static libs versioning could be added, but i'm not sure on how to handle the headers?
Back to top
View user's profile Send private message
Jordi Sayol



Joined: 14 Nov 2011
Posts: 14

PostPosted: Tue Mar 27, 2012 3:37 am    Post subject: Reply with quote

Cleanly separating them by placing at
.../include/gtkd/...
and
.../include/gtkd3/...

and adding "gtkd" and "gtkd3" as needed path in the included headers.

For static libs just adding the major version number on name. i.e.:
libgtkd.a => libgtkd3.a

Shared libs (linker name) including the same base name of static ones. This mean include the major version number on lib name. i.e.:
libgtkd.so => libgtkd3.so
libgtkd.so.1.5.1 => libgtkd3.so.3.0.0

Seeing all this, I'm not sure if is a good idea make them installable together, and probably will be enough just make gtkd v.3 as a newer version of gtkd v.2, but keeping this last in a separated branch for bug fixing.

BTW, GTK3 for windows:
http://blogs.gnome.org/alexl/2011/11/25/gtk-work-on-windows/
Back to top
View user's profile Send private message
demizer



Joined: 11 Apr 2011
Posts: 3

PostPosted: Thu Mar 29, 2012 10:57 am    Post subject: Reply with quote

FYI gtk3 uses gobject introspection to automatically generate bindings and the gtk3 devs say this is the method that should be used going forward for creating language bindings. For example:

go: https://github.com/norisatir/go-gtk3
python: http://live.gnome.org/PyGObject

In fact someone has already started the process for gtk3 and D here: http://repo.or.cz/w/girtod.git, but this project is confusingly structured and the bindings are not complete. As you can see though, he has created fairly complete bindings in a short amount of time thanks to gobject-introspection.

Also, kind of off-topic but have you considered moving the project to github? That would make it easier to contribute to as shown when dmd moved to github and now gdc.
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Thu Mar 29, 2012 3:32 pm    Post subject: Reply with quote

demizer wrote:
FYI gtk3 uses gobject introspection to automatically generate bindings and the gtk3 devs say this is the method that should be used going forward for creating language bindings. For example:

go: https://github.com/norisatir/go-gtk3
python: http://live.gnome.org/PyGObject

In fact someone has already started the process for gtk3 and D here: http://repo.or.cz/w/girtod.git, but this project is confusingly structured and the bindings are not complete. As you can see though, he has created fairly complete bindings in a short amount of time thanks to gobject-introspection.


While i've started working on a gir based wrapper, the current wrapper should wrap gtk3 just fine.

Quote:
Also, kind of off-topic but have you considered moving the project to github? That would make it easier to contribute to as shown when dmd moved to github and now gdc.


https://github.com/gtkd-developers/GtkD
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group