Class Adw


public class Adw extends Package
  • Constructor Details

    • Adw

      public Adw()
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • easingEase

      public static double easingEase(int self, double value)
      Computes easing with @easing for @value.

      @value should generally be in the [0, 1] range.
      Parameters:
      self - an easing value
      value - a value to ease
      Returns:
      the easing for @value
    • getEnableAnimations

      public static boolean getEnableAnimations(@Nonnull 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 [const@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 [const@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 [const@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 [func@Gtk.init] as it initializes GTK
      implicitly.

      There's no need to call this function if you're using [class@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
      [func@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
    • showAboutWindow

      public static void showAboutWindow(@Nullable Window parent, @Nonnull Str first_property_name, Object... _elipse)
      A convenience function for showing an application’s about window.
      Parameters:
      parent - the parent top-level window
      first_property_name - the name of the first property
      _elipse - value of first property, followed by more pairs of property name and value, `NULL`-terminated