Function

GObjectsignal_connect_data

Declaration

gulong
g_signal_connect_data (
  GObject* instance,
  const gchar* detailed_signal,
  GCallback c_handler,
  gpointer data,
  GClosureNotify destroy_data,
  GConnectFlags connect_flags
)

Description

Connects a GCallback function to a signal for a particular object. Similar to g_signal_connect(), but allows to provide a GClosureNotify for the data which will be called when the signal handler is disconnected and no longer used. Specify connect_flags if you need ..._after() or ..._swapped() variants of this function.

This function is not directly available to language bindings

Parameters

instance GObject
 

The instance to connect to.

 The data is owned by the caller of the function.
detailed_signal const gchar*
 

A string of the form “signal-name::detail”.

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

The GCallback to connect.

data gpointer
 

Data to pass to c_handler calls.

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

A GClosureNotify for data.

 The argument can be NULL.
connect_flags GConnectFlags
 

A combination of GConnectFlags.

Return value

Returns: gulong
 

The handler ID (always greater than 0 for successful connections)