Merging upstream version 0.7.0 (Closes: #493243, #510888, #567617, #699414, #709777...
[debian/lxpanel.git] / plugins / netstatus / netstatus-icon.h
1 /*
2 * Copyright (C) 2003 Sun Microsystems, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18
19 * Authors:
20 * Mark McLoughlin <mark@skynet.ie>
21 */
22
23 #ifndef __NETSTATUS_ICON_H__
24 #define __NETSTATUS_ICON_H__
25
26 #include <gtk/gtk.h>
27
28 #include "netstatus-iface.h"
29
30 G_BEGIN_DECLS
31
32 #define NETSTATUS_TYPE_ICON (netstatus_icon_get_type ())
33 #define NETSTATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NETSTATUS_TYPE_ICON, NetstatusIcon))
34 #define NETSTATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NETSTATUS_TYPE_ICON, NetstatusIconClass))
35 #define NETSTATUS_IS_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NETSTATUS_TYPE_ICON))
36 #define NETSTATUS_IS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NETSTATUS_TYPE_ICON))
37 #define NETSTATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NETSTATUS_TYPE_ICON, NetstatusIconClass))
38
39 typedef struct _NetstatusIcon NetstatusIcon;
40 typedef struct _NetstatusIconClass NetstatusIconClass;
41 typedef struct _NetstatusIconPrivate NetstatusIconPrivate;
42
43 struct _NetstatusIcon
44 {
45 GtkBox box_instance;
46
47 NetstatusIconPrivate *priv;
48 };
49
50 struct _NetstatusIconClass
51 {
52 GtkBoxClass box_class;
53
54 void (*invoked) (NetstatusIcon *icon);
55 };
56
57 GType netstatus_icon_get_type (void) G_GNUC_CONST;
58
59 GtkWidget * netstatus_icon_new (NetstatusIface *iface);
60
61 void netstatus_icon_invoke (NetstatusIcon *icon);
62
63 void netstatus_icon_set_iface (NetstatusIcon *icon,
64 NetstatusIface *interface);
65 NetstatusIface *netstatus_icon_get_iface (NetstatusIcon *icon);
66
67 void netstatus_icon_set_orientation (NetstatusIcon *icon,
68 GtkOrientation orientation);
69 GtkOrientation netstatus_icon_get_orientation (NetstatusIcon *icon);
70
71 void netstatus_icon_set_tooltips_enabled (NetstatusIcon *icon,
72 gboolean enabled);
73 gboolean netstatus_icon_get_tooltips_enabled (NetstatusIcon *icon);
74
75 void netstatus_icon_set_show_signal (NetstatusIcon *icon,
76 gboolean show_signal);
77 gboolean netstatus_icon_get_show_signal (NetstatusIcon *icon);
78
79 G_END_DECLS
80
81 #endif /* __NETSTATUS_ICON_H__ */