ecore_wl2: add tizen_launch_appinfo interface 44/205344/3
authorJunseok, Kim <juns.kim@samsung.com>
Tue, 30 Apr 2019 03:57:12 +0000 (12:57 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Thu, 2 May 2019 12:44:30 +0000 (12:44 +0000)
Change-Id: I3c4b1df5cda3d46f3eff1406d3f36f2944477006

configure.ac
packaging/efl-with-elm.spec.example
packaging/efl-without-elm.spec.example
packaging/efl.spec
packaging/elm-only.spec.example
src/lib/ecore_wl2/ecore_wl2_display.c
src/lib/ecore_wl2/ecore_wl2_private.h
src/lib/ecore_wl2/meson.build

index 4ec6242..7d0bd56 100755 (executable)
@@ -3770,7 +3770,7 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [efl])
 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eina])
 
 EFL_DEPEND_PKG([ECORE_WAYLAND], [WAYLAND],
-   [wayland-client >= 1.8.0 wayland-cursor >= 1.8.0 xkbcommon >= 0.5.0 uuid xdg-shell-client text-client tizen-extension-client wayland-tbm-client libtdm-client])
+   [wayland-client >= 1.8.0 wayland-cursor >= 1.8.0 xkbcommon >= 0.5.0 uuid xdg-shell-client text-client tizen-extension-client tizen-launch-client wayland-tbm-client libtdm-client])
 
 EFL_EVAL_PKGS([ECORE_WAYLAND])
 
@@ -3810,7 +3810,7 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_WL2], [efl])
 EFL_INTERNAL_DEPEND_PKG([ECORE_WL2], [eina])
 
 EFL_DEPEND_PKG([ECORE_WL2], [WAYLAND],
-   [wayland-server >= 1.11.0 wayland-client >= 1.11.0 wayland-cursor >= 1.8.0 xkbcommon >= 0.6.0] tizen-extension-client wayland-tbm-client libtdm-client)
+   [wayland-server >= 1.11.0 wayland-client >= 1.11.0 wayland-cursor >= 1.8.0 xkbcommon >= 0.6.0] tizen-extension-client tizen-launch-client wayland-tbm-client libtdm-client)
 
 EFL_EVAL_PKGS([ECORE_WL2])
 
index 45f760c..e745c0e 100644 (file)
@@ -32,6 +32,7 @@ BuildRequires:  pkgconfig(xdg-shell-client)
 BuildRequires:  pkgconfig(wayland-tbm-client)
 BuildRequires:  pkgconfig(wayland-tbm-server)
 BuildRequires:  pkgconfig(tizen-extension-client)
+BuildRequires:  pkgconfig(tizen-launch-client)
 BuildRequires:  pkgconfig(tizen-remote-surface-client)
 BuildRequires:  pkgconfig(wayland-egl-tizen)
 BuildRequires:  wayland-protocols
index 884f205..acee6ce 100644 (file)
@@ -32,6 +32,7 @@ BuildRequires:  pkgconfig(xdg-shell-client)
 BuildRequires:  pkgconfig(wayland-tbm-client)
 BuildRequires:  pkgconfig(wayland-tbm-server)
 BuildRequires:  pkgconfig(tizen-extension-client)
+BuildRequires:  pkgconfig(tizen-launch-client)
 BuildRequires:  pkgconfig(tizen-remote-surface-client)
 BuildRequires:  pkgconfig(wayland-egl-tizen)
 BuildRequires:  wayland-protocols
index cdbede1..2a0b64e 100644 (file)
@@ -51,6 +51,7 @@ BuildRequires:  pkgconfig(xdg-shell-client)
 BuildRequires:  pkgconfig(wayland-tbm-client)
 BuildRequires:  pkgconfig(wayland-tbm-server)
 BuildRequires:  pkgconfig(tizen-extension-client)
+BuildRequires:  pkgconfig(tizen-launch-client)
 BuildRequires:  pkgconfig(tizen-remote-surface-client)
 BuildRequires:  wayland-protocols
 Requires:       libwayland-extension-client
index 243eb1f..9c8697d 100644 (file)
@@ -60,6 +60,7 @@ BuildRequires:  pkgconfig(xdg-shell-client)
 BuildRequires:  pkgconfig(wayland-tbm-client)
 BuildRequires:  pkgconfig(wayland-tbm-server)
 BuildRequires:  pkgconfig(tizen-extension-client)
+BuildRequires:  pkgconfig(tizen-launch-client)
 BuildRequires:  pkgconfig(tizen-remote-surface-client)
 BuildRequires:  pkgconfig(wayland-egl-tizen)
 BuildRequires:  wayland-protocols
index 1d55e3e..2cfe267 100644 (file)
@@ -18,6 +18,12 @@ static void      _ecore_wl_cb_awake(void *data);
 // End of TIZEN_ONLY(20171129)
 static void _ecore_wl2_display_sync_add(Ecore_Wl2_Display *ewd);
 
+// TIZEN_ONLY(20190430): support client appinfo
+static pid_t _base_resolution_pid = 0;
+static uint32_t _base_resolution_w = 0;
+static uint32_t _base_resolution_h = 0;
+//
+
 void
 _display_event_free(void *d, void *event)
 {
@@ -508,6 +514,29 @@ static const struct tizen_policy_listener _tizen_policy_listener =
    _tizen_policy_cb_conformant_region,
 };
 
+// TIZEN_ONLY(20190430): support client appinfo
+static void
+_tizen_appinfo_cb_base_output_resolution_done(void *data, struct tizen_launch_appinfo *tz_appinfo EINA_UNUSED, uint32_t pid, uint32_t width, uint32_t height)
+{
+   Ecore_Wl2_Display *ewd = data;
+
+   if (!ewd) return;
+   if (_base_resolution_pid != pid)
+     {
+        ERR("tzappinfo_cb_size_get_done pid is different. pid: %d / width: %d / height: %d appinfo_pid: %d", pid, width, height, _base_resolution_pid);
+        return;
+     }
+
+   if (_base_resolution_w != width) _base_resolution_w = width;
+   if (_base_resolution_h != height) _base_resolution_h = height;
+}
+
+static const struct tizen_launch_appinfo_listener _tizen_launch_appinfo_listener =
+{
+   _tizen_appinfo_cb_base_output_resolution_done,
+};
+//
+
 static void
 _tizen_policy_ext_cb_active_angle(void *data, struct tizen_policy_ext *tizen_policy_ext EINA_UNUSED, uint32_t angle)
 {
@@ -880,6 +909,15 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
           tizen_screen_rotation_add_listener(ewd->wl.tz_moveresize, &_tizen_move_resize_listener, ewd->wl.display);
      }
 //
+// TIZEN_ONLY(20190430): support client appinfo
+   else if (!strcmp(interface, "tizen_launch_appinfo"))
+     {
+        ewd->wl.tz_appinfo =
+           wl_registry_bind(registry, id, &tizen_launch_appinfo_interface, 1);
+        if (ewd->wl.tz_appinfo)
+          tizen_launch_appinfo_add_listener(ewd->wl.tz_appinfo, &_tizen_launch_appinfo_listener, ewd->wl.display);
+     }
+//
    //
 
 event:
index f7808dc..12cba4b 100644 (file)
 #include <tbm_surface_queue.h>
 //
 
+// TIZEN_ONLY(20190430) : support client appinfo
+#include <wayland-extension/tizen-launch-client-protocol.h>
+//
+
 extern int _ecore_wl2_log_dom;
 extern Eina_Bool no_session_recovery;
 
@@ -122,6 +126,9 @@ struct _Ecore_Wl2_Display
         //TIZEN_ONLY(20180810): support client demand move resize
         struct tizen_move_resize *tz_moveresize;
         //
+        // TIZEN_ONLY(20190430): support client appinfo
+        struct tizen_launch_appinfo *tz_appinfo;
+        //
 
         int compositor_version;
      } wl;
index e9a2cdc..efc5ed9 100644 (file)
@@ -26,6 +26,7 @@ ecore_wl2_src = [
 ecore_wl2_deps += [
   dependency('wayland-cursor'),
   dependency('tizen-extension-client'),
+  dependency('tizen-launch-client'),
   dependency('wayland-tbm-client'),
   dependency('libtdm-client'),
 ]