Package ch.bailu.gtk.adw
Class Adw
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Package
ch.bailu.gtk.adw.Adw
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
easingEase
(int self, double value) Computes easing with @easing for @value.static ClassHandler
static boolean
getEnableAnimations
(Widget widget) Checks whether animations are enabled for @widget.static int
Returns the major version number of the Adwaita library.static int
Returns the micro version number of the Adwaita library.static int
Returns the minor version number of the Adwaita library.static void
init()
Initializes Libadwaita.static boolean
Use this function to check if libadwaita has been initialized with
[func@init].static double
lerp
(double a, double b, double t) Computes the linear interpolation between @a and @b for @t.static void
showAboutWindow
(Window parent, Str first_property_name, Object... _elipse) A convenience function for showing an application’s about window.Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
-
Constructor Details
-
Adw
public Adw()
-
-
Method Details
-
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 valuevalue
- a value to ease- Returns:
- the easing for @value
-
getEnableAnimations
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 startb
- the endt
- 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 windowfirst_property_name
- the name of the first property_elipse
- value of first property, followed by more pairs of property name and value, `NULL`-terminated
-