2007-11-27 19:40:25 +00:00
|
|
|
/********************************************************************
|
2007-04-29 17:35:43 +00:00
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
2007-11-27 19:40:25 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
#ifndef KWIN_BRIDGE_H
|
|
|
|
#define KWIN_BRIDGE_H
|
|
|
|
|
2008-01-26 19:00:14 +00:00
|
|
|
#include <kdecorationbridge.h>
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class Client;
|
|
|
|
|
2013-08-20 09:17:48 +00:00
|
|
|
class Bridge : public KDecorationBridge
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-12-29 06:34:38 +00:00
|
|
|
explicit Bridge(Client* cl);
|
2013-09-13 08:39:24 +00:00
|
|
|
virtual bool isActive() const override;
|
|
|
|
virtual bool isCloseable() const override;
|
|
|
|
virtual bool isMaximizable() const override;
|
|
|
|
virtual MaximizeMode maximizeMode() const override;
|
|
|
|
virtual QuickTileMode quickTileMode() const override;
|
|
|
|
virtual bool isMinimizable() const override;
|
|
|
|
virtual bool providesContextHelp() const override;
|
|
|
|
virtual int desktop() const override;
|
|
|
|
virtual bool isModal() const override;
|
|
|
|
virtual bool isShadeable() const override;
|
|
|
|
virtual bool isShade() const override;
|
|
|
|
virtual bool isSetShade() const override;
|
|
|
|
virtual bool keepAbove() const override;
|
|
|
|
virtual bool keepBelow() const override;
|
|
|
|
virtual bool isMovable() const override;
|
|
|
|
virtual bool isResizable() const override;
|
|
|
|
virtual NET::WindowType windowType(unsigned long supported_types) const override;
|
|
|
|
virtual QIcon icon() const override;
|
|
|
|
virtual QString caption() const override;
|
|
|
|
virtual void processMousePressEvent(QMouseEvent*) override;
|
|
|
|
virtual void showWindowMenu(const QPoint &) override;
|
|
|
|
virtual void showWindowMenu(const QRect &) override;
|
|
|
|
virtual void showApplicationMenu(const QPoint &) override;
|
|
|
|
virtual bool menuAvailable() const override;
|
|
|
|
virtual void performWindowOperation(WindowOperation) override;
|
|
|
|
virtual void setMask(const QRegion&, int) override;
|
|
|
|
virtual bool isPreview() const override;
|
|
|
|
virtual QRect geometry() const override;
|
|
|
|
virtual QRect iconGeometry() const override;
|
|
|
|
virtual QRegion unobscuredRegion(const QRegion& r) const override;
|
|
|
|
virtual WId windowId() const override;
|
|
|
|
virtual void closeWindow() override;
|
|
|
|
virtual void maximize(MaximizeMode mode) override;
|
|
|
|
virtual void minimize() override;
|
|
|
|
virtual void showContextHelp() override;
|
|
|
|
virtual void setDesktop(int desktop) override;
|
|
|
|
virtual void titlebarDblClickOperation() override;
|
|
|
|
virtual void titlebarMouseWheelOperation(int delta) override;
|
|
|
|
virtual void setShade(bool set) override;
|
|
|
|
virtual void setKeepAbove(bool) override;
|
|
|
|
virtual void setKeepBelow(bool) override;
|
|
|
|
virtual int currentDesktop() const override;
|
|
|
|
virtual Qt::WindowFlags initialWFlags() const override;
|
|
|
|
virtual void grabXServer(bool grab) override;
|
2008-10-17 10:30:43 +00:00
|
|
|
|
2013-09-13 08:39:24 +00:00
|
|
|
virtual bool compositingActive() const override;
|
|
|
|
virtual QRect transparentRect() const override;
|
2009-11-15 03:24:04 +00:00
|
|
|
|
2013-10-07 12:26:03 +00:00
|
|
|
virtual void update(const QRegion ®ion) override;
|
2013-10-14 05:21:44 +00:00
|
|
|
virtual QPalette palette() const override;
|
2013-10-07 12:26:03 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
// Window tabbing
|
2013-09-13 08:39:24 +00:00
|
|
|
virtual QString caption(int idx) const override;
|
|
|
|
virtual void closeTab(long id) override;
|
|
|
|
virtual void closeTabGroup() override;
|
|
|
|
virtual long currentTabId() const override;
|
|
|
|
virtual QIcon icon(int idx) const override;
|
|
|
|
virtual void setCurrentTab(long id) override;
|
|
|
|
virtual void showWindowMenu(const QPoint &, long id) override;
|
|
|
|
virtual void tab_A_before_B(long A, long B) override;
|
|
|
|
virtual void tab_A_behind_B(long A, long B) override;
|
|
|
|
virtual int tabCount() const override;
|
|
|
|
virtual long tabId(int idx) const override;
|
|
|
|
virtual void untab(long id, const QRect& newGeom) override;
|
2012-01-12 06:42:55 +00:00
|
|
|
|
2013-09-13 08:39:24 +00:00
|
|
|
virtual WindowOperation buttonToWindowOperation(Qt::MouseButtons button) override;
|
2009-11-15 03:24:04 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
private:
|
2012-01-12 06:42:55 +00:00
|
|
|
Client *clientForId(long id) const;
|
|
|
|
static inline long tabIdOf(Client *c) {
|
|
|
|
return reinterpret_cast<long>(c);
|
|
|
|
}
|
2011-01-30 14:34:42 +00:00
|
|
|
Client* c;
|
|
|
|
};
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|