Rework how we manage extensions
Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
This commit is contained in:
parent
5328e070e3
commit
3636606b72
@ -47,7 +47,7 @@
|
||||
|
||||
<interface name="qt_sub_surface" version="1">
|
||||
<request name="attach_sub_surface">
|
||||
<arg name="sub_surface" type="object" interface="qt_sub_surface"/>
|
||||
<arg name="child" type="object" interface="qt_sub_surface"/>
|
||||
<arg name="x" type="int"/>
|
||||
<arg name="y" type="int"/>
|
||||
</request>
|
||||
|
@ -55,7 +55,6 @@ class QSocketNotifier;
|
||||
class QPlatformScreen;
|
||||
|
||||
namespace QtWayland {
|
||||
class qt_output_extension;
|
||||
class qt_shell;
|
||||
class qt_sub_surface_extension;
|
||||
class qt_surface_extension;
|
||||
|
@ -370,6 +370,7 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
|
||||
printf("#include <QByteArray>\n");
|
||||
printf("#include <QMultiMap>\n");
|
||||
printf("#include <QString>\n");
|
||||
printf("\n");
|
||||
|
||||
printf("\n");
|
||||
printf("#ifndef WAYLAND_VERSION_CHECK\n");
|
||||
@ -381,7 +382,9 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
|
||||
|
||||
printf("\n");
|
||||
printf("QT_BEGIN_NAMESPACE\n");
|
||||
|
||||
printf("\n");
|
||||
printf("class QWaylandExtensionContainer;\n");
|
||||
printf("\n");
|
||||
QByteArray serverExport;
|
||||
if (headerPath.size()) {
|
||||
serverExport = QByteArray("Q_WAYLAND_SERVER_") + preProcessorProtocolName + "_EXPORT";
|
||||
@ -446,6 +449,11 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
|
||||
printf("\n");
|
||||
printf(" bool isGlobal() const { return m_global != 0; }\n");
|
||||
printf(" bool isResource() const { return m_resource != 0; }\n");
|
||||
printf("\n");
|
||||
printf(" static const struct ::wl_interface *interface();\n");
|
||||
printf(" static QByteArray name() { return interface()->name; }\n");
|
||||
printf(" static int interfaceVersion() { return interface()->version; }\n");
|
||||
printf("\n");
|
||||
|
||||
printEnums(interface.enums);
|
||||
|
||||
@ -525,6 +533,7 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
|
||||
printf("#include \"qwayland-server-%s.h\"\n", QByteArray(protocolName).replace('_', '-').constData());
|
||||
else
|
||||
printf("#include <%s/qwayland-server-%s.h>\n", headerPath.constData(), QByteArray(protocolName).replace('_', '-').constData());
|
||||
printf("#include <QtCompositor/QWaylandExtension>\n");
|
||||
printf("\n");
|
||||
printf("QT_BEGIN_NAMESPACE\n");
|
||||
printf("\n");
|
||||
@ -607,6 +616,12 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
|
||||
printf(" }\n");
|
||||
printf("\n");
|
||||
|
||||
printf(" const struct wl_interface *%s::interface()\n", interfaceName);
|
||||
printf(" {\n");
|
||||
printf(" return &::%s_interface;\n", interfaceName);
|
||||
printf(" }\n");
|
||||
printf("\n");
|
||||
|
||||
printf(" %s::Resource *%s::%s_allocate()\n", interfaceName, interfaceName, interfaceNameStripped);
|
||||
printf(" {\n");
|
||||
printf(" return new Resource;\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user