Applets
fdoselectionmanager.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * fdoselectionmanager.h * 00003 * * 00004 * Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program; if not, write to the * 00018 * Free Software Foundation, Inc., * 00019 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * 00020 ***************************************************************************/ 00021 00022 #ifndef FDOSELECTIONMANAGER_H 00023 #define FDOSELECTIONMANAGER_H 00024 00025 #include <QtGui/QWidget> 00026 00027 namespace SystemTray 00028 { 00029 00030 class Notification; 00031 class Task; 00032 class X11EmbedPainter; 00033 class FdoSelectionManagerPrivate; 00034 00035 class FdoSelectionManager : public QWidget 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 static FdoSelectionManager *manager(); 00041 static X11EmbedPainter *painter(); 00042 00043 FdoSelectionManager(); 00044 ~FdoSelectionManager(); 00045 00046 void addDamageWatch(QWidget *container, WId client); 00047 void removeDamageWatch(QWidget *container); 00048 bool haveComposite() const; 00049 00050 signals: 00051 void taskCreated(SystemTray::Task *task); 00052 void notificationCreated(SystemTray::Notification *notification); 00053 00054 protected: 00055 bool x11Event(XEvent *event); 00056 00057 private slots: 00058 void initSelection(); 00059 void cleanupTask(WId winId); 00060 void cleanupNotification(WId winId); 00061 00062 private: 00063 friend class FdoSelectionManagerPrivate; 00064 FdoSelectionManagerPrivate* const d; 00065 }; 00066 00067 } 00068 00069 #endif