add more spacing
[personal-kdebase.git] / workspace / kwin / group.h
blob5776183cf47fb14bcb04f0eada85358e1e05fe56
1 /********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
5 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
6 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *********************************************************************/
22 #ifndef KWIN_GROUP_H
23 #define KWIN_GROUP_H
25 #include "utils.h"
26 #include <X11/X.h>
27 #include <netwm.h>
29 namespace KWin
32 class Client;
33 class Workspace;
34 class EffectWindowGroupImpl;
36 class Group
38 public:
39 Group( Window leader, Workspace* workspace );
40 ~Group();
41 Window leader() const;
42 const Client* leaderClient() const;
43 Client* leaderClient();
44 const ClientList& members() const;
45 QPixmap icon() const;
46 QPixmap miniIcon() const;
47 void addMember( Client* member );
48 void removeMember( Client* member );
49 void gotLeader( Client* leader );
50 void lostLeader();
51 Workspace* workspace();
52 bool groupEvent( XEvent* e );
53 void updateUserTime( Time time = CurrentTime );
54 Time userTime() const;
55 void ref();
56 void deref();
57 EffectWindowGroupImpl* effectGroup();
58 private:
59 void getIcons();
60 void startupIdChanged();
61 ClientList _members;
62 Client* leader_client;
63 Window leader_wid;
64 Workspace* _workspace;
65 NETWinInfo2* leader_info;
66 Time user_time;
67 int refcount;
68 EffectWindowGroupImpl* effect_group;
71 inline Window Group::leader() const
73 return leader_wid;
76 inline const Client* Group::leaderClient() const
78 return leader_client;
81 inline Client* Group::leaderClient()
83 return leader_client;
86 inline const ClientList& Group::members() const
88 return _members;
91 inline Workspace* Group::workspace()
93 return _workspace;
96 inline Time Group::userTime() const
98 return user_time;
101 inline
102 EffectWindowGroupImpl* Group::effectGroup()
104 return effect_group;
107 } // namespace
109 #endif