e_test_efl_util: request set_touch_count(10) before initializing touch device 38/301138/1
authorduna.oh <duna.oh@samsung.com>
Thu, 9 Nov 2023 09:51:42 +0000 (18:51 +0900)
committerduna.oh <duna.oh@samsung.com>
Thu, 9 Nov 2023 09:51:45 +0000 (18:51 +0900)
Change-Id: Ifb6a4d84507606e8f3fc2434f153b085798edb50

src/e_test_efl_util.cpp
src/e_test_efl_util.h

index 400746694b1c15e127b88860e71661c2fd513ee2..b2065381524bf6b06c35b351cc18d448c8181ac7 100644 (file)
@@ -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;
      }
 
index 05d3c70c334c9081a52907309fa9c8c43b8d6a36..87cb490d33d035f10dd17e936d6e62d4e6e1b2de 100644 (file)
@@ -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