Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwineffects.h
Show First 20 Lines • Show All 928 Lines • ▼ Show 20 Line(s) | 820 | public: | |||
---|---|---|---|---|---|
929 | **/ | 929 | **/ | ||
930 | virtual void unregisterTouchBorder(ElectricBorder border, QAction *action) = 0; | 930 | virtual void unregisterTouchBorder(ElectricBorder border, QAction *action) = 0; | ||
931 | 931 | | |||
932 | // functions that allow controlling windows/desktop | 932 | // functions that allow controlling windows/desktop | ||
933 | virtual void activateWindow(KWin::EffectWindow* c) = 0; | 933 | virtual void activateWindow(KWin::EffectWindow* c) = 0; | ||
934 | virtual KWin::EffectWindow* activeWindow() const = 0 ; | 934 | virtual KWin::EffectWindow* activeWindow() const = 0 ; | ||
935 | Q_SCRIPTABLE virtual void moveWindow(KWin::EffectWindow* w, const QPoint& pos, bool snap = false, double snapAdjust = 1.0) = 0; | 935 | Q_SCRIPTABLE virtual void moveWindow(KWin::EffectWindow* w, const QPoint& pos, bool snap = false, double snapAdjust = 1.0) = 0; | ||
936 | Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow* w, int desktop) = 0; | 936 | Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow* w, int desktop) = 0; | ||
937 | /** | ||||
938 | * Removes a window from a desktop on wayland, no-op on X11 | ||||
939 | */ | ||||
940 | Q_SCRIPTABLE void removeWindowFromDesktop(KWin::EffectWindow* w, int desktop); | ||||
937 | Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0; | 941 | Q_SCRIPTABLE virtual void windowToScreen(KWin::EffectWindow* w, int screen) = 0; | ||
938 | virtual void setShowingDesktop(bool showing) = 0; | 942 | virtual void setShowingDesktop(bool showing) = 0; | ||
939 | 943 | | |||
940 | 944 | | |||
941 | // Activities | 945 | // Activities | ||
942 | /** | 946 | /** | ||
943 | * @returns The ID of the current activity. | 947 | * @returns The ID of the current activity. | ||
944 | */ | 948 | */ | ||
945 | virtual QString currentActivity() const = 0; | 949 | virtual QString currentActivity() const = 0; | ||
946 | // Desktops | 950 | // Desktops | ||
947 | /** | 951 | /** | ||
948 | * @returns The ID of the current desktop. | 952 | * @returns The ID of the current desktop. | ||
949 | */ | 953 | */ | ||
950 | virtual int currentDesktop() const = 0; | 954 | virtual int currentDesktop() const = 0; | ||
951 | /** | 955 | /** | ||
952 | * @returns Total number of desktops currently in existence. | 956 | * @returns Total number of desktops currently in existence. | ||
953 | */ | 957 | */ | ||
954 | virtual int numberOfDesktops() const = 0; | 958 | virtual int numberOfDesktops() const = 0; | ||
955 | /** | 959 | /** | ||
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… | |||||
956 | * Set the current desktop to @a desktop. | 960 | * Set the current desktop to @a desktop. | ||
957 | */ | 961 | */ | ||
958 | virtual void setCurrentDesktop(int desktop) = 0; | 962 | virtual void setCurrentDesktop(int desktop) = 0; | ||
959 | /** | 963 | /** | ||
960 | * Sets the total number of desktops to @a desktops. | 964 | * Sets the total number of desktops to @a desktops. | ||
961 | */ | 965 | */ | ||
962 | virtual void setNumberOfDesktops(int desktops) = 0; | 966 | virtual void setNumberOfDesktops(int desktops) = 0; | ||
963 | /** | 967 | /** | ||
▲ Show 20 Lines • Show All 1021 Lines • ▼ Show 20 Line(s) | 1952 | public: | |||
1985 | bool isOnCurrentActivity() const; | 1989 | bool isOnCurrentActivity() const; | ||
1986 | Q_SCRIPTABLE bool isOnActivity(QString id) const; | 1990 | Q_SCRIPTABLE bool isOnActivity(QString id) const; | ||
1987 | bool isOnAllActivities() const; | 1991 | bool isOnAllActivities() const; | ||
1988 | QStringList activities() const; | 1992 | QStringList activities() const; | ||
1989 | 1993 | | |||
1990 | bool isOnDesktop(int d) const; | 1994 | bool isOnDesktop(int d) const; | ||
1991 | bool isOnCurrentDesktop() const; | 1995 | bool isOnCurrentDesktop() const; | ||
1992 | bool isOnAllDesktops() const; | 1996 | bool isOnAllDesktops() const; | ||
1993 | int desktop() const; // prefer isOnXXX() | 1997 | /** | ||
1998 | * The desktop this window is in. This mkaes sense only on X11 | ||||
1999 | * where desktops are mutually exclusive, on Wayland it's the last | ||||
2000 | * desktop the window has been added to. | ||||
2001 | * use desktops() instead. | ||||
2002 | * @see desktops() | ||||
2003 | * @deprecated | ||||
2004 | */ | ||||
2005 | #ifndef KWIN_NO_DEPRECATED | ||||
2006 | int KWIN_DEPRECATED desktop() const; // prefer isOnXXX() | ||||
2007 | #endif | ||||
2008 | /** | ||||
2009 | * All the desktops by number that the window is in. On X11 this list will always have | ||||
2010 | * a length of 1, on Wayland can be any subset. | ||||
2011 | * If the list is empty it means the window is on all desktops | ||||
2012 | */ | ||||
2013 | QList<int> desktops() const; | ||||
1994 | 2014 | | |||
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… | |||||
1995 | int x() const; | 2015 | int x() const; | ||
1996 | int y() const; | 2016 | int y() const; | ||
1997 | int width() const; | 2017 | int width() const; | ||
1998 | int height() const; | 2018 | int height() const; | ||
1999 | /** | 2019 | /** | ||
2000 | * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). | 2020 | * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). | ||
2001 | * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. | 2021 | * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. | ||
2002 | */ | 2022 | */ | ||
▲ Show 20 Lines • Show All 1503 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.