KWindowEffects
Functions | |
void | enableBackgroundContrast (QWindow *window, bool enable=true, qreal contrast=1, qreal intensity=1, qreal saturation=1, const QRegion ®ion=QRegion()) |
void | enableBackgroundContrast (WId window, bool enable=true, qreal contrast=1, qreal intensity=1, qreal saturation=1, const QRegion ®ion=QRegion()) |
void | enableBlurBehind (QWindow *window, bool enable=true, const QRegion ®ion=QRegion()) |
void | enableBlurBehind (WId window, bool enable=true, const QRegion ®ion=QRegion()) |
void | highlightWindows (WId controller, const QList< WId > &ids) |
bool | isEffectAvailable (Effect effect) |
void | markAsDashboard (WId window) |
void | presentWindows (WId controller, const QList< WId > &ids) |
void | presentWindows (WId controller, int desktop=NET::OnAllDesktops) |
void | setBackgroundFrost (QWindow *window, QColor frostColor, const QRegion ®ion=QRegion()) |
void | slideWindow (QWidget *widget, SlideFromLocation location) |
void | slideWindow (QWindow *window, SlideFromLocation location, int offset=-1) |
void | slideWindow (WId id, SlideFromLocation location, int offset=-1) |
QList< QSize > | windowSizes (const QList< WId > &ids) |
Detailed Description
Namespace for common standardized window effects.
Function Documentation
◆ enableBackgroundContrast() [1/2]
KWINDOWSYSTEM_EXPORT void KWindowEffects::enableBackgroundContrast | ( | QWindow * | window, |
bool | enable = true , |
||
qreal | contrast = 1 , |
||
qreal | intensity = 1 , |
||
qreal | saturation = 1 , |
||
const QRegion & | region = QRegion() |
||
) |
Instructs the window manager to modify the color of the background in the specified region behind the given window, in order to improve the contrast and readability of any text in the translucent window.
The given region will overwrite any previous backgroundcontrast region. Passing a null region will enable the blur effect for the whole window. The region is relative to the top-left corner of the client area.
If enable is false
, blur will be disabled for the whole window (region is ignored).
Note that you will usually want to set the region to the shape of the window, excluding any shadow or halo.
- Parameters
-
window The window for which to enable the background contrast effect enable Enable the effect if true
, disable it iffalse
brightness How to modify the area brightness: from 0 (make it black) to 2 (make it white), 1 leaves it unchanged region The region within the window where the background will be modified, specified in logical pixels
- Since
- 5.82
Definition at line 57 of file kwindoweffects.cpp.
◆ enableBackgroundContrast() [2/2]
KWINDOWSYSTEM_EXPORT void KWindowEffects::enableBackgroundContrast | ( | WId | window, |
bool | enable = true , |
||
qreal | contrast = 1 , |
||
qreal | intensity = 1 , |
||
qreal | saturation = 1 , |
||
const QRegion & | region = QRegion() |
||
) |
Instructs the window manager to modify the color of the background in the specified region behind the given window, in order to improve the contrast and readability of any text in the translucent window.
The given region will overwrite any previous backgroundcontrast region. Passing a null region will enable the blur effect for the whole window. The region is relative to the top-left corner of the client area.
If enable is false
, blur will be disabled for the whole window (region is ignored).
Note that you will usually want to set the region to the shape of the window, excluding any shadow or halo.
- Parameters
-
window The window for which to enable the background contrast effect enable Enable the effect if true
, disable it iffalse
brightness How to modify the area brightness: from 0 (make it black) to 2 (make it white), 1 leaves it unchanged region The region within the window where the background will be modified, specified in logical pixels
- Deprecated:
- Since 5.82, use enableBackgroundContrast(QWindow) overload.
Definition at line 46 of file kwindoweffects.cpp.
◆ enableBlurBehind() [1/2]
KWINDOWSYSTEM_EXPORT void KWindowEffects::enableBlurBehind | ( | QWindow * | window, |
bool | enable = true , |
||
const QRegion & | region = QRegion() |
||
) |
Instructs the window manager to blur the background in the specified region behind the given window.
The given region will overwrite any previous blur-behind region. Passing a null region will enable the blur effect for the whole window. The region is relative to the top-left corner of the client area.
If enable is false
, blur will be disabled for the whole window (region is ignored).
Note that you will usually want to set the region to the shape of the window, excluding any shadow or halo.
- Parameters
-
window The window for which to enable the blur effect enable Enable the effect if true
, disable it iffalse
region The region within the window where the background will be blurred, specified in logical pixels
- Since
- 5.82
Definition at line 52 of file kwindoweffects.cpp.
◆ enableBlurBehind() [2/2]
KWINDOWSYSTEM_EXPORT void KWindowEffects::enableBlurBehind | ( | WId | window, |
bool | enable = true , |
||
const QRegion & | region = QRegion() |
||
) |
Instructs the window manager to blur the background in the specified region behind the given window.
The given region will overwrite any previous blur-behind region. Passing a null region will enable the blur effect for the whole window. The region is relative to the top-left corner of the client area.
If enable is false
, blur will be disabled for the whole window (region is ignored).
Note that you will usually want to set the region to the shape of the window, excluding any shadow or halo.
- Parameters
-
window The window for which to enable the blur effect enable Enable the effect if true
, disable it iffalse
region The region within the window where the background will be blurred, specified in logical pixels
- Deprecated:
- Since 5.82, use enableBlurBehind(QWindow) overload.
Definition at line 39 of file kwindoweffects.cpp.
◆ highlightWindows()
KWINDOWSYSTEM_EXPORT void KWindowEffects::highlightWindows | ( | WId | controller, |
const QList< WId > & | ids | ||
) |
Highlight the selected windows, making all the others translucent.
- Parameters
-
controller The window which is the controller of this effect. The property will be set on this window. It will be removed by the effect ids all the windows which should be highlighted.
- Deprecated:
- Since 5.82, Use org.kde.KWin.HighlightWindow d-bus api
Definition at line 76 of file kwindoweffects.cpp.
◆ isEffectAvailable()
KWINDOWSYSTEM_EXPORT bool KWindowEffects::isEffectAvailable | ( | Effect | effect | ) |
- Returns
- if an atom property is available
- Parameters
-
effect the effect we want to check
Definition at line 33 of file kwindoweffects.cpp.
◆ markAsDashboard()
KWINDOWSYSTEM_EXPORT void KWindowEffects::markAsDashboard | ( | WId | window | ) |
Instructs the window manager to handle the given window as dashboard window as Dashboard windows should be handled differently and may have special effects applied to them.
- Parameters
-
window The window for which to enable the blur effect
- Deprecated:
- since 5.67, support for dashboard windows was removed
Definition at line 83 of file kwindoweffects.cpp.
◆ presentWindows() [1/2]
KWINDOWSYSTEM_EXPORT void KWindowEffects::presentWindows | ( | WId | controller, |
const QList< WId > & | ids | ||
) |
Activate the Present Windows effect for the given groups of windows.
- Parameters
-
controller The window which is the controller of this effect. The property will be set on this window. It will be removed by the effect ids all the windows which should be presented.
- Deprecated:
- Since 5.82, Use org.kde.KWin.PresentWindows d-bus api
Definition at line 90 of file kwindoweffects.cpp.
◆ presentWindows() [2/2]
KWINDOWSYSTEM_EXPORT void KWindowEffects::presentWindows | ( | WId | controller, |
int | desktop = NET::OnAllDesktops |
||
) |
Activate the Present Windows effect for the windows of the given desktop.
- Parameters
-
controller The window which is the controller of this effect. The property will be set on this window. It will be removed by the effect desktop The desktop whose windows should be presented. -1 for all desktops
- Deprecated:
- Since 5.82, Use org.kde.KWin.PresentWindows d-bus api
Definition at line 97 of file kwindoweffects.cpp.
◆ setBackgroundFrost()
KWINDOWSYSTEM_EXPORT void KWindowEffects::setBackgroundFrost | ( | QWindow * | window, |
QColor | frostColor, | ||
const QRegion & | region = QRegion() |
||
) |
Instructs the window manager to modify the color of the background in the specified region behind the given window, in order to improve the contrast and readability of any text in the translucent window.
The given region will overwrite any previous backgroundcontrast region. Passing a null region will enable the frost effect for the whole window. The region is relative to the top-left corner of the client area.
If color is null, frost will be disabled for the whole window (region is ignored).
Note that you will usually want to set the region to the shape of the window, excluding any shadow or halo.
- Parameters
-
window The window for which to enable the background frost effect frostColor The color to use as an anchor point for adjusting colors of windows behind the window; usually a translucent version of the window's background colour region The region within the window where the background will be modified, specified in logical pixels
- Since
- 5.86
Definition at line 62 of file kwindoweffects.cpp.
◆ slideWindow() [1/3]
KWINDOWSYSTEM_EXPORT void KWindowEffects::slideWindow | ( | QWidget * | widget, |
SlideFromLocation | location | ||
) |
Mark a window as sliding from screen edge This is an overloaded member function provided for convenience.
- Parameters
-
widget QWidget corresponding to the top level window we want to animate location edge of the screen from which we want the sliding effect. Desktop and Floating won't have effect.
- Deprecated:
- since 5.62, use slideWindow(widget->effectiveWinId(), location);
Definition at line 111 of file kwindoweffects.cpp.
◆ slideWindow() [2/3]
KWINDOWSYSTEM_EXPORT void KWindowEffects::slideWindow | ( | QWindow * | window, |
SlideFromLocation | location, | ||
int | offset = -1 |
||
) |
Mark a window as sliding from screen edge.
- Parameters
-
id of the window on which we want to apply the effect location edge of the screen from which we want the sliding effect. Desktop and Floating won't have effect. offset distance in pixels from the screen edge defined by location
- Since
- 5.82
Definition at line 70 of file kwindoweffects.cpp.
◆ slideWindow() [3/3]
KWINDOWSYSTEM_EXPORT void KWindowEffects::slideWindow | ( | WId | id, |
SlideFromLocation | location, | ||
int | offset = -1 |
||
) |
Mark a window as sliding from screen edge.
- Parameters
-
id of the window on which we want to apply the effect location edge of the screen from which we want the sliding effect. Desktop and Floating won't have effect. offset distance in pixels from the screen edge defined by location
- Deprecated:
- Since 5.82, Use slideWindow(QWindow) overload
Definition at line 104 of file kwindoweffects.cpp.
◆ windowSizes()
- Returns
- dimension of all the windows passed as parameter
- Parameters
-
ids all the windows we want the size
- Deprecated:
- since 5.81, fetch sizes through KWindowSystem instead
Definition at line 118 of file kwindoweffects.cpp.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:54:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.