Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwineffects.h
Show First 20 Lines • Show All 937 Lines • ▼ Show 20 Line(s) | 830 | public: | |||
---|---|---|---|---|---|
938 | * @since 5.10 | 938 | * @since 5.10 | ||
939 | **/ | 939 | **/ | ||
940 | virtual void unregisterTouchBorder(ElectricBorder border, QAction *action) = 0; | 940 | virtual void unregisterTouchBorder(ElectricBorder border, QAction *action) = 0; | ||
941 | 941 | | |||
942 | // functions that allow controlling windows/desktop | 942 | // functions that allow controlling windows/desktop | ||
943 | virtual void activateWindow(KWin::EffectWindow* c) = 0; | 943 | virtual void activateWindow(KWin::EffectWindow* c) = 0; | ||
944 | virtual KWin::EffectWindow* activeWindow() const = 0 ; | 944 | virtual KWin::EffectWindow* activeWindow() const = 0 ; | ||
945 | Q_SCRIPTABLE virtual void moveWindow(KWin::EffectWindow* w, const QPoint& pos, bool snap = false, double snapAdjust = 1.0) = 0; | 945 | Q_SCRIPTABLE virtual void moveWindow(KWin::EffectWindow* w, const QPoint& pos, bool snap = false, double snapAdjust = 1.0) = 0; | ||
946 | | ||||
947 | /** | ||||
948 | * Moves the window to the specific desktop | ||||
949 | * Setting desktop to NET::OnAllDesktops will set the window on all desktops | ||||
950 | */ | ||||
946 | Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow* w, int desktop) = 0; | 951 | Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow* w, int desktop) = 0; | ||
952 | | ||||
zzag: What's the difference between windowToDesktop and addWindowToDesktop? Deprecate it? | |||||
move rather than adding. So it's more akin to so it's not entirely useless API. davidedmundson: move rather than adding.
So it's more akin to
addWindowToDesktop(new) +… | |||||
zzag: Can you please then document what it's doing? | |||||
947 | /** | 953 | /** | ||
948 | * Removes a window from a desktop on wayland, no-op on X11 | 954 | * Moves a window to the given desktops | ||
955 | * On X11, the window will end up on the last window in the list | ||||
956 | * Setting this to an empty list will set the window on all desktops | ||||
957 | * | ||||
958 | * @arg desktopIds a list of desktops the window should be placed on. NET::OnAllDesktops is not a valid desktop X11Id | ||||
949 | */ | 959 | */ | ||
950 | Q_SCRIPTABLE void removeWindowFromDesktop(KWin::EffectWindow* w, int desktop); | 960 | Q_SCRIPTABLE virtual void windowToDesktops(KWin::EffectWindow* w, QVector<uint> desktopIds) = 0; | ||
zzag: const QVector<uint> &desktopIds | |||||
961 | | ||||
951 | Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0; | 962 | Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0; | ||
952 | virtual void setShowingDesktop(bool showing) = 0; | 963 | virtual void setShowingDesktop(bool showing) = 0; | ||
953 | 964 | | |||
954 | | ||||
955 | // Activities | 965 | // Activities | ||
956 | /** | 966 | /** | ||
957 | * @returns The ID of the current activity. | 967 | * @returns The ID of the current activity. | ||
958 | */ | 968 | */ | ||
959 | virtual QString currentActivity() const = 0; | 969 | virtual QString currentActivity() const = 0; | ||
960 | // Desktops | 970 | // Desktops | ||
961 | /** | 971 | /** | ||
962 | * @returns The ID of the current desktop. | 972 | * @returns The ID of the current desktop. | ||
▲ Show 20 Lines • Show All 1123 Lines • ▼ Show 20 Line(s) | |||||
2086 | #ifndef KWIN_NO_DEPRECATED | 2096 | #ifndef KWIN_NO_DEPRECATED | ||
2087 | int KWIN_DEPRECATED desktop() const; // prefer isOnXXX() | 2097 | int KWIN_DEPRECATED desktop() const; // prefer isOnXXX() | ||
2088 | #endif | 2098 | #endif | ||
2089 | /** | 2099 | /** | ||
2090 | * All the desktops by number that the window is in. On X11 this list will always have | 2100 | * All the desktops by number that the window is in. On X11 this list will always have | ||
2091 | * a length of 1, on Wayland can be any subset. | 2101 | * a length of 1, on Wayland can be any subset. | ||
2092 | * If the list is empty it means the window is on all desktops | 2102 | * If the list is empty it means the window is on all desktops | ||
2093 | */ | 2103 | */ | ||
2094 | QVector<int> desktops() const; | 2104 | QVector<uint> desktops() const; | ||
2095 | 2105 | | |||
2096 | int x() const; | 2106 | int x() const; | ||
2097 | int y() const; | 2107 | int y() const; | ||
2098 | int width() const; | 2108 | int width() const; | ||
2099 | int height() const; | 2109 | int height() const; | ||
2100 | /** | 2110 | /** | ||
2101 | * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). | 2111 | * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). | ||
2102 | * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. | 2112 | * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. | ||
▲ Show 20 Lines • Show All 1718 Lines • Show Last 20 Lines |
What's the difference between windowToDesktop and addWindowToDesktop? Deprecate it?