Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwinanimationeffect.h
Show First 20 Lines • Show All 252 Lines • ▼ Show 20 Line(s) | 236 | protected: | |||
---|---|---|---|---|---|
253 | * @param from The starting value, the default is invalid, ie. the attribute for | 253 | * @param from The starting value, the default is invalid, ie. the attribute for | ||
254 | * the window is not transformed in the beginning. | 254 | * the window is not transformed in the beginning. | ||
255 | * @param fullScreen Sets this effect as the active full screen effect for the | 255 | * @param fullScreen Sets this effect as the active full screen effect for the | ||
256 | * duration of the animation. | 256 | * duration of the animation. | ||
257 | * @param keepAlive Whether closed windows should be kept alive during animation. | 257 | * @param keepAlive Whether closed windows should be kept alive during animation. | ||
258 | * @returns An ID that you can use to cancel a running animation. | 258 | * @returns An ID that you can use to cancel a running animation. | ||
259 | * @since 4.8 | 259 | * @since 4.8 | ||
260 | */ | 260 | */ | ||
261 | quint64 animate( EffectWindow *w, Attribute a, uint meta, int ms, FPx2 to, QEasingCurve curve = QEasingCurve(), int delay = 0, FPx2 from = FPx2(), bool fullScreen = false, bool keepAlive = true) | 261 | quint64 animate( EffectWindow *w, Attribute a, uint meta, int ms, const FPx2 &to, const QEasingCurve &curve = QEasingCurve(), int delay = 0, const FPx2 &from = FPx2(), bool fullScreen = false, bool keepAlive = true) | ||
262 | { return p_animate(w, a, meta, ms, to, curve, delay, from, false, fullScreen, keepAlive); } | 262 | { return p_animate(w, a, meta, ms, to, curve, delay, from, false, fullScreen, keepAlive); } | ||
263 | 263 | | |||
264 | /** | 264 | /** | ||
265 | * Starts a persistent animated transition of any supported attribute. | 265 | * Starts a persistent animated transition of any supported attribute. | ||
266 | * | 266 | * | ||
267 | * This method is equal to animate() with one important difference: | 267 | * This method is equal to animate() with one important difference: | ||
268 | * the target value for the attribute is kept until you call cancel(). | 268 | * the target value for the attribute is kept until you call cancel(). | ||
269 | * | 269 | * | ||
Show All 13 Lines | |||||
283 | * @param from The starting value, the default is invalid, ie. the attribute for | 283 | * @param from The starting value, the default is invalid, ie. the attribute for | ||
284 | * the window is not transformed in the beginning. | 284 | * the window is not transformed in the beginning. | ||
285 | * @param fullScreen Sets this effect as the active full screen effect for the | 285 | * @param fullScreen Sets this effect as the active full screen effect for the | ||
286 | * duration of the animation. | 286 | * duration of the animation. | ||
287 | * @param keepAlive Whether closed windows should be kept alive during animation. | 287 | * @param keepAlive Whether closed windows should be kept alive during animation. | ||
288 | * @returns An ID that you need to use to cancel this manipulation. | 288 | * @returns An ID that you need to use to cancel this manipulation. | ||
289 | * @since 4.11 | 289 | * @since 4.11 | ||
290 | */ | 290 | */ | ||
291 | quint64 set( EffectWindow *w, Attribute a, uint meta, int ms, FPx2 to, QEasingCurve curve = QEasingCurve(), int delay = 0, FPx2 from = FPx2(), bool fullScreen = false, bool keepAlive = true) | 291 | quint64 set( EffectWindow *w, Attribute a, uint meta, int ms, const FPx2 &to, const QEasingCurve &curve = QEasingCurve(), int delay = 0, const FPx2 &from = FPx2(), bool fullScreen = false, bool keepAlive = true) | ||
292 | { return p_animate(w, a, meta, ms, to, curve, delay, from, true, fullScreen, keepAlive); } | 292 | { return p_animate(w, a, meta, ms, to, curve, delay, from, true, fullScreen, keepAlive); } | ||
293 | 293 | | |||
294 | /** | 294 | /** | ||
295 | * Changes the target (but not type or curve) of a running animation. | 295 | * Changes the target (but not type or curve) of a running animation. | ||
296 | * | 296 | * | ||
297 | * Please use cancel() to cancel an animation rather than altering it. | 297 | * Please use cancel() to cancel an animation rather than altering it. | ||
298 | * | 298 | * | ||
299 | * @param animationId The id of the animation to be retargetted. | 299 | * @param animationId The id of the animation to be retargetted. | ||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | |||||
381 | typedef QMap<EffectWindow *, QPair<QList<AniData>, QRect> > AniMap; | 381 | typedef QMap<EffectWindow *, QPair<QList<AniData>, QRect> > AniMap; | ||
382 | 382 | | |||
383 | /** | 383 | /** | ||
384 | * @internal | 384 | * @internal | ||
385 | */ | 385 | */ | ||
386 | AniMap state() const; | 386 | AniMap state() const; | ||
387 | 387 | | |||
388 | private: | 388 | private: | ||
389 | quint64 p_animate(EffectWindow *w, Attribute a, uint meta, int ms, FPx2 to, QEasingCurve curve, int delay, FPx2 from, bool keepAtTarget, bool fullScreenEffect, bool keepAlive); | 389 | quint64 p_animate(EffectWindow *w, Attribute a, uint meta, int ms, FPx2 to, const QEasingCurve &curve, int delay, FPx2 from, bool keepAtTarget, bool fullScreenEffect, bool keepAlive); | ||
390 | QRect clipRect(const QRect &windowRect, const AniData&) const; | 390 | QRect clipRect(const QRect &windowRect, const AniData&) const; | ||
391 | void clipWindow(const EffectWindow *, const AniData &, WindowQuadList &) const; | 391 | void clipWindow(const EffectWindow *, const AniData &, WindowQuadList &) const; | ||
392 | float interpolated( const AniData&, int i = 0 ) const; | 392 | float interpolated( const AniData&, int i = 0 ) const; | ||
393 | float progress( const AniData& ) const; | 393 | float progress( const AniData& ) const; | ||
394 | void disconnectGeometryChanges(); | 394 | void disconnectGeometryChanges(); | ||
395 | void updateLayerRepaints(); | 395 | void updateLayerRepaints(); | ||
396 | void validate(Attribute a, uint &meta, FPx2 *from, FPx2 *to, const EffectWindow *w) const; | 396 | void validate(Attribute a, uint &meta, FPx2 *from, FPx2 *to, const EffectWindow *w) const; | ||
397 | 397 | | |||
Show All 22 Lines |