v2026.5.3
All Bundles
Bundle GTK3 GUI toolkit bindings for building native desktop applications on Linux. Wraps GtkApplication and GtkWindow lifecycle, focus management, and window relationships. Compile with -lib gtk3.

GtkApplication

GtkApplication is a class that handles many important aspects of a GTK+ application in a convenient fashion, without enforcing a one-size-fits-all application model

Operations

GetActiveWindow #

Gets the 'active' window for the application

method : public : GetActiveWindow() ~ GtkWindow

Return

TypeDescription
GtkWindowthe active window Nil if there isn't one.

GetAppMenu #

Returns the menu model that has been set with

method : public : GetAppMenu() ~ GMenuModel

Return

TypeDescription
GMenuModelthe application menu

GetMenubar #

Returns the menu model that has been set with

method : public : GetMenubar() ~ GMenuModel

Return

TypeDescription
GMenuModelthe menubar for windows of application

Inhibit #

Inform the session manager that certain types of actions should be inhibited. This is not guaranteed to work on all platforms and for all types of actions

method : public : Inhibit(window:GtkWindow, flags:GtkApplicationInhibitFlags, reason:String) ~ Int

Parameters

NameTypeDescription
windowGtkWindowa window
flagsGtkApplicationInhibitFlagswhat types of actions should be inhibited
reasonStringa short, human-readable string that explains why these operations are inhibited

Return

TypeDescription
Inta non-zero cookie that is used to uniquely identify this request

IsInhibited #

Determines if any of the actions specified in flags are currently inhibited (possibly by another application)

method : public : IsInhibited(flags:GtkApplicationInhibitFlags) ~ Bool

Parameters

NameTypeDescription
flagsGtkApplicationInhibitFlagswhat types of actions should be queried

Return

TypeDescription
Booltrue if any of the actions specified in flags are inhibited

New # constructor

Creates a new #GtkApplication instance

New(application_id:String, flags:GApplicationFlags)

Parameters

NameTypeDescription
application_idString: The application ID.
flagsGApplicationFlagsthe application flags

RemoveWindow #

Adds a window to application

method : public : RemoveWindow(window:GtkWindow) ~ Nil

Parameters

NameTypeDescription
windowGtkWindowwindow to add