📝 Add even more comments

This commit is contained in:
Simon Schneegans
2022-01-10 05:51:22 +01:00
parent 871cb8489f
commit 67186eb37d
4 changed files with 51 additions and 4 deletions
+13 -1
View File
@@ -30,15 +30,21 @@ const utils = Me.imports.src.utils;
// The shader class for this effect is registered further down in this file.
let MatrixShader = null;
// The effect class is completely static. It can be used to get some metadata (like the
// effect's name or supported GNOME Shell versions), to initialize the respective page of
// the settings dialog, as well as to create the actual shader for the effect.
var MatrixEffect = class MatrixEffect {
// ---------------------------------------------------------------------- static methods
// ---------------------------------------------------------------------------- metadata
// This effect is only available on GNOME Shell 40+.
static getMinShellVersion() {
return [40, 0];
}
// This will be called in various places where a unique identifier for this effect is
// required. It should match the prefix of the settings keys which store whether the
// effect is enabled currently (e.g. the '*-close-effect').
static getNick() {
return 'matrix';
}
@@ -49,6 +55,9 @@ var MatrixEffect = class MatrixEffect {
return 'Matrix';
}
// -------------------------------------------------------------------- API for prefs.js
static initPreferences(dialog) {
// Add the settings page to the builder.
@@ -68,6 +77,9 @@ var MatrixEffect = class MatrixEffect {
MatrixEffect.getLabel());
}
// ---------------------------------------------------------------- API for extension.js
static createShader(settings) {
return new MatrixShader(settings);
}