From: duna.oh Date: Thu, 9 Nov 2023 09:51:42 +0000 (+0900) Subject: e_test_efl_util: request set_touch_count(10) before initializing touch device X-Git-Tag: accepted/tizen/unified/20231110.172153~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b392ecaa7519f48cbf463b069c24c190b9fb925;p=platform%2Fcore%2Fuifw%2Fe-tizen-testcase.git e_test_efl_util: request set_touch_count(10) before initializing touch device Change-Id: Ifb6a4d84507606e8f3fc2434f153b085798edb50 --- diff --git a/src/e_test_efl_util.cpp b/src/e_test_efl_util.cpp index 4007466..b206538 100644 --- a/src/e_test_efl_util.cpp +++ b/src/e_test_efl_util.cpp @@ -35,7 +35,7 @@ etInputGenHandler::generateMouseDown(int x, int y) x, y); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate mouse down, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate mouse down, x: %d, y: %d, ret: %d(%s)\n", x, y, ret, printErrorCode(ret)); return EINA_FALSE; } @@ -57,7 +57,7 @@ etInputGenHandler::generateMouseMove(int x, int y) x, y); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate mouse move, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate mouse move, x: %d, y: %d, ret: %d(%s)\n", x, y, ret, printErrorCode(ret)); return EINA_FALSE; } @@ -79,7 +79,7 @@ etInputGenHandler::generateMouseUp(int x, int y) x, y); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate mouse up, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate mouse up, x: %d, y: %d, ret: %d(%s)\n", x, y, ret, printErrorCode(ret)); return EINA_FALSE; } @@ -142,7 +142,7 @@ etInputGenHandler::generateKeyPress(const char *keyname) 1); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate key press, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate key press, keyname: %c, ret: %d(%s)\n", keyname, ret, printErrorCode(ret)); return EINA_FALSE; } @@ -163,7 +163,7 @@ etInputGenHandler::generateKeyRelease(const char *keyname) 0); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate key release, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate key release, keyname: %c, ret: %d(%s)\n", keyname, ret, printErrorCode(ret)); return EINA_FALSE; } @@ -202,7 +202,7 @@ etInputGenHandler::generateTouchDown(int idx, int x, int y) x, y); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate touch down, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate touch down, idx: %d, x: %d, y: %d, ret: %d(%s)\n", idx, x, y, ret, printErrorCode(ret)); return EINA_FALSE; } @@ -224,7 +224,7 @@ etInputGenHandler::generateTouchMove(int idx, int x, int y) x, y); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate touch move, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate touch move, idx: %d, x: %d, y: %d, ret: %d(%s)\n", idx, x, y, ret, printErrorCode(ret)); return EINA_FALSE; } @@ -246,7 +246,7 @@ etInputGenHandler::generateTouchUp(int idx, int x, int y) x, y); if (ret != EFL_UTIL_ERROR_NONE) { - printf("failed to generate touch up, ret: %d(%s)\n", ret, printErrorCode(ret)); + printf("failed to generate touch up, idx: %d, x: %d, y: %d, ret: %d(%s)\n", idx, x, y, ret, printErrorCode(ret)); return EINA_FALSE; } diff --git a/src/e_test_efl_util.h b/src/e_test_efl_util.h index 05d3c70..87cb490 100644 --- a/src/e_test_efl_util.h +++ b/src/e_test_efl_util.h @@ -12,6 +12,14 @@ class etInputGenHandler etInputGenHandler(efl_util_input_device_type_e type) : handler(nullptr) { + if (type == EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN) + { + int ret = EFL_UTIL_ERROR_NONE; + ret = efl_util_input_set_touch_count(10); + if (ret != EFL_UTIL_ERROR_NONE) + printf("failed to set touch count: (ret: %d)", ret); + } + handler = efl_util_input_initialize_generator_with_name(type, NULL); if (handler == nullptr) @@ -20,6 +28,14 @@ class etInputGenHandler etInputGenHandler(efl_util_input_device_type_e type, bool with_sync) : handler(nullptr) { + if (type == EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN) + { + int ret = EFL_UTIL_ERROR_NONE; + ret = efl_util_input_set_touch_count(10); + if (ret != EFL_UTIL_ERROR_NONE) + printf("failed to set touch count: (ret: %d)", ret); + } + if (with_sync) handler = efl_util_input_initialize_generator_with_sync(type, NULL); else