1 |
// -*- Mode: C++ ; c-basic-offset: 2 -*- |
2 |
/**************************************************************************** |
3 |
GLASHCtl - a simple tray applet for controlling lashd |
4 |
|
5 |
Copyright (C) 2006 Nedko Arnaudov <nedko@arnaudov.name> |
6 |
Modified by Lars Luthman (blame all bugs on me!) |
7 |
|
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; version 3 of the License. |
11 |
|
12 |
This program is distributed in the hope that it will be useful, |
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
GNU General Public License for more details. |
16 |
|
17 |
You should have received a copy of the GNU General Public License |
18 |
along with this program; if not, write to the Free Software Foundation, |
19 |
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 |
****************************************************************************/ |
21 |
|
22 |
#ifndef WMDOCKICON_HPP__BFA76043_95E1_4CDC_BFE6_7FF1A53BFB23__INCLUDED |
23 |
#define WMDOCKICON_HPP__BFA76043_95E1_4CDC_BFE6_7FF1A53BFB23__INCLUDED |
24 |
|
25 |
#include <sigc++/signal.h> |
26 |
#include <glibmm/refptr.h> |
27 |
#include <gdkmm/window.h> |
28 |
|
29 |
|
30 |
/** A class that creates a WindowMaker compatible DockApp window |
31 |
with a LASH icon. */ |
32 |
class WMDockIcon : public sigc::trackable { |
33 |
public: |
34 |
|
35 |
WMDockIcon(); |
36 |
|
37 |
/** Called when the LASH daemon has been started. */ |
38 |
void lashd_started(); |
39 |
|
40 |
/** Called when the LASH daemon has been stopped. */ |
41 |
void lashd_stopped(); |
42 |
|
43 |
/** Emitted when the user right-clicks the icon. */ |
44 |
sigc::signal<void, guint, guint> signal_popup; |
45 |
|
46 |
private: |
47 |
|
48 |
static void button_pressed(GdkEvent* event, gpointer data); |
49 |
|
50 |
Glib::RefPtr<Gdk::Window> m_win; |
51 |
Glib::RefPtr<Gdk::Window> m_iconwin; |
52 |
Glib::RefPtr<Gdk::Pixmap> m_active_pixmap; |
53 |
Glib::RefPtr<Gdk::Pixmap> m_inactive_pixmap; |
54 |
}; |
55 |
|
56 |
|
57 |
#endif // #ifndef WMDOCKICON_HPP__BFA76043_95E1_4CDC_BFE6_7FF1A53BFB23__INCLUDED |