theshell/shell/taskbarmanager.h
2019-12-09 01:27:11 +11:00

63 lines
1.7 KiB
C++

/****************************************
*
* theShell - Desktop Environment
* Copyright (C) 2019 Victor Tran
*
* 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 3 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/>.
*
* *************************************/
#ifndef TASKBARMANAGER_H
#define TASKBARMANAGER_H
#include <debuginformationcollector.h>
#include <QObject>
#include <QMap>
#include <QX11Info>
#include <QApplication>
#include <QSettings>
#include "window.h"
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>
#undef Bool
class TaskbarManager : public QObject
{
Q_OBJECT
public:
explicit TaskbarManager(QObject *parent = T_QOBJECT_ROOT);
QList<WmWindow> Windows();
signals:
void windowsChanged();
void updateWindow(WmWindow changedWindow);
void deleteWindow(WmWindow closedWindow);
public slots:
void ReloadWindows();
private slots:
bool updateInternalWindow(Window window);
private:
QMap<Window, WmWindow> knownWindows;
QSettings settings;
};
#endif // TASKBARMANAGER_H