🎉 Add end-animation signal

This commit is contained in:
Simon Schneegans
2022-07-20 16:51:44 +02:00
parent a3ba8cc97d
commit 355a9eb395
3 changed files with 19 additions and 1 deletions
+8 -1
View File
@@ -48,7 +48,8 @@ var Shader = GObject.registerClass(
Signals: {
'begin-animation':
{param_types: [Gio.Settings.$gtype, GObject.TYPE_BOOLEAN, Clutter.Actor.$gtype]},
'update-animation': {param_types: [GObject.TYPE_DOUBLE]}
'update-animation': {param_types: [GObject.TYPE_DOUBLE]},
'end-animation': {}
}
},
class Shader extends Shell.GLSLEffect { // --------------------------------------------
@@ -99,6 +100,12 @@ var Shader = GObject.registerClass(
this._progress = progress;
}
// This will just emit the end-animation signal. It can be used to clean up any
// resources required during the animation.
endAnimation() {
this.emit('end-animation');
}
// This is called by the constructor. This means, it's only called when the
// effect is used for the first time.
vfunc_build_pipeline() {