GType is used in GtkListStore and GtkTreeStore to determine the type of the column in the data table. It is also used for custom signals when defining the return values and accepted parameters for callbacks.

The GType controls what type of data may be stored in the particular column, how the default GtkCellRenderer displays the value in the view, even what user defined signal callbacks can accept and return. The typing is very strict. It is generally safest to make sure you cast your variables properly. In addition, every object that is an instanceof Gobject will have a type in a class constant called gtype. This allows you to store widgets or pixbufs in data stores, or use them for parameters and return values with custom signals.


Symbolic name


  20Gobject::TYPE_BOOLEAN A boolean value, true or false
  32Gobject::TYPE_LONG A big integer number.
  60Gobject::TYPE_DOUBLE A decimal number with a fraction dot in it.
  64Gobject::TYPE_STRING A normal string.
  137706104Gobject::TYPE_PHP_VALUE Any PHP variable content.