diff options
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-event-manager.c | 14 | ||||
-rw-r--r-- | libempathy-gtk/empathy-event-manager.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-event-manager.c b/libempathy-gtk/empathy-event-manager.c index 232d4dfe6..0dcabda94 100644 --- a/libempathy-gtk/empathy-event-manager.c +++ b/libempathy-gtk/empathy-event-manager.c @@ -420,11 +420,23 @@ empathy_event_manager_new (void) return manager; } +GSList * +empathy_event_manager_get_events (EmpathyEventManager *manager) +{ + EmpathyEventManagerPriv *priv = GET_PRIV (manager); + + g_return_val_if_fail (EMPATHY_IS_EVENT_MANAGER (manager), NULL); + + return priv->events; +} + EmpathyEvent * empathy_event_manager_get_top_event (EmpathyEventManager *manager) { EmpathyEventManagerPriv *priv = GET_PRIV (manager); + g_return_val_if_fail (EMPATHY_IS_EVENT_MANAGER (manager), NULL); + return priv->events ? priv->events->data : NULL; } @@ -433,6 +445,8 @@ empathy_event_activate (EmpathyEvent *event_public) { EventPriv *event = (EventPriv*) event_public; + g_return_if_fail (event_public != NULL); + if (event->func) { event->func (event); } else { diff --git a/libempathy-gtk/empathy-event-manager.h b/libempathy-gtk/empathy-event-manager.h index c5bc45a42..a4da56aac 100644 --- a/libempathy-gtk/empathy-event-manager.h +++ b/libempathy-gtk/empathy-event-manager.h @@ -54,6 +54,7 @@ typedef struct { GType empathy_event_manager_get_type (void) G_GNUC_CONST; EmpathyEventManager *empathy_event_manager_new (void); EmpathyEvent * empathy_event_manager_get_top_event (EmpathyEventManager *manager); +GSList * empathy_event_manager_get_events (EmpathyEventManager *manager); void empathy_event_activate (EmpathyEvent *event); G_END_DECLS |