Changeset View
Changeset View
Standalone View
Standalone View
effects.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | |||||
67 | { | 67 | { | ||
68 | Q_OBJECT | 68 | Q_OBJECT | ||
69 | Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Effects") | 69 | Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Effects") | ||
70 | Q_PROPERTY(QStringList activeEffects READ activeEffects) | 70 | Q_PROPERTY(QStringList activeEffects READ activeEffects) | ||
71 | Q_PROPERTY(QStringList loadedEffects READ loadedEffects) | 71 | Q_PROPERTY(QStringList loadedEffects READ loadedEffects) | ||
72 | Q_PROPERTY(QStringList listOfEffects READ listOfEffects) | 72 | Q_PROPERTY(QStringList listOfEffects READ listOfEffects) | ||
73 | public: | 73 | public: | ||
74 | EffectsHandlerImpl(Compositor *compositor, Scene *scene); | 74 | EffectsHandlerImpl(Compositor *compositor, Scene *scene); | ||
75 | virtual ~EffectsHandlerImpl(); | 75 | ~EffectsHandlerImpl() override; | ||
76 | void prePaintScreen(ScreenPrePaintData& data, int time) override; | 76 | void prePaintScreen(ScreenPrePaintData& data, int time) override; | ||
77 | void paintScreen(int mask, QRegion region, ScreenPaintData& data) override; | 77 | void paintScreen(int mask, QRegion region, ScreenPaintData& data) override; | ||
78 | /** | 78 | /** | ||
79 | * Special hook to perform a paintScreen but just with the windows on @p desktop. | 79 | * Special hook to perform a paintScreen but just with the windows on @p desktop. | ||
80 | **/ | 80 | **/ | ||
81 | void paintDesktop(int desktop, int mask, QRegion region, ScreenPaintData& data); | 81 | void paintDesktop(int desktop, int mask, QRegion region, ScreenPaintData& data); | ||
82 | void postPaintScreen() override; | 82 | void postPaintScreen() override; | ||
83 | void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override; | 83 | void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) override; | ||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Line(s) | |||||
257 | bool touchUp(quint32 id, quint32 time); | 257 | bool touchUp(quint32 id, quint32 time); | ||
258 | 258 | | |||
259 | void highlightWindows(const QVector<EffectWindow *> &windows); | 259 | void highlightWindows(const QVector<EffectWindow *> &windows); | ||
260 | 260 | | |||
261 | bool isPropertyTypeRegistered(xcb_atom_t atom) const { | 261 | bool isPropertyTypeRegistered(xcb_atom_t atom) const { | ||
262 | return registered_atoms.contains(atom); | 262 | return registered_atoms.contains(atom); | ||
263 | } | 263 | } | ||
264 | 264 | | |||
265 | void windowToDesktops(EffectWindow *w, const QVector<uint> &desktops); | 265 | void windowToDesktops(EffectWindow *w, const QVector<uint> &desktops) override; | ||
266 | 266 | | |||
267 | /** | 267 | /** | ||
268 | * Finds an effect with the given name. | 268 | * Finds an effect with the given name. | ||
269 | * | 269 | * | ||
270 | * @param name The name of the effect. | 270 | * @param name The name of the effect. | ||
271 | * @returns The effect with the given name @p name, or nullptr if there | 271 | * @returns The effect with the given name @p name, or nullptr if there | ||
272 | * is no such effect loaded. | 272 | * is no such effect loaded. | ||
273 | **/ | 273 | **/ | ||
▲ Show 20 Lines • Show All 211 Lines • ▼ Show 20 Line(s) | 371 | public: | |||
485 | 485 | | |||
486 | void setWindow(Toplevel* w); // internal | 486 | void setWindow(Toplevel* w); // internal | ||
487 | void setSceneWindow(Scene::Window* w); // internal | 487 | void setSceneWindow(Scene::Window* w); // internal | ||
488 | const Scene::Window* sceneWindow() const; // internal | 488 | const Scene::Window* sceneWindow() const; // internal | ||
489 | Scene::Window* sceneWindow(); // internal | 489 | Scene::Window* sceneWindow(); // internal | ||
490 | 490 | | |||
491 | void elevate(bool elevate); | 491 | void elevate(bool elevate); | ||
492 | 492 | | |||
493 | void setData(int role, const QVariant &data); | 493 | void setData(int role, const QVariant &data) override; | ||
494 | QVariant data(int role) const; | 494 | QVariant data(int role) const override; | ||
495 | 495 | | |||
496 | void registerThumbnail(AbstractThumbnailItem *item); | 496 | void registerThumbnail(AbstractThumbnailItem *item); | ||
497 | QHash<WindowThumbnailItem*, QWeakPointer<EffectWindowImpl> > const &thumbnails() const { | 497 | QHash<WindowThumbnailItem*, QWeakPointer<EffectWindowImpl> > const &thumbnails() const { | ||
498 | return m_thumbnails; | 498 | return m_thumbnails; | ||
499 | } | 499 | } | ||
500 | QList<DesktopThumbnailItem*> const &desktopThumbnails() const { | 500 | QList<DesktopThumbnailItem*> const &desktopThumbnails() const { | ||
501 | return m_desktopThumbnails; | 501 | return m_desktopThumbnails; | ||
502 | } | 502 | } | ||
Show All 26 Lines | |||||
529 | 529 | | |||
530 | class KWIN_EXPORT EffectFrameImpl | 530 | class KWIN_EXPORT EffectFrameImpl | ||
531 | : public QObject, public EffectFrame | 531 | : public QObject, public EffectFrame | ||
532 | { | 532 | { | ||
533 | Q_OBJECT | 533 | Q_OBJECT | ||
534 | public: | 534 | public: | ||
535 | explicit EffectFrameImpl(EffectFrameStyle style, bool staticSize = true, QPoint position = QPoint(-1, -1), | 535 | explicit EffectFrameImpl(EffectFrameStyle style, bool staticSize = true, QPoint position = QPoint(-1, -1), | ||
536 | Qt::Alignment alignment = Qt::AlignCenter); | 536 | Qt::Alignment alignment = Qt::AlignCenter); | ||
537 | virtual ~EffectFrameImpl(); | 537 | ~EffectFrameImpl() override; | ||
538 | 538 | | |||
539 | void free() override; | 539 | void free() override; | ||
540 | void render(QRegion region = infiniteRegion(), double opacity = 1.0, double frameOpacity = 1.0) override; | 540 | void render(QRegion region = infiniteRegion(), double opacity = 1.0, double frameOpacity = 1.0) override; | ||
541 | Qt::Alignment alignment() const override; | 541 | Qt::Alignment alignment() const override; | ||
542 | void setAlignment(Qt::Alignment alignment) override; | 542 | void setAlignment(Qt::Alignment alignment) override; | ||
543 | const QFont& font() const override; | 543 | const QFont& font() const override; | ||
544 | void setFont(const QFont& font) override; | 544 | void setFont(const QFont& font) override; | ||
545 | const QRect& geometry() const override; | 545 | const QRect& geometry() const override; | ||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |