<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qwaylandcompositor.cpp --> <title>WaylandCompositor QML Type | Qt Wayland Compositor 5.12.6</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtwaylandcompositor-index.html">Qt Wayland Compositor</a></td><td ><a href="qtwayland-compositor-qmlmodule.html">QML Types</a></td><td >WaylandCompositor QML Type</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtwaylandcompositor-index.html">Qt 5.12.6 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#properties">Properties</a></li> <li class="level1"><a href="#signals">Signals</a></li> <li class="level1"><a href="#methods">Methods</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">WaylandCompositor QML Type</h1> <span class="subtitle"></span> <!-- $$$WaylandCompositor-brief --> <p>Manages the Wayland display server. <a href="#details">More...</a></p> <!-- @@@WaylandCompositor --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtWayland.Compositor 1.3</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.8</td></tr></table></div><ul> <li><a href="qml-qtwayland-compositor-waylandcompositor-members.html">List of all members, including inherited members</a></li> </ul> <a name="properties"></a> <h2 id="properties">Properties</h2> <ul> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#created-prop">created</a></b></b> : bool</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#defaultOutput-prop">defaultOutput</a></b></b> : WaylandOutput</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#defaultSeat-prop">defaultSeat</a></b></b> : WaylandSeat</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#extensions-prop">extensions</a></b></b> : list</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#retainedSelection-prop">retainedSelection</a></b></b> : bool</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#socketName-prop">socketName</a></b></b> : string</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#useHardwareIntegrationExtension-prop">useHardwareIntegrationExtension</a></b></b> : bool</li> </ul> <a name="signals"></a> <h2 id="signals">Signals</h2> <ul> <li class="fn">void <b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#surfaceCreated-signal">surfaceCreated</a></b></b>(QWaylandSurface *<i>surface</i>)</li> <li class="fn">void <b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#surfaceRequested-signal">surfaceRequested</a></b></b>(WaylandClient <i>client</i>, int <i>id</i>, int <i>version</i>)</li> </ul> <a name="methods"></a> <h2 id="methods">Methods</h2> <ul> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#addSocketDescriptor-method">addSocketDescriptor</a></b></b>(<i>fd</i>)</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#destroyClient-method">destroyClient</a></b></b>(<i>client</i>)</li> <li class="fn"><b><b><a href="qml-qtwayland-compositor-waylandcompositor.html#destroyClientForSurface-method">destroyClientForSurface</a></b></b>(<i>surface</i>)</li> </ul> <!-- $$$WaylandCompositor-description --> <a name="details"></a> <h2 id="details">Detailed Description</h2> <p>The <a href="qml-qtwayland-compositor-waylandcompositor.html">WaylandCompositor</a> manages the connections to the clients, as well as the different <a href="qml-qtwayland-compositor-waylandoutput.html">outputs</a> and <a href="qwaylandseat.html">seats</a>.</p> <p>Normally, a compositor application will have a single <a href="qml-qtwayland-compositor-waylandcompositor.html">WaylandCompositor</a> instance, which can have several outputs as children. When a client requests the compositor to create a surface, the request is handled by the onSurfaceRequested handler.</p> <p>Extensions that are supported by the compositor should be instantiated and added to the extensions property.</p> <!-- @@@WaylandCompositor --> <h2>Property Documentation</h2> <!-- $$$created --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="created-prop"> <td class="tblQmlPropNode"><p> <a name="created-prop"></a><span class="name">created</span> : <span class="type">bool</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>This property is true if <a href="qml-qtwayland-compositor-waylandcompositor.html">WaylandCompositor</a> has been initialized, otherwise it's false.</p> </div></div><!-- @@@created --> <br/> <!-- $$$defaultOutput --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="defaultOutput-prop"> <td class="tblQmlPropNode"><p> <a name="defaultOutput-prop"></a><span class="name">defaultOutput</span> : <span class="type"><a href="qml-qtwayland-compositor-waylandoutput.html">WaylandOutput</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>This property contains the first in the list of outputs added to the <a href="qml-qtwayland-compositor-waylandcompositor.html">WaylandCompositor</a>, or null if no outputs have been added.</p> <p>Setting a new default output prepends it to the output list, making it the new default, but the previous default is not removed from the list.</p> </div></div><!-- @@@defaultOutput --> <br/> <!-- $$$defaultSeat --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="defaultSeat-prop"> <td class="tblQmlPropNode"><p> <a name="defaultSeat-prop"></a><span class="name">defaultSeat</span> : <span class="type"><a href="qml-qtwayland-compositor-waylandseat.html">WaylandSeat</a></span></p></td></tr> </table></div> </div><div class="qmldoc"><p>This property contains the default seat for this <a href="qml-qtwayland-compositor-waylandcompositor.html">WaylandCompositor</a>.</p> </div></div><!-- @@@defaultSeat --> <br/> <!-- $$$extensions --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="extensions-prop"> <td class="tblQmlPropNode"><p> <a name="extensions-prop"></a><span class="name">extensions</span> : <span class="type">list</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>A list of extensions that the compositor advertises to its clients. For any Wayland extension the compositor should support, instantiate its component, and add it to the list of extensions.</p> <p>For instance, the following code would allow the clients to request <code>wl_shell</code> surfaces in the compositor using the <code>wl_shell</code> interface.</p> <pre class="cpp"> import <span class="type">QtWayland</span><span class="operator">.</span>Compositor <span class="number">1.0</span> WaylandCompositor { WlShell { <span class="comment">// ...</span> } } </pre> </div></div><!-- @@@extensions --> <br/> <!-- $$$retainedSelection --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="retainedSelection-prop"> <td class="tblQmlPropNode"><p> <a name="retainedSelection-prop"></a><span class="name">retainedSelection</span> : <span class="type">bool</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>This property holds whether retained selection is enabled.</p> </div></div><!-- @@@retainedSelection --> <br/> <!-- $$$socketName --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="socketName-prop"> <td class="tblQmlPropNode"><p> <a name="socketName-prop"></a><span class="name">socketName</span> : <span class="type">string</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>This property holds the socket name used by <a href="qml-qtwayland-compositor-waylandcompositor.html">WaylandCompositor</a> to communicate with clients. It must be set before the component is completed.</p> <p>If the socketName is empty (the default), the contents of the start argument <code>--wayland-socket-name</code> are used instead. If the argument is not set, the compositor tries to find a socket name, which is <code>wayland-0</code> by default.</p> </div></div><!-- @@@socketName --> <br/> <!-- $$$useHardwareIntegrationExtension --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="useHardwareIntegrationExtension-prop"> <td class="tblQmlPropNode"><p> <a name="useHardwareIntegrationExtension-prop"></a><span class="name">useHardwareIntegrationExtension</span> : <span class="type">bool</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>This property holds whether the hardware integration extension should be enabled for this <a href="qml-qtwayland-compositor-waylandcompositor.html">WaylandCompositor</a>.</p> <p>This property must be set before the compositor component is completed.</p> </div></div><!-- @@@useHardwareIntegrationExtension --> <br/> <h2>Signal Documentation</h2> <!-- $$$surfaceCreated --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="surfaceCreated-signal"> <td class="tblQmlFuncNode"><p> <a name="surfaceCreated-signal"></a><span class="type">void</span> <span class="name">surfaceCreated</span>(<span class="type">QWaylandSurface</span> *<i>surface</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when a new <a href="qml-qtwayland-compositor-waylandsurface.html">WaylandSurface</a> instance has been created.</p> </div></div><!-- @@@surfaceCreated --> <br/> <!-- $$$surfaceRequested --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="surfaceRequested-signal"> <td class="tblQmlFuncNode"><p> <a name="surfaceRequested-signal"></a><span class="type">void</span> <span class="name">surfaceRequested</span>(<span class="type"><a href="qml-qtwayland-compositor-waylandclient.html">WaylandClient</a></span> <i>client</i>, <span class="type">int</span> <i>id</i>, <span class="type">int</span> <i>version</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>This signal is emitted when a client has created a surface. The slot connecting to this signal may create and initialize a <a href="qml-qtwayland-compositor-waylandsurface.html">WaylandSurface</a> instance in the scope of the slot. Otherwise a default surface is created.</p> </div></div><!-- @@@surfaceRequested --> <br/> <h2>Method Documentation</h2> <!-- $$$addSocketDescriptor --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="addSocketDescriptor-method"> <td class="tblQmlFuncNode"><p> <a name="addSocketDescriptor-method"></a><span class="name">addSocketDescriptor</span>(<i>fd</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Listen for client connections on a file descriptor referring to a server socket already bound and listening.</p> <p>Does not take ownership of the file descriptor; it must be closed explicitly if needed.</p> <p><b>Note: </b>This method is only available with libwayland 1.10.0 or newer. If built against an earlier libwayland runtime, this method is a noop.</p><p>This method was introduced in Qt 5.12.</p> </div></div><!-- @@@addSocketDescriptor --> <br/> <!-- $$$destroyClient --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="destroyClient-method"> <td class="tblQmlFuncNode"><p> <a name="destroyClient-method"></a><span class="name">destroyClient</span>(<i>client</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Destroys the given <a href="qml-qtwayland-compositor-waylandclient.html">WaylandClient</a> <i>client</i>.</p> </div></div><!-- @@@destroyClient --> <br/> <!-- $$$destroyClientForSurface --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="destroyClientForSurface-method"> <td class="tblQmlFuncNode"><p> <a name="destroyClientForSurface-method"></a><span class="name">destroyClientForSurface</span>(<i>surface</i>)</p></td></tr> </table></div> </div><div class="qmldoc"><p>Destroys the client for the <a href="qml-qtwayland-compositor-waylandsurface.html">WaylandSurface</a> <i>surface</i>.</p> </div></div><!-- @@@destroyClientForSurface --> <br/> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>