]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tray-monitor/eggtrayicon.h
Fix bug # 746 - Windows FD crashes when job canceled
[bacula/bacula] / bacula / src / tray-monitor / eggtrayicon.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* eggtrayicon.h
3  * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 /*
21    Bacula® - The Network Backup Solution
22
23    Copyright (C) 2004-2006 Free Software Foundation Europe e.V.
24
25    The main author of Bacula is Kern Sibbald, with contributions from
26    many others, a complete list can be found in the file AUTHORS.
27    This program is Free Software; you can redistribute it and/or
28    modify it under the terms of version two of the GNU General Public
29    License as published by the Free Software Foundation plus additions
30    that are listed in the file LICENSE.
31
32    This program is distributed in the hope that it will be useful, but
33    WITHOUT ANY WARRANTY; without even the implied warranty of
34    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35    General Public License for more details.
36
37    You should have received a copy of the GNU General Public License
38    along with this program; if not, write to the Free Software
39    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
40    02110-1301, USA.
41
42    Bacula® is a registered trademark of John Walker.
43    The licensor of Bacula is the Free Software Foundation Europe
44    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
45    Switzerland, email:ftf@fsfeurope.org.
46 */
47
48 #ifndef __EGG_TRAY_ICON_H__
49 #define __EGG_TRAY_ICON_H__
50
51 #include <gtk/gtkplug.h>
52 #include <gdk/gdkx.h>
53
54 G_BEGIN_DECLS
55
56 #define EGG_TYPE_TRAY_ICON              (egg_tray_icon_get_type ())
57 #define EGG_TRAY_ICON(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
58 #define EGG_TRAY_ICON_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
59 #define EGG_IS_TRAY_ICON(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
60 #define EGG_IS_TRAY_ICON_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
61 #define EGG_TRAY_ICON_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
62
63 typedef struct _EggTrayIcon       EggTrayIcon;
64 typedef struct _EggTrayIconClass  EggTrayIconClass;
65
66 struct _EggTrayIcon
67 {
68   GtkPlug parent_instance;
69
70   guint stamp;
71
72   Atom selection_atom;
73   Atom manager_atom;
74   Atom system_tray_opcode_atom;
75   Atom orientation_atom;
76   Window manager_window;
77
78   GtkOrientation orientation;
79 };
80
81 struct _EggTrayIconClass
82 {
83   GtkPlugClass parent_class;
84 };
85
86 GType        egg_tray_icon_get_type       (void);
87
88 EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen   *screen,
89                                            const gchar *name);
90
91 EggTrayIcon *egg_tray_icon_new            (const gchar *name);
92
93 guint        egg_tray_icon_send_message   (EggTrayIcon *icon,
94                                            gint         timeout,
95                                            const char  *message,
96                                            gint         len);
97 void         egg_tray_icon_cancel_message (EggTrayIcon *icon,
98                                            guint        id);
99
100 GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
101
102 G_END_DECLS
103
104 #endif /* __EGG_TRAY_ICON_H__ */