]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/tray-monitor/eggstatusicon.h
Replace explicit checks for "/" with calls to IsPathSeparator, strchr with first_path...
[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 #ifndef __EGG_STATUS_ICON_H__
26 #define __EGG_STATUS_ICON_H__
27
28 #include "eggtrayicon.h"
29 #include <gtk/gtkimage.h>
30
31 G_BEGIN_DECLS
32
33 #define EGG_TYPE_STATUS_ICON         (egg_status_icon_get_type ())
34 #define EGG_STATUS_ICON(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_TYPE_STATUS_ICON, EggStatusIcon))
35 #define EGG_STATUS_ICON_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EGG_TYPE_STATUS_ICON, EggStatusIconClass))
36 #define EGG_IS_STATUS_ICON(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_TYPE_STATUS_ICON))
37 #define EGG_IS_STATUS_ICON_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EGG_TYPE_STATUS_ICON))
38 #define EGG_STATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EGG_TYPE_STATUS_ICON, EggStatusIconClass))
39
40 typedef struct _EggStatusIcon        EggStatusIcon;
41 typedef struct _EggStatusIconClass   EggStatusIconClass;
42 typedef struct _EggStatusIconPrivate EggStatusIconPrivate;
43
44 struct _EggStatusIcon
45 {
46   GObject               parent_instance;
47
48   EggStatusIconPrivate *priv;
49 };
50
51 struct _EggStatusIconClass
52 {
53   GObjectClass parent_class;
54
55   void     (* activate)     (EggStatusIcon *status_icon);
56   void     (* popup_menu)   (EggStatusIcon *status_icon,
57                              guint          buttton,
58                              guint32        activate_time);
59   gboolean (* size_changed) (EggStatusIcon *status_icon,
60                              gint           size);
61 };
62
63 GType                 egg_status_icon_get_type           (void);
64
65 EggStatusIcon        *egg_status_icon_new                (void);
66 EggStatusIcon        *egg_status_icon_new_from_pixbuf    (GdkPixbuf          *pixbuf);
67 EggStatusIcon        *egg_status_icon_new_from_file      (const gchar        *filename);
68 EggStatusIcon        *egg_status_icon_new_from_stock     (const gchar        *stock_id);
69 EggStatusIcon        *egg_status_icon_new_from_animation (GdkPixbufAnimation *animation);
70
71 void                  egg_status_icon_set_from_pixbuf    (EggStatusIcon      *status_icon,
72                                                           GdkPixbuf          *pixbuf);
73 void                  egg_status_icon_set_from_file      (EggStatusIcon      *status_icon,
74                                                           const gchar        *filename);
75 void                  egg_status_icon_set_from_stock     (EggStatusIcon      *status_icon,
76                                                           const gchar        *stock_id);
77 void                  egg_status_icon_set_from_animation (EggStatusIcon      *status_icon,
78                                                           GdkPixbufAnimation *animation);
79
80 GtkImageType          egg_status_icon_get_image_type     (EggStatusIcon      *status_icon);
81
82 GdkPixbuf            *egg_status_icon_get_pixbuf         (EggStatusIcon      *status_icon);
83 G_CONST_RETURN gchar *egg_status_icon_get_stock          (EggStatusIcon      *status_icon);
84 GdkPixbufAnimation   *egg_status_icon_get_animation      (EggStatusIcon      *status_icon);
85
86 gint                  egg_status_icon_get_size           (EggStatusIcon      *status_icon);
87
88 void                  egg_status_icon_set_tooltip        (EggStatusIcon      *status_icon,
89                                                           const gchar        *tooltip_text,
90                                                           const gchar        *tooltip_private);
91
92 void                  egg_status_icon_set_balloon_text   (EggStatusIcon      *status_icon,
93                                                           const gchar        *text);
94 G_CONST_RETURN gchar *egg_status_icon_get_balloon_text   (EggStatusIcon      *status_icon);
95
96 void                  egg_status_icon_set_is_blinking    (EggStatusIcon      *status_icon,
97                                                           guint            enable_blinking);
98 gboolean              egg_status_icon_get_is_blinking    (EggStatusIcon      *status_icon);
99
100 EggTrayIcon*          egg_status_icon_get_tray_icon      (EggStatusIcon      *status_icon);
101
102 G_END_DECLS
103
104 #endif /* __EGG_STATUS_ICON_H__ */