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 enableBlurBehind (WId 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 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

Definition at line 35 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

Definition at line 30 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.

Definition at line 40 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 25 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 diffrently 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 46 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.

Definition at line 52 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

Definition at line 57 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

Definition at line 62 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 68 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

Definition at line 74 of file kwindoweffects.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Oct 20 2020 22:46:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.