Changeset View
Changeset View
Standalone View
Standalone View
scripting/scriptedeffect.h
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 45 | public: | |||
---|---|---|---|---|---|
75 | virtual ~ScriptedEffect(); | 75 | virtual ~ScriptedEffect(); | ||
76 | /** | 76 | /** | ||
77 | * Whether another effect has grabbed the @p w with the given @p grabRole. | 77 | * Whether another effect has grabbed the @p w with the given @p grabRole. | ||
78 | * @param w The window to check | 78 | * @param w The window to check | ||
79 | * @param grabRole The grab role to check | 79 | * @param grabRole The grab role to check | ||
80 | * @returns @c true if another window has grabbed the effect, @c false otherwise | 80 | * @returns @c true if another window has grabbed the effect, @c false otherwise | ||
81 | **/ | 81 | **/ | ||
82 | Q_SCRIPTABLE bool isGrabbed(KWin::EffectWindow *w, DataRole grabRole); | 82 | Q_SCRIPTABLE bool isGrabbed(KWin::EffectWindow *w, DataRole grabRole); | ||
83 | | ||||
84 | /** | ||||
85 | * Grabs the window with the specified role. | ||||
86 | * | ||||
87 | * @param w The window. | ||||
88 | * @param grabRole The grab role. | ||||
89 | * @param force By default, if the window is already grabbed by another effect, | ||||
90 | * then that window won't be grabbed by effect that called this method. If you | ||||
91 | * would like to grab a window even if it's grabbed by another effect, then | ||||
92 | * pass @c true. | ||||
93 | * @returns @c true if the window was grabbed successfully, otherwise @c false. | ||||
94 | **/ | ||||
95 | Q_SCRIPTABLE bool grab(KWin::EffectWindow *w, DataRole grabRole, bool force = false); | ||||
96 | | ||||
97 | /** | ||||
98 | * Ungrabs the window with the specified role. | ||||
99 | * | ||||
100 | * @param w The window. | ||||
101 | * @param grabRole The grab role. | ||||
102 | * @returns @c true if the window was ungrabbed successfully, otherwise @c false. | ||||
103 | **/ | ||||
104 | Q_SCRIPTABLE bool ungrab(KWin::EffectWindow *w, DataRole grabRole); | ||||
105 | | ||||
83 | /** | 106 | /** | ||
84 | * Reads the value from the configuration data for the given key. | 107 | * Reads the value from the configuration data for the given key. | ||
85 | * @param key The key to search for | 108 | * @param key The key to search for | ||
86 | * @param defaultValue The value to return if the key is not found | 109 | * @param defaultValue The value to return if the key is not found | ||
87 | * @returns The config value if present | 110 | * @returns The config value if present | ||
88 | **/ | 111 | **/ | ||
89 | Q_SCRIPTABLE QVariant readConfig(const QString &key, const QVariant defaultValue = QVariant()); | 112 | Q_SCRIPTABLE QVariant readConfig(const QString &key, const QVariant defaultValue = QVariant()); | ||
90 | void registerShortcut(QAction *a, QScriptValue callback); | 113 | void registerShortcut(QAction *a, QScriptValue callback); | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |