Modify to support ecore_wl2 44/172944/2 accepted/tizen/unified/20180328.010203 submit/tizen/20180319.053649
authorWonki Kim <wonki_.kim@samsung.com>
Mon, 19 Mar 2018 04:52:15 +0000 (13:52 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 19 Mar 2018 05:02:28 +0000 (14:02 +0900)
this patch replaces ecore_wayland by ecore_wl2 for efl 1.20 upgrade.

Change-Id: I847cf9dfb9ebc79912e1259f89db4ea5b33bf4f6
Signed-off-by: Wonki Kim <wonki_.kim@samsung.com>
configure.ac
packaging/efl-config.spec
src/efl_config.c

index 3a643bda12b4d151d3163cf54d2d9ef39f203de2..eafb272a266e2970370d89f0b6617dbe8de4b998 100644 (file)
@@ -18,7 +18,7 @@ LT_INIT
 AC_PROG_LIBTOOL
 # Checks for library functions.
 PKG_CHECK_MODULES([ELEMENTARY],[elementary])
-PKG_CHECK_MODULES([ECOREWAYLAND],[ecore-wayland])
+PKG_CHECK_MODULES([ECOREWAYLAND],[ecore-wl2])
 PKG_CHECK_MODULES([CAPISYSTEMINFO],[capi-system-info])
 
 AC_SUBST([DESKTOP])
index 74728f164d0cd8c2f0165e8107e6d2ff29a7a874..0a6790ea442e55f476cbc7b7f2b610e429b903e1 100644 (file)
@@ -11,7 +11,7 @@ Source2: %{alias}.manifest
 BuildRequires: automake
 BuildRequires: libtool
 BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(ecore-wayland)
+BuildRequires: pkgconfig(ecore-wl2)
 BuildRequires: pkgconfig(libtzplatform-config)
 BuildRequires: pkgconfig(libsystemd)
 BuildRequires: pkgconfig(capi-system-info)
@@ -24,6 +24,8 @@ EFL config daemon
 cp %{SOURCE2} .
 
 %build
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
+
 ./autogen.sh
 TZ_SYS_BIN=%{TZ_SYS_BIN} ./configure --prefix %{_prefix}/
 
index 579ab93960186b1dcfcf24d4f46a83e77dae416a..3230c9a4394487aa89c750807950558f925b1328 100644 (file)
@@ -1,5 +1,5 @@
 #include <Elementary.h>
-#include <Ecore_Wayland.h>
+#include <Ecore_Wl2.h>
 
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -71,19 +71,23 @@ static inline tizen_profile_t get_tizen_profile()
 }
 
 static void
-_scale_set(void)
+_scale_set(Evas_Object *win)
 {
    Evas_Coord w, h;
    float inch, scale = 0.0, saved_scale = 0.0, profile_factor = 1.0;
    int dpi;
 
-   ecore_wl_sync();
-   dpi = ecore_wl_dpi_get();
+   Ecore_Wl2_Window *wlwin = elm_win_wl_window_get(win);
+   Ecore_Wl2_Output *wlout = ecore_wl2_window_output_find(wlwin);
+   Ecore_Wl2_Display *wldp = ecore_wl2_window_display_get(wlwin);
+
+   ecore_wl2_sync();
+   dpi = ecore_wl2_output_dpi_get(wlout);
 
    tizen_profile_t prof = get_tizen_profile();
    if (prof == TIZEN_PROFILE_MOBILE || prof == TIZEN_PROFILE_IVI || prof == TIZEN_PROFILE_COMMON)
      {
-        ecore_wl_screen_size_get(&w, &h);
+        ecore_wl2_display_screen_size_get(wldp, &w, &h);
 
         inch = floor(sqrt((w * w) + (h * h)) / dpi * 10 + 0.5) / 10;
 
@@ -99,7 +103,7 @@ _scale_set(void)
      }
    else /* prof == TIZEN_PROFILE_TV */
      {
-        ecore_wl_screen_size_get(&w, &h);
+        ecore_wl2_display_screen_size_get(wldp, &w, &h);
 
         profile_factor = 2.0;
         scale = floor((double)w * profile_factor / 1920 * 10 + 0.5) / 10;
@@ -322,7 +326,7 @@ int main(int argc, char **argv)
 
    EINA_LOG_INFO("efl-config :: START");
 
-   elm_win_add(NULL, "config", ELM_WIN_BASIC);
+   Evas_Object *win = elm_win_add(NULL, "config", ELM_WIN_BASIC);
 
    if (argc > 1)
      {
@@ -339,7 +343,7 @@ int main(int argc, char **argv)
    else
      {
         EINA_LOG_DBG("efl-config :: Launching without option. Call _scale_set()");
-        _scale_set();
+        _scale_set(win);
      }
 
    if (opt_with_message)