From: Seoyeon Kim Date: Thu, 27 Apr 2017 13:10:38 +0000 (+0900) Subject: Add PRIVATECOMMAND of ImfEvent in text-controller X-Git-Tag: dali_1.2.38~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5149e02ac3595cc6f73cca7eb4682f7dbafe00b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Add PRIVATECOMMAND of ImfEvent in text-controller Change-Id: I00af8ca6913004bd90c58652ef34bc6a1fbce0e4 Signed-off-by: Seoyeon Kim --- diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp index d39a88f..c0a7076 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Controller.cpp @@ -241,6 +241,13 @@ int UtcDaliTextControllerImfEvent(void) controller->GetText( text ); DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION ); + // Send PRIVATECOMMAND event + imfEvent = ImfManager::ImfEventData( ImfManager::PRIVATECOMMAND, "", 0, 0 ); + controller->OnImfEvent( imfManager, imfEvent ); + + controller->GetText( text ); + DALI_TEST_EQUALS( "Hello wo", text, TEST_LOCATION ); + tet_result(TET_PASS); END_TEST; } diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.h index a777d95..392b580 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-imf-manager.h @@ -53,7 +53,8 @@ public: PREEDIT, ///< Pre-Edit changed COMMIT, ///< Commit recieved DELETESURROUNDING, ///< Event to delete a range of characters from the string - GETSURROUNDING ///< Event to query string and cursor position + GETSURROUNDING, ///< Event to query string and cursor position + PRIVATECOMMAND ///< Private command sent from the input panel }; /** diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index 5e40058..2811804 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -2148,6 +2148,13 @@ ImfManager::ImfCallbackData Controller::OnImfEvent( ImfManager& imfManager, cons retrieveCursor = true; break; } + case ImfManager::PRIVATECOMMAND: + { + // PRIVATECOMMAND event is just for getting the private command message + retrieveText = true; + retrieveCursor = true; + break; + } case ImfManager::VOID: { // do nothing