add event for shelf deletion

SVN revision: 75371
This commit is contained in:
Mike Blumenkrantz 2012-08-17 08:23:09 +00:00
parent ac19f221ff
commit e63f8c7f4d
2 changed files with 15 additions and 1 deletions

View File

@ -40,12 +40,14 @@ static Eina_List *dummies = NULL;
static Eina_Hash *winid_shelves = NULL;
EAPI int E_EVENT_SHELF_ADD = -1;
EAPI int E_EVENT_SHELF_DEL = -1;
/* externally accessible functions */
EINTERN int
e_shelf_init(void)
{
E_EVENT_SHELF_ADD = ecore_event_type_new();
E_EVENT_SHELF_DEL = ecore_event_type_new();
return 1;
}
@ -954,8 +956,9 @@ _e_shelf_del_cb(void *d)
}
static void
_e_shelf_free(E_Shelf *es)
_e_shelf_free_cb(void *data __UNUSED__, void *ev)
{
E_Shelf *es = ev;
if (!es->dummy)
_e_shelf_bindings_del(es);
@ -1019,6 +1022,16 @@ _e_shelf_free(E_Shelf *es)
free(es);
}
static void
_e_shelf_free(E_Shelf *es)
{
E_Event_Shelf *ev;
ev = E_NEW(E_Event_Shelf, 1);
ev->shelf = es;
ecore_event_add(E_EVENT_SHELF_DEL, ev, _e_shelf_free_cb, NULL);
}
static void
_e_shelf_gadcon_min_size_request(void *data __UNUSED__, E_Gadcon *gc __UNUSED__, Evas_Coord w __UNUSED__, Evas_Coord h __UNUSED__)
{

View File

@ -56,6 +56,7 @@ typedef struct E_Event_Shelf
typedef struct E_Event_Shelf E_Event_Shelf_Add;
EAPI extern int E_EVENT_SHELF_ADD;
EAPI extern int E_EVENT_SHELF_DEL;
EINTERN int e_shelf_init(void);
EINTERN int e_shelf_shutdown(void);