From 408382a821985bdf3c1399df683369e51f1ee47b Mon Sep 17 00:00:00 2001 From: minkyu kim Date: Fri, 29 Mar 2013 20:05:29 +0900 Subject: [PATCH] add clipboard key codes Change-Id: I1be89c96cf2f48c04cab2211747f849c3a2490b4 --- src/ui/FUi_EflUiEventManager.cpp | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/ui/FUi_EflUiEventManager.cpp b/src/ui/FUi_EflUiEventManager.cpp index a29da72..0430fe8 100644 --- a/src/ui/FUi_EflUiEventManager.cpp +++ b/src/ui/FUi_EflUiEventManager.cpp @@ -802,6 +802,29 @@ OnKeyReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) } Eina_Bool +OnClipboardMessageReceived(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + Ecore_X_Event_Client_Message *pEv = static_cast(pEventInfo); + + if (pEv->message_type != ecore_x_atom_get("CBHM_MSG")) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (!strcmp("SET_OWNER", pEv->data.b)) + { + _KeyEvent event(KEY_PRESSED, _KEY_OEM_1, 0, pEv); + SysLog(NID_UI, "KeyName = clipboard, KeyCode = _KEY_OEM_1, KeyModifier = 0"); + event.Send(); + + SetLastResult(E_SUCCESS); + } + + return ECORE_CALLBACK_PASS_ON; +} + + +Eina_Bool OnTouchPressed(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) { Ecore_Event_Mouse_Button* pEv = static_cast (pEventInfo); @@ -872,7 +895,7 @@ OnTouchReleased(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) } if (pFingerInfo->GetDeviceId() == pEv->multi.device) - { + { pFingerInfo->SetPointId(INVALID_POINT_ID); break; } @@ -1185,6 +1208,12 @@ _EflUiEventManager::_EflUiEventManager(void) pEventHandlers->Add(pEventHandler); + // clipboard key + pEventHandler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, OnClipboardMessageReceived, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + // Touch pEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, OnTouchPressed, null); SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); -- 2.7.4