e_test_helper: Add method to get screen size without output resolution 50/314750/2 tizen
authorJunseok Kim <juns.kim@samsung.com>
Tue, 16 Jul 2024 05:44:47 +0000 (14:44 +0900)
committerJunSeok Kim <juns.kim@samsung.com>
Fri, 19 Jul 2024 00:20:34 +0000 (00:20 +0000)
Change-Id: Ic3cb31b86ff71c473c1b411066844062a2b943b0

src/bin/debug/e_test_helper.c

index b2d3751..f7ed3ad 100644 (file)
@@ -12,6 +12,7 @@
 #include "e_utils_intern.h"
 #include "e_hints_intern.h"
 #include "e_appinfo_intern.h"
+#include "e_comp_screen_intern.h"
 
 #define BUS "org.enlightenment.wm"
 #define PATH "/org/enlightenment/wm"
@@ -79,6 +80,7 @@ static Eldbus_Message *_e_test_helper_cb_del_supported_aux_hint(const Eldbus_Ser
 static Eldbus_Message *_e_test_helper_cb_get_aux_hint(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
 static Eldbus_Message *_e_test_helper_cb_set_configured_output_resolution(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
 static Eldbus_Message *_e_test_helper_cb_set_base_output_resolution(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
+static Eldbus_Message *_e_test_helper_cb_get_screen_size(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg);
 static Eina_Bool _e_test_helper_cb_img_render(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
 static Eina_Bool _e_test_helper_cb_effect_start(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
 static Eina_Bool _e_test_helper_cb_effect_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
@@ -327,6 +329,12 @@ static const Eldbus_Method methods[] ={
           ELDBUS_ARGS({"i", "configured output resolution is set or not"}),
           _e_test_helper_cb_set_base_output_resolution, 0,
        },
+       {
+          "GetScreenSize",
+          NULL,
+          ELDBUS_ARGS({"ii", "width and height of screen"}),
+          _e_test_helper_cb_get_screen_size, 0,
+       },
        { }
 };
 
@@ -1689,6 +1697,22 @@ fin:
    return reply;
 }
 
+static Eldbus_Message *
+_e_test_helper_cb_get_screen_size(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
+{
+   Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+   int width = -1, height = -1;
+
+   if (!th_data) goto fin;
+
+   e_comp_screen_size_get(e_comp->e_comp_screen, &width, &height);
+
+fin:
+   eldbus_message_arguments_append(reply, "ii", width, height);
+
+   return reply;
+}
+
 static Eina_Bool
 _e_test_helper_cb_img_render(void *data EINA_UNUSED,
                              int type EINA_UNUSED,