2017-01-02 17:05:30 -05:00
/*
* Copyright 2016 Smith AR < audoban @ openmailbox . org >
* Michail Vourlakos < mvourlakos @ gmail . com >
*
* This file is part of Latte - Dock
*
* Latte - Dock 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 .
*
* Latte - Dock 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/>.
*/
# ifndef XWINDOWINTERFACE_H
2016-12-25 09:25:27 +02:00
# define XWINDOWINTERFACE_H
2016-12-29 00:37:53 -05:00
# include "abstractwindowinterface.h"
2017-02-24 21:40:47 -05:00
# include "windowinfowrap.h"
2016-12-29 00:37:53 -05:00
2016-12-25 09:25:27 +02:00
# include <QObject>
# include <KWindowInfo>
2017-02-24 21:40:47 -05:00
# include <KWindowEffects>
2016-12-25 09:25:27 +02:00
2016-12-28 22:27:55 -05:00
namespace Latte {
2016-12-25 09:25:27 +02:00
2016-12-28 22:27:55 -05:00
class XWindowInterface : public AbstractWindowInterface {
2016-12-25 09:25:27 +02:00
Q_OBJECT
2017-01-16 14:07:49 -05:00
2016-12-25 09:25:27 +02:00
public :
2017-02-24 21:40:47 -05:00
explicit XWindowInterface ( QObject * parent = nullptr ) ;
~ XWindowInterface ( ) override ;
2017-01-16 14:07:49 -05:00
2017-06-15 16:56:55 -05:00
void setDockExtraFlags ( QWindow & view ) override ;
2017-06-29 15:50:11 -05:00
void setDockStruts ( QWindow & view , const QRect & rect
2017-06-15 16:56:55 -05:00
, Plasma : : Types : : Location location ) override ;
2018-01-21 11:53:15 +02:00
void setWindowOnActivities ( QWindow & window , const QStringList & activities ) override ;
2017-03-23 00:03:45 -05:00
2017-06-15 16:56:55 -05:00
void removeDockStruts ( QWindow & view ) const override ;
2017-01-16 14:07:49 -05:00
2017-06-08 17:10:49 -05:00
WindowId activeWindow ( ) const override ;
WindowInfoWrap requestInfo ( WindowId wid ) const override ;
2017-01-02 01:04:10 -05:00
WindowInfoWrap requestInfoActive ( ) const override ;
2017-06-08 17:10:49 -05:00
bool isOnCurrentDesktop ( WindowId wid ) const override ;
2017-06-20 19:06:04 -05:00
bool isOnCurrentActivity ( WindowId wid ) const override ;
2017-06-08 17:10:49 -05:00
const std : : list < WindowId > & windows ( ) const override ;
2017-01-16 14:07:49 -05:00
2018-01-26 19:46:02 +02:00
void setKeepAbove ( const QDialog & dialog , bool above = true ) const override ;
2017-02-24 21:40:47 -05:00
void skipTaskBar ( const QDialog & dialog ) const override ;
2017-06-15 16:56:55 -05:00
void slideWindow ( QWindow & view , Slide location ) const override ;
void enableBlurBehind ( QWindow & view ) const override ;
2017-01-16 14:07:49 -05:00
2016-12-25 09:25:27 +02:00
private :
2017-01-02 01:04:10 -05:00
bool isValidWindow ( const KWindowInfo & winfo ) const ;
2016-12-28 22:27:55 -05:00
void windowChangedProxy ( WId wid , NET : : Properties prop1 , NET : : Properties2 prop2 ) ;
2017-01-16 14:07:49 -05:00
2017-06-08 17:10:49 -05:00
WindowId m_desktopId ;
2016-12-25 09:25:27 +02:00
} ;
}
2016-12-28 22:27:55 -05:00
# endif // XWINDOWINTERFACE_H
2016-12-25 09:25:27 +02:00