static Eina_Bool
_cb_border_remove(void *data, EINA_UNUSED int type, void *event)
{
   E_Event_Client *ev = event;
   Client_Item *bi;
   Eina_List *l;
   Plugin *p = data;

   EINA_LIST_FOREACH(p->clients, l, bi)
     if (bi->client == ev->ec)
       break;

   if (!bi) return ECORE_CALLBACK_PASS_ON;

   EVRY_PLUGIN_ITEMS_CLEAR(p);

   p->clients = eina_list_remove(p->clients, bi);
   EVRY_ITEM_FREE(bi);

   EVRY_PLUGIN_ITEMS_ADD(p, p->clients, p->input, 1, 0);

   EVRY_PLUGIN_UPDATE(p, EVRY_UPDATE_ADD);

   return ECORE_CALLBACK_PASS_ON;
}
Exemple #2
0
static Eina_Bool
_cb_border_add(void *data, __UNUSED__ int type, void *event)
{
   E_Event_Border_Add *ev = event;
   Plugin *p = data;

   if (!_border_item_add(p, ev->border))
     return ECORE_CALLBACK_PASS_ON;

   EVRY_PLUGIN_ITEMS_CLEAR(p);

   EVRY_PLUGIN_ITEMS_ADD(p, p->borders, p->input, 1, 0);

   EVRY_PLUGIN_UPDATE(p, EVRY_UPDATE_ADD);

   return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_cb_client_add(void *data, EINA_UNUSED int type, void *event)
{
   E_Event_Client *ev = event;
   Plugin *p = data;

   if (e_client_util_ignored_get(ev->ec)) return ECORE_CALLBACK_RENEW;
   if (!_client_item_add(p, ev->ec))
     return ECORE_CALLBACK_PASS_ON;

   EVRY_PLUGIN_ITEMS_CLEAR(p);

   EVRY_PLUGIN_ITEMS_ADD(p, p->clients, p->input, 1, 0);

   EVRY_PLUGIN_UPDATE(p, EVRY_UPDATE_ADD);

   return ECORE_CALLBACK_PASS_ON;
}