try
{
- __initZxdgShellV6();
+ __initShell();
__initTizenPolicy();
__initTizenAppinfoMgr();
}
return true;
}
-bool DSWaylandExtensionPrivate::__initZxdgShellV6(void)
+bool DSWaylandExtensionPrivate::__initShell(void)
{
__zxdgShell = std::make_shared<DSWaylandZxdgShellV6>(__compositor);
if (__zxdgShell == nullptr)
bool init(DSWaylandCompositor *compositor);
private:
- bool __initZxdgShellV6(void);
+ bool __initShell(void);
bool __initTizenPolicy(void);
bool __initTizenAppinfoMgr(void);
} // namespace display_server
-#endif // __DS_WAYLAND_EXTENSION_PRIVATE_H__
\ No newline at end of file
+#endif // __DS_WAYLAND_EXTENSION_PRIVATE_H__
*****************************************/
DSWaylandZxdgShellV6::DSWaylandZxdgShellV6()
- : DSObject(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgShellV6)
+ : IDSWaylandShell(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgShellV6)
{
}
DSWaylandZxdgShellV6::DSWaylandZxdgShellV6(DSWaylandCompositor *wlCompositor)
- : DSObject(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgShellV6)
+ : IDSWaylandShell(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgShellV6)
{
this->init(wlCompositor->display(), ZXDG_SHELL_V6_VERSION);
}
return priv->getSurfaceList();
}
-void DSWaylandZxdgShellV6::registerCallbackShellSurfaceCreated(DSObject *slot, std::function<void(DSWaylandZxdgSurfaceV6*)> func)
+void DSWaylandZxdgShellV6::registerCallbackShellSurfaceCreated(DSObject *slot, std::function<void(IDSWaylandShellSurface*)> func)
{
__zxdgSurfaceCreatedSignal.connect(slot, func);
}
*****************************************/
DSWaylandZxdgSurfaceV6::DSWaylandZxdgSurfaceV6()
- : DSObject(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgSurfaceV6)
+ : IDSWaylandShellSurface(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgSurfaceV6)
{
}
DSWaylandZxdgSurfaceV6::DSWaylandZxdgSurfaceV6(struct ::wl_client *client, int id, int ver)
- : DSObject(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgSurfaceV6)
+ : IDSWaylandShellSurface(), DS_INIT_PRIVATE_PTR(DSWaylandZxdgSurfaceV6)
{
this->init(client, id, ver);
}
#include <DSCore.h>
#include <DSSignal.h>
#include <DSObject.h>
+#include "IDSWaylandShell.h"
#include <wayland-server-core.h>
class DSWaylandZxdgToplevelV6Private;
class DSWaylandZxdgPopupV6Private;
-class DSWaylandZxdgShellV6 : public DSObject
+class DSWaylandZxdgShellV6 : public IDSWaylandShell
{
DS_PIMPL_USE_PRIVATE(DSWaylandZxdgShellV6);
void delSurface(DSWaylandZxdgSurfaceV6 *zxdgSurf);
std::list<DSWaylandZxdgSurfaceV6 *> getSurfaceList();
- void registerCallbackShellSurfaceCreated(DSObject *slot, std::function<void(DSWaylandZxdgSurfaceV6*)> func);
+ void registerCallbackShellSurfaceCreated(DSObject *slot, std::function<void(IDSWaylandShellSurface*)> func);
public:
DSSignal<DSWaylandZxdgSurfaceV6*> __zxdgSurfaceCreatedSignal;
};
-class DSWaylandZxdgSurfaceV6 : public DSObject
+class DSWaylandZxdgSurfaceV6 : public IDSWaylandShellSurface
{
DS_PIMPL_USE_PRIVATE(DSWaylandZxdgSurfaceV6);
--- /dev/null
+#ifndef __I_DS_WAYLAND_SHELL_H__
+#define __I_DS_WAYLAND_SHELL_H__
+
+#include <DSCore.h>
+#include <DSSignal.h>
+#include <DSObject.h>
+
+#include <wayland-server-core.h>
+
+namespace display_server
+{
+
+class IDSWaylandShellSurface;
+
+class IDSWaylandShell : public DSObject
+{
+public:
+ virtual ~IDSWaylandShell() = default;
+
+ virtual void registerCallbackShellSurfaceCreated(DSObject *slot, std::function<void(IDSWaylandShellSurface*)> func) = 0;
+};
+
+
+class IDSWaylandShellSurface : public DSObject
+{
+public:
+ virtual ~IDSWaylandShellSurface() = default;
+
+ // TODO: we need change ::wl_resource to DSWaylandSurface
+ virtual void setWlSurface(struct ::wl_resource *surface) = 0;
+ virtual struct ::wl_resource *getWlSurface(void) = 0;
+};
+
+
+}
+
+#endif // __I_DS_WAYLAND_SHELL_H__
+