Function

Adw-1Adwbind_property_to_css_class_fullSince 1.10

  • Creates a binding between a property on source and a CSS class on target with a custom mapping using closures.

    This function is the language bindings friendly version of Adw.bind_property_to_css_class_full.

    The binding will automatically be removed when either the source or target instances are finalized. To remove the binding without affecting the source or target, call GObject.Object.unref on the returned binding. It is recommended to only call GObject.Object.unref when it is clear that both source and target will outlive the binding.

    This function is not thread safe. A source can have multiple bindings.

    See also: Adw.bind_property_to_css_class.

    Parameters

    • source: GObject.Object

      the source object

    • source_property: string

      the property on source to bind

    • target: Gtk.Widget

      the target widget

    • target_css_class: string

      the CSS class on target to bind

    • flags: GObject.BindingFlags

      flags to pass to self

    • map_to_class: Closure<any, any>

      a closure wrapping the source_property to boolean value map, or NULL to use the default

    • map_to_property: Closure<any, any>

      a closure wrapping the target_css_class to GObject.Value map, or NULL to use the default

    Returns Adw.CssClassBinding

    the new binding

    1.10