GES.Extractable¶
- Implementations:
Methods¶
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class GES.Extractable¶
- Bases:
- Structure:
A
GObject.Object
that implements theGES.Extractable
interface can be extracted from aGES.Asset
usingGES.Asset.extract
().Each extractable type will have its own way of interpreting the
GES.Asset
:id
of an asset (or, if it is associated with a specific subclass ofGES.Asset
, the asset subclass may handle the interpretation of theGES.Asset
:id
). By default, the requested assetGES.Asset
:id
will be ignored by aGES.Extractable
and will be set to the type name of the extractable instead. Also by default, when the requested asset is extracted, the returned object will simply be a newly created default object of that extractable type. You should check the documentation for each extractable type to see if they differ from the default.After the object is extracted, it will have a reference to the asset it came from, which you can retrieve using
GES.Extractable.get_asset
().- get_id()[source]¶
- Returns:
The
GES.Asset
:id
of some associatedGES.Asset
that is compatible with self's current state.- Return type:
Gets the
GES.Asset
:id
of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the assetGES.Asset
:id
that is _compatible_ with the current state of the object, as determined by theGES.Extractable
implementer. If it was indeed extracted from an asset, this should return the same as its corresponding assetGES.Asset
:id
.
- set_asset(asset)[source]¶
- Parameters:
asset (
GES.Asset
) – The asset to set- Returns:
True
if asset could be successfully set on self.- Return type:
Sets the asset for this extractable object.
When an object is extracted from an asset using
GES.Asset.extract
() its asset will be automatically set. Note that many classes that implementGES.Extractable
will automatically create their objects using assets when you call their new methods. However, you can use this method to associate an object with a compatible asset if it was created by other means and does not yet have an asset. Or, for some implementations ofGES.Extractable
, you can use this to change the asset of the given extractable object, which will lead to a change in its state to match the new assetGES.Asset
:id
.
- do_get_id() virtual¶
- Returns:
The
GES.Asset
:id
of some associatedGES.Asset
that is compatible with self's current state.- Return type:
Gets the
GES.Asset
:id
of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the assetGES.Asset
:id
that is _compatible_ with the current state of the object, as determined by theGES.Extractable
implementer. If it was indeed extracted from an asset, this should return the same as its corresponding assetGES.Asset
:id
.
- do_set_asset(asset) virtual¶
- Parameters:
asset (
GES.Asset
) –
This method is called after the
GES.Asset
of an object is set. If your class supports the asset of an object changing, then you can use this method to change the parameters of the object to match the new assetGES.Asset
:id
. If setting the asset should be able to fail, you should implement set_asset_full instead.