Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwineffects.h
Show First 20 Lines • Show All 806 Lines • ▼ Show 20 Line(s) | 790 | { | |||
---|---|---|---|---|---|
807 | /** | 807 | /** | ||
808 | * Factor by which animation speed in the effect should be modified (multiplied). | 808 | * Factor by which animation speed in the effect should be modified (multiplied). | ||
809 | * If configurable in the effect itself, the option should have also 'default' | 809 | * If configurable in the effect itself, the option should have also 'default' | ||
810 | * animation speed. The actual value should be determined using animationTime(). | 810 | * animation speed. The actual value should be determined using animationTime(). | ||
811 | * Note: The factor can be also 0, so make sure your code can cope with 0ms time | 811 | * Note: The factor can be also 0, so make sure your code can cope with 0ms time | ||
812 | * if used manually. | 812 | * if used manually. | ||
813 | */ | 813 | */ | ||
814 | Q_PROPERTY(qreal animationTimeFactor READ animationTimeFactor) | 814 | Q_PROPERTY(qreal animationTimeFactor READ animationTimeFactor) | ||
815 | Q_PROPERTY(QList< KWin::EffectWindow* > stackingOrder READ stackingOrder) | 815 | Q_PROPERTY(QList< QObject* > stackingOrder READ stackingOrderProxy) | ||
816 | /** | 816 | /** | ||
817 | * Whether window decorations use the alpha channel. | 817 | * Whether window decorations use the alpha channel. | ||
818 | **/ | 818 | **/ | ||
819 | Q_PROPERTY(bool decorationsHaveAlpha READ decorationsHaveAlpha) | 819 | Q_PROPERTY(bool decorationsHaveAlpha READ decorationsHaveAlpha) | ||
820 | /** | 820 | /** | ||
821 | * Whether the window decorations support blurring behind the decoration. | 821 | * Whether the window decorations support blurring behind the decoration. | ||
822 | **/ | 822 | **/ | ||
823 | Q_PROPERTY(bool decorationSupportsBlurBehind READ decorationSupportsBlurBehind) | 823 | Q_PROPERTY(bool decorationSupportsBlurBehind READ decorationSupportsBlurBehind) | ||
▲ Show 20 Lines • Show All 493 Lines • ▼ Show 20 Line(s) | 829 | public: | |||
1317 | virtual KSharedConfigPtr config() const = 0; | 1317 | virtual KSharedConfigPtr config() const = 0; | ||
1318 | 1318 | | |||
1319 | /** | 1319 | /** | ||
1320 | * @returns The global input configuration (kcminputrc) | 1320 | * @returns The global input configuration (kcminputrc) | ||
1321 | * @since 5.10 | 1321 | * @since 5.10 | ||
1322 | **/ | 1322 | **/ | ||
1323 | virtual KSharedConfigPtr inputConfig() const = 0; | 1323 | virtual KSharedConfigPtr inputConfig() const = 0; | ||
1324 | 1324 | | |||
1325 | | ||||
1326 | QList<QObject *> stackingOrderProxy() const; | ||||
1327 | | ||||
1325 | Q_SIGNALS: | 1328 | Q_SIGNALS: | ||
1326 | /** | 1329 | /** | ||
1327 | * Signal emitted when the current desktop changed. | 1330 | * Signal emitted when the current desktop changed. | ||
1328 | * @param oldDesktop The previously current desktop | 1331 | * @param oldDesktop The previously current desktop | ||
1329 | * @param newDesktop The new current desktop | 1332 | * @param newDesktop The new current desktop | ||
1330 | * @param with The window which is taken over to the new desktop, can be NULL | 1333 | * @param with The window which is taken over to the new desktop, can be NULL | ||
1331 | * @since 4.9 | 1334 | * @since 4.9 | ||
1332 | */ | 1335 | */ | ||
1333 | void desktopChanged(int oldDesktop, int newDesktop, KWin::EffectWindow *with); | 1336 | void desktopChanged(int oldDesktop, int newDesktop, KWin::EffectWindow *with); | ||
1334 | /** | 1337 | /** | ||
1335 | * @since 4.7 | 1338 | * @since 4.7 | ||
1336 | * @deprecated | 1339 | * @deprecated | ||
1337 | */ | 1340 | */ | ||
1338 | void desktopChanged(int oldDesktop, int newDesktop); | 1341 | void desktopChanged(int oldDesktop, int newDesktop); | ||
1342 | ///@internal | ||||
1343 | void desktopChangedCompat(int oldDesktop, int newDesktop); | ||||
1339 | /** | 1344 | /** | ||
1340 | * Signal emitted when a window moved to another desktop | 1345 | * Signal emitted when a window moved to another desktop | ||
1341 | * NOTICE that this does NOT imply that the desktop has changed | 1346 | * NOTICE that this does NOT imply that the desktop has changed | ||
1342 | * The @param window which is moved to the new desktop | 1347 | * The @param window which is moved to the new desktop | ||
1343 | * @param oldDesktop The previous desktop of the window | 1348 | * @param oldDesktop The previous desktop of the window | ||
1344 | * @param newDesktop The new desktop of the window | 1349 | * @param newDesktop The new desktop of the window | ||
1345 | * @since 4.11.4 | 1350 | * @since 4.11.4 | ||
1346 | */ | 1351 | */ | ||
▲ Show 20 Lines • Show All 817 Lines • ▼ Show 20 Line(s) | 1971 | public: | |||
2164 | bool keepAbove() const; | 2169 | bool keepAbove() const; | ||
2165 | /** | 2170 | /** | ||
2166 | * Returns whether the window is kept below all other windows. | 2171 | * Returns whether the window is kept below all other windows. | ||
2167 | */ | 2172 | */ | ||
2168 | bool keepBelow() const; | 2173 | bool keepBelow() const; | ||
2169 | 2174 | | |||
2170 | bool isModal() const; | 2175 | bool isModal() const; | ||
2171 | Q_SCRIPTABLE virtual KWin::EffectWindow* findModal() = 0; | 2176 | Q_SCRIPTABLE virtual KWin::EffectWindow* findModal() = 0; | ||
2172 | Q_SCRIPTABLE virtual QList<KWin::EffectWindow*> mainWindows() const = 0; | 2177 | Q_SCRIPTABLE virtual QList<KWin::EffectWindow*> mainWindows() const = 0; | ||
2173 | 2178 | | |||
zzag: We're breaking third-party effects, that's not good. | |||||
2174 | /** | 2179 | /** | ||
2175 | * Returns whether the window should be excluded from window switching effects. | 2180 | * Returns whether the window should be excluded from window switching effects. | ||
2176 | * @since 4.5 | 2181 | * @since 4.5 | ||
2177 | */ | 2182 | */ | ||
2178 | bool isSkipSwitcher() const; | 2183 | bool isSkipSwitcher() const; | ||
2179 | 2184 | | |||
2180 | /** | 2185 | /** | ||
2181 | * Returns the unmodified window quad list. Can also be used to force rebuilding. | 2186 | * Returns the unmodified window quad list. Can also be used to force rebuilding. | ||
Show All 33 Lines | |||||
2215 | bool isUnresponsive() const; | 2220 | bool isUnresponsive() const; | ||
2216 | 2221 | | |||
2217 | /** | 2222 | /** | ||
2218 | * Can be used to by effects to store arbitrary data in the EffectWindow. | 2223 | * Can be used to by effects to store arbitrary data in the EffectWindow. | ||
2219 | * | 2224 | * | ||
2220 | * Invoking this method will emit the signal EffectsHandler::windowDataChanged. | 2225 | * Invoking this method will emit the signal EffectsHandler::windowDataChanged. | ||
2221 | * @see EffectsHandler::windowDataChanged | 2226 | * @see EffectsHandler::windowDataChanged | ||
2222 | */ | 2227 | */ | ||
2223 | Q_SCRIPTABLE virtual void setData(int role, const QVariant &data) = 0; | 2228 | Q_SCRIPTABLE virtual void setData(int role, const QVariant &data) = 0; | ||
@davidedmundson This might be one of the broken cases - please check fvogt: @davidedmundson This might be one of the broken cases - please check | |||||
There are two types of role GrabRole which should be set to a pointer to the object For a Scripted effect: w.setData(Effect.WindowClosedGrabRole, effect); resulted in QVariant(QObject*, ScriptedEffectWithDebugSpy(0x7f7f60006190)) which looks fine The other roles (such as WindowForceBackgroundContrastRole) should be a boolean w.setData(Effect.WindowForceBackgroundContrastRole, true); which resulted in QVariant(bool, true) which also looks fine Obviously one can do something stupid like setData(["asdfasf", 2]) which results in a QJSValue but unboxing won't help. davidedmundson: There are two types of role
GrabRole which should be set to a pointer to the object
For a… | |||||
Hm, so it is affected. If a new role with a QStringList gets instroduced (or even a QVariantList) it might stop working (or behave unexpectedly). Currently it shouldn't cause any issues though. fvogt: Hm, so it is affected. If a new role with a QStringList gets instroduced (or even a… | |||||
2224 | Q_SCRIPTABLE virtual QVariant data(int role) const = 0; | 2229 | Q_SCRIPTABLE virtual QVariant data(int role) const = 0; | ||
2225 | 2230 | | |||
2226 | /** | 2231 | /** | ||
2227 | * @brief References the previous window pixmap to prevent discarding. | 2232 | * @brief References the previous window pixmap to prevent discarding. | ||
2228 | * | 2233 | * | ||
2229 | * This method allows to reference the previous window pixmap in case that a window changed | 2234 | * This method allows to reference the previous window pixmap in case that a window changed | ||
2230 | * its size, which requires a new window pixmap. By referencing the previous (and then outdated) | 2235 | * its size, which requires a new window pixmap. By referencing the previous (and then outdated) | ||
2231 | * window pixmap an effect can for example cross fade the current window pixmap with the previous | 2236 | * window pixmap an effect can for example cross fade the current window pixmap with the previous | ||
▲ Show 20 Lines • Show All 1491 Lines • Show Last 20 Lines |
We're breaking third-party effects, that's not good.