Class Application

All Implemented Interfaces:
PointerInterface

public class Application extends Application
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: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:dark] is `TRUE`.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Application.html

  • Constructor Details

    • Application

      public Application(PointerContainer pointer)
    • Application

      public Application(@Nullable Str application_id, int flags)
      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.
      Parameters:
      application_id - The application ID
      flags - The application flags
    • Application

      public Application(String application_id, int flags)
      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.
      Parameters:
      application_id - The application ID
      flags - The application flags
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getStyleManager

      public StyleManager getStyleManager()
      Gets the style manager for @self.

      This is a convenience property allowing to access `AdwStyleManager` through
      property bindings or expressions.
      Returns:
      the style manager
    • asActionGroup

      public ActionGroup asActionGroup()
      Implements interface ActionGroup. Call this to get access to interface functions.
      Overrides:
      asActionGroup in class Application
      Returns:
      ActionGroup
    • asActionMap

      public ActionMap asActionMap()
      Implements interface ActionMap. Call this to get access to interface functions.
      Overrides:
      asActionMap in class Application
      Returns:
      ActionMap
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()