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.GSimpleAction
— MethodGSimpleAction(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.
Gtk4.GLib.add_action
— Functionadd_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.
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.
Gtk4.GLib.add_stateful_action
— Functionadd_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.
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.
Gtk4.GLib.set_state
— Functionset_state(m::GSimpleAction, v)
Set the state of a stateful action.
Menus
Gtk4.GLib.GMenuItem
— MethodGMenuItem(label, [detailed_action])
Create a GMenuItem with attributes label
and an optional detailed_action
, which is an action name with an optional detail argument.
GApplication
Gtk4.GLib.GApplication
— MethodGApplication(id = nothing, flags = GLib.ApplicationFlags_FLAGS_NONE)
Create a GApplication
with DBus id id
and flags.
Related GLib function: g_application_new
()
Base.run
— Functionrun(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.
Miscellaneous
Gtk4.GLib.cancel_after_delay
— Functioncancel_after_delay(timeout)->GCancellable
Creates and returns a GCancellable
and after timeout
seconds, cancels it.