Adw.Application¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Application (15), Gio.Application (39), GObject.Object (37), Gio.ActionGroup (14), Gio.ActionMap (5)
- Structs:
class |
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
Signals¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Adw.Application(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A base class for Adwaita applications.
AdwApplicationhandles library initialization by calling [func`init`] in the default [signal`Gio`.Application::startup] signal handler, in turn chaining up as required by [class`Gtk`.Application]. Therefore, any subclass ofAdwApplicationshould always chain up itsstartuphandler before using any Adwaita or GTK API.- Automatic Resources
AdwApplicationwill automatically load certain resources located in the application’s resource base path (see [method`Gio`.Application.set_resource_base_path], if they’re present.### Shortcuts Dialog
If there’s a resource located at
shortcuts-dialog.uiwhich defines an [class`ShortcutsDialog`] with the IDshortcuts_dialog,AdwApplicationwill set up anapp.shortcutsaction that creates and presents this dialog, as well as a <kbd>Ctrl</kbd><kbd>?</kbd> accelerator for it.### Stylesheet
If there’s a resource located at
style.css,AdwApplicationwill load styles from it. This can be used to add custom styles to the application.#### Additional styles (deprecated)
AdwApplicationwill also load the following stylesheets conditionally:style-dark.csswhen [property`StyleManager`:py:data::dark<Adw.Application.props.dark>] isTRUE.style-hc.csswhen the system high contrast preference is enabled.style-hc-dark.csswhen the system high contrast preference is enabled and [property`StyleManager`:py:data::dark<Adw.Application.props.dark>] isTRUE.
:
::warningThese resources are deprecated since 1.9.Use
style.csswith the following media queries instead:prefers-color-scheme: darkfor styles used only for dark appearance.prefers-contrast: morefor styles used only when the system high contrast preference is enabled.
- classmethod new(application_id, flags)¶
- Parameters:
flags (
Gio.ApplicationFlags) – The application flags
- Returns:
the newly created
AdwApplication- Return type:
Creates a new
AdwApplication.If
application_idis notNULL, then it must be valid. See [func`Gio`.Application.id_is_valid].If no application ID is given then some features (most notably application uniqueness) will be disabled.
- get_style_manager()¶
- Returns:
the style manager
- Return type:
Gets the style manager for self.
This is a convenience property allowing to access
AdwStyleManagerthrough property bindings or expressions.
Property Details¶
- Adw.Application.props.style_manager¶
- Name:
style-manager- Type:
- Default Value:
- Flags:
The style manager for this application.
This is a convenience property allowing to access
AdwStyleManagerthrough property bindings or expressions.