Commit a94c0778 authored by Xavier Claessens's avatar Xavier Claessens

Add empathy_event_manager_get_events

svn path=/trunk/; revision=1245
parent 9cccaa8e
......@@ -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 {
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment