static void _e_gadcon_provider_populate_unrequest(const E_Gadcon_Client_Class *cc);
static Eina_Bool _e_gadcon_provider_populate_idler(void *data);
static Eina_Bool _e_gadcon_custom_populate_idler(void *data);
-static void _e_gadcon_event_end(void *data, void *ev);
static int _e_gadcon_location_change(E_Gadcon_Client *gcc, E_Gadcon_Location *src, E_Gadcon_Location *dst);
/********************/
-EAPI int E_EVENT_GADCON_POPULATE = -1;
-EAPI int E_EVENT_GADCON_UNPOPULATE = -1;
-
static Eina_Hash *providers = NULL;
static Eina_List *providers_list = NULL;
static Eina_List *gadcons = NULL;
EINTERN int
e_gadcon_init(void)
{
- E_EVENT_GADCON_POPULATE = ecore_event_type_new();
- E_EVENT_GADCON_UNPOPULATE = ecore_event_type_new();
_module_init_end_handler = ecore_event_handler_add(E_EVENT_MODULE_INIT_END, _module_init_end_cb, NULL);
return 1;
}
Eina_List *l;
E_Config_Gadcon_Client *cf_gcc;
Eina_Bool ret = EINA_TRUE;
- E_Event_Gadcon_Populate *ev;
E_OBJECT_CHECK(gc);
E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE);
e_gadcon_client_queue(gc, cf_gcc);
}
e_gadcon_layout_thaw(gc->o_container);
- ev = E_NEW(E_Event_Gadcon_Populate, 1);
- ev->gadcon = gc;
- e_object_ref(E_OBJECT(gc));
- ecore_event_add(E_EVENT_GADCON_POPULATE, ev, _e_gadcon_event_end, NULL);
return EINA_TRUE;
}
e_gadcon_unpopulate(E_Gadcon *gc)
{
E_Gadcon_Client *gcc;
- E_Event_Gadcon_Populate *ev;
E_OBJECT_CHECK(gc);
E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE);
if (gc->awaiting_classes)
eina_hash_free(gc->awaiting_classes);
gc->awaiting_classes = NULL;
- ev = E_NEW(E_Event_Gadcon_Populate, 1);
- ev->gadcon = gc;
- e_object_ref(E_OBJECT(gc));
- ecore_event_add(E_EVENT_GADCON_UNPOPULATE, ev, _e_gadcon_event_end, NULL);
}
EAPI void
}
}
-static void
-_e_gadcon_event_end(void *data __UNUSED__, void *event)
-{
- E_Event_Gadcon_Populate *ev = event;
- e_object_unref(E_OBJECT(ev->gadcon));
- free(ev);
-}
-
static Eina_Bool
_e_gadcon_custom_populate_idler(void *data __UNUSED__)
{
#ifdef E_TYPEDEFS
-EAPI extern int E_EVENT_GADCON_POPULATE;
-EAPI extern int E_EVENT_GADCON_UNPOPULATE;
-
#define E_GADCON_CLIENT(x) ((E_Gadcon_Client *)(x))
/* different layout policies - only 1 supported for now */
typedef struct _E_Gadcon_Client_Class E_Gadcon_Client_Class;
typedef struct _E_Gadcon_Location E_Gadcon_Location;
-typedef struct _E_Event_Gadcon E_Event_Gadcon_Populate;
-typedef struct _E_Event_Gadcon E_Event_Gadcon_Unpopulate;
-
#else
#ifndef E_GADCON_H
#define E_GADCON_H
unsigned char dummy : 1;
};
-struct _E_Event_Gadcon
-{
- E_Gadcon *gadcon;
-};
-
#define GADCON_CLIENT_CLASS_VERSION 3
/* Version 3 add the *client_class param to icon(),label(),id_new(), id_del() */
/* and the *orient param to orient() */