Web lists-archives.com

Re: Question about porting from gtk 2.x to 4.0

Ciao Emmanuele,

I'm really really glad you replied, I tried to get in touch with you directly but I was unable to locate an email of yours! My software uses cairo API to draw the transitions between the slides on a cairo surface and yes I implemented a couple of widgets. Its name is Imagination, I would be delighted if you could try it in your spare time. I'm getting a problem of performances when exporting the slideshow through pipe to ffmpeg but this is another topic, I'm going to post it at the cairo ML. 

Is it possible to draw circles and lines by using the GDK API? I didn't know about it. Maybe I will solve the above performance problem.

Thank you indeed for your reply, it was very informative.


Do you live in London? :)

On Tue, 2 Oct 2018 at 21:26, Emmanuele Bassi <ebassi@xxxxxxxxx> wrote:

On Tue, 2 Oct 2018 at 20:02, Giuseppe Torelli via gtk-list <gtk-list@xxxxxxxxx> wrote:
Thank you. Any other clue? The question is not interesting?

It's more of a problem of scope: we have no idea what your application does, or how it uses GTK.

Are you drawing using GDK API instead of Cairo? Are you implementing your own widgets? Are you using GdkWindow API, or using things like foreign surfaces?

You can start from the migration guide from 2.x to 3.x:


And if you want to look at what changes are necessary to go from 3.x to 4.0, you can look at the migration guide:


Just a word of caution: GTK 4.0 is not out yet, and there are still some changes that are in the pipeline, especially because GNOME applications are now in the process of experimental ports to the 4.0 API, and we're addressing the feedback.

My strong suggestion is to port to GTK 3.x, and use the 3.x-to-4.x migration guide to ensure that you're using modern API that can ease the transition toward 4.0 when it's released.



On Sat, 29 Sep 2018 at 21:51, Allin Cottrell <cottrell@xxxxxxx> wrote:
On Sat, 29 Sep 2018, Giuseppe Torelli via gtk-list wrote:

> Hello,
> my application, Imagination, is written in GTK 2.x. After years of
> inactivity I finally started developing it again so I wanted to port it to
> GTK 3 but I noticed GTK 4 is under development.
> What do you guys suggest to do? Port my app to 3.0 or wait until 4.0 stable
> is released?

Just one simple observation: porting your app to 3.0 will probably
be trivial, if you're willing to use functions that are deprecated
in 3.0 (maybe less trivial if you use low-level drawing functions).
But porting to GTK 4.0 will likely be quite painful -- my
understanding is that everything that's deprecated in 3.0 (which is
quite a lot of bread-and-butter stuff in 2.x) will be gone in 4.0.

Allin Cottrell
Department of Economics
Wake Forest University
gtk-list mailing list

gtk-list mailing list