aboutsummaryrefslogtreecommitdiff
path: root/src/SystemTray.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-15 13:48:50 (GMT)
committerfluxgen <fluxgen>2003-08-15 13:48:50 (GMT)
commit9d69d8b94eea3c59ac5e600b1e641f6764f0d81a (patch)
tree5b283402f07f0c8dd7f27722e5a6bd768d6da7cd /src/SystemTray.hh
parent779a0f4707bc249969feaed33af0567ca0250f28 (diff)
downloadfluxbox_pavel-9d69d8b94eea3c59ac5e600b1e641f6764f0d81a.zip
fluxbox_pavel-9d69d8b94eea3c59ac5e600b1e641f6764f0d81a.tar.bz2
systray
Diffstat (limited to 'src/SystemTray.hh')
-rw-r--r--src/SystemTray.hh76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/SystemTray.hh b/src/SystemTray.hh
new file mode 100644
index 0000000..908738e
--- /dev/null
+++ b/src/SystemTray.hh
@@ -0,0 +1,76 @@
1// SystemTray.hh
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22// $Id: SystemTray.hh,v 1.1 2003/08/15 13:48:50 fluxgen Exp $
23
24#ifndef SYSTEMTRAY_HH
25#define SYSTEMTRAY_HH
26
27
28#include "FbTk/FbWindow.hh"
29#include "FbTk/EventHandler.hh"
30
31#include "ToolbarItem.hh"
32
33#include <X11/Xlib.h>
34
35#include <list>
36
37class AtomHandler;
38
39class SystemTray: public ToolbarItem, public FbTk::EventHandler {
40public:
41
42 explicit SystemTray(const FbTk::FbWindow &parent);
43 ~SystemTray();
44
45 void move(int x, int y);
46 void resize(unsigned int width, unsigned int height);
47 void moveResize(int x, int y,
48 unsigned int width, unsigned int height);
49 void show();
50 void hide();
51
52 bool clientMessage(const XClientMessageEvent &event);
53 void exposeEvent(XExposeEvent &event);
54 void handleEvent(XEvent &event);
55
56 unsigned int width() const;
57 unsigned int height() const;
58 unsigned int borderWidth() const;
59
60private:
61 typedef std::list<FbTk::FbWindow *> ClientList;
62 ClientList::iterator findClient(Window win);
63 void addClient(Window win);
64 void removeClient(Window win);
65 void renderTheme();
66 void rearrangeClients();
67 void removeAllClients();
68
69 FbTk::FbWindow m_window;
70
71 std::auto_ptr<AtomHandler> m_handler;
72
73 ClientList m_clients;
74};
75
76#endif // SYSTEMTRAY_HH