11.1Class GObject

The base object type

Class GObject

GObject is the fundamental type providing the common attributes and methods for all object types in GTK+, Pango and other libraries based on GObject. The GObject class provides methods for object construction and destruction, property access methods, and signal support.

Methods
freeze_notifyIncreases the freeze count on object.
get_propertyGets a property of an object.
notifyEmits a "notify" signal for the property property_name on object.
refIncreases the reference count of object.
ref_sinkIncrease the reference count of object, and possibly remove the floating reference, if object has a floating reference.
set_propertySets a property on an object.
signal_notifyThe notify signal is emitted on an object when one of its properties has been changed.
thaw_notifyReverts the effect of a previous call to freeze_notify().
unrefDecreases the reference count of object.

Methods

freeze_notify

Increases the freeze count on object.

GObject.freeze_notify()

If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero.

This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

get_property

Gets a property of an object.

GObject.get_property( property_name )
property_name (string)
Returnthe property value

notify

Emits a "notify" signal for the property property_name on object.

GObject.notify( property_name )
property_name (string)

ref

Increases the reference count of object.

GObject.ref()

Note: Don't use this...

ref_sink

Increase the reference count of object, and possibly remove the floating reference, if object has a floating reference.

GObject.ref_sink()

Note: Don't use this...

In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

set_property

Sets a property on an object.

GObject.set_property( property_name, value )
property_name name of the property to set
value value for the property

    w = GtkWindow()
    w.set_property( "title", "Falcon" )

signal_notify

The notify signal is emitted on an object when one of its properties has been changed.

GObject.signal_notify()

Note that getting this signal doesn't guarantee that the value of the property has actually changed, it may also be emitted when the setter for the property is called to reinstate the previous value.

thaw_notify

Reverts the effect of a previous call to freeze_notify().

GObject.thaw_notify()

The freeze count is decreased on object and when it reaches zero, all queued "notify" signals are emitted.

It is an error to call this function when the freeze count is zero.

unref

Decreases the reference count of object.

GObject.unref()

Note: Don't use this...

When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

Made with http://www.falconpl.org