These functions dynamically compute information
about the class hierarchy for a given Gtk object
or a type.
The class hierarchy is defined by the C-level Gtk
code and is ``reflected'' to S via these functions.
Most S-level Gtk objects will be created in the RGtk package
with the appropriate class. In cases where this is not true,
gtkObjectGetClass
can be used to compute and assign the
appropriate class
so that the regular S interface for that object will work.
gtkObjectGetClasses(w, check=TRUE)
gtkObjectGetTypeName(w)
gtkTypeGetClasses(type)
GtkType
w
is of class
GtkObject
. If the object has not class information
but the caller knows that it is a pointer to a Gtk object,
then to compute the class conveniently, check
can be passed as FALSE
.gtkObjectGetTypeName
returns the name of the class/type
of the given object.
gtkObjectGetClasses
and gtkTypeGetClasses
return the names of the object class/type and its
successive parent classes, up to GtkObject
.
Information on Gtk is available from http://www.gtk.org.
gtkObjectGetSignals
gtkTypeGetSignals
if (gtkInit()) {
b <- gtkButton()
class(b)
# Should be true
class(b) == gtkObjectGetClasses(b)
}
Run the code above in your browser using DataLab