Is someone using libadwaita or knows what it is?

Someone asked for Nim bindings two years ago, so I added them. But that time I only could find out that libadwaita is some form of libhandy for GTK4. Gentoo Linux does not ship adwaita at all, so it seems to be not an important lib?

Just someone created an issue for libadwaita, see https://github.com/StefanSalewski/gintro/issues/188

The problem is, that libadwaita seems to duplicate many data types like Window or Application. Many more I fear, maybe most of the important GTK types like Widget, Button and all that? For Nim we generally use no module name prefix, we write for types just Button instead of gtk.Button. But when using libadwaity we have name conflicts, and have to specify adw.Window vs. gtk.Window. Unfortunately the gintro Nim bindings does not support module name prefixes well currently, and fixing that may be a larger amount of work.

So the question: Has libadwaita some relevance, or can we just ignore it and the single user that had tried it?

libadwaita is what most GNOME apps are gonna be using when they port to GTK4. It’s not shipped because it’s not released yet.

Name conflicts are nothing new, for example:

  • GApplication / GtkApplication
  • GSettings / GtkSettings
  • GListStore / GtkListStore

In GTK3:

  • GMenu / GtkMenu
  • GdkWindow / GtkWindow

So having an extra AdwApplication on top of GtkApplication doesn’t change much - it’s not different from how GtkApplication extends GApplication, or e.g. libdazzle extends GtkApplication into DzlApplication.

3 Likes

To add to that

  • GObject / AtkObject / GstObject
  • GtkBin / GstBin
  • GAction / GtkAction / AtkAction
  • GtkRange / AtkRange
  • GdkWindow / GtkWindow / AtkWindow
  • GtkMisc / AtkMisc
  • GSocket / GtkSocket
  • PangoRenderer / GskRenderer

and probably many others I forgot. Without proper namespacing you’ll have a lot of problems.

3 Likes

Also WrapMode:
gtk4.WrapMode
pango.WrapMode

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.