From 6fbd4133743ab5c9b063822b95d4d4131bc93c51 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 3 Jul 2012 11:55:00 +0000 Subject: [PATCH] add event for when a shelf gets added SVN revision: 73225 --- src/bin/e_shelf.c | 10 ++++++++++ src/bin/e_shelf.h | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index 86bfb6a10..3ff10f9da 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -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; } diff --git a/src/bin/e_shelf.h b/src/bin/e_shelf.h index 27938c85e..f30fd60d8 100644 --- a/src/bin/e_shelf.h +++ b/src/bin/e_shelf.h @@ -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);