GObject.TypeInterface¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
g_instance_type |
r |
||
g_type |
r |
Methods¶
class |
|
class |
|
class |
|
class |
|
class |
|
|
Details¶
- class GObject.TypeInterface¶
An opaque structure used as the base of all interface types.
- classmethod add_prerequisite(interface_type, prerequisite_type)[source]¶
- Parameters:
interface_type (
GObject.GType) –GObject.GTypevalue of an interface typeprerequisite_type (
GObject.GType) –GObject.GTypevalue of an interface or instantiatable type
Adds prerequisite_type to the list of prerequisites of interface_type. This means that any type implementing interface_type must also implement prerequisite_type. Prerequisites can be thought of as an alternative to interface derivation (which
GObject.GTypedoesn’t support). An interface can have at most one instantiatable prerequisite type.
- classmethod get_plugin(instance_type, interface_type)[source]¶
- Parameters:
instance_type (
GObject.GType) –GObject.GTypeof an instantiatable typeinterface_type (
GObject.GType) –GObject.GTypeof an interface type
- Returns:
the
GObject.TypePluginfor the dynamic interface interface_type of instance_type- Return type:
Returns the
GObject.TypePluginstructure for the dynamic interface interface_type which has been added to instance_type, orNoneif interface_type has not been added to instance_type or does not have aGObject.TypePluginstructure. SeeGObject.type_add_interface_dynamic().
- classmethod instantiatable_prerequisite(interface_type)[source]¶
- Parameters:
interface_type (
GObject.GType) – an interface type- Returns:
the instantiatable prerequisite type or
GObject.TYPE_INVALIDif none- Return type:
Returns the most specific instantiatable prerequisite of an interface type. If the interface type has no instantiatable prerequisite,
GObject.TYPE_INVALIDis returned.See
GObject.TypeInterface.add_prerequisite() for more information about prerequisites.New in version 2.68.
- classmethod peek(instance_class, iface_type)[source]¶
- Parameters:
instance_class (
GObject.TypeClass) – aGObject.TypeClassstructureiface_type (
GObject.GType) – an interface ID which this class conforms to
- Returns:
the
GObject.TypeInterfacestructure of iface_type if implemented by instance_class,Noneotherwise- Return type:
Returns the
GObject.TypeInterfacestructure of an interface to which the passed in class conforms.
- classmethod prerequisites(interface_type)[source]¶
- Parameters:
interface_type (
GObject.GType) – an interface type- Returns:
a newly-allocated zero-terminated array of
GObject.GTypecontaining the prerequisites of interface_type- Return type:
Returns the prerequisites of an interfaces type.
New in version 2.2.
- peek_parent()[source]¶
- Returns:
the corresponding
GObject.TypeInterfacestructure of the parent type of the instance type to which self belongs, orNoneif the parent type doesn’t conform to the interface- Return type:
Returns the corresponding
GObject.TypeInterfacestructure of the parent type of the instance type to which self belongs.This is useful when deriving the implementation of an interface from the parent type and then possibly overriding some methods.