gtk.Object Properties

gtk.Object Signal Prototypes

Description

gtk.Object is the
base class for all widgets, and for a few non-widget objects such as gtk.Adjustment.
gtk.Object
predates GObject; non-widgets
that derive from gtk.Object rather
than GObject do
so for backward compatibility reasons.

The "destroy" signal, emitted by the destroy()
method asks all code owning a GTK reference to the object to release its GTK
reference. So, for example, if you call
window.destroy() where
window is a gtk.Window, GTK will
release the GTK reference count that it owns; if you call
button.destroy() where button is a gtk.Button,
button will be removed from its parent container and
the parent container will release its GTK reference to
button. Because these GTK references are released,
calling destroy()
should result in freeing all memory associated with an object (finalizing
it) if the GTK reference count reaches zero. However, in PyGTK the GTK
objects are wrapped in a Python object that has its own reference counting
mechanism. The destroy()
method does not affect the Python reference counts. The GTK object
associated with a Python object will not be released until the Python object
reference count reaches zero. Therefore, calling the destroy()
method will not result in the finalization of the GTK object until the
Python object is finalized. In the case mentioned above if a gtk.Button is
destroyed using the destroy()
method, it will be removed from its container and unmapped and unrealized
but it will not be finalized because the Python wrapper object will still
exist and hold a reference.

Methods

gtk.Object.flags

def flags()

Returns :

the flags set for the
object

The flags() method returns the value of
the flags for the object. The flags returned will include both the gtk.Object flags and
the gtk.Widget
flags.

gtk.bindings_activate_event

The gtk.bindings_activate_event() function
looks up key bindings for the gtk.Object specified
by object to find one matching the key gtk.gdk.Event
specified by event, and if one was found, activate
it.

The gtk.binding_entry_add_signal() function
adds a binding (specified by keyval and
modifiers) to the binding set of the object class
derived from object. The signal specified by
signal_name will be emitted with the optional
arguments specified by the argument pairs denoted by ... that are value type
and value. This function is used when creating a new widget class to set up
key bindings.