Thread overview
Is anyone running gtk4 is D?
Apr 13
Jamie
Aug 04
aberba
April 09

I'm building a UI component library on top of gtk3 to aid and building good looking UI faster with few lines of code. Currently using Gtk-d (gtk3)

I know there's a gtk4 branch somewhere but doesn't seem to have gained much improvement a while now. I would much rather prefer going with the newest version of gtk, v4, rather than the soon to be phased out, v3

Is anyone able to use gtk4 in D?

April 09

On Tuesday, 9 April 2024 at 09:15:18 UTC, Iliana Marquardt wrote:

>

I know there's a gtk4 branch somewhere but doesn't seem to have gained much improvement a while now. I would much rather prefer going with the newest version of gtk, v4, rather than the soon to be phased out, v3

Is anyone able to use gtk4 in D?

I believe the best would be to start a thread in the GtkD support forum. There have been few individuals who tried to bring the v4 branch up-to-date but it does not look like they were successful. It is unfair to expect Mike Wey to do everything - it should be a community effort. In fact, I humbly believe D Foundation should be involved as this is in my humble opinion one of the most important project in D ecosystem. GtkD is the most complete GUI toolkit for D, without any doubt.

April 13

On Tuesday, 9 April 2024 at 09:15:18 UTC, Iliana Marquardt wrote:

>

I'm building a UI component library on top of gtk3 to aid and building good looking UI faster with few lines of code. Currently using Gtk-d (gtk3)

I know there's a gtk4 branch somewhere but doesn't seem to have gained much improvement a while now. I would much rather prefer going with the newest version of gtk, v4, rather than the soon to be phased out, v3

Is anyone able to use gtk4 in D?

Yes, you can use GTK4 in D. Although the GTK4 branch for the GtkD wrapper hasn’t been updated recently, GTK4 is still a C library and can be used directly from D.

August 04

On Tuesday, 9 April 2024 at 09:15:18 UTC, Iliana Marquardt wrote:

>

Is anyone able to use gtk4 in D?

Just FYI, gtk4 (compared to gtk3) dropped all responsibility for window placement (an application window opens in the same screen position where it was last closed). One of the devs told me it's because this type of thing should be handled by the OS's window manager (which, truthfully, it should). However, there is no window manager in Linux that will properly handle window position on a multi-monitor set-up.

There were other things that got dropped, but I don't recall what they were ATM. This one thing was enough for me to steer away from it.

And if you're interested in an OOP approach to GtkD (3, naturally) you might check out https://gtkdcoding.com. I put it all in the public domain, so feel free to use anything you find there.

August 04

On Sunday, 4 August 2024 at 07:45:50 UTC, Ron Tarrant wrote:

>

On Tuesday, 9 April 2024 at 09:15:18 UTC, Iliana Marquardt wrote:

>

Is anyone able to use gtk4 in D?

Just FYI, gtk4 (compared to gtk3) dropped all responsibility for window placement (an application window opens in the same screen position where it was last closed). One of the devs told me it's because this type of thing should be handled by the OS's window manager (which, truthfully, it should). However, there is no window manager in Linux that will properly handle window position on a multi-monitor set-up.

There were other things that got dropped, but I don't recall what they were ATM. This one thing was enough for me to steer away from it.
Isn't support by window managers only a matter of time?

Like it was mentioned on that thread (https://discourse.gnome.org/t/how-to-center-gtkwindows-in-gtk4/3112/9) windowing systems have gotten more complicated and also multiple monitors don't make it easier either. So it's not an easy thing to do in such a way that it works cross platform across all envs supported by gtk4. The only possible chance of reliable implementation is using platform specific windowing managers that support it. Like you said, none supports it well... probably because it's a hard problem?

>

And if you're interested in an OOP approach to GtkD (3, naturally) you might check out https://gtkdcoding.com. I put it all in the public domain, so feel free to use anything you find there.

August 07

On Sunday, 4 August 2024 at 09:46:20 UTC, aberba wrote:

>

[As] you said, none supports it well... probably because it's a hard problem?

I'm not well enough versed in that type of thing to say, really. I've always assumed this lack was ecosystem specific or it's just not sexy enough as a coding problem for most volunteers to bother with. I say that because Windows doesn't seem to have this problem (I've never run into it) whereas Linux—in its many iterations—experiences more of a close-but-no-cigar situation.

Perhaps if dual-monitor set-ups had become the norm at some point in history—on alternative OS's anyway—this would have been resolved.