Ggit.ObjectFactory¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Ggit.ObjectFactory(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Represents an object factory.
- classmethod get_default()¶
- Returns:
- Return type:
Get the default type factory instance.
- construct(parent_class, basetype, construct_properties)¶
- Parameters:
parent_class (
GObject.ObjectClass
) – aGObject.ObjectClass
.basetype (
GObject.GType
) – aGObject.GType
.construct_properties ([
GObject.ObjectConstructParam
]) – a list ofGObject.ObjectConstructParam
.
- Returns:
a
GObject.Object
orNone
.- Return type:
Construct a new object.
- register(basetype, subtype)¶
- Parameters:
basetype (
GObject.GType
) – aGObject.GType
.subtype (
GObject.GType
) – aGObject.GType
.
Register subtype as the instantiation class for basetype. Each time an object of type basetype is going to be created, an instance of subtype is created instead. basetype must be subclassed from
Ggit.ObjectFactoryBase
.
- unregister(basetype, subtype)¶
- Parameters:
basetype (
GObject.GType
) – aGObject.GType
.subtype (
GObject.GType
) – aGObject.GType
.
Unregister a subtype from the factory.