From 5144944dbe90e1eaf65bfeedbd6057b858880abc Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 8 Oct 2009 20:47:19 -0400 Subject: Adding some accessor functions for the various GTK objects. --- libindicator/indicator-object.c | 24 ++++++++++++++++++++++++ libindicator/indicator-object.h | 4 ++++ 2 files changed, 28 insertions(+) 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 -- cgit v1.2.3