Home · All Namespaces · All Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of mhome. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef WINDOWINFO_H_ 00021 #define WINDOWINFO_H_ 00022 00023 #include <QString> 00024 #include <QHash> 00025 #include <X11/Xlib.h> 00026 #include <X11/Xutil.h> 00027 #include <QExplicitlySharedDataPointer> 00028 00029 class WindowData; 00030 00034 class WindowInfo 00035 { 00036 public: 00037 // X11 atoms 00038 static Atom TypeAtom; 00039 static Atom StateAtom; 00040 static Atom NormalAtom; 00041 static Atom DesktopAtom; 00042 static Atom NotificationAtom; 00043 static Atom DialogAtom; 00044 static Atom CallAtom; 00045 static Atom DockAtom; 00046 static Atom MenuAtom; 00047 static Atom SkipTaskbarAtom; 00048 static Atom InputWindowAtom; 00049 static Atom NameAtom; 00050 00056 explicit WindowInfo(Window window); 00057 00061 WindowInfo(const WindowInfo &other); 00062 00066 ~WindowInfo(); 00067 00071 WindowInfo& operator=(const WindowInfo &rhs); 00072 00076 static void initializeAtoms(); 00077 00083 const QString &title() const; 00084 00089 QList<Atom> types() const; 00090 00095 QList<Atom> states() const; 00096 00102 Window window() const; 00103 00109 Window transientFor() const; 00110 00115 bool updateWindowTitle(); 00116 00120 void updateWindowProperties(); 00121 00122 private: 00125 static QHash<Window, QExplicitlySharedDataPointer<WindowData> > windowDatas; 00126 00130 QList<Atom> getWindowProperties(Window winId, Atom propertyAtom, long maxCount = 16L); 00131 00133 QExplicitlySharedDataPointer<WindowData> d; 00134 00135 }; 00136 00138 bool operator==(const WindowInfo &, const WindowInfo &); 00139 00141 uint qHash(WindowInfo wi); 00142 00143 #endif /* WINDOWINFO_H_ */
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |