aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-08 20:47:19 -0400
committerTed Gould <ted@canonical.com>2009-10-08 20:47:19 -0400
commit5144944dbe90e1eaf65bfeedbd6057b858880abc (patch)
tree545b419abee441ab33903f5224f0c9148e98a47c
parentfda24e437ad0664e7287237e5bcffcbe15faade4 (diff)
downloadlibayatana-indicator-5144944dbe90e1eaf65bfeedbd6057b858880abc.tar.gz
libayatana-indicator-5144944dbe90e1eaf65bfeedbd6057b858880abc.tar.bz2
libayatana-indicator-5144944dbe90e1eaf65bfeedbd6057b858880abc.zip
Adding some accessor functions for the various GTK objects.
-rw-r--r--libindicator/indicator-object.c24
-rw-r--r--libindicator/indicator-object.h4
2 files changed, 28 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 71e72d8..38847dd 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -175,3 +175,27 @@ unrefandout:
g_object_unref(object);
return NULL;
}
+
+GtkLabel *
+indicator_object_get_label (IndicatorObject * io)
+{
+ g_return_val_if_fail(IS_INDICATOR_OBJECT(io), NULL);
+ IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(io);
+ return priv->label;
+}
+
+GtkImage *
+indicator_object_get_icon (IndicatorObject * io)
+{
+ g_return_val_if_fail(IS_INDICATOR_OBJECT(io), NULL);
+ IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(io);
+ return priv->icon;
+}
+
+GtkMenu *
+indicator_object_get_menu (IndicatorObject * io)
+{
+ g_return_val_if_fail(IS_INDICATOR_OBJECT(io), NULL);
+ IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(io);
+ return priv->menu;
+}
diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index fd7f470..d06355b 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -29,6 +29,10 @@ struct _IndicatorObject {
GType indicator_object_get_type (void);
IndicatorObject * indicator_object_new_from_file (const gchar * file);
+GtkLabel * indicator_object_get_label (IndicatorObject * io);
+GtkImage * indicator_object_get_icon (IndicatorObject * io);
+GtkMenu * indicator_object_get_menu (IndicatorObject * io);
+
G_END_DECLS
#endif