Reputation: 182
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?
Upvotes: 0
Views: 2263
Reputation: 1
use eext_object_event_callback_add(Evas_Object * obj,eext_callback_type type,callback_fun,NULL) and in call back function you can write your requirement
Upvotes: 0
Reputation: 131
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.
Upvotes: 0
Reputation: 26
Instead of EVAS_CALLBACK_KEY_DOWNand
evas_object_event_callback_add()`,
ea_object_event_callback_add
EA_CALLBACK_BACK
for back buttonEA_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 filesUpvotes: 1
Reputation: 592
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.
Upvotes: 0