summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c50
1 files changed, 40 insertions, 10 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index aecbe4e700..24c287fdee 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -4502,15 +4502,45 @@ _direct_mouse_out_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info)
4502} 4502}
4503 4503
4504static Eina_Bool 4504static Eina_Bool
4505_direct_key_down_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info EINA_UNUSED) 4505_direct_key_updown_cb(Ecore_Evas *ee, const Ecore_Event_Key *info, Eina_Bool down)
4506{ 4506{
4507 return EINA_FALSE; 4507 Efl_Event_Key_Data *ev;
4508} 4508 Efl_Event_Key *evt;
4509 Evas *e = ee->evas;
4510 Eina_Bool processed;
4509 4511
4510static Eina_Bool 4512 /* Unused information:
4511_direct_key_up_cb(Ecore_Evas *ee EINA_UNUSED, const Ecore_Event_Key *info EINA_UNUSED) 4513 * window
4512{ 4514 * root_window
4513 return EINA_FALSE; 4515 * event_window
4516 * same_screen
4517 * modifiers (already passed to evas, no need to do anything)
4518 */
4519
4520 evt = eo_add(EFL_EVENT_KEY_CLASS, e);
4521 ev = eo_data_scope_get(evt, EFL_EVENT_KEY_CLASS);
4522 if (!ev) return EINA_FALSE;
4523
4524 ev->timestamp = info->timestamp;
4525 ev->pressed = down;
4526 eina_stringshare_replace(&ev->keyname, info->keyname);
4527 eina_stringshare_replace(&ev->key, info->key);
4528 eina_stringshare_replace(&ev->string, info->string);
4529 eina_stringshare_replace(&ev->compose, info->compose);
4530 ev->keycode = info->keycode;
4531 ev->data = info->data;
4532 ev->event_flags = 0;
4533 ev->device = NULL; /* FIXME */
4534
4535 if (down)
4536 eo_event_callback_call(e, EFL_EVENT_KEY_DOWN, evt);
4537 else
4538 eo_event_callback_call(e, EFL_EVENT_KEY_UP, evt);
4539
4540 processed = ev->evas_done;
4541 eo_unref(evt);
4542
4543 return processed;
4514} 4544}
4515 4545
4516static Eina_Bool 4546static Eina_Bool
@@ -4538,11 +4568,11 @@ _ecore_evas_input_direct_cb(void *window, int type, const void *info)
4538 else if (type == ECORE_EVENT_MOUSE_OUT) 4568 else if (type == ECORE_EVENT_MOUSE_OUT)
4539 return _direct_mouse_out_cb(ee, (const Ecore_Event_Mouse_IO *) info); 4569 return _direct_mouse_out_cb(ee, (const Ecore_Event_Mouse_IO *) info);
4540 else if (type == ECORE_EVENT_KEY_DOWN) 4570 else if (type == ECORE_EVENT_KEY_DOWN)
4541 return _direct_key_down_cb(ee, (const Ecore_Event_Key *) info); 4571 return _direct_key_updown_cb(ee, (const Ecore_Event_Key *) info, EINA_TRUE);
4572 else if (type == ECORE_EVENT_KEY_UP)
4573 return _direct_key_updown_cb(ee, (const Ecore_Event_Key *) info, EINA_FALSE);
4542 else if (type == ECORE_EVENT_MOUSE_BUTTON_CANCEL) 4574 else if (type == ECORE_EVENT_MOUSE_BUTTON_CANCEL)
4543 return _direct_mouse_cancel_cb(ee, (const Ecore_Event_Mouse_Button *) info); 4575 return _direct_mouse_cancel_cb(ee, (const Ecore_Event_Mouse_Button *) info);
4544 else if (type == ECORE_EVENT_KEY_UP)
4545 return _direct_key_up_cb(ee, (const Ecore_Event_Key *) info);
4546 else if (type == ECORE_EVENT_AXIS_UPDATE) 4576 else if (type == ECORE_EVENT_AXIS_UPDATE)
4547 return _direct_axis_update_cb(ee, (const Ecore_Event_Axis_Update *) info); 4577 return _direct_axis_update_cb(ee, (const Ecore_Event_Axis_Update *) info);
4548 else 4578 else