since: 1.4

Declaration [src]

adw_breakpoint_add_setter (
  AdwBreakpoint* self,
  GObject* object,
  const char* property,
  const GValue* value

Description [src]

Adds a setter to self.

The setter will automatically set property on object to value when applying the breakpoint, and set it back to its original value upon unapplying it.


Setting properties to their original values does not work for properties that have irreversible side effects. For example, changing GtkButton:label while GtkButton:icon-name is set will reset the icon. However, resetting the label will not set icon-name to its original value.

Use the AdwBreakpoint::apply and AdwBreakpoint::unapply signals for those properties instead, as follows:

static void
breakpoint_apply_cb (MyWidget *self)
  gtk_button_set_icon_name (self->button, "go-previous-symbolic");

static void
breakpoint_apply_cb (MyWidget *self)
  gtk_button_set_label (self->button, _("_Back"));

// ...

g_signal_connect_swapped (breakpoint, "apply",
                          G_CALLBACK (breakpoint_apply_cb), self);
g_signal_connect_swapped (breakpoint, "unapply",
                          G_CALLBACK (breakpoint_unapply_cb), self);

Available since: 1.4



Type: GObject

The target object.

The data is owned by the caller of the method.

Type: const char*

The target property.

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

Type: GValue

The value to set.

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