Being annoyed by different types of eina critical macros - CRI, CRIT,
CRITICAL -, I concluded to unify them to one. Discussed on IRC and
finally, CRI was chosen to meet the consistency with other macros -
ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
This reverts commit 824ee3c56b1a23a082b5e5d1016d8e872a51fbce.
This commit breaks many gestures that are not "pointer" based.
For example, zooming with Ctrl+Wheel. But not only.
if target object is deleted before GLayer is deleted, we get a crash
from _event_history_clear.
Setting target to NULL on delete, then testing it before reporting state
takes care of this problem.
elm_gesture_layer_cb_add/del functions have been added to provide this
functionality.
elm_gesture_layer_cb_set provided only one callback and so was
overriding the callback with the new one.
For ABI compatibility, some rules were needed:
- when set function is called with NULL, all the callbacks of the state will be
removed (old behavior respect)
- try to use set or add/del exclusively with a preference to the new
APIs. This is because of the first rule and because it will be more correct.
- if you remove a callback, only one instance of this callback of this
type/state for this gesture will be removed, by comparing func and data.
It means that if you register twice the same callback/data, it will be added
twice and you will have to remove also twice too.
If _pointer_even_make is false pe stays NULL and might get dereferenced
later. Instead we return now if _pointer_event_make fails.
Thanks to Tom for consulting with the gesture layer code.
I splited ELM_SAFE_FREE refactoring patches. One commit per each file as recommended.
For the detail, please refer 3072dab12f12fe83fb5a628d15efd5cded11787f.
1. Do not need to print the same error message from all the widget codes.
2. Even though elm_widget_sub_object_add() can be used internally, there should be no error message at all.
Elm devs should fix it beforehand.
So it looks ok to print the error message in elm_widget_sub_object_add() to force elm devs to fix it.
3. Got additional code cleanups.
Smart data is already initialized so we do not need to re-initialize them if the value equals to 0, NULL, or EINA_FALSE.
Sometimes re-initializing smart data explicitly is needed for readability. So there are left overs.
SVN revision: 82228
because target object could have different gesture callback with different gesture object.
after _callbacks_unregister() is called, only one callback remains.
SVN revision: 79317
One should either listen to mouse events and filter the corrosponding multi
events, or listen only to multi events. We chose the former, so we should
handle it correctly.
SVN revision: 72905