Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwineffects.h
Show First 20 Lines • Show All 655 Lines • ▼ Show 20 Line(s) | 655 | static double interpolate(double x, double y, double a) { | |||
---|---|---|---|---|---|
656 | return x * (1 - a) + y * a; | 656 | return x * (1 - a) + y * a; | ||
657 | } | 657 | } | ||
658 | /** Helper to set WindowPaintData and QRegion to necessary transformations so that | 658 | /** Helper to set WindowPaintData and QRegion to necessary transformations so that | ||
659 | * a following drawWindow() would put the window at the requested geometry (useful for thumbnails) | 659 | * a following drawWindow() would put the window at the requested geometry (useful for thumbnails) | ||
660 | **/ | 660 | **/ | ||
661 | static void setPositionTransformations(WindowPaintData& data, QRect& region, EffectWindow* w, | 661 | static void setPositionTransformations(WindowPaintData& data, QRect& region, EffectWindow* w, | ||
662 | const QRect& r, Qt::AspectRatioMode aspect); | 662 | const QRect& r, Qt::AspectRatioMode aspect); | ||
663 | 663 | | |||
664 | /** | ||||
665 | * Whether another effect has grabbed the @p w with the given @p grabRole. | ||||
666 | * @param w The window to check | ||||
667 | * @param grabRole The grab role to check | ||||
668 | * @returns @c true if another window has grabbed the effect, @c false otherwise | ||||
669 | * @since ?.?? | ||||
670 | **/ | ||||
671 | Q_SCRIPTABLE bool isGrabbed(KWin::EffectWindow *w, DataRole grabRole); | ||||
672 | /** | ||||
673 | * Grabs @p w with the given @p grabRole. | ||||
674 | * | ||||
675 | * If the given window is already grabbed by somebody else, this method will do | ||||
676 | * nothing, unless @p force is set to @c true. | ||||
677 | * | ||||
678 | * @param w The window to grab | ||||
679 | * @param grabRole The role to grab | ||||
680 | * @param force Whether to force the effect to grab the window | ||||
681 | * @returns @c true if the window has been grabbed successfully, @c false otherwise | ||||
682 | * @since 5.?? | ||||
683 | **/ | ||||
684 | Q_SCRIPTABLE bool grab(KWin::EffectWindow *w, DataRole grabRole, bool force = false); | ||||
685 | /** | ||||
686 | * Ungrabs @p w with the given @p grabRole. | ||||
687 | * | ||||
688 | * If the given window is grabbed by somebody else, this method will do | ||||
689 | * nothing, unless @p force is set to @c true. | ||||
690 | * | ||||
691 | * @param w The window to ungrab | ||||
692 | * @param grabRole The role to ungrab | ||||
693 | * @param force Whether to force the effect to ungrab the window | ||||
694 | * @returns @c true if the window has been ungrabbed successfully, @c false otherwise | ||||
695 | * @since 5.?? | ||||
696 | **/ | ||||
697 | Q_SCRIPTABLE bool ungrab(KWin::EffectWindow *w, DataRole grabRole, bool force = false); | ||||
698 | | ||||
664 | public Q_SLOTS: | 699 | public Q_SLOTS: | ||
665 | virtual bool borderActivated(ElectricBorder border); | 700 | virtual bool borderActivated(ElectricBorder border); | ||
666 | 701 | | |||
667 | protected: | 702 | protected: | ||
668 | xcb_connection_t *xcbConnection() const; | 703 | xcb_connection_t *xcbConnection() const; | ||
669 | xcb_window_t x11RootWindow() const; | 704 | xcb_window_t x11RootWindow() const; | ||
670 | 705 | | |||
671 | /** | 706 | /** | ||
▲ Show 20 Lines • Show All 2826 Lines • Show Last 20 Lines |