KWindowEffects

KWindowEffects Namespace Reference

Enumerations

enum  Effect {
  Slide = 1, PresentWindows = 3, PresentWindowsGroup = 4, HighlightWindows = 5,
  BlurBehind = 7, Dashboard = 8, BackgroundContrast = 9
}
 
enum  SlideFromLocation {
  NoEdge = 0, TopEdge, RightEdge, BottomEdge,
  LeftEdge
}
 

Functions

void enableBackgroundContrast (WId window, bool enable=true, qreal contrast=1, qreal intensity=1, qreal saturation=1, const QRegion &region=QRegion())
 
void enableBackgroundContrast (QWindow *window, bool enable=true, qreal contrast=1, qreal intensity=1, qreal saturation=1, const QRegion &region=QRegion())
 
void enableBlurBehind (WId window, bool enable=true, const QRegion &region=QRegion())
 
void enableBlurBehind (QWindow *window, bool enable=true, const QRegion &region=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 &region=QRegion())
 
void slideWindow (QWindow *window, SlideFromLocation location, int offset=-1)
 
void slideWindow (WId id, SlideFromLocation location, int offset=-1)
 
void slideWindow (QWidget *widget, SlideFromLocation location)
 
QList< QSizewindowSizes (const QList< WId > &ids)
 

Detailed Description

Namespace for common standardized window effects.

Function Documentation

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
windowThe window for which to enable the background contrast effect
enableEnable the effect if true, disable it if false
brightnessHow to modify the area brightness: from 0 (make it black) to 2 (make it white), 1 leaves it unchanged
regionThe 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.

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
windowThe window for which to enable the background contrast effect
enableEnable the effect if true, disable it if false
brightnessHow to modify the area brightness: from 0 (make it black) to 2 (make it white), 1 leaves it unchanged
regionThe 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.

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
windowThe window for which to enable the blur effect
enableEnable the effect if true, disable it if false
regionThe 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.

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
windowThe window for which to enable the blur effect
enableEnable the effect if true, disable it if false
regionThe 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.

KWINDOWSYSTEM_EXPORT void KWindowEffects::highlightWindows ( WId  controller,
const QList< WId > &  ids 
)

Highlight the selected windows, making all the others translucent.

Parameters
controllerThe window which is the controller of this effect. The property will be set on this window. It will be removed by the effect
idsall 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.

KWINDOWSYSTEM_EXPORT bool KWindowEffects::isEffectAvailable ( Effect  effect)
Returns
if an atom property is available
Parameters
effectthe effect we want to check

Definition at line 33 of file kwindoweffects.cpp.

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
windowThe 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.

KWINDOWSYSTEM_EXPORT void KWindowEffects::presentWindows ( WId  controller,
const QList< WId > &  ids 
)

Activate the Present Windows effect for the given groups of windows.

Parameters
controllerThe window which is the controller of this effect. The property will be set on this window. It will be removed by the effect
idsall 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.

KWINDOWSYSTEM_EXPORT void KWindowEffects::presentWindows ( WId  controller,
int  desktop = NET::OnAllDesktops 
)

Activate the Present Windows effect for the windows of the given desktop.

Parameters
controllerThe window which is the controller of this effect. The property will be set on this window. It will be removed by the effect
desktopThe 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.

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
windowThe window for which to enable the background frost effect
frostColorThe 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
regionThe 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.

KWINDOWSYSTEM_EXPORT void KWindowEffects::slideWindow ( QWindow window,
SlideFromLocation  location,
int  offset = -1 
)

Mark a window as sliding from screen edge.

Parameters
idof the window on which we want to apply the effect
locationedge of the screen from which we want the sliding effect. Desktop and Floating won't have effect.
offsetdistance in pixels from the screen edge defined by location
Since
5.82

Definition at line 70 of file kwindoweffects.cpp.

KWINDOWSYSTEM_EXPORT void KWindowEffects::slideWindow ( WId  id,
SlideFromLocation  location,
int  offset = -1 
)

Mark a window as sliding from screen edge.

Parameters
idof the window on which we want to apply the effect
locationedge of the screen from which we want the sliding effect. Desktop and Floating won't have effect.
offsetdistance 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.

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
widgetQWidget corresponding to the top level window we want to animate
locationedge 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.

KWINDOWSYSTEM_EXPORT QList< QSize > KWindowEffects::windowSizes ( const QList< WId > &  ids)
Returns
dimension of all the windows passed as parameter
Parameters
idsall the windows we want the size
Deprecated:
since 5.81, fetch sizes through KWindowSystem instead

Definition at line 118 of file kwindoweffects.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 22:37:05 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.