DSWaylandTizenLaunchEffect/Splash: add skeleton code for tizen_launch_effect/splash 42/242342/1
authorDuna Oh <duna.oh@samsung.com>
Mon, 24 Aug 2020 01:25:24 +0000 (10:25 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 25 Aug 2020 12:40:49 +0000 (21:40 +0900)
Change-Id: Id600cd5f63056df52417934e5f9ca7df9b1fc591

12 files changed:
samples/exampleClient.c
src/DSWaylandExtension/DSWaylandExtension.cpp
src/DSWaylandExtension/DSWaylandExtensionPrivate.h
src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp [new file with mode: 0644]
src/DSWaylandServer/DSWaylandTizenLaunchEffect.h [new file with mode: 0644]
src/DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h [new file with mode: 0644]
src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp [new file with mode: 0644]
src/DSWaylandServer/DSWaylandTizenLaunchSplash.h [new file with mode: 0644]
src/DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h [new file with mode: 0644]
src/meson.build
tests/DSWaylandTizenLaunchEffect-test.cpp [new file with mode: 0644]
tests/meson.build

index 929f72b..6726029 100644 (file)
@@ -50,6 +50,8 @@ struct xkb_context *xkb_context = NULL;
 struct xkb_keymap *keymap = NULL;
 struct tizen_policy *tz_policy = NULL;
 struct tizen_launch_appinfo *tz_appinfo = NULL;
+struct tizen_launch_effect *tz_launcheffect = NULL;
+struct tizen_launch_splash *tz_launchsplash = NULL;
 struct zxdg_shell_v6 *zxdg_shell;
 struct zxdg_surface_v6 *zxdg_surface;
 struct zxdg_toplevel_v6 *zxdg_toplevel;
@@ -483,6 +485,12 @@ global_registry_handler(void *data, struct wl_registry *registry, uint32_t id,
        {
                output = wl_registry_bind(registry, id, &wl_output_interface, 2);
        }
+       else if(strcmp(interface, "tizen_launch_effect") == 0)
+       {
+               tz_launcheffect = wl_registry_bind(registry, id, &tizen_launch_effect_interface, 1);
+
+               tz_launchsplash = tizen_launch_effect_create_splash_img(tz_launcheffect);
+       }
 }
 
 static void
index 0c27e6c..6534383 100644 (file)
@@ -27,7 +27,7 @@
 #include "DSWaylandZxdgShellV6.h"
 #include "DSWaylandTizenPolicy.h"
 #include "DSWaylandTizenAppinfo.h"
-
+#include "DSWaylandTizenLaunchEffect.h"
 
 namespace display_server
 {
@@ -57,6 +57,7 @@ bool DSWaylandExtensionPrivate::init(DSWaylandCompositor *compositor)
                __initShell();
                __initTizenPolicy();
                __initTizenAppinfo();
+               __initTizenLaunchEffect();
        }
        catch(const std::runtime_error& e)
        {
@@ -109,6 +110,18 @@ bool DSWaylandExtensionPrivate::__initTizenAppinfo(void)
        return true;
 }
 
+bool DSWaylandExtensionPrivate::__initTizenLaunchEffect(void)
+{
+       __tzLaunchEffect = std::make_shared<DSWaylandTizenLaunchEffect>(__compositor);
+       if (__tzLaunchEffect == nullptr)
+       {
+               throw std::runtime_error(__func__);
+               return false;
+       }
+
+       return true;
+}
+
 DSWaylandExtension::DSWaylandExtension(DSWaylandCompositor *compositor)
        : DS_INIT_PRIVATE_PTR(DSWaylandExtension)
 {
index 361082b..2c063d3 100644 (file)
@@ -30,6 +30,7 @@ namespace display_server
 class DSWaylandZxdgShellV6;
 class DSWaylandTizenPolicy;
 class DSWaylandTizenAppinfo;
+class DSWaylandTizenLaunchEffect;
 
 class DSWaylandExtensionPrivate : public DSObjectPrivate
 {
@@ -46,12 +47,14 @@ private:
        bool __initShell(void);
        bool __initTizenPolicy(void);
        bool __initTizenAppinfo(void);
+       bool __initTizenLaunchEffect(void);
 
 private:
        DSWaylandCompositor *__compositor;
        std::shared_ptr<DSWaylandZxdgShellV6> __zxdgShell;
        std::shared_ptr<DSWaylandTizenPolicy> __tzPolicy;
        std::shared_ptr<DSWaylandTizenAppinfo> __tzAppinfo;
+       std::shared_ptr<DSWaylandTizenLaunchEffect> __tzLaunchEffect;
 
 };
 
diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp b/src/DSWaylandServer/DSWaylandTizenLaunchEffect.cpp
new file mode 100644 (file)
index 0000000..30c78da
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#include "DSWaylandTizenLaunchEffect.h"
+#include "DSWaylandTizenLaunchEffectPrivate.h"
+#include "DSWaylandTizenLaunchSplash.h"
+#include "DSWaylandClient.h"
+
+const int TIZEN_LAUNCH_EFFECT_VERSION = 1;
+
+namespace display_server
+{
+
+DSWaylandTizenLaunchEffectPrivate::DSWaylandTizenLaunchEffectPrivate(DSWaylandTizenLaunchEffect *p_ptr)
+       : DSObjectPrivate(p_ptr),
+         __p_ptr(p_ptr)
+{
+}
+
+DSWaylandTizenLaunchEffectPrivate::~DSWaylandTizenLaunchEffectPrivate()
+{
+}
+
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_initialize(DSWaylandCompositor *wlCompositor)
+{
+       ::wl_display *display;
+       display = wlCompositor->display();
+
+       init(display, TIZEN_LAUNCH_EFFECT_VERSION);
+}
+
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_finalize(void)
+{
+
+}
+
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_bind_resource(Resource *resource)
+{
+    DSLOG_DBG("TizenLaunchEffectPriv", "");
+}
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_destroy_resource(Resource *resource)
+{
+    DSLOG_DBG("TizenLaunchEffectPriv", "");
+}
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_create_splash_img(Resource *resource, uint32_t id)
+{
+    DSLOG_DBG("TizenLaunchEffectPriv", "");
+
+    DSWaylandClient *waylandClient = DSWaylandClient::fromWlClient(resource->client());
+       auto waylandSplash = std::make_shared<DSWaylandTizenLaunchSplash>(waylandClient, id);
+}
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_type_set(Resource *resource, const std::string &effect_type, uint32_t pid, struct ::wl_array *options)
+{
+    DSLOG_DBG("TizenLaunchEffectPriv", "");
+}
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_type_unset(Resource *resource, uint32_t pid)
+{
+    DSLOG_DBG("TizenLaunchEffectPriv", "");
+}
+void DSWaylandTizenLaunchEffectPrivate::tizen_launch_effect_destroy(Resource *resource)
+{
+    DSLOG_DBG("TizenLaunchEffectPriv", "");
+}
+
+DSWaylandTizenLaunchEffect::DSWaylandTizenLaunchEffect(DSWaylandCompositor *wlCompositor)
+       : DS_INIT_PRIVATE_PTR(DSWaylandTizenLaunchEffect),
+         __wlCompositor(wlCompositor),
+         __isCreated(false)
+{
+       this->initialize(__wlCompositor);
+}
+
+DSWaylandTizenLaunchEffect::~DSWaylandTizenLaunchEffect()
+{
+       if (isCreated())
+               this->finalize();
+}
+
+bool DSWaylandTizenLaunchEffect::isCreated(void)
+{
+       return __isCreated;
+}
+
+bool DSWaylandTizenLaunchEffect::initialize(DSWaylandCompositor *wlCompositor)
+{
+    if (!wlCompositor) return false;
+       if (isCreated())
+       {
+               DSLOG_ERR("TizenLaunchEffect", "Already initialized");
+               return true;
+       }
+
+       DS_GET_PRIV(DSWaylandTizenLaunchEffect);
+       if (!priv) return false;
+
+       __wlCompositor = wlCompositor;
+       __isCreated = true;
+
+       priv->tizen_launch_effect_initialize(__wlCompositor);
+
+       DSLOG_INF("TizenLaunchEffect", "TizenLaunchEffect initialized");
+       return true;
+}
+
+void DSWaylandTizenLaunchEffect::finalize(void)
+{
+       DS_GET_PRIV(DSWaylandTizenLaunchEffect);
+       priv->tizen_launch_effect_finalize();
+
+       DSLOG_INF("TizenLaunchEffect", "TizenLaunchEffect finalized");
+       __isCreated = false;
+}
+
+}
\ No newline at end of file
diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchEffect.h b/src/DSWaylandServer/DSWaylandTizenLaunchEffect.h
new file mode 100644 (file)
index 0000000..06a737e
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef __DS_WAYLAND_TIZEN_LAUNCHEFFECT_H__
+#define __DS_WAYLAND_TIZEN_LAUNCHEFFECT_H__
+
+#include "DSWaylandCompositor.h"
+
+namespace display_server
+{
+
+class DSWaylandTizenLaunchEffectPrivate;
+
+class DSWaylandTizenLaunchEffect : public DSObject
+{
+DS_PIMPL_USE_PRIVATE(DSWaylandTizenLaunchEffect);
+
+public:
+    DSWaylandTizenLaunchEffect(DSWaylandCompositor *wlCompositor);
+    virtual ~DSWaylandTizenLaunchEffect();
+
+       bool isCreated(void);
+
+       bool initialize(DSWaylandCompositor *wlCompositor);
+       void finalize(void);
+
+private:
+       DSWaylandCompositor *__wlCompositor;
+       bool __isCreated;
+
+};
+
+}
+#endif
\ No newline at end of file
diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h b/src/DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h
new file mode 100644 (file)
index 0000000..3fc6822
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef __DS_WAYLAND_TIZEN_LAUNCHEFFECT_PRIVATE_H__
+#define __DS_WAYLAND_TIZEN_LAUNCHEFFECT_PRIVATE_H__
+
+#include "dswayland-server-tizen-launch.h"
+
+#include "DSWaylandTizenLaunchEffect.h"
+
+namespace display_server
+{
+
+class DSWaylandTizenLaunchSplash;
+
+class DS_DECL_EXPORT DSWaylandTizenLaunchEffectPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_launch_effect
+{
+DS_PIMPL_USE_PUBLIC(DSWaylandTizenLaunchEffect);
+
+public:
+    DSWaylandTizenLaunchEffectPrivate() = delete;
+    DSWaylandTizenLaunchEffectPrivate(DSWaylandTizenLaunchEffect *p_ptr);
+    ~DSWaylandTizenLaunchEffectPrivate() override;
+
+    void tizen_launch_effect_initialize(DSWaylandCompositor *wlCompositor);
+    void tizen_launch_effect_finalize(void);
+
+protected:
+    void tizen_launch_effect_bind_resource(Resource *resource);
+    void tizen_launch_effect_destroy_resource(Resource *resource);
+
+    void tizen_launch_effect_create_splash_img(Resource *resource, uint32_t id);
+    void tizen_launch_effect_type_set(Resource *resource, const std::string &effect_type, uint32_t pid, struct ::wl_array *options);
+    void tizen_launch_effect_type_unset(Resource *resource, uint32_t pid);
+    void tizen_launch_effect_destroy(Resource *resource);
+
+private:
+
+};
+
+}
+#endif
\ No newline at end of file
diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp b/src/DSWaylandServer/DSWaylandTizenLaunchSplash.cpp
new file mode 100644 (file)
index 0000000..b3a734f
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#include "DSWaylandTizenLaunchSplash.h"
+#include "DSWaylandTizenLaunchSplashPrivate.h"
+
+namespace display_server
+{
+
+DSWaylandTizenLaunchSplashPrivate::DSWaylandTizenLaunchSplashPrivate(DSWaylandTizenLaunchSplash *p_ptr)
+       : DSObjectPrivate(p_ptr),
+      __p_ptr(p_ptr)
+{}
+DSWaylandTizenLaunchSplashPrivate::DSWaylandTizenLaunchSplashPrivate(DSWaylandTizenLaunchSplash *p_ptr, DSWaylandClient *waylandClient, uint32_t id)
+       : DSObjectPrivate(p_ptr),
+      __p_ptr(p_ptr)
+{
+    if (id > 0) {
+        tizen_launch_splash::init(waylandClient->wlClient(), (int)id, 1);
+    }
+
+}
+DSWaylandTizenLaunchSplashPrivate::~DSWaylandTizenLaunchSplashPrivate()
+{}
+
+void DSWaylandTizenLaunchSplashPrivate::tizen_launch_splash_bind_resource(Resource *resource)
+{}
+void DSWaylandTizenLaunchSplashPrivate::tizen_launch_splash_destroy_resource(Resource *resource)
+{}
+
+void DSWaylandTizenLaunchSplashPrivate::tizen_launch_splash_destroy(Resource *resource)
+{}
+void DSWaylandTizenLaunchSplashPrivate::tizen_launch_splash_launch(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, struct ::wl_array *options)
+{}
+void DSWaylandTizenLaunchSplashPrivate::tizen_launch_splash_owner(Resource *resource, uint32_t pid)
+{}
+void DSWaylandTizenLaunchSplashPrivate::tizen_launch_splash_launch_v2(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, struct ::wl_array *options, struct ::wl_array *extra_config)
+{}
+
+DSWaylandTizenLaunchSplash::DSWaylandTizenLaunchSplash()
+{}
+
+DSWaylandTizenLaunchSplash::DSWaylandTizenLaunchSplash(DSWaylandClient *waylandClient, uint32_t id)
+    : _d_ptr(std::make_unique<DSWaylandTizenLaunchSplashPrivate>(this, waylandClient, id))
+{}
+
+DSWaylandTizenLaunchSplash::~DSWaylandTizenLaunchSplash()
+{}
+
+
+}
\ No newline at end of file
diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchSplash.h b/src/DSWaylandServer/DSWaylandTizenLaunchSplash.h
new file mode 100644 (file)
index 0000000..3543562
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef __DS_WAYLAND_TIZEN_LAUNCHSPLASH_H__
+#define __DS_WAYLAND_TIZEN_LAUNCHSPLASH_H__
+
+#include "DSWaylandClient.h"
+
+namespace display_server
+{
+
+class DSWaylandTizenLaunchSplashPrivate;
+
+class DSWaylandTizenLaunchSplash : public DSObject
+{
+DS_PIMPL_USE_PRIVATE(DSWaylandTizenLaunchSplash);
+
+public:
+       DSWaylandTizenLaunchSplash();
+       DSWaylandTizenLaunchSplash(DSWaylandClient *waylandClient, uint32_t id);
+       virtual ~DSWaylandTizenLaunchSplash();
+
+private:
+
+};
+
+}
+#endif
diff --git a/src/DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h b/src/DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h
new file mode 100644 (file)
index 0000000..f911d7a
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef __DS_WAYLAND_TIZEN_LAUNCHSPLASH_PRIVATE_H__
+#define __DS_WAYLAND_TIZEN_LAUNCHSPLASH_PRIVATE_H__
+
+#include "dswayland-server-tizen-launch.h"
+
+#include "DSWaylandTizenLaunchSplash.h"
+
+namespace display_server
+{
+
+class DSWaylandTizenLaunchSplash;
+
+class DS_DECL_EXPORT DSWaylandTizenLaunchSplashPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_launch_splash
+{
+DS_PIMPL_USE_PUBLIC(DSWaylandTizenLaunchSplash);
+
+public:
+    DSWaylandTizenLaunchSplashPrivate() = delete;
+    DSWaylandTizenLaunchSplashPrivate(DSWaylandTizenLaunchSplash *p_ptr);
+    DSWaylandTizenLaunchSplashPrivate(DSWaylandTizenLaunchSplash *p_ptr, DSWaylandClient *waylandClient, uint32_t id);
+    ~DSWaylandTizenLaunchSplashPrivate() override;
+
+protected:
+    void tizen_launch_splash_bind_resource(Resource *resource);
+    void tizen_launch_splash_destroy_resource(Resource *resource);
+
+    void tizen_launch_splash_destroy(Resource *resource);
+    void tizen_launch_splash_launch(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, struct ::wl_array *options);
+    void tizen_launch_splash_owner(Resource *resource, uint32_t pid);
+    void tizen_launch_splash_launch_v2(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, struct ::wl_array *options, struct ::wl_array *extra_config);
+
+private:
+
+};
+
+}
+#endif
\ No newline at end of file
index 6b988da..d84f3d2 100644 (file)
@@ -165,6 +165,12 @@ libds_wayland_srcs = [
        'DSWaylandServer/DSWaylandTizenAppinfoPrivate.h',
        'DSWaylandServer/DSWaylandTizenAppinfo.h',
        'DSWaylandServer/DSWaylandTizenAppinfo.cpp',
+       'DSWaylandServer/DSWaylandTizenLaunchEffectPrivate.h',
+       'DSWaylandServer/DSWaylandTizenLaunchEffect.h',
+       'DSWaylandServer/DSWaylandTizenLaunchEffect.cpp',
+       'DSWaylandServer/DSWaylandTizenLaunchSplashPrivate.h',
+       'DSWaylandServer/DSWaylandTizenLaunchSplash.h',
+       'DSWaylandServer/DSWaylandTizenLaunchSplash.cpp',
        'DSWaylandServer/DSWaylandProtocolTracePrivate.h',
        'DSWaylandServer/DSWaylandProtocolTrace.h',
        'DSWaylandServer/DSWaylandProtocolTrace.cpp',
diff --git a/tests/DSWaylandTizenLaunchEffect-test.cpp b/tests/DSWaylandTizenLaunchEffect-test.cpp
new file mode 100644 (file)
index 0000000..6a1eecd
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+* Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice (including the next
+* paragraph) shall be included in all copies or substantial portions of the
+* Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*/
+
+#include "libds-tests.h"
+#include "DSWaylandTizenLaunchEffect.h"
+
+using namespace display_server;
+
+class DSWaylandTizenLaunchEffectTest : public ::testing::Test
+{
+public:
+       void SetUp(void) override
+       {}
+       void TearDown(void) override
+       {}
+};
+
+TEST_F(DSWaylandTizenLaunchEffectTest, New_LaunchEffect)
+{
+    DSWaylandCompositor *compositor = DSWaylandCompositor::getInstance();
+       DSWaylandTizenLaunchEffect *tzLaunchEffect = new DSWaylandTizenLaunchEffect(compositor);
+       EXPECT_TRUE(tzLaunchEffect != nullptr);
+
+       if (tzLaunchEffect)
+               delete tzLaunchEffect;
+
+       DSWaylandCompositor::releaseInstance();
+}
+
+TEST_F(DSWaylandTizenLaunchEffectTest, Initialize_LaunchEffect)
+{
+       bool ret;
+
+       DSWaylandCompositor *compositor = DSWaylandCompositor::getInstance();
+       DSWaylandTizenLaunchEffect *tzLaunchEffect = new DSWaylandTizenLaunchEffect(compositor);
+
+       ret = tzLaunchEffect->initialize(compositor);
+       EXPECT_TRUE(ret == true);
+
+       if (tzLaunchEffect)
+               delete tzLaunchEffect;
+
+       DSWaylandCompositor::releaseInstance();
+}
\ No newline at end of file
index cab5ea3..f790065 100644 (file)
@@ -30,6 +30,7 @@ libds_tests_srcs = [
        'DSWaylandTizenSurface-test.cpp',
        'DSWaylandTizenIndicator-test.cpp',
        'DSWaylandTizenAppinfo-test.cpp',
+       'DSWaylandTizenLaunchEffect-test.cpp',
        'DSWaylandZxdgShellV6-test.cpp',
        'DSWaylandBuffer-test.cpp',
        'DSObject-test.cpp',