This returns the package names of the ancestral types in reverse order, with the root of the tree at the end of the list.
|- signal_id||Numeric id of a signal. Its rare that youll need this in Gtk2-Perl.|
|- signal_name||Name of the signal, such as what youd pass to signal_connect.|
|- itype||The instance type for which this signal is defined.|
|- signal_flags||GSignalFlags describing this signal.|
|- return_type||The return type expected from handlers for this signal. If undef or not present, then no return is expected. The type name is mapped to the corresponding Perl package name if it is known, otherwise you get the raw C name straight from GLib.|
|- param_types||The types of the parameters passed to any callbacks connected to the emission of this signal. The list does not include the instance, which is always first, and the user data from signal_connect, which is always last (unless the signal was connected with swap, which swaps the instance and the data, but you get the point).|
Returns the values as a list of hashes, one hash for each value, containing the value, name and nickname, eg. for Glib::SignalFlags
|o||$parent_class (package) type from which to derive|
|o||$new_class (package) name of new type|
|o||... (list) arguments for creation|
This is a traffic-cop function. If $parent_type derives from Glib::Object,
this passes the arguments through to register_object. If $parent_type
is Glib::Flags or Glib::Enum, this strips $parent_type and passes the
remaining args on to register_enum or register_flags. See those
functions documentation for more information.
Glib::Type->register_enum ($name, ...)
|o||$name (string) package name for new enum type|
|o||... (list) new enums values; see description.|
The list of values is used to create the nicknames that are used in general Perl code; the actual numeric values used at the C level are automatically assigned, starting with 1. If you need to specify a particular numeric value for a nick, use an array reference containing the nickname and the numeric value, instead. You may mix and match the two styles.
value-one, # assigned 1
value-two, # assigned 2
[value-three => 15 ], # explicit 15
[value-four => 35 ], # explicit 35
value-five, # assigned 5
|o||$name (string) package name of new flags type|
|o||... (list) flag values, see discussion.|
The list of values is used to create the nicknames that are used in general Perl code; the actual numeric values used at the C level are automatically assigned, of the form 1<<i, starting with i = 0. If you need to specify a particular numeric value for a nick, use an array reference containing the nickname and the numeric value, instead. You may mix and match the two styles.
value-one, # assigned 1<<0
value-two, # assigned 1<<1
[value-three => 1<<10 ], # explicit 1<<10
[value-four => 0x0f ], # explicit 0x0f
value-five, # assigned 1<<4
If you use the array-ref form, beware: the code performs no validation
for unique values.
Glib::Type->register_object ($parent_package, CW$new_package, ...)
|o||$parent_package (string) name of the parent package, which must be a derivative of Glib::Object.|
|o||$new_package (string) usually __PACKAGE__.|
|o||... (list) key/value pairs controlling how the class is created.|
The ... parameters are key/value pairs, currently supporting:
|signals => HASHREF||
The signals key contains a hash, keyed by signal names, which describes
how to set up the signals for new_package.
If the value is a code reference, the named signal must exist somewhere in parent_package or its ancestry; the code reference will be used to override the class closure for that signal. This is the officially sanctioned way to override virtual methods on Glib::Objects. The value may be a string rather than a code reference, in which case the sub with that name in new_package will be used. (The function should not be inherited.)
If the value is a hash reference, the key will be the name of a new signal created with the properties defined in the hash. All of the properties are optional, with defaults provided:
|properties => ARRAYREF||
Array of Glib::ParamSpec objects, each describing an object property to add
to the new type. These properties are available for use by all code that
can access the object, regardless of implementation language. See
Glib::ParamSpec. This list may be empty; if it is not, the functions
GET_PROPERTY and SET_PROPERTY in $new_package will be called to
get and set the values. Note that an object property is just a mechanism
for getting and setting a value it implies no storage. As a convenience,
however, Glib::Object provides fallbacks for GET_PROPERTY and SET_PROPERTY
which use the property nicknames as hash keys in the object variable for
Additionally, you may specify ParamSpecs as a describing hash instead of as an object; this form allows you to supply explicit getter and setter methods which override GET_PROPERY and SET_PROPERTY. The getter and setter are both optional in the hash form. For example:
You can mix the two declaration styles as you like. If you have individual get_foo / set_foo methods with the operative code for a property then the get/set form is a handy way to go straight to that.
|interfaces => ARRAYREF||Array of interface package names that the new object implements. Interfaces are the GObject way of doing multiple inheritance, thus, in Perl, the package names will be prepended to @ISA and certain inheritable and overrideable ALLCAPS methods will automatically be called whenever needed. Which methods exactly depends on the interface Gtk2::CellEditable for example uses START_EDITING, EDITING_DONE, and REMOVE_WIDGET.|
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Glib for a full notice.
|perl v5.20.3||GLIB::TYPE (3)||2016-04-05|