Mgraesslin (Talk | contribs) |
Mgraesslin (Talk | contribs) (Update to 4.11) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
* ''KWin::Options'' '''options''': Global property to all configuration values of KWin core. | * ''KWin::Options'' '''options''': Global property to all configuration values of KWin core. | ||
* ''KWin::Workspace'' '''workspace''': Global property to the core wrapper of KWin. | * ''KWin::Workspace'' '''workspace''': Global property to the core wrapper of KWin. | ||
− | + | * ''object'' '''KWin''': Provides access to enums defined in KWin::WorkspaceWrapper | |
− | + | ||
− | + | ||
− | + | ||
=== Functions === | === Functions === | ||
* '''print(QVariant ... values)''': Prints all provided values to kDebug and as a D-Bus signal | * '''print(QVariant ... values)''': Prints all provided values to kDebug and as a D-Bus signal | ||
* ''QVariant'' '''readConfig(QString key, QVariant defaultValue = QVariant())''': Reads the config value for key in the Script's configuration with the optional default value. If not providing a default value and no value stored in the configuration an undefined value is returned. | * ''QVariant'' '''readConfig(QString key, QVariant defaultValue = QVariant())''': Reads the config value for key in the Script's configuration with the optional default value. If not providing a default value and no value stored in the configuration an undefined value is returned. | ||
+ | * ''bool'' '''registerScreenEdge(ElectricBorder border, QScriptValue callback)''': Registers the callback for the screen edge. When the mouse gets pushed against the given edge the callback will be invoked. | ||
* ''bool'' '''registerShortcut(QString title, QString text, QString keySequence, QScriptValue callback)''': Registers keySequence as a global shortcut. When the shortcut is invoked the callback will be called. Title and text are used to name the shortcut and make it available to the global shortcut configuration module. | * ''bool'' '''registerShortcut(QString title, QString text, QString keySequence, QScriptValue callback)''': Registers keySequence as a global shortcut. When the shortcut is invoked the callback will be called. Title and text are used to name the shortcut and make it available to the global shortcut configuration module. | ||
+ | * ''bool'' '''assert(bool value, QString message = QString())''': Aborts the execution of the script if value does not evaluate to true. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
+ | * ''bool'' '''assertTrue(bool value, QString message = QString())''': Aborts the execution of the script if value does not evaluate to true. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
+ | * ''bool'' '''assertFalse(bool value, QString message = QString())''': Aborts the execution of the script if value does not evaluate to false. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
+ | * ''bool'' '''assertEquals(QVariant expected, QVariant actual, QString message = QString())''': Aborts the execution of the script if the actual value is not equal to the expected value. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
+ | * ''bool'' '''assertNull(QVariant value, QString message = QString())''': Aborts the execution of the script if value is not null. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
+ | * ''bool'' '''assertNotNull(QVariant value, QString message = QString())''': Aborts the execution of the script if value is null. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
+ | * '''callDBus(QString service, QString path, QString interface, QString method, QVariant arg..., QScriptValue callback = QScriptValue())''': Call a D-Bus method at (service, path, interface and method). A variable number of arguments can be added to the method call. The D-Bus call is always performed in an async way invoking the callback provided as the last (optional) argument. The reply values of the D-Bus method call are passed to the callback. | ||
+ | * '''registerUserActionsMenu(QScriptValue callback)''': Registers the passed in callback to be invoked whenever the User actions menu (Alt+F3 or right click on window decoration) is about to be shown. The callback is invoked with a reference to the Client for which the menu is shown. The callback can return either a single menu entry to be added to the menu or an own sub menu with multiple entries. The object for a menu entry should be {title: "My Menu entry", checkable: true, checked: false, triggered: function (action) { // callback with triggered QAction}}, for a menu it should be {title: "My menu", items: [{...}, {...}, ...] /*list with entries as described*/} | ||
== KWin::WorkspaceWrapper == | == KWin::WorkspaceWrapper == | ||
+ | === Enums === | ||
+ | |||
+ | ==== ClientAreaOption ==== | ||
+ | |||
+ | * '''PlacementArea''': window movement snapping area? ignore struts | ||
+ | * '''MovementArea''': | ||
+ | * '''MaximizeArea''': | ||
+ | * '''MaximizeFullArea''': | ||
+ | * '''FullScreenArea''': | ||
+ | * '''WorkArea''': | ||
+ | * '''FullArea''': | ||
+ | * '''ScreenArea''': | ||
+ | ==== ElectricBorder ==== | ||
+ | |||
+ | * '''ElectricTop''': | ||
+ | * '''ElectricTopRight''': | ||
+ | * '''ElectricRight''': | ||
+ | * '''ElectricBottomRight''': | ||
+ | * '''ElectricBottom''': | ||
+ | * '''ElectricBottomLeft''': | ||
+ | * '''ElectricLeft''': | ||
+ | * '''ElectricTopLeft''': | ||
+ | * '''ELECTRIC_COUNT''': | ||
+ | * '''ElectricNone''': | ||
=== Read-only Properties === | === Read-only Properties === | ||
Line 31: | Line 61: | ||
* ''int'' '''activeScreen''' | * ''int'' '''activeScreen''' | ||
* ''int'' '''numScreens''' | * ''int'' '''numScreens''' | ||
+ | * ''QString'' '''currentActivity''' | ||
+ | * ''QStringList'' '''activities''' | ||
=== Read-write Properties === | === Read-write Properties === | ||
Line 39: | Line 71: | ||
* '''desktopPresenceChanged(KWin::Client *client, int desktop)''' | * '''desktopPresenceChanged(KWin::Client *client, int desktop)''' | ||
− | * '''currentDesktopChanged(int desktop)''' | + | * '''currentDesktopChanged(int desktop, KWin::Client *client)''' |
* '''clientAdded(KWin::Client *client)''' | * '''clientAdded(KWin::Client *client)''' | ||
* '''clientRemoved(KWin::Client *client)''' | * '''clientRemoved(KWin::Client *client)''' | ||
Line 51: | Line 83: | ||
* '''clientFullScreenSet(KWin::Client *client, bool fullScreen, bool user)''' | * '''clientFullScreenSet(KWin::Client *client, bool fullScreen, bool user)''' | ||
* '''clientSetKeepAbove(KWin::Client *client, bool keepAbove)''' | * '''clientSetKeepAbove(KWin::Client *client, bool keepAbove)''' | ||
− | * '''numberDesktopsChanged( | + | * '''numberDesktopsChanged(uint oldNumberOfDesktops)''': Signal emitted whenever the number of desktops changed. To get the current number of desktops use the property desktops. |
− | * '''clientDemandsAttentionChanged(KWin::Client *client, bool set)''': The demands attention state for Client c changed to set. c The Client for which demands attention changed set New value of demands attention | + | |
− | * '''numberScreensChanged(int count)''': Signal emitted when the number of screens changes. count The new number of screens | + | oldNumberOfDesktops |
+ | |||
+ | |||
+ | The previous number of desktops. | ||
+ | * '''desktopLayoutChanged()''': Signal emitted whenever the layout of virtual desktops changed. That is desktopGrid(Size/Width/Height) will have new values. 4.11 | ||
+ | * '''clientDemandsAttentionChanged(KWin::Client *client, bool set)''': The demands attention state for Client c changed to set. | ||
+ | |||
+ | c | ||
+ | |||
+ | |||
+ | The Client for which demands attention changed | ||
+ | |||
+ | |||
+ | |||
+ | set | ||
+ | |||
+ | |||
+ | New value of demands attention | ||
+ | * '''numberScreensChanged(int count)''': Signal emitted when the number of screens changes. | ||
+ | |||
+ | count | ||
+ | |||
+ | |||
+ | The new number of screens | ||
* '''screenResized(int screen)''': This signal is emitted when the size of screen changes. Don't forget to fetch an updated client area. | * '''screenResized(int screen)''': This signal is emitted when the size of screen changes. Don't forget to fetch an updated client area. | ||
+ | * '''currentActivityChanged(const QString &id)''': Signal emitted whenever the current activity changed. | ||
+ | |||
+ | id | ||
+ | |||
+ | |||
+ | id of the new activity | ||
+ | * '''activitiesChanged(const QString &id)''': Signal emitted whenever the list of activities changed. | ||
+ | |||
+ | id | ||
+ | |||
+ | |||
+ | id of the new activity | ||
+ | * '''activityAdded(const QString &id)''': This signal is emitted when a new activity is added | ||
+ | |||
+ | id | ||
+ | |||
+ | |||
+ | id of the new activity | ||
+ | * '''activityRemoved(const QString &id)''': This signal is emitted when the activity is removed | ||
+ | |||
+ | id | ||
+ | |||
+ | |||
+ | id of the removed activity | ||
=== Functions === | === Functions === | ||
Line 114: | Line 193: | ||
* '''hideOutline()''': Hides the outline previously shown by showOutline. | * '''hideOutline()''': Hides the outline previously shown by showOutline. | ||
* ''QList< KWin::Client * >'' '''clientList() const ''': List of Clients currently managed by KWin. | * ''QList< KWin::Client * >'' '''clientList() const ''': List of Clients currently managed by KWin. | ||
− | * ''QRect'' '''clientArea(ClientAreaOption option, int screen, int desktop) const ''': Returns the geometry a Client can use with the specified option. This method should be preferred over other methods providing screen sizes as the various options take constraints such as struts set on panels into account. This method is also multi screen aware, but there are also options to get full areas. option The type of area which should be considered screen The screen for which the area should be considered desktop The desktop for which the area should be considered, in general there should not be a difference The specified screen geometry | + | * ''QRect'' '''clientArea(ClientAreaOption option, int screen, int desktop) const ''': Returns the geometry a Client can use with the specified option. This method should be preferred over other methods providing screen sizes as the various options take constraints such as struts set on panels into account. This method is also multi screen aware, but there are also options to get full areas. |
− | * ''QRect'' '''clientArea(ClientAreaOption option, const QPoint &point, int desktop) const ''': Overloaded method for convenience. option The type of area which should be considered point The coordinates which have to be included in the area desktop The desktop for which the area should be considered, in general there should not be a difference The specified screen geometry | + | |
− | * ''QRect'' '''clientArea(ClientAreaOption option, const KWin::Client *client) const ''': Overloaded method for convenience. client The Client for which the area should be retrieved The specified screen geometry | + | option |
+ | |||
+ | |||
+ | The type of area which should be considered | ||
+ | |||
+ | |||
+ | |||
+ | screen | ||
+ | |||
+ | |||
+ | The screen for which the area should be considered | ||
+ | |||
+ | |||
+ | |||
+ | desktop | ||
+ | |||
+ | |||
+ | The desktop for which the area should be considered, in general there should not be a difference | ||
+ | |||
+ | |||
+ | The specified screen geometry | ||
+ | * ''QRect'' '''clientArea(ClientAreaOption option, const QPoint &point, int desktop) const ''': Overloaded method for convenience. | ||
+ | |||
+ | option | ||
+ | |||
+ | |||
+ | The type of area which should be considered | ||
+ | |||
+ | |||
+ | |||
+ | point | ||
+ | |||
+ | |||
+ | The coordinates which have to be included in the area | ||
+ | |||
+ | |||
+ | |||
+ | desktop | ||
+ | |||
+ | |||
+ | The desktop for which the area should be considered, in general there should not be a difference | ||
+ | |||
+ | |||
+ | The specified screen geometry | ||
+ | * ''QRect'' '''clientArea(ClientAreaOption option, const KWin::Client *client) const ''': Overloaded method for convenience. | ||
+ | |||
+ | client | ||
+ | |||
+ | |||
+ | The Client for which the area should be retrieved | ||
+ | |||
+ | |||
+ | The specified screen geometry | ||
* ''QString'' '''desktopName(int desktop) const ''': Returns the name for the given desktop. | * ''QString'' '''desktopName(int desktop) const ''': Returns the name for the given desktop. | ||
* ''QString'' '''supportInformation() const ''': Provides support information about the currently running KWin instance. | * ''QString'' '''supportInformation() const ''': Provides support information about the currently running KWin instance. | ||
+ | * ''KWin::Client *'' '''getClient(qulonglong windowId)''': Finds the Client with the given windowId. | ||
+ | |||
+ | windowId | ||
+ | |||
+ | |||
+ | The window Id of the Client | ||
+ | |||
+ | |||
+ | The found Client or null | ||
Line 124: | Line 264: | ||
'''Inherits:''' KDecorationOptions | '''Inherits:''' KDecorationOptions | ||
+ | === Enums === | ||
+ | |||
+ | ==== FocusPolicy ==== | ||
+ | |||
+ | * '''ClickToFocus''': | ||
+ | * '''FocusFollowsMouse''': | ||
+ | * '''FocusUnderMouse''': | ||
+ | * '''FocusStrictlyUnderMouse''': | ||
+ | ==== MouseCommand ==== | ||
+ | |||
+ | * '''MouseRaise''': | ||
+ | * '''MouseLower''': | ||
+ | * '''MouseOperationsMenu''': | ||
+ | * '''MouseToggleRaiseAndLower''': | ||
+ | * '''MouseActivateAndRaise''': | ||
+ | * '''MouseActivateAndLower''': | ||
+ | * '''MouseActivate''': | ||
+ | * '''MouseActivateRaiseAndPassClick''': | ||
+ | * '''MouseActivateAndPassClick''': | ||
+ | * '''MouseMove''': | ||
+ | * '''MouseUnrestrictedMove''': | ||
+ | * '''MouseActivateRaiseAndMove''': | ||
+ | * '''MouseActivateRaiseAndUnrestrictedMove''': | ||
+ | * '''MouseResize''': | ||
+ | * '''MouseUnrestrictedResize''': | ||
+ | * '''MouseShade''': | ||
+ | * '''MouseSetShade''': | ||
+ | * '''MouseUnsetShade''': | ||
+ | * '''MouseMaximize''': | ||
+ | * '''MouseRestore''': | ||
+ | * '''MouseMinimize''': | ||
+ | * '''MouseNextDesktop''': | ||
+ | * '''MousePreviousDesktop''': | ||
+ | * '''MouseAbove''': | ||
+ | * '''MouseBelow''': | ||
+ | * '''MouseOpacityMore''': | ||
+ | * '''MouseOpacityLess''': | ||
+ | * '''MouseClose''': | ||
+ | * '''MousePreviousTab''': | ||
+ | * '''MouseNextTab''': | ||
+ | * '''MouseDragTab''': | ||
+ | * '''MouseNothing''': | ||
+ | ==== MouseWheelCommand ==== | ||
+ | |||
+ | * '''MouseWheelRaiseLower''': | ||
+ | * '''MouseWheelShadeUnshade''': | ||
+ | * '''MouseWheelMaximizeRestore''': | ||
+ | * '''MouseWheelAboveBelow''': | ||
+ | * '''MouseWheelPreviousNextDesktop''': | ||
+ | * '''MouseWheelChangeOpacity''': | ||
+ | * '''MouseWheelChangeCurrentTab''': | ||
+ | * '''MouseWheelNothing''': | ||
+ | ==== GlSwapStrategy ==== | ||
+ | |||
+ | * '''NoSwapEncourage''': | ||
+ | * '''CopyFrontBuffer''': | ||
+ | * '''PaintFullScreen''': | ||
+ | * '''ExtendDamage''': | ||
+ | * '''AutoSwapStrategy''': | ||
=== Read-only Properties === | === Read-only Properties === | ||
* ''bool'' '''focusPolicyIsReasonable''' | * ''bool'' '''focusPolicyIsReasonable''' | ||
− | |||
=== Read-write Properties === | === Read-write Properties === | ||
Line 138: | Line 336: | ||
* ''bool'' '''shadeHover''': Whether shade hover is enabled or not | * ''bool'' '''shadeHover''': Whether shade hover is enabled or not | ||
* ''int'' '''shadeHoverInterval''': shade hover interval | * ''int'' '''shadeHoverInterval''': shade hover interval | ||
− | |||
− | |||
− | |||
* ''bool'' '''separateScreenFocus''': whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) | * ''bool'' '''separateScreenFocus''': whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) | ||
− | |||
* ''int'' '''placement''' | * ''int'' '''placement''' | ||
* ''int'' '''borderSnapZone''': the size of the zone that triggers snapping on desktop borders | * ''int'' '''borderSnapZone''': the size of the zone that triggers snapping on desktop borders | ||
Line 168: | Line 362: | ||
* ''uint'' '''keyCmdAllModKey''' | * ''uint'' '''keyCmdAllModKey''' | ||
* ''bool'' '''showGeometryTip''': whether the Geometry Tip should be shown during a window move/resize. | * ''bool'' '''showGeometryTip''': whether the Geometry Tip should be shown during a window move/resize. | ||
− | * '' | + | * ''bool'' '''condensedTitle''': whether the visible name should be condensed |
− | + | ||
− | + | ||
* ''bool'' '''electricBorderMaximize''': Whether a window gets maximized when it reaches top screen edge while being moved. | * ''bool'' '''electricBorderMaximize''': Whether a window gets maximized when it reaches top screen edge while being moved. | ||
* ''bool'' '''electricBorderTiling''': Whether a window is tiled to half screen when reaching left or right screen edge while been moved | * ''bool'' '''electricBorderTiling''': Whether a window is tiled to half screen when reaching left or right screen edge while been moved | ||
+ | * ''float'' '''electricBorderCornerRatio''': Whether a window is tiled to half screen when reaching left or right screen edge while been moved | ||
* ''bool'' '''borderlessMaximizedWindows''' | * ''bool'' '''borderlessMaximizedWindows''' | ||
* ''int'' '''killPingTimeout''': timeout before non-responding application will be killed after attempt to close | * ''int'' '''killPingTimeout''': timeout before non-responding application will be killed after attempt to close | ||
Line 185: | Line 378: | ||
* ''bool'' '''unredirectFullscreen''' | * ''bool'' '''unredirectFullscreen''' | ||
* ''int'' '''glSmoothScale''': 0 = no, 1 = yes when transformed, 2 = try trilinear when transformed; else 1, -1 = auto | * ''int'' '''glSmoothScale''': 0 = no, 1 = yes when transformed, 2 = try trilinear when transformed; else 1, -1 = auto | ||
− | * ''bool'' ''' | + | * ''bool'' '''colorCorrected''' |
* ''bool'' '''xrenderSmoothScale''' | * ''bool'' '''xrenderSmoothScale''' | ||
− | * '' | + | * ''qint64'' '''maxFpsInterval''' |
* ''uint'' '''refreshRate''' | * ''uint'' '''refreshRate''' | ||
+ | * ''qint64'' '''vBlankTime''' | ||
* ''bool'' '''glDirect''' | * ''bool'' '''glDirect''' | ||
* ''bool'' '''glStrictBinding''' | * ''bool'' '''glStrictBinding''' | ||
+ | * ''bool'' '''glStrictBindingFollowsDriver''': Whether strict binding follows the driver or has been overwritten by a user defined config value. If true is set by the OpenGL Scene during initialization. If false glStrictBinding is set from a config value and not updated during scene initialization. | ||
+ | * ''bool'' '''glLegacy''': Whether legacy OpenGL should be used or OpenGL (ES) 2 | ||
+ | * ''bool'' '''glCoreProfile''' | ||
+ | * ''GlSwapStrategy'' '''glPreferBufferSwap''' | ||
=== Signals === | === Signals === | ||
Line 202: | Line 400: | ||
* '''shadeHoverChanged()''' | * '''shadeHoverChanged()''' | ||
* '''shadeHoverIntervalChanged()''' | * '''shadeHoverIntervalChanged()''' | ||
− | + | * '''separateScreenFocusChanged(bool)''' | |
− | + | ||
− | + | ||
− | * '''separateScreenFocusChanged( | + | |
− | + | ||
* '''placementChanged()''' | * '''placementChanged()''' | ||
* '''borderSnapZoneChanged()''' | * '''borderSnapZoneChanged()''' | ||
Line 213: | Line 407: | ||
* '''snapOnlyWhenOverlappingChanged()''' | * '''snapOnlyWhenOverlappingChanged()''' | ||
* '''showDesktopIsMinimizeAllChanged()''' | * '''showDesktopIsMinimizeAllChanged()''' | ||
− | * '''rollOverDesktopsChanged()''' | + | * '''rollOverDesktopsChanged(bool enabled)''' |
* '''focusStealingPreventionLevelChanged()''' | * '''focusStealingPreventionLevelChanged()''' | ||
* '''legacyFullscreenSupportChanged()''' | * '''legacyFullscreenSupportChanged()''' | ||
Line 232: | Line 426: | ||
* '''keyCmdAllModKeyChanged()''' | * '''keyCmdAllModKeyChanged()''' | ||
* '''showGeometryTipChanged()''' | * '''showGeometryTipChanged()''' | ||
− | * ''' | + | * '''condensedTitleChanged()''' |
− | + | ||
− | + | ||
− | + | ||
* '''electricBorderMaximizeChanged()''' | * '''electricBorderMaximizeChanged()''' | ||
* '''electricBorderTilingChanged()''' | * '''electricBorderTilingChanged()''' | ||
+ | * '''electricBorderCornerRatioChanged()''' | ||
* '''borderlessMaximizedWindowsChanged()''' | * '''borderlessMaximizedWindowsChanged()''' | ||
* '''killPingTimeoutChanged()''' | * '''killPingTimeoutChanged()''' | ||
Line 250: | Line 442: | ||
* '''unredirectFullscreenChanged()''' | * '''unredirectFullscreenChanged()''' | ||
* '''glSmoothScaleChanged()''' | * '''glSmoothScaleChanged()''' | ||
− | * ''' | + | * '''colorCorrectedChanged()''' |
* '''xrenderSmoothScaleChanged()''' | * '''xrenderSmoothScaleChanged()''' | ||
* '''maxFpsIntervalChanged()''' | * '''maxFpsIntervalChanged()''' | ||
* '''refreshRateChanged()''' | * '''refreshRateChanged()''' | ||
+ | * '''vBlankTimeChanged()''' | ||
* '''glDirectChanged()''' | * '''glDirectChanged()''' | ||
* '''glStrictBindingChanged()''' | * '''glStrictBindingChanged()''' | ||
+ | * '''glStrictBindingFollowsDriverChanged()''' | ||
+ | * '''glLegacyChanged()''' | ||
+ | * '''glCoreProfileChanged()''' | ||
+ | * '''glPreferBufferSwapChanged()''' | ||
=== Functions === | === Functions === | ||
+ | * '''setColorCorrected(bool colorCorrected=false)''' | ||
Line 268: | Line 466: | ||
* ''qulonglong'' '''frameId''' | * ''qulonglong'' '''frameId''' | ||
* ''QRect'' '''geometry''' | * ''QRect'' '''geometry''' | ||
+ | * ''QRect'' '''visibleRect''' | ||
* ''int'' '''height''' | * ''int'' '''height''' | ||
* ''QPoint'' '''pos''' | * ''QPoint'' '''pos''' | ||
Line 277: | Line 476: | ||
* ''int'' '''y''' | * ''int'' '''y''' | ||
* ''int'' '''desktop''' | * ''int'' '''desktop''' | ||
+ | * ''bool'' '''onAllDesktops''': Whether the window is on all desktops. That is desktop is -1. | ||
* ''QRect'' '''rect''' | * ''QRect'' '''rect''' | ||
* ''QPoint'' '''clientPos''' | * ''QPoint'' '''clientPos''' | ||
Line 312: | Line 512: | ||
* '''geometryChanged()''' | * '''geometryChanged()''' | ||
* '''geometryShapeChanged(KWin::Toplevel *toplevel, const QRect &old)''' | * '''geometryShapeChanged(KWin::Toplevel *toplevel, const QRect &old)''' | ||
+ | * '''paddingChanged(KWin::Toplevel *toplevel, const QRect &old)''' | ||
* '''windowClosed(KWin::Toplevel *toplevel, KWin::Deleted *deleted)''' | * '''windowClosed(KWin::Toplevel *toplevel, KWin::Deleted *deleted)''' | ||
* '''windowShown(KWin::Toplevel *toplevel)''' | * '''windowShown(KWin::Toplevel *toplevel)''' | ||
* '''shapedChanged()''': Signal emitted when the window's shape state changed. That is if it did not have a shape and received one or if the shape was withdrawn. Think of Chromium enabling/disabling KWin's decoration. | * '''shapedChanged()''': Signal emitted when the window's shape state changed. That is if it did not have a shape and received one or if the shape was withdrawn. Think of Chromium enabling/disabling KWin's decoration. | ||
+ | * '''needsRepaint()''': Emitted whenever the state changes in a way, that the Compositor should schedule a repaint of the scene. | ||
+ | * '''activitiesChanged(KWin::Toplevel *toplevel)''' | ||
+ | * '''screenChanged()''': Emitted whenever the Toplevel's screen changes. This can happen either in consequence to a screen being removed/added or if the Toplevel's geometry changes. 4.11 | ||
=== Functions === | === Functions === | ||
Line 329: | Line 533: | ||
The Client class encapsulates a window decoration frame. | The Client class encapsulates a window decoration frame. | ||
'''Inherits:''' KWin::Toplevel | '''Inherits:''' KWin::Toplevel | ||
+ | === Enums === | ||
+ | |||
+ | ==== Sizemode ==== | ||
+ | |||
+ | * '''SizemodeAny''': | ||
+ | * '''SizemodeFixedW''': | ||
+ | * '''SizemodeFixedH''': | ||
+ | * '''SizemodeMax''': | ||
+ | ==== CoordinateMode ==== | ||
+ | |||
+ | * '''DecorationRelative''': | ||
+ | * '''WindowRelative''': | ||
=== Read-only Properties === | === Read-only Properties === | ||
Line 352: | Line 568: | ||
* ''bool'' '''wantsInput''': Whether the Client can accept keyboard focus. The value is evaluated each time the getter is called. Because of that no changed signal is provided. | * ''bool'' '''wantsInput''': Whether the Client can accept keyboard focus. The value is evaluated each time the getter is called. Because of that no changed signal is provided. | ||
* ''QPixmap'' '''icon''' | * ''QPixmap'' '''icon''' | ||
+ | * ''KWin::TabGroup'' '''tabGroup''': The "Window Tabs" Group this Client belongs to. | ||
* ''bool'' '''isCurrentTab''': Whether this Client is the currently visible Client in its Client Group (Window Tabs). For change connect to the visibleChanged signal on the Client's Group. | * ''bool'' '''isCurrentTab''': Whether this Client is the currently visible Client in its Client Group (Window Tabs). For change connect to the visibleChanged signal on the Client's Group. | ||
* ''QSize'' '''minSize''': Minimum size as specified in WM_NORMAL_HINTS | * ''QSize'' '''minSize''': Minimum size as specified in WM_NORMAL_HINTS | ||
* ''QSize'' '''maxSize''': Maximum size as specified in WM_NORMAL_HINTS | * ''QSize'' '''maxSize''': Maximum size as specified in WM_NORMAL_HINTS | ||
+ | * ''bool'' '''decorationHasAlpha''': Whether the decoration is currently using an alpha channel. | ||
=== Read-write Properties === | === Read-write Properties === | ||
* ''int'' '''desktop''': The desktop this Client is on. If the Client is on all desktops the property has value -1.Returns the virtual desktop within the workspace() the client window is located in, 0 if it isn't located on any special desktop (not mapped yet), or NET::OnAllDesktops. Do not use desktop() directly, use isOnDesktop() instead. | * ''int'' '''desktop''': The desktop this Client is on. If the Client is on all desktops the property has value -1.Returns the virtual desktop within the workspace() the client window is located in, 0 if it isn't located on any special desktop (not mapped yet), or NET::OnAllDesktops. Do not use desktop() directly, use isOnDesktop() instead. | ||
+ | * ''bool'' '''onAllDesktops''': Whether the Client is on all desktops. That is desktop is -1. | ||
* ''bool'' '''fullScreen''': Whether this Client is fullScreen. A Client might either be fullScreen due to the _NET_WM property or through a legacy support hack. The fullScreen state can only be changed if the Client does not use the legacy hack. To be sure whether the state changed, connect to the notify signal. | * ''bool'' '''fullScreen''': Whether this Client is fullScreen. A Client might either be fullScreen due to the _NET_WM property or through a legacy support hack. The fullScreen state can only be changed if the Client does not use the legacy hack. To be sure whether the state changed, connect to the notify signal. | ||
* ''QRect'' '''geometry''': The geometry of this Client. Be aware that depending on resize mode the geometryChanged signal might be emitted at each resize step or only at the end of the resize operation. | * ''QRect'' '''geometry''': The geometry of this Client. Be aware that depending on resize mode the geometryChanged signal might be emitted at each resize step or only at the end of the resize operation. | ||
Line 388: | Line 607: | ||
* '''modalChanged()''' | * '''modalChanged()''' | ||
* '''shadeChanged()''' | * '''shadeChanged()''' | ||
− | * '''keepAboveChanged()''' | + | * '''keepAboveChanged(bool)''' |
− | * '''keepBelowChanged()''' | + | * '''keepBelowChanged(bool)''' |
* '''minimizedChanged()''' | * '''minimizedChanged()''' | ||
* '''moveResizedChanged()''' | * '''moveResizedChanged()''' | ||
Line 397: | Line 616: | ||
* '''skipPagerChanged()''' | * '''skipPagerChanged()''' | ||
* '''tabGroupChanged()''': Emitted whenever the Client's TabGroup changed. That is whenever the Client is moved to another group, but not when a Client gets added or removed to the Client's ClientGroup. | * '''tabGroupChanged()''': Emitted whenever the Client's TabGroup changed. That is whenever the Client is moved to another group, but not when a Client gets added or removed to the Client's ClientGroup. | ||
+ | * '''showRequest()''': Emitted whenever the Client want to show it menu | ||
+ | * '''menuHidden()''': Emitted whenever the Client's menu is closed | ||
+ | * '''appMenuAvailable()''': Emitted whenever the Client's menu is available | ||
+ | * '''appMenuUnavailable()''': Emitted whenever the Client's menu is unavailable | ||
* '''demandsAttentionChanged()''': Emitted whenever the demands attention state changes. | * '''demandsAttentionChanged()''': Emitted whenever the demands attention state changes. | ||
− | * '''blockingCompositingChanged()''': Emitted whenever the Client's block compositing state changes. | + | * '''blockingCompositingChanged(KWin::Client *client)''': Emitted whenever the Client's block compositing state changes. |
=== Functions === | === Functions === | ||
* '''closeWindow()''': Closes the window by either sending a delete_window message or using XKill. | * '''closeWindow()''': Closes the window by either sending a delete_window message or using XKill. | ||
+ | * '''updateCaption()''' | ||
* ''bool'' '''tabBefore(Client *other, bool activate)''' | * ''bool'' '''tabBefore(Client *other, bool activate)''' | ||
* ''bool'' '''tabBehind(Client *other, bool activate)''' | * ''bool'' '''tabBehind(Client *other, bool activate)''' | ||
− | * ''bool'' '''untab(const QRect &toGeometry=QRect())''' | + | * '''syncTabGroupFor(QString property, bool fromThisClient=false)''': Syncs the dynamic property fromThisClient or the to all members of the tabGroup() (if there is one) eg. if you call: client->setProperty("kwin_tiling_floats", true); client->syncTabGroupFor("kwin_tiling_floats", true) all clients in this tabGroup will have ::property("kwin_tiling_floats").toBool() == true WARNING: non dynamic properties are ignored - you're not supposed to alter/update such explicitly |
+ | * ''bool'' '''untab(const QRect &toGeometry=QRect(), bool clientRemoved=false)''' |
Methods and properties added to the global JavaScript object.
oldNumberOfDesktops
The previous number of desktops.
c
The Client for which demands attention changed
set
New value of demands attention
count
The new number of screens
id
id of the new activity
id
id of the new activity
id
id of the new activity
id
id of the removed activity
option
The type of area which should be considered
screen
The screen for which the area should be considered
desktop
The desktop for which the area should be considered, in general there should not be a difference
The specified screen geometry
option
The type of area which should be considered
point
The coordinates which have to be included in the area
desktop
The desktop for which the area should be considered, in general there should not be a difference
The specified screen geometry
client
The Client for which the area should be retrieved
The specified screen geometry
windowId
The window Id of the Client
The found Client or null
Inherits: KDecorationOptions
Inherits: KDecorationDefines
The Client class encapsulates a window decoration frame. Inherits: KWin::Toplevel