Adw.bind_property_to_css_class_with_closures
Description: Reference for Adw.bind_property_to_css_class_with_closures

### Function

# Adwbind_property_to_css_class_with_closures

unstable since: 1.10

#### Declaration [src]

    AdwCssClassBinding*
    adw_bind_property_to_css_class_with_closures (
      GObject* source,
      const char* source_property,
      GtkWidget* target,
      const char* target_css_class,
      GBindingFlags flags,
      GClosure* map_to_class,
      GClosure* map_to_property
    )

#### Description [src]

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 `g_object_unref()` on the returned binding. It is recommended to only call `g_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()`.

Available since: 1.10

This function is renamed to `adw_bind_property_to_css_class_full()` in language bindings.

#### Parameters

`source`

  Type: `GObject`

  The source object.

  The data is owned by the caller of the function.

`source_property`

  Type: `const char*`

  The property on `source` to bind.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`target`

  Type: `GtkWidget`

  The target widget.

  The data is owned by the caller of the function.

`target_css_class`

  Type: `const char*`

  The CSS class on `target` to bind.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`flags`

  Type: `GBindingFlags`

  Flags to pass to `self`.

`map_to_class`

  Type: `GClosure`

  A closure wrapping the `source_property` to boolean value map, or `NULL` to use the default.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`map_to_property`

  Type: `GClosure`

  A closure wrapping the `target_css_class` to `GValue` map, or `NULL` to use the default.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `AdwCssClassBinding`

The new binding.

The data is owned by the called function.