#include "DSWaylandCompositor.h"
#include "DSWaylandCompositorPrivate.h"
+#include "DSWaylandExtension.h"
#include "DSWaylandClient.h"
#include "DSWaylandSeat.h"
#include "DSWaylandSurface.h"
_display(nullptr),
_loop(nullptr),
_socket_fd_handler(nullptr),
- _compositor(compositor)
+ _compositor(compositor),
+ __wlExtension(nullptr)
{
if (!ecore_init())
{
return true;
}
+bool DSWaylandCompositorPrivate::initExtension()
+{
+ if (__wlExtension)
+ {
+ DSLOG_INF("DSWaylandCompositor", "Already initialize Extension");
+ return true;
+ }
+
+ __wlExtension = std::make_unique<DSWaylandExtension>(_compositor);
+ if (!__wlExtension) return false;
+
+ return true;
+}
+
Eina_Bool DSWaylandCompositorPrivate::__readEvents(void *data, Ecore_Fd_Handler *hdlr)
{
DSWaylandCompositorPrivate *compPrivate = (DSWaylandCompositorPrivate *) data;
return false;
}
+ res = priv->initExtension();
+ if (!res)
+ {
+ DSLOG_ERR("DSWaylandCompositor", "Failed on initExtension ! (res=%d)\n", res);
+ return false;
+ }
+
priv->_created = true;
return true;
}
class DSWaylandClient;
class DSWaylandSeat;
class DSWaylandCompositor;
+class DSWaylendExtension;
+
class DS_DECL_EXPORT DSWaylandCompositorPrivate : public DSObjectPrivate, public DSWaylandServer::wl_compositor
{
DS_PIMPL_USE_PUBLIC(DSWaylandCompositor);
~DSWaylandCompositorPrivate() override;
bool initCompositor();
+ bool initExtension();
void initSocket(std::string sName, std::string sDir);
inline void addClient(DSWaylandClient *client);
inline void removeClient(DSWaylandClient *client);
private:
static Eina_Bool __readEvents(void *data, Ecore_Fd_Handler *hdlr);
static void __prepareFunc(void *data, Ecore_Fd_Handler *hdlr);
+
+ std::unique_ptr<DSWaylandExtension> __wlExtension;
};
void DSWaylandCompositorPrivate::addClient(DSWaylandClient *client)
}
-#endif //__DS_WAYLAND_COMPOSITOR_PRIVATE_H__
\ No newline at end of file
+#endif //__DS_WAYLAND_COMPOSITOR_PRIVATE_H__