// This file was generated by qtwaylandscanner
// source file is xdg-foreign-unstable-v2.xml

#include "qwayland-xdg-foreign-unstable-v2.h"

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers")

namespace QtWayland {

static inline void *wlRegistryBind(struct ::wl_registry *registry, uint32_t name, const struct ::wl_interface *interface, uint32_t version)
{
    const uint32_t bindOpCode = 0;
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
    bindOpCode, interface, version, name, interface->name, version, nullptr);
}

    zxdg_exporter_v2::zxdg_exporter_v2(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    zxdg_exporter_v2::zxdg_exporter_v2(struct ::zxdg_exporter_v2 *obj)
        : m_zxdg_exporter_v2(obj)
    {
    }

    zxdg_exporter_v2::zxdg_exporter_v2()
        : m_zxdg_exporter_v2(nullptr)
    {
    }

    zxdg_exporter_v2::~zxdg_exporter_v2()
    {
    }

    void zxdg_exporter_v2::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_zxdg_exporter_v2 = static_cast<struct ::zxdg_exporter_v2 *>(wlRegistryBind(registry, id, &zxdg_exporter_v2_interface, version));
    }

    void zxdg_exporter_v2::init(struct ::zxdg_exporter_v2 *obj)
    {
        m_zxdg_exporter_v2 = obj;
    }

    zxdg_exporter_v2 *zxdg_exporter_v2::fromObject(struct ::zxdg_exporter_v2 *object)
    {
        return static_cast<zxdg_exporter_v2 *>(zxdg_exporter_v2_get_user_data(object));
    }

    bool zxdg_exporter_v2::isInitialized() const
    {
        return m_zxdg_exporter_v2 != nullptr;
    }

    uint32_t zxdg_exporter_v2::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_zxdg_exporter_v2));
    }

    const struct wl_interface *zxdg_exporter_v2::interface()
    {
        return &::zxdg_exporter_v2_interface;
    }

    void zxdg_exporter_v2::destroy()
    {
        ::zxdg_exporter_v2_destroy(
            m_zxdg_exporter_v2);
        m_zxdg_exporter_v2 = nullptr;
    }

    struct ::zxdg_exported_v2 *zxdg_exporter_v2::export_toplevel(struct ::wl_surface *surface)
    {
        struct ::zxdg_exported_v2 * id = ::zxdg_exporter_v2_export_toplevel(
            m_zxdg_exporter_v2,
            surface);
        return id;
    }

    zxdg_importer_v2::zxdg_importer_v2(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    zxdg_importer_v2::zxdg_importer_v2(struct ::zxdg_importer_v2 *obj)
        : m_zxdg_importer_v2(obj)
    {
    }

    zxdg_importer_v2::zxdg_importer_v2()
        : m_zxdg_importer_v2(nullptr)
    {
    }

    zxdg_importer_v2::~zxdg_importer_v2()
    {
    }

    void zxdg_importer_v2::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_zxdg_importer_v2 = static_cast<struct ::zxdg_importer_v2 *>(wlRegistryBind(registry, id, &zxdg_importer_v2_interface, version));
    }

    void zxdg_importer_v2::init(struct ::zxdg_importer_v2 *obj)
    {
        m_zxdg_importer_v2 = obj;
    }

    zxdg_importer_v2 *zxdg_importer_v2::fromObject(struct ::zxdg_importer_v2 *object)
    {
        return static_cast<zxdg_importer_v2 *>(zxdg_importer_v2_get_user_data(object));
    }

    bool zxdg_importer_v2::isInitialized() const
    {
        return m_zxdg_importer_v2 != nullptr;
    }

    uint32_t zxdg_importer_v2::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_zxdg_importer_v2));
    }

    const struct wl_interface *zxdg_importer_v2::interface()
    {
        return &::zxdg_importer_v2_interface;
    }

    void zxdg_importer_v2::destroy()
    {
        ::zxdg_importer_v2_destroy(
            m_zxdg_importer_v2);
        m_zxdg_importer_v2 = nullptr;
    }

    struct ::zxdg_imported_v2 *zxdg_importer_v2::import_toplevel(const QString &handle)
    {
        struct ::zxdg_imported_v2 * id = ::zxdg_importer_v2_import_toplevel(
            m_zxdg_importer_v2,
            handle.toUtf8().constData());
        return id;
    }

    zxdg_exported_v2::zxdg_exported_v2(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    zxdg_exported_v2::zxdg_exported_v2(struct ::zxdg_exported_v2 *obj)
        : m_zxdg_exported_v2(obj)
    {
        init_listener();
    }

    zxdg_exported_v2::zxdg_exported_v2()
        : m_zxdg_exported_v2(nullptr)
    {
    }

    zxdg_exported_v2::~zxdg_exported_v2()
    {
    }

    void zxdg_exported_v2::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_zxdg_exported_v2 = static_cast<struct ::zxdg_exported_v2 *>(wlRegistryBind(registry, id, &zxdg_exported_v2_interface, version));
        init_listener();
    }

    void zxdg_exported_v2::init(struct ::zxdg_exported_v2 *obj)
    {
        m_zxdg_exported_v2 = obj;
        init_listener();
    }

    zxdg_exported_v2 *zxdg_exported_v2::fromObject(struct ::zxdg_exported_v2 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zxdg_exported_v2_listener)
            return nullptr;
        return static_cast<zxdg_exported_v2 *>(zxdg_exported_v2_get_user_data(object));
    }

    bool zxdg_exported_v2::isInitialized() const
    {
        return m_zxdg_exported_v2 != nullptr;
    }

    uint32_t zxdg_exported_v2::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_zxdg_exported_v2));
    }

    const struct wl_interface *zxdg_exported_v2::interface()
    {
        return &::zxdg_exported_v2_interface;
    }

    void zxdg_exported_v2::destroy()
    {
        ::zxdg_exported_v2_destroy(
            m_zxdg_exported_v2);
        m_zxdg_exported_v2 = nullptr;
    }

    void zxdg_exported_v2::zxdg_exported_v2_handle(const QString &)
    {
    }

    void zxdg_exported_v2::handle_handle(
        void *data,
        struct ::zxdg_exported_v2 *object,
        const char *handle)
    {
        Q_UNUSED(object);
        static_cast<zxdg_exported_v2 *>(data)->zxdg_exported_v2_handle(
            QString::fromUtf8(handle));
    }

    const struct zxdg_exported_v2_listener zxdg_exported_v2::m_zxdg_exported_v2_listener = {
        zxdg_exported_v2::handle_handle,
    };

    void zxdg_exported_v2::init_listener()
    {
        zxdg_exported_v2_add_listener(m_zxdg_exported_v2, &m_zxdg_exported_v2_listener, this);
    }

    zxdg_imported_v2::zxdg_imported_v2(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    zxdg_imported_v2::zxdg_imported_v2(struct ::zxdg_imported_v2 *obj)
        : m_zxdg_imported_v2(obj)
    {
        init_listener();
    }

    zxdg_imported_v2::zxdg_imported_v2()
        : m_zxdg_imported_v2(nullptr)
    {
    }

    zxdg_imported_v2::~zxdg_imported_v2()
    {
    }

    void zxdg_imported_v2::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_zxdg_imported_v2 = static_cast<struct ::zxdg_imported_v2 *>(wlRegistryBind(registry, id, &zxdg_imported_v2_interface, version));
        init_listener();
    }

    void zxdg_imported_v2::init(struct ::zxdg_imported_v2 *obj)
    {
        m_zxdg_imported_v2 = obj;
        init_listener();
    }

    zxdg_imported_v2 *zxdg_imported_v2::fromObject(struct ::zxdg_imported_v2 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zxdg_imported_v2_listener)
            return nullptr;
        return static_cast<zxdg_imported_v2 *>(zxdg_imported_v2_get_user_data(object));
    }

    bool zxdg_imported_v2::isInitialized() const
    {
        return m_zxdg_imported_v2 != nullptr;
    }

    uint32_t zxdg_imported_v2::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_zxdg_imported_v2));
    }

    const struct wl_interface *zxdg_imported_v2::interface()
    {
        return &::zxdg_imported_v2_interface;
    }

    void zxdg_imported_v2::destroy()
    {
        ::zxdg_imported_v2_destroy(
            m_zxdg_imported_v2);
        m_zxdg_imported_v2 = nullptr;
    }

    void zxdg_imported_v2::set_parent_of(struct ::wl_surface *surface)
    {
        ::zxdg_imported_v2_set_parent_of(
            m_zxdg_imported_v2,
            surface);
    }

    void zxdg_imported_v2::zxdg_imported_v2_destroyed()
    {
    }

    void zxdg_imported_v2::handle_destroyed(
        void *data,
        struct ::zxdg_imported_v2 *object)
    {
        Q_UNUSED(object);
        static_cast<zxdg_imported_v2 *>(data)->zxdg_imported_v2_destroyed();
    }

    const struct zxdg_imported_v2_listener zxdg_imported_v2::m_zxdg_imported_v2_listener = {
        zxdg_imported_v2::handle_destroyed,
    };

    void zxdg_imported_v2::init_listener()
    {
        zxdg_imported_v2_add_listener(m_zxdg_imported_v2, &m_zxdg_imported_v2_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
