Forum und email


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.

Таблица 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

Пример 1. Querying a signal

var_dump(GObject::signal_query('delete-event', GtkWindow::gtype));
/* Returns:
array(6) {
  string(12) "delete-event"
  object(GType)#1 (2) {
    string(9) "GtkWidget"
  object(GType)#2 (2) {
    string(8) "gboolean"
  array(1) {
    object(GType)#3 (2) {
      string(8) "GdkEvent"

Виж също: signal_list_ids() , signal_list_names()