Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwineffects.h
Show First 20 Lines • Show All 938 Lines • ▼ Show 20 Line(s) | 830 | public: | |||
---|---|---|---|---|---|
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 | Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow* w, int desktop) = 0; | 946 | Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow* w, int desktop) = 0; | ||
947 | /** | ||||
948 | * Removes a window from a desktop on wayland, no-op on X11 | ||||
949 | */ | ||||
950 | Q_SCRIPTABLE void removeWindowFromDesktop(KWin::EffectWindow* w, int desktop); | ||||
947 | Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0; | 951 | Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0; | ||
948 | virtual void setShowingDesktop(bool showing) = 0; | 952 | virtual void setShowingDesktop(bool showing) = 0; | ||
949 | 953 | | |||
950 | 954 | | |||
951 | // Activities | 955 | // Activities | ||
952 | /** | 956 | /** | ||
953 | * @returns The ID of the current activity. | 957 | * @returns The ID of the current activity. | ||
954 | */ | 958 | */ | ||
955 | virtual QString currentActivity() const = 0; | 959 | virtual QString currentActivity() const = 0; | ||
956 | // Desktops | 960 | // Desktops | ||
957 | /** | 961 | /** | ||
958 | * @returns The ID of the current desktop. | 962 | * @returns The ID of the current desktop. | ||
959 | */ | 963 | */ | ||
960 | virtual int currentDesktop() const = 0; | 964 | virtual int currentDesktop() const = 0; | ||
961 | /** | 965 | /** | ||
962 | * @returns Total number of desktops currently in existence. | 966 | * @returns Total number of desktops currently in existence. | ||
963 | */ | 967 | */ | ||
964 | virtual int numberOfDesktops() const = 0; | 968 | virtual int numberOfDesktops() const = 0; | ||
965 | /** | 969 | /** | ||
davidedmundson: Kwin effects are supposedly ABI stable.
We'll need a bodge.
For the EffectWindow it's best… | |||||
i think i don't really need this function now i got back to just use numbers here.. mart: i think i don't really need this function now i got back to just use numbers here..
However… | |||||
will go trugh the property for now, and in the future we'll switch to the giand private class filled with virtuals mart: will go trugh the property for now, and in the future we'll switch to the giand private class… | |||||
966 | * Set the current desktop to @a desktop. | 970 | * Set the current desktop to @a desktop. | ||
967 | */ | 971 | */ | ||
968 | virtual void setCurrentDesktop(int desktop) = 0; | 972 | virtual void setCurrentDesktop(int desktop) = 0; | ||
969 | /** | 973 | /** | ||
970 | * Sets the total number of desktops to @a desktops. | 974 | * Sets the total number of desktops to @a desktops. | ||
971 | */ | 975 | */ | ||
972 | virtual void setNumberOfDesktops(int desktops) = 0; | 976 | virtual void setNumberOfDesktops(int desktops) = 0; | ||
973 | /** | 977 | /** | ||
▲ Show 20 Lines • Show All 1092 Lines • ▼ Show 20 Line(s) | 2033 | public: | |||
2066 | bool isOnCurrentActivity() const; | 2070 | bool isOnCurrentActivity() const; | ||
2067 | Q_SCRIPTABLE bool isOnActivity(QString id) const; | 2071 | Q_SCRIPTABLE bool isOnActivity(QString id) const; | ||
2068 | bool isOnAllActivities() const; | 2072 | bool isOnAllActivities() const; | ||
2069 | QStringList activities() const; | 2073 | QStringList activities() const; | ||
2070 | 2074 | | |||
2071 | Q_SCRIPTABLE bool isOnDesktop(int d) const; | 2075 | Q_SCRIPTABLE bool isOnDesktop(int d) const; | ||
2072 | bool isOnCurrentDesktop() const; | 2076 | bool isOnCurrentDesktop() const; | ||
2073 | bool isOnAllDesktops() const; | 2077 | bool isOnAllDesktops() const; | ||
2074 | int desktop() const; // prefer isOnXXX() | 2078 | /** | ||
2079 | * The desktop this window is in. This mkaes sense only on X11 | ||||
2080 | * where desktops are mutually exclusive, on Wayland it's the last | ||||
2081 | * desktop the window has been added to. | ||||
2082 | * use desktops() instead. | ||||
2083 | * @see desktops() | ||||
2084 | * @deprecated | ||||
2085 | */ | ||||
2086 | #ifndef KWIN_NO_DEPRECATED | ||||
2087 | int KWIN_DEPRECATED desktop() const; // prefer isOnXXX() | ||||
2088 | #endif | ||||
2089 | /** | ||||
2090 | * 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. | ||||
2092 | * If the list is empty it means the window is on all desktops | ||||
2093 | */ | ||||
2094 | QList<int> desktops() const; | ||||
2075 | 2095 | | |||
It would be great to add a comment describing what's the difference between desktop and desktops. Maybe, deprecate desktop? zzag: It would be great to add a comment describing what's the difference between `desktop` and… | |||||
2076 | int x() const; | 2096 | int x() const; | ||
2077 | int y() const; | 2097 | int y() const; | ||
2078 | int width() const; | 2098 | int width() const; | ||
2079 | int height() const; | 2099 | int height() const; | ||
2080 | /** | 2100 | /** | ||
2081 | * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). | 2101 | * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). | ||
2082 | * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. | 2102 | * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. | ||
2083 | */ | 2103 | */ | ||
▲ Show 20 Lines • Show All 1717 Lines • Show Last 20 Lines |
Kwin effects are supposedly ABI stable.
We'll need a bodge.
For the EffectWindow it's best for now to follow the pattern already used there.
parent() is a toplevel, but one that dynamically switches from a real client to a deleted.