Functions ========= .. currentmodule:: gi.repository.Adw .. function:: accent_color_to_rgba(self: ~gi.repository.Adw.AccentColor) -> ~gi.repository.Gdk.RGBA :param self: .. function:: accent_color_to_standalone_rgba(self: ~gi.repository.Adw.AccentColor, dark: bool) -> ~gi.repository.Gdk.RGBA :param self: :param dark: .. function:: breakpoint_condition_parse(str: str) -> ~gi.repository.Adw.BreakpointCondition :param str: .. function:: easing_ease(self: ~gi.repository.Adw.Easing, value: float) -> float :param self: :param value: .. function:: get_enable_animations(widget: ~gi.repository.Gtk.Widget) -> bool Checks whether animations are enabled for ``widget``\. This should be used when implementing an animated widget to know whether to animate it or not. :param widget: a ``GtkWidget`` :return: whether animations are enabled for ``widget`` .. function:: get_major_version() -> int 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 :obj:`~gi.repository.Adw.MAJOR_VERSION` constant, which represents the major version of the libadwaita headers you have included when compiling your code. :return: the major version number of the Adwaita library .. function:: get_micro_version() -> int 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 :obj:`~gi.repository.Adw.MAJOR_VERSION` constant, which represents the micro version of the libadwaita headers you have included when compiling your code. :return: the micro version number of the Adwaita library .. function:: get_minor_version() -> int 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 :obj:`~gi.repository.Adw.MAJOR_VERSION` constant, which represents the minor version of the libadwaita headers you have included when compiling your code. :return: the minor version number of the Adwaita library .. function:: init() -> None Initializes Libadwaita. This function can be used instead of :obj:`~gi.repository.Gtk.init` as it initializes GTK implicitly. There's no need to call this function if you're using :obj:`~gi.repository.Adw.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. .. function:: is_initialized() -> bool Use this function to check if libadwaita has been initialized with :obj:`~gi.repository.Adw.init`\. :return: the initialization status .. function:: length_unit_from_px(unit: ~gi.repository.Adw.LengthUnit, value: float, settings: ~gi.repository.Gtk.Settings | None = None) -> float :param unit: :param value: :param settings: .. function:: length_unit_to_px(unit: ~gi.repository.Adw.LengthUnit, value: float, settings: ~gi.repository.Gtk.Settings | None = None) -> float :param unit: :param value: :param settings: .. function:: lerp(a: float, b: float, t: float) -> float Computes the linear interpolation between ``a`` and ``b`` for ``t``\. :param a: the start :param b: the end :param t: the interpolation rate :return: the computed value .. function:: rgba_to_standalone(rgba: ~gi.repository.Gdk.RGBA, dark: bool) -> ~gi.repository.Gdk.RGBA Adjusts ``rgba`` to be suitable as a standalone color. It will typically be darker for light background, and lighter for dark background, ensuring contrast. .. versionadded:: 1.6 :param rgba: a background color :param dark: Whether to calculate standalone color for light or dark background