I use EFL library to develop applications for Tizen platform. I need to implement event handler for hardware button "Back".
In native Tizen API it is done pretty simple. But I have no idea how can I do this in EFL library.
I tried to do it using the following way:
evas_object_event_callback_add( obj, EVAS_CALLBACK_KEY_DOWN, on_key_down, NULL );
But it doesn't work.
Could anyone help me?
Instead of EVAS_CALLBACK_KEY_DOWN and
evas_object_event_callback_add()`,
ea_object_event_callback_add
EA_CALLBACK_BACK
for back button EA_CALLBACK_MORE
for menu button but you need to include one header file, unfortunately I forgot the header file name some thing efl-util.h or something, you can make a search in header files AFAIK the thing is that EFL uses queues for processing events. That means that callbacks are called one by one: the first should return PASS_ON (or something) for the next callback for the same event to be run.
So, there may be another callback that does not allow the dispatch of the event.
Try
Ecore_Event_Handler *handler;
handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, hardware_key_down_cb, NULL);
In hardware_key_down_cb() callback function, check for key name ' XF86Stop ' Ecore_Event_Key to handle back key event.
使用eext_object_event_callback_add(Evas_Object * obj,eext_callback_type type,callback_fun,NULL),并在回调函数中可以编写您的要求
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.