add event for when a shelf gets added

SVN revision: 73225
This commit is contained in:
Mike Blumenkrantz 2012-07-03 11:55:00 +00:00
parent 5950d44b2f
commit 6fbd413374
2 changed files with 19 additions and 0 deletions

View File

@ -38,10 +38,13 @@ static Eina_List *shelves = NULL;
static Eina_List *dummies = NULL;
static Eina_Hash *winid_shelves = NULL;
EAPI int E_EVENT_SHELF_ADD = -1;
/* externally accessible functions */
EINTERN int
e_shelf_init(void)
{
E_EVENT_SHELF_ADD = ecore_event_type_new();
return 1;
}
@ -271,6 +274,13 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, i
es->hide_origin = -1;
{
E_Event_Shelf *ev;
ev = E_NEW(E_Event_Shelf, 1);
ev->shelf = es;
ecore_event_add(E_EVENT_SHELF_ADD, ev, NULL, NULL);
}
return es;
}

View File

@ -47,6 +47,15 @@ struct _E_Shelf
unsigned int locked;
};
typedef struct E_Event_Shelf
{
E_Shelf *shelf;
} E_Event_Shelf;
typedef struct E_Event_Shelf E_Event_Shelf_Add;
EAPI extern int E_EVENT_SHELF_ADD;
EINTERN int e_shelf_init(void);
EINTERN int e_shelf_shutdown(void);
EAPI void e_shelf_config_update(void);