What is libadwaita?

I’m beginner in GTK and understand nothing about these libs from documentation just.

Please describe in few words - is this library used for new / testing features for next GTK releases? Something like libboost in cpp?

I found lot of useful components there, but not sure what is that project exactly in the GNOME ecosystem and how to maintain applications.

For example, once I’ve found LibHandy but now it’s deprecated, and seems that merged with libadwaita. Is this final point or it’s better to work with GTK for long term applications support?

No.

Libadwaita is the implementation of the GNOME interface guidelines. It provides widgets and ancillary objects to write applications targeting GNOME as their primary environment, both in desktop and mobile form factors.

GTK is platform agnostic, and encourages environments to provide their own platform library, like libadwaita for GNOME or granite for Elementary, to implement platform specific UI patterns.

Libhandy was a library that added functionality targeting non-desktop form factors to GTK3 applications, which slowly incorporated patterns from the GNOME HIG; it won’t be ported to GTK4, because there’s no point in doing that.

If you want to write a GTK application, you should figure out the kind of environment you wish to target:

  • GNOME: use libadwaita
  • Elementary: use libgranite
  • anything else: use GTK, but be prepared to implement a lot of custom widgets for platform-specific functionality

You can use libadwaita even if you’re not targeting GNOME, but be mindful that libadwaita is a GNOME project, and as such it will always put GNOME requirements first.

2 Likes

Clear description, thank you much!

FWIW there’s also Linux Mint’s xapp library now, in addition to libadwaita and granite.

1 Like

Thanks for reply, now I understand that’s something like Bootstrap/MD concepts with different implementations but in GTK context, interesting!

Because using Linux over ten years but without understanding about how does UI work :slight_smile:

tldr gtk extensions for gnome

1 Like

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