Gio Reference

The Gio library contains functionality for I/O (most of which overlaps functionality in the Julia Base library) and machinery for applications, such as actions and menus.

Actions and action groups

Gtk4.GLib.GSimpleActionMethod
GSimpleAction(name::AbstractString, 
              [parameter_type::Type{T}, [initial_state]]; kwargs...) where T

Create an action with a name and optionally a parameter_type from a Julia type (only a few simple types are supported) and an initial_state. If initial_state is not provided, the action will be stateless.

Keyword arguments set the action's GObject properties.

source
Gtk4.GLib.add_actionFunction
add_action(m::GActionMap, name::AbstractString, parameter::Type{T}, handler::Function)

Add an action with name and a parameter of type T to a GActionMap. Also connect a handler for the action's "activate" signal.

source
add_action(m::GActionMap, name::AbstractString, handler::Function)

Add an action with name to a GActionMap. Also connect a handler for the action's "activate" signal.

source
Gtk4.GLib.add_stateful_actionFunction
add_stateful_action(m::GActionMap, name::AbstractString, parameter::Type{T}, initial_state, handler::Function)

Add a stateful action with name, a parameter of type T, and an initial state to a GActionMap. Also connect a handler for the action's "change-state" signal.

source
add_stateful_action(m::GActionMap, name::AbstractString, initial_state, handler::Function)

Add a stateful action with name and an initial state to a GActionMap. Also connect a handler for the action's "change-state" signal.

source
Gtk4.GLib.GMenuItemMethod
GMenuItem(label, [detailed_action])

Create a GMenuItem with attributes label and an optional detailed_action, which is an action name with an optional detail argument.

source

GApplication

Base.runFunction
run(app::GApplication)

Calls g_application_run, starting the main loop. If the loop is already running, this function will stop it and emit a warning before starting the application loop.

source

Miscellaneous