adw.application

Module for Application class

Types 3

A base class for Adwaita applications.

adw.application.Application handles library initialization by calling func@init in the default gio.application.Application.startup signal handler, in turn chaining up as required by gtk.application.Application. Therefore, any subclass of adw.application.Application should always chain up its startup handler before using any Adwaita or GTK API.

Automatic Resources

adw.application.Application will automatically load stylesheets located in the application's resource base path (see gio.application.Application.setResourceBasePath, 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 adw.style_manager.StyleManager.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 adw.style_manager.StyleManager.dark is TRUE.
Methods
GType _gType() @property
Application self()Returns `this`, for use in `with` statements.
ApplicationGidBuilder builder()Get builder for [adw.application.Application] Returns: New builder object
adw.style_manager.StyleManager styleManager() @propertyGet `styleManager` property. Returns: The style manager for this application.
adw.style_manager.StyleManager getStyleManager()Gets the style manager for self.
Constructors
this(void * ptr, Flag!"Take" take)
this(string applicationId, gio.types.ApplicationFlags flags)Creates a new [adw.application.Application].

Fluent builder for adw.application.Application

Methods
Application build()Create object from builder. Returns: New object