KWin
group.h
Go to the documentation of this file.00001 /******************************************************************** 00002 KWin - the KDE window manager 00003 This file is part of the KDE project. 00004 00005 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org> 00006 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org> 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 *********************************************************************/ 00021 00022 #ifndef KWIN_GROUP_H 00023 #define KWIN_GROUP_H 00024 00025 #include "utils.h" 00026 #include <X11/X.h> 00027 #include <netwm.h> 00028 00029 namespace KWin 00030 { 00031 00032 class Client; 00033 class Workspace; 00034 class EffectWindowGroupImpl; 00035 00036 class Group 00037 { 00038 public: 00039 Group( Window leader, Workspace* workspace ); 00040 ~Group(); 00041 Window leader() const; 00042 const Client* leaderClient() const; 00043 Client* leaderClient(); 00044 const ClientList& members() const; 00045 QPixmap icon() const; 00046 QPixmap miniIcon() const; 00047 void addMember( Client* member ); 00048 void removeMember( Client* member ); 00049 void gotLeader( Client* leader ); 00050 void lostLeader(); 00051 Workspace* workspace(); 00052 bool groupEvent( XEvent* e ); 00053 void updateUserTime( Time time = CurrentTime ); 00054 Time userTime() const; 00055 void ref(); 00056 void deref(); 00057 EffectWindowGroupImpl* effectGroup(); 00058 private: 00059 void getIcons(); 00060 void startupIdChanged(); 00061 ClientList _members; 00062 Client* leader_client; 00063 Window leader_wid; 00064 Workspace* _workspace; 00065 NETWinInfo* leader_info; 00066 Time user_time; 00067 int refcount; 00068 EffectWindowGroupImpl* effect_group; 00069 }; 00070 00071 inline Window Group::leader() const 00072 { 00073 return leader_wid; 00074 } 00075 00076 inline const Client* Group::leaderClient() const 00077 { 00078 return leader_client; 00079 } 00080 00081 inline Client* Group::leaderClient() 00082 { 00083 return leader_client; 00084 } 00085 00086 inline const ClientList& Group::members() const 00087 { 00088 return _members; 00089 } 00090 00091 inline Workspace* Group::workspace() 00092 { 00093 return _workspace; 00094 } 00095 00096 inline Time Group::userTime() const 00097 { 00098 return user_time; 00099 } 00100 00101 inline 00102 EffectWindowGroupImpl* Group::effectGroup() 00103 { 00104 return effect_group; 00105 } 00106 00107 } // namespace 00108 00109 #endif