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.
AdwApplication
handles 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 ofAdwApplication
should always chain up itsstartup
handler before using any Adwaita or GTK API.- Automatic Resources
AdwApplication
will automatically load stylesheets located in the application’s resource base path (see [method`Gio`.Application.set_resource_base_path], if they’re present.They can be used to add custom styles to the application, as follows:
style.css
contains styles that are always present.style-dark.css
contains styles only used when [property`StyleManager`:py:data::dark<Adw.Application.props.dark>] isTRUE
.style-hc.css
contains styles used when the system high contrast preference is enabled.style-hc-dark.css
contains styles used when the system high contrast preference is enabled and [property`StyleManager`:py:data::dark<Adw.Application.props.dark>] isTRUE
.
- 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_id
is 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
AdwStyleManager
through 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
AdwStyleManager
through property bindings or expressions.