Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwineffects.h
Show First 20 Lines • Show All 422 Lines • ▼ Show 20 Line(s) | 318 | public: | |||
---|---|---|---|---|---|
423 | * @li paint something on top of the windows (by painting after calling | 423 | * @li paint something on top of the windows (by painting after calling | ||
424 | * effects->paintScreen()) | 424 | * effects->paintScreen()) | ||
425 | * @li paint multiple desktops and/or multiple copies of the same desktop | 425 | * @li paint multiple desktops and/or multiple copies of the same desktop | ||
426 | * by calling effects->paintScreen() multiple times | 426 | * by calling effects->paintScreen() multiple times | ||
427 | * | 427 | * | ||
428 | * In OpenGL based compositing, the frameworks ensures that the context is current | 428 | * In OpenGL based compositing, the frameworks ensures that the context is current | ||
429 | * when this method is invoked. | 429 | * when this method is invoked. | ||
430 | */ | 430 | */ | ||
431 | virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data); | 431 | virtual void paintScreen(int mask, const QRegion ®ion, ScreenPaintData& data); | ||
432 | /** | 432 | /** | ||
433 | * Called after all the painting has been finished. | 433 | * Called after all the painting has been finished. | ||
434 | * In this method you can: | 434 | * In this method you can: | ||
435 | * @li schedule next repaint in case of animations | 435 | * @li schedule next repaint in case of animations | ||
436 | * You shouldn't paint anything here. | 436 | * You shouldn't paint anything here. | ||
437 | * | 437 | * | ||
438 | * In OpenGL based compositing, the frameworks ensures that the context is current | 438 | * In OpenGL based compositing, the frameworks ensures that the context is current | ||
439 | * when this method is invoked. | 439 | * when this method is invoked. | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
482 | * @param region Region to restrict painting to | 482 | * @param region Region to restrict painting to | ||
483 | * @param opacity Opacity of text/icon | 483 | * @param opacity Opacity of text/icon | ||
484 | * @param frameOpacity Opacity of background | 484 | * @param frameOpacity Opacity of background | ||
485 | * @since 4.6 | 485 | * @since 4.6 | ||
486 | * | 486 | * | ||
487 | * In OpenGL based compositing, the frameworks ensures that the context is current | 487 | * In OpenGL based compositing, the frameworks ensures that the context is current | ||
488 | * when this method is invoked. | 488 | * when this method is invoked. | ||
489 | */ | 489 | */ | ||
490 | virtual void paintEffectFrame(EffectFrame* frame, QRegion region, double opacity, double frameOpacity); | 490 | virtual void paintEffectFrame(EffectFrame* frame, const QRegion ®ion, double opacity, double frameOpacity); | ||
491 | 491 | | |||
492 | /** | 492 | /** | ||
493 | * Called on Transparent resizes. | 493 | * Called on Transparent resizes. | ||
494 | * return true if your effect substitutes questioned feature | 494 | * return true if your effect substitutes questioned feature | ||
495 | */ | 495 | */ | ||
496 | virtual bool provides(Feature); | 496 | virtual bool provides(Feature); | ||
497 | 497 | | |||
498 | /** | 498 | /** | ||
Show All 12 Lines | |||||
511 | /** | 511 | /** | ||
512 | * Can be called to draw multiple copies (e.g. thumbnails) of a window. | 512 | * Can be called to draw multiple copies (e.g. thumbnails) of a window. | ||
513 | * You can change window's opacity/brightness/etc here, but you can't | 513 | * You can change window's opacity/brightness/etc here, but you can't | ||
514 | * do any transformations. | 514 | * do any transformations. | ||
515 | * | 515 | * | ||
516 | * In OpenGL based compositing, the frameworks ensures that the context is current | 516 | * In OpenGL based compositing, the frameworks ensures that the context is current | ||
517 | * when this method is invoked. | 517 | * when this method is invoked. | ||
518 | */ | 518 | */ | ||
519 | virtual void drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data); | 519 | virtual void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data); | ||
520 | 520 | | |||
521 | /** | 521 | /** | ||
522 | * Define new window quads so that they can be transformed by other effects. | 522 | * Define new window quads so that they can be transformed by other effects. | ||
523 | * It's up to the effect to keep track of them. | 523 | * It's up to the effect to keep track of them. | ||
524 | */ | 524 | */ | ||
525 | virtual void buildQuads(EffectWindow* w, WindowQuadList& quadList); | 525 | virtual void buildQuads(EffectWindow* w, WindowQuadList& quadList); | ||
526 | 526 | | |||
527 | virtual void windowInputMouseEvent(QEvent* e); | 527 | virtual void windowInputMouseEvent(QEvent* e); | ||
▲ Show 20 Lines • Show All 299 Lines • ▼ Show 20 Line(s) | 790 | { | |||
827 | Q_PROPERTY(QRect virtualScreenGeometry READ virtualScreenGeometry NOTIFY virtualScreenGeometryChanged) | 827 | Q_PROPERTY(QRect virtualScreenGeometry READ virtualScreenGeometry NOTIFY virtualScreenGeometryChanged) | ||
828 | Q_PROPERTY(bool hasActiveFullScreenEffect READ hasActiveFullScreenEffect NOTIFY hasActiveFullScreenEffectChanged) | 828 | Q_PROPERTY(bool hasActiveFullScreenEffect READ hasActiveFullScreenEffect NOTIFY hasActiveFullScreenEffectChanged) | ||
829 | friend class Effect; | 829 | friend class Effect; | ||
830 | public: | 830 | public: | ||
831 | explicit EffectsHandler(CompositingType type); | 831 | explicit EffectsHandler(CompositingType type); | ||
832 | ~EffectsHandler() override; | 832 | ~EffectsHandler() override; | ||
833 | // for use by effects | 833 | // for use by effects | ||
834 | virtual void prePaintScreen(ScreenPrePaintData& data, int time) = 0; | 834 | virtual void prePaintScreen(ScreenPrePaintData& data, int time) = 0; | ||
835 | virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data) = 0; | 835 | virtual void paintScreen(int mask, const QRegion ®ion, ScreenPaintData& data) = 0; | ||
836 | virtual void postPaintScreen() = 0; | 836 | virtual void postPaintScreen() = 0; | ||
837 | virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) = 0; | 837 | virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time) = 0; | ||
838 | virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) = 0; | 838 | virtual void paintWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) = 0; | ||
839 | virtual void postPaintWindow(EffectWindow* w) = 0; | 839 | virtual void postPaintWindow(EffectWindow* w) = 0; | ||
840 | virtual void paintEffectFrame(EffectFrame* frame, QRegion region, double opacity, double frameOpacity) = 0; | 840 | virtual void paintEffectFrame(EffectFrame* frame, const QRegion ®ion, double opacity, double frameOpacity) = 0; | ||
841 | virtual void drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) = 0; | 841 | virtual void drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) = 0; | ||
842 | virtual void buildQuads(EffectWindow* w, WindowQuadList& quadList) = 0; | 842 | virtual void buildQuads(EffectWindow* w, WindowQuadList& quadList) = 0; | ||
843 | virtual QVariant kwinOption(KWinOption kwopt) = 0; | 843 | virtual QVariant kwinOption(KWinOption kwopt) = 0; | ||
844 | /** | 844 | /** | ||
845 | * Sets the cursor while the mouse is intercepted. | 845 | * Sets the cursor while the mouse is intercepted. | ||
846 | * @see startMouseInterception | 846 | * @see startMouseInterception | ||
847 | * @since 4.11 | 847 | * @since 4.11 | ||
848 | */ | 848 | */ | ||
849 | virtual void defineCursor(Qt::CursorShape shape) = 0; | 849 | virtual void defineCursor(Qt::CursorShape shape) = 0; | ||
▲ Show 20 Lines • Show All 1285 Lines • ▼ Show 20 Line(s) | 2104 | public: | |||
2135 | 2135 | | |||
2136 | virtual bool isDeleted() const = 0; | 2136 | virtual bool isDeleted() const = 0; | ||
2137 | 2137 | | |||
2138 | virtual bool isMinimized() const = 0; | 2138 | virtual bool isMinimized() const = 0; | ||
2139 | virtual double opacity() const = 0; | 2139 | virtual double opacity() const = 0; | ||
2140 | virtual bool hasAlpha() const = 0; | 2140 | virtual bool hasAlpha() const = 0; | ||
2141 | 2141 | | |||
2142 | bool isOnCurrentActivity() const; | 2142 | bool isOnCurrentActivity() const; | ||
2143 | Q_SCRIPTABLE bool isOnActivity(QString id) const; | 2143 | Q_SCRIPTABLE bool isOnActivity(const QString &id) const; | ||
2144 | bool isOnAllActivities() const; | 2144 | bool isOnAllActivities() const; | ||
2145 | virtual QStringList activities() const = 0; | 2145 | virtual QStringList activities() const = 0; | ||
2146 | 2146 | | |||
2147 | Q_SCRIPTABLE bool isOnDesktop(int d) const; | 2147 | Q_SCRIPTABLE bool isOnDesktop(int d) const; | ||
2148 | bool isOnCurrentDesktop() const; | 2148 | bool isOnCurrentDesktop() const; | ||
2149 | bool isOnAllDesktops() const; | 2149 | bool isOnAllDesktops() const; | ||
2150 | /** | 2150 | /** | ||
2151 | * The desktop this window is in. This makes sense only on X11 | 2151 | * The desktop this window is in. This makes sense only on X11 | ||
▲ Show 20 Lines • Show All 1069 Lines • ▼ Show 20 Line(s) | 3215 | public: | |||
3221 | 3221 | | |||
3222 | /** | 3222 | /** | ||
3223 | * Register a window for managing. | 3223 | * Register a window for managing. | ||
3224 | */ | 3224 | */ | ||
3225 | void manage(EffectWindow *w); | 3225 | void manage(EffectWindow *w); | ||
3226 | /** | 3226 | /** | ||
3227 | * Register a list of windows for managing. | 3227 | * Register a list of windows for managing. | ||
3228 | */ | 3228 | */ | ||
3229 | inline void manage(EffectWindowList list) { | 3229 | inline void manage(const EffectWindowList &list) { | ||
3230 | for (int i = 0; i < list.size(); i++) | 3230 | for (int i = 0; i < list.size(); i++) | ||
3231 | manage(list.at(i)); | 3231 | manage(list.at(i)); | ||
3232 | } | 3232 | } | ||
3233 | /** | 3233 | /** | ||
3234 | * Deregister a window. All transformations applied to the | 3234 | * Deregister a window. All transformations applied to the | ||
3235 | * window will be permanently removed and cannot be recovered. | 3235 | * window will be permanently removed and cannot be recovered. | ||
3236 | */ | 3236 | */ | ||
3237 | void unmanage(EffectWindow *w); | 3237 | void unmanage(EffectWindow *w); | ||
▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Line(s) | 3370 | public: | |||
3375 | * Delete any existing textures to free up graphics memory. They will | 3375 | * Delete any existing textures to free up graphics memory. They will | ||
3376 | * be automatically recreated the next time they are required. | 3376 | * be automatically recreated the next time they are required. | ||
3377 | */ | 3377 | */ | ||
3378 | virtual void free() = 0; | 3378 | virtual void free() = 0; | ||
3379 | 3379 | | |||
3380 | /** | 3380 | /** | ||
3381 | * Render the frame. | 3381 | * Render the frame. | ||
3382 | */ | 3382 | */ | ||
3383 | virtual void render(QRegion region = infiniteRegion(), double opacity = 1.0, double frameOpacity = 1.0) = 0; | 3383 | virtual void render(const QRegion ®ion = infiniteRegion(), double opacity = 1.0, double frameOpacity = 1.0) = 0; | ||
3384 | 3384 | | |||
3385 | virtual void setPosition(const QPoint& point) = 0; | 3385 | virtual void setPosition(const QPoint& point) = 0; | ||
3386 | /** | 3386 | /** | ||
3387 | * Set the text alignment for static frames and the position alignment | 3387 | * Set the text alignment for static frames and the position alignment | ||
3388 | * for non-static. | 3388 | * for non-static. | ||
3389 | */ | 3389 | */ | ||
3390 | virtual void setAlignment(Qt::Alignment alignment) = 0; | 3390 | virtual void setAlignment(Qt::Alignment alignment) = 0; | ||
3391 | virtual Qt::Alignment alignment() const = 0; | 3391 | virtual Qt::Alignment alignment() const = 0; | ||
▲ Show 20 Lines • Show All 582 Lines • Show Last 20 Lines |