// This file was generated by qtwaylandscanner
// source file is qt-shell-unstable-v1.xml

#include "qwayland-server-qt-shell-unstable-v1.h"

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

namespace QtWaylandServer {
    zqt_shell_surface_v1::zqt_shell_surface_v1(struct ::wl_client *client, uint32_t id, int version)
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
        init(client, id, version);
    }

    zqt_shell_surface_v1::zqt_shell_surface_v1(struct ::wl_display *display, int version)
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
        init(display, version);
    }

    zqt_shell_surface_v1::zqt_shell_surface_v1(struct ::wl_resource *resource)
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
        init(resource);
    }

    zqt_shell_surface_v1::zqt_shell_surface_v1()
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
    }

    zqt_shell_surface_v1::~zqt_shell_surface_v1()
    {
        for (auto resource : std::as_const(m_resource_map))
            resource->zqt_shell_surface_v1_object = nullptr;

        if (m_resource)
            m_resource->zqt_shell_surface_v1_object = nullptr;

        if (m_global) {
            wl_global_destroy(m_global);
            wl_list_remove(&m_displayDestroyedListener.link);
        }
    }

    void zqt_shell_surface_v1::init(struct ::wl_client *client, uint32_t id, int version)
    {
        m_resource = bind(client, id, version);
    }

    void zqt_shell_surface_v1::init(struct ::wl_resource *resource)
    {
        m_resource = bind(resource);
    }

    zqt_shell_surface_v1::Resource *zqt_shell_surface_v1::add(struct ::wl_client *client, int version)
    {
        Resource *resource = bind(client, 0, version);
        m_resource_map.insert(client, resource);
        return resource;
    }

    zqt_shell_surface_v1::Resource *zqt_shell_surface_v1::add(struct ::wl_client *client, uint32_t id, int version)
    {
        Resource *resource = bind(client, id, version);
        m_resource_map.insert(client, resource);
        return resource;
    }

    void zqt_shell_surface_v1::init(struct ::wl_display *display, int version)
    {
        m_global = wl_global_create(display, &::zqt_shell_surface_v1_interface, version, this, bind_func);
        m_displayDestroyedListener.notify = zqt_shell_surface_v1::display_destroy_func;
        m_displayDestroyedListener.parent = this;
        wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
    }

    const struct wl_interface *zqt_shell_surface_v1::interface()
    {
        return &::zqt_shell_surface_v1_interface;
    }

    zqt_shell_surface_v1::Resource *zqt_shell_surface_v1::zqt_shell_surface_v1_allocate()
    {
        return new Resource;
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_bind_resource(Resource *)
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_destroy_resource(Resource *)
    {
    }

    void zqt_shell_surface_v1::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
    {
        zqt_shell_surface_v1 *that = static_cast<zqt_shell_surface_v1 *>(data);
        that->add(client, id, version);
    }

    void zqt_shell_surface_v1::display_destroy_func(struct ::wl_listener *listener, void *data)
    {
        Q_UNUSED(data);
        zqt_shell_surface_v1 *that = static_cast<zqt_shell_surface_v1::DisplayDestroyedListener *>(listener)->parent;
        that->m_global = nullptr;
    }

    void zqt_shell_surface_v1::destroy_func(struct ::wl_resource *client_resource)
    {
        Resource *resource = Resource::fromResource(client_resource);
        Q_ASSERT(resource);
        zqt_shell_surface_v1 *that = resource->zqt_shell_surface_v1_object;
        if (Q_LIKELY(that)) {
            that->m_resource_map.remove(resource->client(), resource);
            that->zqt_shell_surface_v1_destroy_resource(resource);

            that = resource->zqt_shell_surface_v1_object;
            if (that && that->m_resource == resource)
                that->m_resource = nullptr;
        }
        delete resource;
    }

    zqt_shell_surface_v1::Resource *zqt_shell_surface_v1::bind(struct ::wl_client *client, uint32_t id, int version)
    {
        Q_ASSERT_X(!wl_client_get_object(client, id), "QWaylandObject bind", QStringLiteral("binding to object %1 more than once").arg(id).toLocal8Bit().constData());
        struct ::wl_resource *handle = wl_resource_create(client, &::zqt_shell_surface_v1_interface, version, id);
        return bind(handle);
    }

    zqt_shell_surface_v1::Resource *zqt_shell_surface_v1::bind(struct ::wl_resource *handle)
    {
        Resource *resource = zqt_shell_surface_v1_allocate();
        resource->zqt_shell_surface_v1_object = this;

        wl_resource_set_implementation(handle, &m_zqt_shell_surface_v1_interface, resource, destroy_func);
        resource->handle = handle;
        zqt_shell_surface_v1_bind_resource(resource);
        return resource;
    }
    zqt_shell_surface_v1::Resource *zqt_shell_surface_v1::Resource::fromResource(struct ::wl_resource *resource)
    {
        if (Q_UNLIKELY(!resource))
            return nullptr;
        if (wl_resource_instance_of(resource, &::zqt_shell_surface_v1_interface, &m_zqt_shell_surface_v1_interface))
            return static_cast<Resource *>(wl_resource_get_user_data(resource));
        return nullptr;
    }

    const struct ::zqt_shell_surface_v1_interface zqt_shell_surface_v1::m_zqt_shell_surface_v1_interface = {
        zqt_shell_surface_v1::handle_destroy,
        zqt_shell_surface_v1::handle_reposition,
        zqt_shell_surface_v1::handle_request_activate,
        zqt_shell_surface_v1::handle_set_size,
        zqt_shell_surface_v1::handle_set_minimum_size,
        zqt_shell_surface_v1::handle_set_maximum_size,
        zqt_shell_surface_v1::handle_set_window_title,
        zqt_shell_surface_v1::handle_set_window_flags,
        zqt_shell_surface_v1::handle_start_system_resize,
        zqt_shell_surface_v1::handle_start_system_move,
        zqt_shell_surface_v1::handle_change_window_state,
        zqt_shell_surface_v1::handle_raise,
        zqt_shell_surface_v1::handle_lower,
        zqt_shell_surface_v1::handle_ack_configure
    };

    void zqt_shell_surface_v1::zqt_shell_surface_v1_destroy(Resource *)
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_reposition(Resource *, int32_t , int32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_request_activate(Resource *)
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_size(Resource *, int32_t , int32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_minimum_size(Resource *, int32_t , int32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_maximum_size(Resource *, int32_t , int32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_window_title(Resource *, const QString &)
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_window_flags(Resource *, uint32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_start_system_resize(Resource *, uint32_t , uint32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_start_system_move(Resource *, uint32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_change_window_state(Resource *, uint32_t )
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_raise(Resource *)
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_lower(Resource *)
    {
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_ack_configure(Resource *, uint32_t )
    {
    }


    void zqt_shell_surface_v1::handle_destroy(
        ::wl_client *client,
        struct wl_resource *resource)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            wl_resource_destroy(resource);
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_destroy(
            r);
    }

    void zqt_shell_surface_v1::handle_reposition(
        ::wl_client *client,
        struct wl_resource *resource,
        int32_t x,
        int32_t y)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_reposition(
            r,
            x,
            y);
    }

    void zqt_shell_surface_v1::handle_request_activate(
        ::wl_client *client,
        struct wl_resource *resource)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_request_activate(
            r);
    }

    void zqt_shell_surface_v1::handle_set_size(
        ::wl_client *client,
        struct wl_resource *resource,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_set_size(
            r,
            width,
            height);
    }

    void zqt_shell_surface_v1::handle_set_minimum_size(
        ::wl_client *client,
        struct wl_resource *resource,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_set_minimum_size(
            r,
            width,
            height);
    }

    void zqt_shell_surface_v1::handle_set_maximum_size(
        ::wl_client *client,
        struct wl_resource *resource,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_set_maximum_size(
            r,
            width,
            height);
    }

    void zqt_shell_surface_v1::handle_set_window_title(
        ::wl_client *client,
        struct wl_resource *resource,
        const char *window_title)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_set_window_title(
            r,
            QString::fromUtf8(window_title));
    }

    void zqt_shell_surface_v1::handle_set_window_flags(
        ::wl_client *client,
        struct wl_resource *resource,
        uint32_t flags)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_set_window_flags(
            r,
            flags);
    }

    void zqt_shell_surface_v1::handle_start_system_resize(
        ::wl_client *client,
        struct wl_resource *resource,
        uint32_t serial,
        uint32_t edge)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_start_system_resize(
            r,
            serial,
            edge);
    }

    void zqt_shell_surface_v1::handle_start_system_move(
        ::wl_client *client,
        struct wl_resource *resource,
        uint32_t serial)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_start_system_move(
            r,
            serial);
    }

    void zqt_shell_surface_v1::handle_change_window_state(
        ::wl_client *client,
        struct wl_resource *resource,
        uint32_t state)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_change_window_state(
            r,
            state);
    }

    void zqt_shell_surface_v1::handle_raise(
        ::wl_client *client,
        struct wl_resource *resource)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_raise(
            r);
    }

    void zqt_shell_surface_v1::handle_lower(
        ::wl_client *client,
        struct wl_resource *resource)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_lower(
            r);
    }

    void zqt_shell_surface_v1::handle_ack_configure(
        ::wl_client *client,
        struct wl_resource *resource,
        uint32_t serial)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_surface_v1_object)) {
            return;
        }
        static_cast<zqt_shell_surface_v1 *>(r->zqt_shell_surface_v1_object)->zqt_shell_surface_v1_ack_configure(
            r,
            serial);
    }

    void zqt_shell_surface_v1::send_resize(uint32_t serial, int32_t width, int32_t height)
    {
        Q_ASSERT_X(m_resource, "zqt_shell_surface_v1::resize", "Uninitialised resource");
        if (Q_UNLIKELY(!m_resource)) {
            qWarning("could not call zqt_shell_surface_v1::resize as it's not initialised");
            return;
        }
        send_resize(
            m_resource->handle,
            serial,
            width,
            height);
    }

    void zqt_shell_surface_v1::send_resize(struct ::wl_resource *resource, uint32_t serial, int32_t width, int32_t height)
    {
        zqt_shell_surface_v1_send_resize(
            resource,
            serial,
            width,
            height);
    }


    void zqt_shell_surface_v1::send_set_position(uint32_t serial, int32_t x, int32_t y)
    {
        Q_ASSERT_X(m_resource, "zqt_shell_surface_v1::set_position", "Uninitialised resource");
        if (Q_UNLIKELY(!m_resource)) {
            qWarning("could not call zqt_shell_surface_v1::set_position as it's not initialised");
            return;
        }
        send_set_position(
            m_resource->handle,
            serial,
            x,
            y);
    }

    void zqt_shell_surface_v1::send_set_position(struct ::wl_resource *resource, uint32_t serial, int32_t x, int32_t y)
    {
        zqt_shell_surface_v1_send_set_position(
            resource,
            serial,
            x,
            y);
    }


    void zqt_shell_surface_v1::send_set_window_state(uint32_t serial, uint32_t state)
    {
        Q_ASSERT_X(m_resource, "zqt_shell_surface_v1::set_window_state", "Uninitialised resource");
        if (Q_UNLIKELY(!m_resource)) {
            qWarning("could not call zqt_shell_surface_v1::set_window_state as it's not initialised");
            return;
        }
        send_set_window_state(
            m_resource->handle,
            serial,
            state);
    }

    void zqt_shell_surface_v1::send_set_window_state(struct ::wl_resource *resource, uint32_t serial, uint32_t state)
    {
        zqt_shell_surface_v1_send_set_window_state(
            resource,
            serial,
            state);
    }


    void zqt_shell_surface_v1::send_configure(uint32_t serial)
    {
        Q_ASSERT_X(m_resource, "zqt_shell_surface_v1::configure", "Uninitialised resource");
        if (Q_UNLIKELY(!m_resource)) {
            qWarning("could not call zqt_shell_surface_v1::configure as it's not initialised");
            return;
        }
        send_configure(
            m_resource->handle,
            serial);
    }

    void zqt_shell_surface_v1::send_configure(struct ::wl_resource *resource, uint32_t serial)
    {
        zqt_shell_surface_v1_send_configure(
            resource,
            serial);
    }


    void zqt_shell_surface_v1::send_set_frame_margins(uint32_t left, uint32_t right, uint32_t top, uint32_t bottom)
    {
        Q_ASSERT_X(m_resource, "zqt_shell_surface_v1::set_frame_margins", "Uninitialised resource");
        if (Q_UNLIKELY(!m_resource)) {
            qWarning("could not call zqt_shell_surface_v1::set_frame_margins as it's not initialised");
            return;
        }
        send_set_frame_margins(
            m_resource->handle,
            left,
            right,
            top,
            bottom);
    }

    void zqt_shell_surface_v1::send_set_frame_margins(struct ::wl_resource *resource, uint32_t left, uint32_t right, uint32_t top, uint32_t bottom)
    {
        zqt_shell_surface_v1_send_set_frame_margins(
            resource,
            left,
            right,
            top,
            bottom);
    }


    void zqt_shell_surface_v1::send_close()
    {
        Q_ASSERT_X(m_resource, "zqt_shell_surface_v1::close", "Uninitialised resource");
        if (Q_UNLIKELY(!m_resource)) {
            qWarning("could not call zqt_shell_surface_v1::close as it's not initialised");
            return;
        }
        send_close(
            m_resource->handle);
    }

    void zqt_shell_surface_v1::send_close(struct ::wl_resource *resource)
    {
        zqt_shell_surface_v1_send_close(
            resource);
    }


    void zqt_shell_surface_v1::send_set_capabilities(uint32_t capabilities)
    {
        Q_ASSERT_X(m_resource, "zqt_shell_surface_v1::set_capabilities", "Uninitialised resource");
        if (Q_UNLIKELY(!m_resource)) {
            qWarning("could not call zqt_shell_surface_v1::set_capabilities as it's not initialised");
            return;
        }
        send_set_capabilities(
            m_resource->handle,
            capabilities);
    }

    void zqt_shell_surface_v1::send_set_capabilities(struct ::wl_resource *resource, uint32_t capabilities)
    {
        zqt_shell_surface_v1_send_set_capabilities(
            resource,
            capabilities);
    }


    zqt_shell_v1::zqt_shell_v1(struct ::wl_client *client, uint32_t id, int version)
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
        init(client, id, version);
    }

    zqt_shell_v1::zqt_shell_v1(struct ::wl_display *display, int version)
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
        init(display, version);
    }

    zqt_shell_v1::zqt_shell_v1(struct ::wl_resource *resource)
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
        init(resource);
    }

    zqt_shell_v1::zqt_shell_v1()
        : m_resource_map()
        , m_resource(nullptr)
        , m_global(nullptr)
    {
    }

    zqt_shell_v1::~zqt_shell_v1()
    {
        for (auto resource : std::as_const(m_resource_map))
            resource->zqt_shell_v1_object = nullptr;

        if (m_resource)
            m_resource->zqt_shell_v1_object = nullptr;

        if (m_global) {
            wl_global_destroy(m_global);
            wl_list_remove(&m_displayDestroyedListener.link);
        }
    }

    void zqt_shell_v1::init(struct ::wl_client *client, uint32_t id, int version)
    {
        m_resource = bind(client, id, version);
    }

    void zqt_shell_v1::init(struct ::wl_resource *resource)
    {
        m_resource = bind(resource);
    }

    zqt_shell_v1::Resource *zqt_shell_v1::add(struct ::wl_client *client, int version)
    {
        Resource *resource = bind(client, 0, version);
        m_resource_map.insert(client, resource);
        return resource;
    }

    zqt_shell_v1::Resource *zqt_shell_v1::add(struct ::wl_client *client, uint32_t id, int version)
    {
        Resource *resource = bind(client, id, version);
        m_resource_map.insert(client, resource);
        return resource;
    }

    void zqt_shell_v1::init(struct ::wl_display *display, int version)
    {
        m_global = wl_global_create(display, &::zqt_shell_v1_interface, version, this, bind_func);
        m_displayDestroyedListener.notify = zqt_shell_v1::display_destroy_func;
        m_displayDestroyedListener.parent = this;
        wl_display_add_destroy_listener(display, &m_displayDestroyedListener);
    }

    const struct wl_interface *zqt_shell_v1::interface()
    {
        return &::zqt_shell_v1_interface;
    }

    zqt_shell_v1::Resource *zqt_shell_v1::zqt_shell_v1_allocate()
    {
        return new Resource;
    }

    void zqt_shell_v1::zqt_shell_v1_bind_resource(Resource *)
    {
    }

    void zqt_shell_v1::zqt_shell_v1_destroy_resource(Resource *)
    {
    }

    void zqt_shell_v1::bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id)
    {
        zqt_shell_v1 *that = static_cast<zqt_shell_v1 *>(data);
        that->add(client, id, version);
    }

    void zqt_shell_v1::display_destroy_func(struct ::wl_listener *listener, void *data)
    {
        Q_UNUSED(data);
        zqt_shell_v1 *that = static_cast<zqt_shell_v1::DisplayDestroyedListener *>(listener)->parent;
        that->m_global = nullptr;
    }

    void zqt_shell_v1::destroy_func(struct ::wl_resource *client_resource)
    {
        Resource *resource = Resource::fromResource(client_resource);
        Q_ASSERT(resource);
        zqt_shell_v1 *that = resource->zqt_shell_v1_object;
        if (Q_LIKELY(that)) {
            that->m_resource_map.remove(resource->client(), resource);
            that->zqt_shell_v1_destroy_resource(resource);

            that = resource->zqt_shell_v1_object;
            if (that && that->m_resource == resource)
                that->m_resource = nullptr;
        }
        delete resource;
    }

    zqt_shell_v1::Resource *zqt_shell_v1::bind(struct ::wl_client *client, uint32_t id, int version)
    {
        Q_ASSERT_X(!wl_client_get_object(client, id), "QWaylandObject bind", QStringLiteral("binding to object %1 more than once").arg(id).toLocal8Bit().constData());
        struct ::wl_resource *handle = wl_resource_create(client, &::zqt_shell_v1_interface, version, id);
        return bind(handle);
    }

    zqt_shell_v1::Resource *zqt_shell_v1::bind(struct ::wl_resource *handle)
    {
        Resource *resource = zqt_shell_v1_allocate();
        resource->zqt_shell_v1_object = this;

        wl_resource_set_implementation(handle, &m_zqt_shell_v1_interface, resource, destroy_func);
        resource->handle = handle;
        zqt_shell_v1_bind_resource(resource);
        return resource;
    }
    zqt_shell_v1::Resource *zqt_shell_v1::Resource::fromResource(struct ::wl_resource *resource)
    {
        if (Q_UNLIKELY(!resource))
            return nullptr;
        if (wl_resource_instance_of(resource, &::zqt_shell_v1_interface, &m_zqt_shell_v1_interface))
            return static_cast<Resource *>(wl_resource_get_user_data(resource));
        return nullptr;
    }

    const struct ::zqt_shell_v1_interface zqt_shell_v1::m_zqt_shell_v1_interface = {
        zqt_shell_v1::handle_surface_create
    };

    void zqt_shell_v1::zqt_shell_v1_surface_create(Resource *, struct ::wl_resource *, uint32_t)
    {
    }


    void zqt_shell_v1::handle_surface_create(
        ::wl_client *client,
        struct wl_resource *resource,
        struct ::wl_resource *surface,
        uint32_t id)
    {
        Q_UNUSED(client);
        Resource *r = Resource::fromResource(resource);
        if (Q_UNLIKELY(!r->zqt_shell_v1_object)) {
            return;
        }
        static_cast<zqt_shell_v1 *>(r->zqt_shell_v1_object)->zqt_shell_v1_surface_create(
            r,
            surface,
            id);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
