Method

GObjectObjectconnect

Declaration

GObject*
g_object_connect (
  GObject* object,
  const gchar* signal_spec,
  ...
)

Description

A convenience function to connect multiple signals at once.

The signal specs expected by this function have the form “modifier::signal_name”, where modifier can be one of the following: - signal: equivalent to g_signal_connect_data (…, NULL, 0) - object-signal, object_signal: equivalent to g_signal_connect_object (…, 0) - swapped-signal, swapped_signal: equivalent to g_signal_connect_data (…, NULL, G_CONNECT_SWAPPED) - swapped_object_signal, swapped-object-signal: equivalent to g_signal_connect_object (…, G_CONNECT_SWAPPED) - signal_after, signal-after: equivalent to g_signal_connect_data (…, NULL, G_CONNECT_AFTER) - object_signal_after, object-signal-after: equivalent to g_signal_connect_object (…, G_CONNECT_AFTER) - swapped_signal_after, swapped-signal-after: equivalent to g_signal_connect_data (…, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER) - swapped_object_signal_after, swapped-object-signal-after: equivalent to g_signal_connect_object (…, G_CONNECT_SWAPPED | G_CONNECT_AFTER)

  menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
                           "type", GTK_WINDOW_POPUP,
                           "child", menu,
                           NULL),
                     "signal::event", gtk_menu_window_event, menu,
                     "signal::size_request", gtk_menu_window_size_request, menu,
                     "signal::destroy", gtk_widget_destroyed, &menu->toplevel,
                     NULL);

Parameters

signal_spec const gchar*
 

The spec for the first signal.

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

GCallback for the first signal, followed by data for the first signal, followed optionally by more signal spec/callback/data triples, followed by NULL.

Return value

Returns: GObject
 

object.

 The data is owned by the instance.