Interfacing Raku to Gnome GTK+


The tutorial section tries to explain how you can build your own GUI (Graphical User Interface) in Raku based on the gnome libraries such as gtk, gdk and glib. As the GTK+ library builds upon other libraries such as glib and gdk, the Gnome::Gtk3 package depends on Gnome::Gdk3 and Gnome::Glib among others.

Many techniques will pass and lead you along all kinds of details like creating and showing windows, adding widgets, using dialogs and sending signals to name a few.

At first, a large part of the tutorial will be about building your GUI by hand. There are some sections in between to tell you something about how the Raku modules are set up. Later sections will be about making use of XML files, possibly generated from the GTK+ GUI designer program Glade, how to make use of stylesheets, resources, applications, drag and drop, ….

Have fun!


To get more detailed information of each module, there is also a reference section of the implemented modules on this web site;


Installing all packages is simple, just run the following command;

zef install Gnome::Gtk3

Assuming that Raku and zef is installed properly


There is a small but not less important thing to say. The documentation found here are often taken from other sources and changed where there is some code, often in Python or C. Therefore I like to express my gratitude towards these writers;

  • Wikibooks For explanations on Gtk+, Pango and Cairo.
  • Zetcode for the several tutorials on Gtk+ and Cairo.
  • Prof Stewart Weiss, web address. On his site are numerous documents under which many about GTK+. I have used parts from these to explain many aspects of the user interface system.
  • Bert Timmerman for his Cairo transformation examples: