Package flumotion :: Package common :: Module pygobject
[hide private]

Module pygobject

source code

PyGTK helper functions

Functions [hide private]
 
gobject_set_property(object, property, value)
Set the given property to the given value on the given object.
source code
 
gsignal(name, *args)
Add a GObject signal to the current object.
source code
 
with_construct_properties(__init__)
Wrap a class' __init__ method in a procedure that will construct gobject properties.
source code
 
gproperty(type_, name, desc, *args, **kwargs)
Add a GObject property to the current object.
source code
 
type_register(klass) source code
Variables [hide private]
  PARAM_CONSTRUCT = 512
Function Details [hide private]

gobject_set_property(object, property, value)

source code 

Set the given property to the given value on the given object.

Parameters:
  • value - value to set property to
  • property (string)
  • object (gobject.GObject)

gsignal(name, *args)

source code 

Add a GObject signal to the current object. To be used from class definition scope.

Parameters:
  • args (mixed)
  • name (string)

with_construct_properties(__init__)

source code 

Wrap a class' __init__ method in a procedure that will construct gobject properties. This is necessary because pygtk's object construction is a bit broken.

Usage:

   class Foo(GObject):
       def __init__(self):
           GObject.__init(self)
       __init__ = with_construct_properties(__init__)

gproperty(type_, name, desc, *args, **kwargs)

source code 

Add a GObject property to the current object. To be used from class definition scope.

Parameters:
  • type_ (type object)
  • args (mixed)
  • name (string)
  • desc (string)