The name of the currently active theme, or null if none has been set.
Map of window names to close delays in milliseconds.
Directory containing the user's config file.
Absolute path to the user's config file.
The current cursor theme name.
The current GTK theme name.
The current GTK icon theme name.
All registered windows.
Optionalproperties: Partial<ConstructorProps>ReadonlyaddPrepends a directory to the icon search path.
Directory containing icon files
ReadonlyaddRegisters a window with the application.
The window must have a name property set. Emits 'window-toggled'
when the window's visibility changes.
The GTK window to register
ReadonlyapplyApplies CSS styling from a file path or inline CSS string.
A file path to a CSS file or an inline CSS string
If true, removes all previously applied CSS first
ReadonlycloseHides a window by name, respecting any configured close delay.
The window name
ReadonlyconfigApplies configuration settings to the application.
The configuration object
ReadonlyconnectConnects a callback to a signal.
The signal name (defaults to 'window-toggled')
The callback to invoke
The connection ID
ReadonlygetRetrieves a registered window by name.
The window name
The window, or undefined if not found
Opens the GTK interactive debugger.
ReadonlyopenShows a window by name.
The window name
ReadonlyquitQuits the application.
DBus method to quit the application.
ReadonlyregisterRegisters a named theme (CSS file path or inline CSS string).
A unique theme name
Path to a CSS file or inline CSS string
ReadonlyremoveRemoves and destroys a registered window.
The window instance or its name
ReadonlyresetRemoves all CSS providers that were applied via applyCss.
Reads and evaluates a JavaScript file in the application context.
Path to the JavaScript file
Optionalbus: stringThe client's DBus bus name
Optionalpath: stringThe client's DBus object path
Evaluates a JavaScript string in the application context. Called via DBus from the client.
JavaScript code to evaluate
OptionalclientBusName: stringThe client's DBus bus name for returning results
OptionalclientObjPath: stringThe client's DBus object path
OptionalbusName: stringOptionalobjPath: stringUse RunJs instead, which now supports await syntax.
ReadonlysetSwitches to a registered theme by name.
Resets all current CSS and applies the theme CSS. Use
@define-color in theme CSS files for GTK3-compatible theming.
The theme name previously registered via registerTheme
ReadonlytoggleToggles a window's visibility by name.
The window name
DBus method to toggle a window. Returns the window's visibility as a string.
Returns a JSON-serializable representation of the application state.
Activates the application.
In essence, this results in the Gio.Application::activate signal being emitted in the primary instance.
The application must be registered before calling this function.
The main AGS application singleton.
Manages windows, CSS styling, icon themes, and the DBus interface. Access the running instance via the global
Appobject or importappfrom this module.Example