GObject::signal_query

array signal_query(string/int signal, int gtype);

Provides additional information about a signal.

The signal parameter can be either a signal id or a signal name.

This method is static.

The gtype parameter is an integer unique to all classes/interfaces. You can acquire the gtype of a class by using ClassName::gtype.

Table 1. Return array values

0Signal id, or 0 if the signal is unknown.
1Signal name
2GType of the class/interface the signal is emitted for
3GSignalFlags used for signal instantiation.
4GType of the return type
5Array of GTypes for the parameters

Example 3. Querying a signal

<?php
var_dump(GObject::signal_query('delete-event', GtkWindow::gtype));
/* Returns:
array(6) {
  [0]=>
  int(31)
  [1]=>
  string(12) "delete-event"
  [2]=>
  object(GType)#1 (2) {
    ["type"]=>
    int(142760632)
    ["name"]=>
    string(9) "GtkWidget"
  }
  [3]=>
  int(2)
  [4]=>
  object(GType)#2 (2) {
    ["type"]=>
    int(20)
    ["name"]=>
    string(8) "gboolean"
  }
  [5]=>
  array(1) {
    [0]=>
    object(GType)#3 (2) {
      ["type"]=>
      int(148319049)
      ["name"]=>
      string(8) "GdkEvent"
    }
  }
}
*/
?>

See also: signal_list_ids() , signal_list_names()