parent
fa8f786d44
commit
21ccd37737
|
@ -625,17 +625,7 @@ _eo_callbacks_clear(Eo_Base_Data *pd)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pd->deletions_waiting = EINA_FALSE;
|
pd->deletions_waiting = EINA_FALSE;
|
||||||
#if 0
|
|
||||||
EINA_INARRAY_FOREACH(pd->callbacks, cb)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (cb->delete_me)
|
|
||||||
{
|
|
||||||
// _eo_callback_remove(pd, titr);
|
|
||||||
eina_inarray_remove(pd->callbacks , cb );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
eina_inarray_foreach_remove( pd->callbacks, _eo_base_callback_delete_me_check, NULL);
|
eina_inarray_foreach_remove( pd->callbacks, _eo_base_callback_delete_me_check, NULL);
|
||||||
|
|
||||||
_eo_base_update_callbacks_hash(pd);
|
_eo_base_update_callbacks_hash(pd);
|
||||||
|
@ -644,7 +634,7 @@ _eo_callbacks_clear(Eo_Base_Data *pd)
|
||||||
static void
|
static void
|
||||||
_eo_callbacks_sorted_insert(Eo_Base_Data *pd, Eo_Callback_Description *cb)
|
_eo_callbacks_sorted_insert(Eo_Base_Data *pd, Eo_Callback_Description *cb)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
Eo_Callback_Description *itr, *itrp = NULL;
|
Eo_Callback_Description *itr, *itrp = NULL;
|
||||||
for (itr = pd->callbacks; itr && (itr->priority < cb->priority);
|
for (itr = pd->callbacks; itr && (itr->priority < cb->priority);
|
||||||
itr = itr->next)
|
itr = itr->next)
|
||||||
|
@ -662,7 +652,7 @@ _eo_callbacks_sorted_insert(Eo_Base_Data *pd, Eo_Callback_Description *cb)
|
||||||
cb->next = pd->callbacks;
|
cb->next = pd->callbacks;
|
||||||
pd->callbacks = cb;
|
pd->callbacks = cb;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void set_event_have( const Eo_Event_Description *a , Eo_Base_Data *pd){
|
void set_event_have( const Eo_Event_Description *a , Eo_Base_Data *pd){
|
||||||
|
@ -753,25 +743,6 @@ _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
for (cb = pd->callbacks; cb; cb = cb->next)
|
|
||||||
{
|
|
||||||
if ((cb->items.item.desc == desc) && (cb->items.item.func == func) &&
|
|
||||||
(cb->func_data == user_data))
|
|
||||||
{
|
|
||||||
const Eo_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}};
|
|
||||||
|
|
||||||
cb->delete_me = EINA_TRUE;
|
|
||||||
pd->deletions_waiting = EINA_TRUE;
|
|
||||||
_eo_callbacks_clear(pd);
|
|
||||||
eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_DEL, (void *)arr); );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DBG("Callback of object %p with function %p and data %p not found.", obj, func, user_data);
|
DBG("Callback of object %p with function %p and data %p not found.", obj, func, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,20 +788,6 @@ _eo_base_event_callback_array_del(Eo *obj, Eo_Base_Data *pd,
|
||||||
{
|
{
|
||||||
Eo_Callback_Description *cb;
|
Eo_Callback_Description *cb;
|
||||||
|
|
||||||
#if 0
|
|
||||||
for (cb = pd->callbacks; cb; cb = cb->next)
|
|
||||||
{
|
|
||||||
if ((cb->items.item_array == array) && (cb->func_data == user_data))
|
|
||||||
{
|
|
||||||
cb->delete_me = EINA_TRUE;
|
|
||||||
pd->deletions_waiting = EINA_TRUE;
|
|
||||||
_eo_callbacks_clear(pd);
|
|
||||||
|
|
||||||
eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_DEL, (void *)array); );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EINA_INARRAY_FOREACH(pd->callbacks, cb)
|
EINA_INARRAY_FOREACH(pd->callbacks, cb)
|
||||||
if ((cb->items.item_array == array) && (cb->func_data == user_data))
|
if ((cb->items.item_array == array) && (cb->func_data == user_data))
|
||||||
|
@ -954,67 +911,6 @@ if(pd->callbacks_hash[index_hash][2]==0){//the only one
|
||||||
}
|
}
|
||||||
// printf("cal: more than one for %d\n", index_hash);
|
// printf("cal: more than one for %d\n", index_hash);
|
||||||
|
|
||||||
#if 0
|
|
||||||
int size = eina_inarray_count( pd->callbacks);
|
|
||||||
for (int i= index_hash ; i< size; i++){
|
|
||||||
|
|
||||||
|
|
||||||
pd->called_loop_counter++;//avi debug
|
|
||||||
cb = eina_inarray_nth(pd->callbacks, i);
|
|
||||||
|
|
||||||
if (!cb->delete_me)
|
|
||||||
{
|
|
||||||
if (cb->func_array)
|
|
||||||
{
|
|
||||||
const Eo_Callback_Array_Item *it;
|
|
||||||
//int counter = 0;
|
|
||||||
for (it = cb->items.item_array; it->func; it++)
|
|
||||||
{
|
|
||||||
pd->called_inner_loop_counter++;//avi debug
|
|
||||||
// printf("here arrary index %d \n",counter++);
|
|
||||||
if (!_cb_desc_match(it->desc, desc))
|
|
||||||
continue;
|
|
||||||
if (!it->desc->unfreezable &&
|
|
||||||
(event_freeze_count || pd->event_freeze_count))
|
|
||||||
continue;
|
|
||||||
unsigned int before_func=clock();
|
|
||||||
/* Abort callback calling if the func says so. */
|
|
||||||
if (!it->func((void *) cb->func_data, obj_id, desc,
|
|
||||||
(void *) event_info))
|
|
||||||
{
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
ret = EINA_FALSE;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// printf("here regular callback \n");
|
|
||||||
if (!_cb_desc_match(cb->items.item.desc, desc))
|
|
||||||
continue;
|
|
||||||
if ((!cb->items.item.desc
|
|
||||||
|| !cb->items.item.desc->unfreezable) &&
|
|
||||||
(event_freeze_count || pd->event_freeze_count))
|
|
||||||
continue;
|
|
||||||
unsigned int before_func=clock();
|
|
||||||
/* Abort callback calling if the func says so. */
|
|
||||||
if (!cb->items.item.func((void *) cb->func_data, obj_id, desc,
|
|
||||||
(void *) event_info))
|
|
||||||
{
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
ret = EINA_FALSE;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EINA_INARRAY_FOREACH(pd->callbacks, cb)
|
EINA_INARRAY_FOREACH(pd->callbacks, cb)
|
||||||
{
|
{
|
||||||
|
@ -1070,61 +966,6 @@ cb = eina_inarray_nth(pd->callbacks, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
for (cb = pd->callbacks; cb; cb = cb->next)
|
|
||||||
{
|
|
||||||
pd->called_loop_counter++;//avi debug
|
|
||||||
|
|
||||||
if (!cb->delete_me)
|
|
||||||
{
|
|
||||||
if (cb->func_array)
|
|
||||||
{
|
|
||||||
const Eo_Callback_Array_Item *it;
|
|
||||||
|
|
||||||
for (it = cb->items.item_array; it->func; it++)
|
|
||||||
{
|
|
||||||
pd->called_inner_loop_counter++;//avi debug
|
|
||||||
if (!_cb_desc_match(it->desc, desc))
|
|
||||||
continue;
|
|
||||||
if (!it->desc->unfreezable &&
|
|
||||||
(event_freeze_count || pd->event_freeze_count))
|
|
||||||
continue;
|
|
||||||
unsigned int before_func=clock();
|
|
||||||
/* Abort callback calling if the func says so. */
|
|
||||||
if (!it->func((void *) cb->func_data, obj_id, desc,
|
|
||||||
(void *) event_info))
|
|
||||||
{
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
ret = EINA_FALSE;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!_cb_desc_match(cb->items.item.desc, desc))
|
|
||||||
continue;
|
|
||||||
if ((!cb->items.item.desc
|
|
||||||
|| !cb->items.item.desc->unfreezable) &&
|
|
||||||
(event_freeze_count || pd->event_freeze_count))
|
|
||||||
continue;
|
|
||||||
unsigned int before_func=clock();
|
|
||||||
/* Abort callback calling if the func says so. */
|
|
||||||
if (!cb->items.item.func((void *) cb->func_data, obj_id, desc,
|
|
||||||
(void *) event_info))
|
|
||||||
{
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
ret = EINA_FALSE;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
start_time+=clock()-before_func;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
pd->called_sum_clocks +=clock()-start_time;//avi dbg
|
pd->called_sum_clocks +=clock()-start_time;//avi dbg
|
||||||
pd->walking_list--;
|
pd->walking_list--;
|
||||||
|
|
Loading…
Reference in New Issue