]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tray-monitor/eggstatusicon.h
Fix bug # 746 - Windows FD crashes when job canceled
[bacula/bacula] / bacula / src / tray-monitor / eggstatusicon.h
1 /* eggstatusicon.h:
2  *
3  * Copyright (C) 2003 Sun Microsystems, Inc.
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  * Authors:
21  *      Mark McLoughlin <mark@skynet.ie>
22  *      Nicolas Boichat <nicolas@boichat.ch> (add access to the underlying EggTrayIcon)
23  */
24 /*
25    Bacula® - The Network Backup Solution
26
27    Copyright (C) 2004-2006 Free Software Foundation Europe e.V.
28
29    The main author of Bacula is Kern Sibbald, with contributions from
30    many others, a complete list can be found in the file AUTHORS.
31    This program is Free Software; you can redistribute it and/or
32    modify it under the terms of version two of the GNU General Public
33    License as published by the Free Software Foundation plus additions
34    that are listed in the file LICENSE.
35
36    This program is distributed in the hope that it will be useful, but
37    WITHOUT ANY WARRANTY; without even the implied warranty of
38    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
39    General Public License for more details.
40
41    You should have received a copy of the GNU General Public License
42    along with this program; if not, write to the Free Software
43    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
44    02110-1301, USA.
45
46    Bacula® is a registered trademark of John Walker.
47    The licensor of Bacula is the Free Software Foundation Europe
48    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
49    Switzerland, email:ftf@fsfeurope.org.
50 */
51
52
53 #ifndef __EGG_STATUS_ICON_H__
54 #define __EGG_STATUS_ICON_H__
55
56 #include "eggtrayicon.h"
57 #include <gtk/gtkimage.h>
58
59 G_BEGIN_DECLS
60
61 #define EGG_TYPE_STATUS_ICON         (egg_status_icon_get_type ())
62 #define EGG_STATUS_ICON(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_TYPE_STATUS_ICON, EggStatusIcon))
63 #define EGG_STATUS_ICON_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EGG_TYPE_STATUS_ICON, EggStatusIconClass))
64 #define EGG_IS_STATUS_ICON(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_TYPE_STATUS_ICON))
65 #define EGG_IS_STATUS_ICON_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EGG_TYPE_STATUS_ICON))
66 #define EGG_STATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EGG_TYPE_STATUS_ICON, EggStatusIconClass))
67
68 typedef struct _EggStatusIcon        EggStatusIcon;
69 typedef struct _EggStatusIconClass   EggStatusIconClass;
70 typedef struct _EggStatusIconPrivate EggStatusIconPrivate;
71
72 struct _EggStatusIcon
73 {
74   GObject               parent_instance;
75
76   EggStatusIconPrivate *priv;
77 };
78
79 struct _EggStatusIconClass
80 {
81   GObjectClass parent_class;
82
83   void     (* activate)     (EggStatusIcon *status_icon);
84   void     (* popup_menu)   (EggStatusIcon *status_icon,
85                              guint          buttton,
86                              guint32        activate_time);
87   gboolean (* size_changed) (EggStatusIcon *status_icon,
88                              gint           size);
89 };
90
91 GType                 egg_status_icon_get_type           (void);
92
93 EggStatusIcon        *egg_status_icon_new                (void);
94 EggStatusIcon        *egg_status_icon_new_from_pixbuf    (GdkPixbuf          *pixbuf);
95 EggStatusIcon        *egg_status_icon_new_from_file      (const gchar        *filename);
96 EggStatusIcon        *egg_status_icon_new_from_stock     (const gchar        *stock_id);
97 EggStatusIcon        *egg_status_icon_new_from_animation (GdkPixbufAnimation *animation);
98
99 void                  egg_status_icon_set_from_pixbuf    (EggStatusIcon      *status_icon,
100                                                           GdkPixbuf          *pixbuf);
101 void                  egg_status_icon_set_from_file      (EggStatusIcon      *status_icon,
102                                                           const gchar        *filename);
103 void                  egg_status_icon_set_from_stock     (EggStatusIcon      *status_icon,
104                                                           const gchar        *stock_id);
105 void                  egg_status_icon_set_from_animation (EggStatusIcon      *status_icon,
106                                                           GdkPixbufAnimation *animation);
107
108 GtkImageType          egg_status_icon_get_image_type     (EggStatusIcon      *status_icon);
109
110 GdkPixbuf            *egg_status_icon_get_pixbuf         (EggStatusIcon      *status_icon);
111 G_CONST_RETURN gchar *egg_status_icon_get_stock          (EggStatusIcon      *status_icon);
112 GdkPixbufAnimation   *egg_status_icon_get_animation      (EggStatusIcon      *status_icon);
113
114 gint                  egg_status_icon_get_size           (EggStatusIcon      *status_icon);
115
116 void                  egg_status_icon_set_tooltip        (EggStatusIcon      *status_icon,
117                                                           const gchar        *tooltip_text,
118                                                           const gchar        *tooltip_private);
119
120 void                  egg_status_icon_set_balloon_text   (EggStatusIcon      *status_icon,
121                                                           const gchar        *text);
122 G_CONST_RETURN gchar *egg_status_icon_get_balloon_text   (EggStatusIcon      *status_icon);
123
124 void                  egg_status_icon_set_is_blinking    (EggStatusIcon      *status_icon,
125                                                           guint            enable_blinking);
126 gboolean              egg_status_icon_get_is_blinking    (EggStatusIcon      *status_icon);
127
128 EggTrayIcon*          egg_status_icon_get_tray_icon      (EggStatusIcon      *status_icon);
129
130 G_END_DECLS
131
132 #endif /* __EGG_STATUS_ICON_H__ */