diff options
author | yumi82.ko <yumi82.ko@samsung.com> | 2013-02-27 09:56:04 +0900 |
---|---|---|
committer | yumi82.ko <yumi82.ko@samsung.com> | 2013-02-27 09:56:04 +0900 |
commit | bc832e5ad4fe509b82ba1b0526d5a55f31c7b9dd (patch) | |
tree | 643b1d65e2689b2549a1e11b3fc434a200c7d7f2 /thread | |
parent | 5bd6bd4f6a09d930179c56c2e6d9bc6a51dd1e99 (diff) | |
download | message-app-bc832e5ad4fe509b82ba1b0526d5a55f31c7b9dd.tar.gz message-app-bc832e5ad4fe509b82ba1b0526d5a55f31c7b9dd.tar.bz2 message-app-bc832e5ad4fe509b82ba1b0526d5a55f31c7b9dd.zip |
fix N_SE-25920. add press/unpress callback to panes
Change-Id: Ic6e323d0cf886ec1593506dbad78e62ad1f16735
Diffstat (limited to 'thread')
-rwxr-xr-x | thread/include/msg-ui-thread-main.h | 3 | ||||
-rwxr-xr-x | thread/src/msg-ui-thread-callback.c | 16 | ||||
-rwxr-xr-x | thread/src/msg-ui-thread-main.c | 6 |
3 files changed, 25 insertions, 0 deletions
diff --git a/thread/include/msg-ui-thread-main.h b/thread/include/msg-ui-thread-main.h index 7aad78e..b063da7 100755 --- a/thread/include/msg-ui-thread-main.h +++ b/thread/include/msg-ui-thread-main.h @@ -131,6 +131,7 @@ typedef struct _MSG_THREAD_DATA { char locale[DEF_BUF_LEN]; bool isRotate; /* Rotation state */ + bool handlerIsPressed; /*pressed status of panes's handler*/ bool isIncomingMsg; /* Check there is new incoming message when it back from edit mode to normal. */ PMSG_THREAD_LIST_DATA list_data[MSG_THREAD_LIST_MAX_COUNT]; @@ -333,6 +334,8 @@ void msg_ui_thread_sweep_btn_cb(void *data, Evas_Object *obj, void *event_info); void msg_ui_thread_timezone_change_cb(keynode_t *key, void *data); void msg_ui_thread_gl_mode_right(void *data, Evas_Object *obj, void *event_info); void msg_ui_thread_gl_mode_left(void *data, Evas_Object *obj, void *event_info); +void msg_ui_thread_panes_handler_press_cb(void *data, Evas_Object *obj, void *event_info); +void msg_ui_thread_panes_handler_unpress_cb(void *data, Evas_Object *obj, void *event_info); /* THREAD UTILS */ int msg_ui_thread_launch_voice_call(const char *call_num); diff --git a/thread/src/msg-ui-thread-callback.c b/thread/src/msg-ui-thread-callback.c index 98c46ab..1598801 100755 --- a/thread/src/msg-ui-thread-callback.c +++ b/thread/src/msg-ui-thread-callback.c @@ -1116,3 +1116,19 @@ void msg_ui_thread_gl_mode_left(void *data, Evas_Object *obj, void *event_info) MSG_UI_LEAVE(); } + +void msg_ui_thread_panes_handler_press_cb(void *data, Evas_Object *obj, void *event_info) +{ + MSG_UI_RET_IF(MSG_UI_LEVEL_DEBUG, !data); + + PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)data; + pData->handlerIsPressed = true; +} + +void msg_ui_thread_panes_handler_unpress_cb(void *data, Evas_Object *obj, void *event_info) +{ + MSG_UI_RET_IF(MSG_UI_LEVEL_DEBUG, !data); + + PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)data; + pData->handlerIsPressed = false; +} diff --git a/thread/src/msg-ui-thread-main.c b/thread/src/msg-ui-thread-main.c index e89d534..2048dd0 100755 --- a/thread/src/msg-ui-thread-main.c +++ b/thread/src/msg-ui-thread-main.c @@ -340,6 +340,9 @@ Evas_Object *msg_ui_thread_create_layout_main(PMSG_THREAD_DATA pData) evas_object_size_hint_align_set(pData->panes, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(pData->panes); + evas_object_smart_callback_add(pData->panes, "press", msg_ui_thread_panes_handler_press_cb, pData); + evas_object_smart_callback_add(pData->panes, "unpress", msg_ui_thread_panes_handler_unpress_cb, pData); + elm_object_part_content_set(layout, "elm.swallow.content", pData->panes); pData->layout_main = elm_layout_add(pData->panes); @@ -892,6 +895,9 @@ void msg_ui_thread_rotation_set(void *data, int rot) if (!pData) return; + if (pData->handlerIsPressed) + evas_event_feed_mouse_up(evas_object_evas_get(pData->panes), 1, EVAS_BUTTON_NONE, 0, NULL); + if (rot == THREAD_ROTATE_ANGLE_LANDSCAPE || rot == THREAD_ROTATE_ANGLE_LANDSCAPE_UPSIDEDOWN) { pData->isRotate = true; msg_ui_thread_split_view_show(pData); |