GObject utilities and addons

Function list_properties Return a list of all properties for GType gtype, excluding properties in parent classes
Function type_register Register the type, but only if it's not already registered @param gtype: the class to register
Class PropertyMeta No summary
Class PropertyObject I am an object which maps GObject properties to attributes To be able to use me, you must also inherit from a gobject.GObject subclass.
Function gsignal No summary
Function gproperty No summary
Function quote Similar to urllib.quote but for glibs GMarkup @param msg: string to quote @returns: quoted string
Class _GObjectClassInittableMetaType Undocumented
Class _GobjectClassInittableObject Undocumented
Function _max Undocumented
def list_properties(gtype, parent=True):

Return a list of all properties for GType gtype, excluding properties in parent classes

def type_register(gtype):

Register the type, but only if it's not already registered

Parametersgtypethe class to register
def gsignal(name, *args, **kwargs):

Add a GObject signal to the current object. It current supports the following types:

  • str, int, float, long, object, enum
Parametersnamename of the signal (type: string)
argstypes for signal parameters, if the first one is a string 'override', the signal will be overridden and must therefor exists in the parent GObject.
Notesflags: A combination of;
  • gobject.SIGNAL_RUN_FIRST
  • gobject.SIGNAL_RUN_LAST
  • gobject.SIGNAL_RUN_CLEANUP
  • gobject.SIGNAL_NO_RECURSE
  • gobject.SIGNAL_DETAILED
  • gobject.SIGNAL_ACTION
  • gobject.SIGNAL_NO_HOOKS
retval: return value in signal callback
def _max(c):
Undocumented
def gproperty(name, ptype, default=None, nick='', blurb='', flags=gobject.PARAM_READWRITE, **kwargs):

Add a GObject property to the current object.

Parametersnamename of property (type: string)
ptypetype of property (type: type)
defaultdefault value
nickshort description
blurblong description
flagsparameter flags, a combination of:
  • PARAM_READABLE
  • PARAM_READWRITE
  • PARAM_WRITABLE
  • PARAM_CONSTRUCT
  • PARAM_CONSTRUCT_ONLY
  • PARAM_LAX_VALIDATION

Optional, only for int, float, long types:

Notesminimum: minimum allowed value
maximum: maximum allowed value
def quote(msg):

Similar to urllib.quote but for glibs GMarkup

Parametersmsgstring to quote
Returnsquoted string
API Documentation for Kiwi, generated by pydoctor at 2015-12-15 11:23:22.