From dc37f8f058c78737a73302c915a035506d6d1d60 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Sat, 13 Jul 2013 21:00:03 +0900 Subject: [PATCH] Update the accessibility event handler. [model] Redwood [binary_type] AP [customer] Docomo/Orange/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: Ibf3d89bc6abc86ab2ddc2a7d44c220e58331a8c8 --- packaging/liblivebox.spec | 2 +- src/livebox.c | 12 +++++++++++- src/virtual_window.c | 16 ++++++++-------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/packaging/liblivebox.spec b/packaging/liblivebox.spec index 56ee405..f92290f 100644 --- a/packaging/liblivebox.spec +++ b/packaging/liblivebox.spec @@ -1,6 +1,6 @@ Name: liblivebox Summary: Library for the development of a livebox -Version: 0.4.1 +Version: 0.4.2 Release: 1 Group: HomeTF/Livebox License: Flora License diff --git a/src/livebox.c b/src/livebox.c index f6a6732..adf4c25 100644 --- a/src/livebox.c +++ b/src/livebox.c @@ -473,7 +473,16 @@ static inline int event_handler_wrapper(struct livebox_buffer *buffer, enum buff int ret; pkgname = provider_buffer_pkgname(buffer); - id = provider_buffer_pkgname(buffer); + if (!pkgname) { + ErrPrint("pkgname is not valid\n"); + return LB_STATUS_ERROR_INVALID; + } + + id = provider_buffer_id(buffer); + if (!id) { + ErrPrint("id is not valid[%s]\n", pkgname); + return LB_STATUS_ERROR_INVALID; + } ret = cbdata->handler(buffer, event, timestamp, x, y, cbdata->cbdata); @@ -488,6 +497,7 @@ static inline int event_handler_wrapper(struct livebox_buffer *buffer, enum buff case BUFFER_EVENT_SCROLL_MOVE: case BUFFER_EVENT_SCROLL_DOWN: case BUFFER_EVENT_UNHIGHLIGHT: + DbgPrint("Accessibility event: %d\n", event); if (ret < 0) (void)provider_send_access_status(pkgname, id, LB_ACCESS_STATUS_ERROR); else diff --git a/src/virtual_window.c b/src/virtual_window.c index 58b92b9..9fe6c74 100644 --- a/src/virtual_window.c +++ b/src/virtual_window.c @@ -65,22 +65,22 @@ static int event_handler_cb(struct livebox_buffer *handler, enum buffer_event ev */ switch (evt) { case BUFFER_EVENT_ENTER: - evas_event_feed_mouse_in(e, timestamp, NULL); + evas_event_feed_mouse_in(e, timestamp * 1000, NULL); break; case BUFFER_EVENT_LEAVE: - evas_event_feed_mouse_out(e, timestamp, NULL); + evas_event_feed_mouse_out(e, timestamp * 1000, NULL); break; case BUFFER_EVENT_DOWN: - evas_event_feed_mouse_in(e, timestamp, NULL); - evas_event_feed_mouse_move(e, ix, iy, timestamp + 0.01f, NULL); /* + 0.1f just for fake event */ - evas_event_feed_mouse_down(e, 1, EVAS_BUTTON_NONE, timestamp + 0.02f, NULL); /* + 0.2f just for fake event */ + evas_event_feed_mouse_in(e, timestamp * 1000, NULL); + evas_event_feed_mouse_move(e, ix, iy, (timestamp + 0.01f) * 1000, NULL); /* + 0.1f just for fake event */ + evas_event_feed_mouse_down(e, 1, EVAS_BUTTON_NONE, (timestamp + 0.02f) * 1000, NULL); /* + 0.2f just for fake event */ break; case BUFFER_EVENT_MOVE: - evas_event_feed_mouse_move(e, ix, iy, timestamp, NULL); + evas_event_feed_mouse_move(e, ix, iy, timestamp * 1000, NULL); break; case BUFFER_EVENT_UP: - evas_event_feed_mouse_up(e, 1, EVAS_BUTTON_NONE, timestamp, NULL); - evas_event_feed_mouse_out(e, timestamp + 0.01f, NULL); /* + 0.1f just for fake event */ + evas_event_feed_mouse_up(e, 1, EVAS_BUTTON_NONE, timestamp * 1000, NULL); + evas_event_feed_mouse_out(e, (timestamp + 0.01f) * 1000, NULL); /* + 0.1f just for fake event */ break; case BUFFER_EVENT_HIGHLIGHT: if (!parent_elm) { -- 2.7.4