Thread overview
Gkt4 + Adwaita
Feb 23, 2023
slawtul
Feb 23, 2023
Dejan Lekic
Feb 23, 2023
slawtul
Feb 23, 2023
Dejan Lekic
Feb 23, 2023
slawtul
Feb 23, 2023
Dejan Lekic
Feb 23, 2023
Iain Buclaw
February 23, 2023

Hi guys,
Was anyone here trying to marry dlang, gtk4 and adwaita lib?
Do you have some examples?

In C++ it's easy - however I would like to use D lang obviously

#include <adwaita.h>
#include <gtkmm.h>
#include <ui/include/Window.h>

int main(int argc, char *argv[]) {
  auto app = Gtk::Application::create("my.app");
  adw_style_manager_set_color_scheme(adw_style_manager_get_default(),
                                     ADW_COLOR_SCHEME_PREFER_LIGHT);
  return app->make_window_and_run<Window>(argc, argv);
}
February 23, 2023

On Thursday, 23 February 2023 at 09:51:34 UTC, slawtul wrote:

>

Hi guys,
Was anyone here trying to marry dlang, gtk4 and adwaita lib?
Do you have some examples?

It already works... well, "kind of". There is GTK4 branch in GtkD (https://gtkd.org) that needs some love. Branch: https://github.com/gtkd-developers/GtkD/tree/gtk4 . With that you can write Gtk4+Adwaita applications in D.

February 23, 2023

On Thursday, 23 February 2023 at 09:51:34 UTC, slawtul wrote:

>

Hi guys,
Was anyone here trying to marry dlang, gtk4 and adwaita lib?
Do you have some examples?

Here is an example with Gtk3: https://imgur.com/nXcI7E9.png
DIDE 0.1.0

February 23, 2023

On Thursday, 23 February 2023 at 09:51:34 UTC, slawtul wrote:

>

Hi guys,
Was anyone here trying to marry dlang, gtk4 and adwaita lib?
Do you have some examples?

In C++ it's easy - however I would like to use D lang obviously

I had a quick look at Tilix, but it's still using GTK3 it seems.

https://github.com/gnunn1/tilix

February 23, 2023

On Thursday, 23 February 2023 at 10:16:35 UTC, Dejan Lekic wrote:

>

On Thursday, 23 February 2023 at 09:51:34 UTC, slawtul wrote:

>

Hi guys,
Was anyone here trying to marry dlang, gtk4 and adwaita lib?
Do you have some examples?

It already works... well, "kind of". There is GTK4 branch in GtkD (https://gtkd.org) that needs some love. Branch: https://github.com/gtkd-developers/GtkD/tree/gtk4 . With that you can write Gtk4+Adwaita applications in D.

Hi thanks, for reply.

that needs some love - this statement worries me a litte bit.
Anyways, I will try it but if I encounter too many issues - I will stay with c++ unfortunately.

February 23, 2023

On Thursday, 23 February 2023 at 11:57:17 UTC, slawtul wrote:

>

Hi thanks, for reply.

that needs some love - this statement worries me a litte bit.
Anyways, I will try it but if I encounter too many issues - I will stay with c++ unfortunately.

Gtk3 branch is quite stable for quite some time. As Ian mentioned, Tilix is based on it for an example - quite popular project built with D and GtkD (stable, Gtk3 branch).

February 23, 2023

On Thursday, 23 February 2023 at 12:24:02 UTC, Dejan Lekic wrote:

>

On Thursday, 23 February 2023 at 11:57:17 UTC, slawtul wrote:

>

Hi thanks, for reply.

that needs some love - this statement worries me a litte bit.
Anyways, I will try it but if I encounter too many issues - I will stay with c++ unfortunately.

Gtk3 branch is quite stable for quite some time. As Ian mentioned, Tilix is based on it for an example - quite popular project built with D and GtkD (stable, Gtk3 branch).

I know Tilix - I even use it everyday. It's a pity the project is less and less maintained.