Adw.Application

g Adw.Application Adw.Application GObject.GInterface GObject.GInterface Gio.ActionGroup Gio.ActionGroup GObject.GInterface->Gio.ActionGroup Gio.ActionMap Gio.ActionMap GObject.GInterface->Gio.ActionMap GObject.Object GObject.Object Gio.Application Gio.Application GObject.Object->Gio.Application Gio.ActionGroup->Gio.Application Gio.ActionMap->Gio.Application Gtk.Application Gtk.Application Gio.Application->Gtk.Application Gtk.Application->Adw.Application

Subclasses:

None

Methods

Inherited:

Gtk.Application (15), Gio.Application (39), GObject.Object (37), Gio.ActionGroup (14), Gio.ActionMap (5)

Structs:

GObject.ObjectClass (5)

class

new (application_id, flags)

get_style_manager ()

Virtual Methods

Inherited:

Gtk.Application (2), Gio.Application (15), GObject.Object (7), Gio.ActionGroup (14), Gio.ActionMap (3)

Properties

Inherited:

Gtk.Application (4), Gio.Application (9)

Name

Type

Flags

Short Description

style-manager

Adw.StyleManager

r

Signals

Inherited:

Gtk.Application (3), Gio.Application (7), GObject.Object (1), Gio.ActionGroup (4)

Fields

Inherited:

Gtk.Application (3), Gio.Application (7), GObject.Object (1), Gio.ActionGroup (4)

Name

Type

Access

Description

parent_instance

Gtk.Application

r

Class Details

class Adw.Application(**kwargs)
Bases:

Gtk.Application

Abstract:

No

Structure:

Adw.ApplicationClass

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 of AdwApplication should always chain up its startup 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>] is TRUE.

  • 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>] is TRUE.

classmethod new(application_id, flags)
Parameters:
Returns:

the newly created AdwApplication

Return type:

Adw.Application

Creates a new AdwApplication.

If application_id is not NULL, 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:

Adw.StyleManager

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:

Adw.StyleManager

Default Value:

None

Flags:

READABLE

The style manager for this application.

This is a convenience property allowing to access AdwStyleManager through property bindings or expressions.