From: Junkyeong Kim Date: Tue, 14 Jul 2020 05:11:50 +0000 (+0900) Subject: DSWaylandServer: add tizen_surface interface related prototype codes X-Git-Tag: accepted/tizen/unified/20200820.213435~255 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F20%2F241620%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git DSWaylandServer: add tizen_surface interface related prototype codes Change-Id: I5952da3bf77440ccc5f23534fd6e92e379336470 --- diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp new file mode 100644 index 0000000..91e91a7 --- /dev/null +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.cpp @@ -0,0 +1,33 @@ +#include "DSWaylandTizenSurfaceShm.h" +#include "DSWaylandTizenSurfaceShmPrivate.h" + +namespace display_server +{ +DSWaylandTizenSurfaceShmPrivate::DSWaylandTizenSurfaceShmPrivate(DSWaylandTizenSurfaceShm *p_ptr) + : DSObjectPrivate(p_ptr) +{ +} + +DSWaylandTizenSurfaceShmPrivate::~DSWaylandTizenSurfaceShmPrivate() +{ +} + +void DSWaylandTizenSurfaceShmPrivate::tizen_surface_shm_get_flusher(tizen_surface_shm::Resource *resource, uint32_t id, struct ::wl_resource *surface) +{ +} + +void DSWaylandTizenSurfaceShmPrivate::tizen_surface_shm_destroy(tizen_surface_shm::Resource *resource) +{ +} + +DSWaylandTizenSurfaceShm::DSWaylandTizenSurfaceShm() + : DSObject(std::make_unique(this)) +{ +} + +DSWaylandTizenSurfaceShm::~DSWaylandTizenSurfaceShm() +{ +} + +} // namespace display_server + diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShm.h b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.h new file mode 100644 index 0000000..e72cec6 --- /dev/null +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShm.h @@ -0,0 +1,32 @@ +#ifndef _DS_WAYLAND_TIZEN_SURFACE_SHM_H_ +#define _DS_WAYLAND_TIZEN_SURFACE_SHM_H_ + +#include + +namespace display_server +{ + +class DSWaylandTizenSurfaceShmPrivate; + +class DSWaylandTizenSurfaceShm : public DSObject +{ +public: + DSWaylandTizenSurfaceShm(); + virtual ~DSWaylandTizenSurfaceShm(); + +private: + inline DSWaylandTizenSurfaceShmPrivate *__d_func() + { + return reinterpret_cast(_d_ptr.get()); + } + inline const DSWaylandTizenSurfaceShmPrivate *__d_func() const + { + return reinterpret_cast(_d_ptr.get()); + } + friend class DSWaylandTizenSurfaceShmPrivate; +}; + +} + +#endif + diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.cpp b/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.cpp new file mode 100644 index 0000000..e8be539 --- /dev/null +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.cpp @@ -0,0 +1,29 @@ +#include "DSWaylandTizenSurfaceShmFlusher.h" +#include "DSWaylandTizenSurfaceShmFlusherPrivate.h" + +namespace display_server +{ +DSWaylandTizenSurfaceShmFlusherPrivate::DSWaylandTizenSurfaceShmFlusherPrivate(DSWaylandTizenSurfaceShmFlusher *p_ptr) + : DSObjectPrivate(p_ptr) +{ +} + +DSWaylandTizenSurfaceShmFlusherPrivate::~DSWaylandTizenSurfaceShmFlusherPrivate() +{ +} + +void DSWaylandTizenSurfaceShmFlusherPrivate::tizen_surface_shm_flusher_destroy(Resource *resource) +{ +} + +DSWaylandTizenSurfaceShmFlusher::DSWaylandTizenSurfaceShmFlusher() + : DSObject(std::make_unique(this)) +{ +} + +DSWaylandTizenSurfaceShmFlusher::~DSWaylandTizenSurfaceShmFlusher() +{ +} + +} // namespace display_server + diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.h b/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.h new file mode 100644 index 0000000..7f5c405 --- /dev/null +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.h @@ -0,0 +1,32 @@ +#ifndef _DS_WAYLAND_TIZEN_SURFACE_SHM_FLUSHER_H_ +#define _DS_WAYLAND_TIZEN_SURFACE_SHM_FLUSHER_H_ + +#include + +namespace display_server +{ + +class DSWaylandTizenSurfaceShmFlusherPrivate; + +class DSWaylandTizenSurfaceShmFlusher : public DSObject +{ +public: + DSWaylandTizenSurfaceShmFlusher(); + virtual ~DSWaylandTizenSurfaceShmFlusher(); + +private: + inline DSWaylandTizenSurfaceShmFlusherPrivate *__d_func() + { + return reinterpret_cast(_d_ptr.get()); + } + inline const DSWaylandTizenSurfaceShmFlusherPrivate *__d_func() const + { + return reinterpret_cast(_d_ptr.get()); + } + friend class DSWaylandTizenSurfaceShmFlusherPrivate; +}; + +} + +#endif + diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusherPrivate.h b/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusherPrivate.h new file mode 100644 index 0000000..f8788b1 --- /dev/null +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShmFlusherPrivate.h @@ -0,0 +1,26 @@ +#ifndef _DS_WAYLAND_TIZEN_SURFACE_SHM_FLUSHER_PRIVATE_H_ +#define _DS_WAYLAND_TIZEN_SURFACE_SHM_FLUSHER_PRIVATE_H_ + +#include "dswayland-server-tizen-surface.h" +#include "DSWaylandTizenSurfaceShmFlusher.h" + +namespace display_server +{ + +class DSWaylandTizenSurfaceShmFlusherPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_surface_shm_flusher +{ +public: + DSWaylandTizenSurfaceShmFlusherPrivate() = delete; + DSWaylandTizenSurfaceShmFlusherPrivate(DSWaylandTizenSurfaceShmFlusher *p_ptr); + ~DSWaylandTizenSurfaceShmFlusherPrivate() override; + +protected: + void tizen_surface_shm_flusher_destroy(Resource *resource) override; +private: + /* data */ +}; + +} + +#endif + diff --git a/src/DSWaylandServer/DSWaylandTizenSurfaceShmPrivate.h b/src/DSWaylandServer/DSWaylandTizenSurfaceShmPrivate.h new file mode 100644 index 0000000..d5d1b52 --- /dev/null +++ b/src/DSWaylandServer/DSWaylandTizenSurfaceShmPrivate.h @@ -0,0 +1,27 @@ +#ifndef _DS_WAYLAND_TIZEN_SURFACE_SHM_PRIVATE_H_ +#define _DS_WAYLAND_TIZEN_SURFACE_SHM_PRIVATE_H_ + +#include "dswayland-server-tizen-surface.h" +#include "DSWaylandTizenSurfaceShm.h" + +namespace display_server +{ + +class DSWaylandTizenSurfaceShmPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_surface_shm +{ +public: + DSWaylandTizenSurfaceShmPrivate() = delete; + DSWaylandTizenSurfaceShmPrivate(DSWaylandTizenSurfaceShm *p_ptr); + ~DSWaylandTizenSurfaceShmPrivate() override; + +protected: + void tizen_surface_shm_get_flusher(Resource *resource, uint32_t id, struct ::wl_resource *surface) override; + void tizen_surface_shm_destroy(Resource *resource) override; +private: + /* data */ +}; + +} + +#endif + diff --git a/src/meson.build b/src/meson.build index 923c788..ce199a7 100644 --- a/src/meson.build +++ b/src/meson.build @@ -79,6 +79,12 @@ libds_wayland_srcs = [ 'DSWaylandServer/DSWaylandTizenInputDeviceManager.cpp', 'DSWaylandServer/DSWaylandTizenInputDeviceManager.h', 'DSWaylandServer/DSWaylandTizenInputDeviceManagerPrivate.h', + 'DSWaylandServer/DSWaylandTizenSurfaceShm.cpp', + 'DSWaylandServer/DSWaylandTizenSurfaceShm.h', + 'DSWaylandServer/DSWaylandTizenSurfaceShmPrivate.h', + 'DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.cpp', + 'DSWaylandServer/DSWaylandTizenSurfaceShmFlusher.h', + 'DSWaylandServer/DSWaylandTizenSurfaceShmFlusherPrivate.h', 'DSWaylandServer/DSWaylandZxdgShellV6.cpp', 'DSWaylandServer/DSWaylandZxdgShellV6.h', 'DSWaylandServer/DSWaylandZxdgShellV6Private.h', diff --git a/tests/DSWaylandTizenSurfaceShm-test.cpp b/tests/DSWaylandTizenSurfaceShm-test.cpp new file mode 100644 index 0000000..f03d9fb --- /dev/null +++ b/tests/DSWaylandTizenSurfaceShm-test.cpp @@ -0,0 +1,21 @@ +#include "libds-tests.h" +#include "DSWaylandTizenSurfaceShm.h" + +using namespace display_server; + +class DSWaylandTizenSurfaceTest : public ::testing::Test +{ +public: + void SetUp(void) override + {} + void TearDown(void) override + {} +}; + +TEST_F(DSWaylandTizenSurfaceTest, NewDSWaylandTizenSurface) +{ + DSWaylandTizenSurfaceShm *shm = new DSWaylandTizenSurfaceShm; + delete shm; + EXPECT_TRUE(true); +} + diff --git a/tests/DSWaylandTizenSurfaceShmFlusher-test.cpp b/tests/DSWaylandTizenSurfaceShmFlusher-test.cpp new file mode 100644 index 0000000..54015d2 --- /dev/null +++ b/tests/DSWaylandTizenSurfaceShmFlusher-test.cpp @@ -0,0 +1,21 @@ +#include "libds-tests.h" +#include "DSWaylandTizenSurfaceShmFlusher.h" + +using namespace display_server; + +class DSWaylandTizenSurfaceShmFlusherTest : public ::testing::Test +{ +public: + void SetUp(void) override + {} + void TearDown(void) override + {} +}; + +TEST_F(DSWaylandTizenSurfaceShmFlusherTest, NewDSWaylandTizenSurfaceShmFlusher) +{ + DSWaylandTizenSurfaceShmFlusher *shmFlusher = new DSWaylandTizenSurfaceShmFlusher; + delete shmFlusher; + EXPECT_TRUE(true); +} + diff --git a/tests/meson.build b/tests/meson.build index 6e4ecfd..394b20e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -21,6 +21,8 @@ libds_tests_srcs = [ 'DSWaylandSurface-test.cpp', 'DSWaylandTizenInputDeviceManager-test.cpp', 'DSWaylandTizenInputDevice-test.cpp', + 'DSWaylandTizenSurfaceShm-test.cpp', + 'DSWaylandTizenSurfaceShmFlusher-test.cpp', 'DSWaylandZxdgShellV6-test.cpp', 'DSWaylandZxdgPositionerV6-test.cpp', 'DSWaylandZxdgSurfaceV6-test.cpp',