struct CCL::Linux::IWaylandClient
Overview
Wayland client interface. More…
#include <ilinuxspecifics.h> struct IWaylandClient: public CCL::IUnknown { // methods virtual wl_display*CCL_API getWaylandDisplay () const = 0; virtual tresult CCL_API setWaylandSocket (IWaylandSocket* socket) = 0; virtual tresult CCL_API setEventLoop (IEventLoop* eventLoop) = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
Wayland client interface.
This interface can be used to connect CCL-based applications or plug-ins to a custom compositor connection.
By default, CCL connects to the default compositor, which is usually the session compositor. When setting a custom IWaylandSocket implementation using IWaylandClient::setWaylandSocket, CCL disconnects from the previous wl_display and connects to the custom implementation using IWaylandSocket::openWaylandConnection. All existing framework objects remain intact, but internal Wayland objects are replaced with objects from the new connection.
In addition, IWaylandSocket::setEventLoop may be used to integrate CCL-based applications or plug-ins into a custom event loop. By default, CCL performs blocking reads. For example, CCL polls the wl_display’s file descriptor. When setting a custom IEventLoop implementation, CCL registers event handlers using IEventLoop::addEventHandler instead. Like IWaylandClient::setWaylandSocket, this method causes CCL to disconnect from the previous wl_display. All existing framework objects remain intact, but internal Wayland objects are replaced with objects from a new connection.
Methods
virtual wl_display*CCL_API getWaylandDisplay () const = 0
Get the Wayland connection object.
virtual tresult CCL_API setWaylandSocket (IWaylandSocket* socket) = 0
Use a specific wayland socket.
Socket is shared.
virtual tresult CCL_API setEventLoop (IEventLoop* eventLoop) = 0
Use an external event loop.
Event loop is shared.