Method

interpeerWyrdHandlesetup_property_signal

since: 0.1.0

Declaration

const gchar*
interpeer_wyrd_handle_setup_property_signal (
  WyrdHandle* self,
  GObject* target,
  const gchar* property_path,
  GError** error
)

Description

Sets up a signal for the target class to receive that will be emitted when the wyrd property at property_path changes. The signal will have a detail, which is the property_path, meaning you can set up multiple signals for multiple properties.

The emitted signal will have the following arguments: - The WyrdHandle of the document. - The name of the updated wyrd property. - The new value of that wyrd property, as a GValue type.

Note that it is safe to set this or other properties from within the signal callback. If you set the same property, the signal will not be emitted again, preventing infinite loops.

When the WyrdHandle instance is destroyed, all signals connected via this function are destroyed.

Note that the target instance is not connected to this signal. This is because bindings to other languages than C make this difficult to achieve. This is why the function returns the full signal name, so that you can connect the target afterwards.

Stability: Stable

Available since: 0.1.0

Parameters

target

Type: GObject

The target object for the signal.

The data is owned by the caller of the method.
property_path

Type: const gchar*

The path of the wyrd property to observe.

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

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: const gchar*

The full name of the signal (with detail)

The caller of the method takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.