Class Adw

java.lang.Object
org.gnome.adw.Adw

@Generated("org.javagi.JavaGI") public final class Adw extends Object
Constants and functions that are declared in the global Adw namespace.
  • Field Details

    • DURATION_INFINITE

      public static final int DURATION_INFINITE

      Indicates an Animation with an infinite duration.

      This value is mostly used internally.

      See Also:
    • MAJOR_VERSION

      public static final int MAJOR_VERSION
      Adwaita major version component (e.g. 1 if the version is 1.2.3).
      See Also:
    • MICRO_VERSION

      public static final int MICRO_VERSION
      Adwaita micro version component (e.g. 3 if the version is 1.2.3).
      See Also:
    • MINOR_VERSION

      public static final int MINOR_VERSION
      Adwaita minor version component (e.g. 2 if the version is 1.2.3).
      See Also:
    • VERSION_S

      public static final String VERSION_S
      Adwaita version, encoded as a string, useful for printing and concatenation.
      See Also:
  • Constructor Details

    • Adw

      public Adw()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • getEnableAnimations

      public static boolean getEnableAnimations(Widget widget)

      Checks whether animations are enabled for widget.

      This should be used when implementing an animated widget to know whether to animate it or not.

      Parameters:
      widget - a GtkWidget
      Returns:
      whether animations are enabled for widget
    • getMajorVersion

      public static int getMajorVersion()

      Returns the major version number of the Adwaita library.

      For example, in libadwaita version 1.2.3 this is 1.

      This function is in the library, so it represents the libadwaita library your code is running against. Contrast with the MAJOR_VERSION constant, which represents the major version of the libadwaita headers you have included when compiling your code.

      Returns:
      the major version number of the Adwaita library
    • getMicroVersion

      public static int getMicroVersion()

      Returns the micro version number of the Adwaita library.

      For example, in libadwaita version 1.2.3 this is 3.

      This function is in the library, so it represents the libadwaita library your code is running against. Contrast with the MAJOR_VERSION constant, which represents the micro version of the libadwaita headers you have included when compiling your code.

      Returns:
      the micro version number of the Adwaita library
    • getMinorVersion

      public static int getMinorVersion()

      Returns the minor version number of the Adwaita library.

      For example, in libadwaita version 1.2.3 this is 2.

      This function is in the library, so it represents the libadwaita library your code is running against. Contrast with the MAJOR_VERSION constant, which represents the minor version of the libadwaita headers you have included when compiling your code.

      Returns:
      the minor version number of the Adwaita library
    • init

      public static void init()

      Initializes Libadwaita.

      This function can be used instead of Gtk#init as it initializes GTK implicitly.

      There's no need to call this function if you're using Application.

      If Libadwaita has already been initialized, the function will simply return.

      This makes sure translations, types, themes, and icons for the Adwaita library are set up properly.

    • isInitialized

      public static boolean isInitialized()
      Use this function to check if libadwaita has been initialized with init().
      Returns:
      the initialization status
    • lerp

      public static double lerp(double a, double b, double t)
      Computes the linear interpolation between a and b for t.
      Parameters:
      a - the start
      b - the end
      t - the interpolation rate
      Returns:
      the computed value
    • rgbaToStandalone

      public static void rgbaToStandalone(RGBA rgba, boolean dark, RGBA standaloneRgba)

      Adjusts rgba to be suitable as a standalone color.

      It will typically be darker for light background, and lighter for dark background, ensuring contrast.

      Parameters:
      rgba - a background color
      dark - Whether to calculate standalone color for light or dark background
      standaloneRgba - return location for the standalone color
      Since:
      1.6
    • showAboutDialog

      public static void showAboutDialog(Widget parent, String firstPropertyName, Object... varargs)
      A convenience function for showing an application’s about dialog.
      Parameters:
      parent - the parent widget
      firstPropertyName - the name of the first property
      varargs - value of first property, followed by more pairs of property name and value, NULL-terminated
      Since:
      1.5
    • showAboutDialogFromAppdata

      public static void showAboutDialogFromAppdata(Widget parent, String resourcePath, @Nullable String releaseNotesVersion, String firstPropertyName, Object... varargs)

      A convenience function for showing an application’s about dialog from AppStream metadata.

      See AboutDialog.fromAppdata(String, String) for details.

      Parameters:
      parent - the parent widget
      resourcePath - The resource to use
      releaseNotesVersion - The version to retrieve release notes for
      firstPropertyName - the name of the first property
      varargs - value of first property, followed by more pairs of property name and value, NULL-terminated
      Since:
      1.5
    • showAboutWindow

      @Deprecated public static void showAboutWindow(@Nullable Window parent, String firstPropertyName, Object... varargs)
      A convenience function for showing an application’s about window.
      Parameters:
      parent - the parent top-level window
      firstPropertyName - the name of the first property
      varargs - value of first property, followed by more pairs of property name and value, NULL-terminated
      Since:
      1.2
    • showAboutWindowFromAppdata

      @Deprecated public static void showAboutWindowFromAppdata(@Nullable Window parent, String resourcePath, @Nullable String releaseNotesVersion, String firstPropertyName, Object... varargs)

      A convenience function for showing an application’s about window from AppStream metadata.

      See AboutWindow.fromAppdata(String, String) for details.

      Parameters:
      parent - the parent top-level window
      resourcePath - The resource to use
      releaseNotesVersion - The version to retrieve release notes for
      firstPropertyName - the name of the first property
      varargs - value of first property, followed by more pairs of property name and value, NULL-terminated
      Since:
      1.4