Converts self to a <GdkRGBA> representing
its background color.
The matching foreground color is white.
Passed: a <AdwAccentColor>, or one of its
symbols.
an accent color
Passed, filled in, and returned: a <GdkRGBA>.
return location for the color
Converts self to a <GdkRGBA> representing
its standalone color.
It will typically be darker for light background, and lighter for dark background, ensuring contrast.
Passed: a <AdwAccentColor>, or one of its
symbols.
an accent color
Passed: a boolean.
Whether to calculate standalone color for light or dark background
Passed, filled in, and returned: a <GdkRGBA>.
return location for the color
Parses a condition from a string.
Length conditions are specified as <type>: <value>[<unit>],
where:
<type> can be min-width, max-width,
min-height or max-height
<value> is a fractional number
<unit> can be px, pt or sp
If the unit is omitted, px is assumed.
See BreakpointCondition.new_length.
Examples:
min-width: 500px
min-height: 400pt
max-width: 100sp
max-height: 500
Ratio conditions are specified as <type>: <width>[/<height>],
where:
<type> can be min-aspect-ratio or max-aspect-ratio
<width> and <height> are integer numbers
See BreakpointCondition.new_ratio.
The ratio is represented as <width> divided by <height>.
If <height> is omitted, it’s assumed to be 1.
Examples:
min-aspect-ratio: 4/3
max-aspect-ratio: 1
The logical operators and, or can be used to compose a
complex condition as follows:
<condition> and <condition>: the condition is true when both
<condition>s are true, same as when using
BreakpointCondition.new_and
<condition> or <condition>: the condition is true when either of
the <condition>s is true, same as when using
BreakpointCondition.new_or
Examples:
min-width: 400px and max-aspect-ratio: 4/3
max-width: 360sp or max-width: 360px
Conditions can be further nested using parentheses, for example:
min-width: 400px and (max-aspect-ratio: 4/3 or max-height: 400px)
If parentheses are omitted, the first operator takes priority.
Passed: a string.
the string specifying the condition
Returned: a <AdwBreakpointCondition>.
the parsed condition
Computes easing with easing for value.
value should generally be in the [0, 1] range.
Passed: a <AdwEasing>, or one of its symbols.
an easing value
Passed: a real number.
a value to ease
Returned: a real number.
the easing for value
Checks whether animations are enabled for widget.
This should be used when implementing an animated widget to know whether to animate it or not.
Passed: a <GtkWidget>.
Returned: a boolean.
whether animations are enabled for widget
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.
Returned: an unsigned 32-bit integer.
the major version number of the Adwaita library
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.
Returned: an unsigned 32-bit integer.
the micro version number of the Adwaita library
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.
Returned: an unsigned 32-bit integer.
the minor version number of the Adwaita library
Initializes Libadwaita.
This function can be used instead of 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.
Use this function to check if libadwaita has been initialized with
init.
Returned: a boolean.
the initialization status
Converts value from pixels to unit.
Passed: a <AdwLengthUnit>, or one of its
symbols.
a length unit
Passed: a real number.
a value in pixels
Passed, or left out: a <GtkSettings>, or
#f.
settings to use, or NULL for default settings
Returned: a real number.
the length in unit
Converts value from unit to pixels.
Passed: a <AdwLengthUnit>, or one of its
symbols.
a length unit
Passed: a real number.
a value in unit
Passed, or left out: a <GtkSettings>, or
#f.
settings to use, or NULL for default settings
Returned: a real number.
the length in pixels
Computes the linear interpolation between a and b for t.
Passed: a real number.
the start
Passed: a real number.
the end
Passed: a real number.
the interpolation rate
Returned: a real number.
the computed value
Adjusts rgba to be suitable as a standalone color.
It will typically be darker for light background, and lighter for dark background, ensuring contrast.