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() ~ GtkWindowReturn
| Type | Description |
|---|---|
| GtkWindow | the active window Nil if there isn't one. |
GetAppMenu #
Returns the menu model that has been set with
method : public : GetAppMenu() ~ GMenuModelReturn
| Type | Description |
|---|---|
| GMenuModel | the application menu |
GetMenubar #
Returns the menu model that has been set with
method : public : GetMenubar() ~ GMenuModelReturn
| Type | Description |
|---|---|
| GMenuModel | the 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) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| window | GtkWindow | a window |
| flags | GtkApplicationInhibitFlags | what types of actions should be inhibited |
| reason | String | a short, human-readable string that explains why these operations are inhibited |
Return
| Type | Description |
|---|---|
| Int | a 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) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| flags | GtkApplicationInhibitFlags | what types of actions should be queried |
Return
| Type | Description |
|---|---|
| Bool | true if any of the actions specified in flags are inhibited |
New # constructor
Creates a new #GtkApplication instance
New(application_id:String, flags:GApplicationFlags)Parameters
| Name | Type | Description |
|---|---|---|
| application_id | String | : The application ID. |
| flags | GApplicationFlags | the application flags |