#include <QtWaylandClient/private/qwayland-xdg-output-unstable-v1.h>

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-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;
#if (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR > 10) || WAYLAND_VERSION_MAJOR > 1
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
        bindOpCode, interface, version, name, interface->name, version, nullptr);
#else
    return (void *) wl_proxy_marshal_constructor((struct wl_proxy *) registry,
        bindOpCode, interface, name, interface->name, version, nullptr);
#endif
}

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

    zxdg_output_manager_v1::zxdg_output_manager_v1(struct ::zxdg_output_manager_v1 *obj)
        : m_zxdg_output_manager_v1(obj)
    {
    }

    zxdg_output_manager_v1::zxdg_output_manager_v1()
        : m_zxdg_output_manager_v1(nullptr)
    {
    }

    zxdg_output_manager_v1::~zxdg_output_manager_v1()
    {
    }

    void zxdg_output_manager_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zxdg_output_manager_v1 = static_cast<struct ::zxdg_output_manager_v1 *>(wlRegistryBind(registry, id, &zxdg_output_manager_v1_interface, version));
    }

    void zxdg_output_manager_v1::init(struct ::zxdg_output_manager_v1 *obj)
    {
        m_zxdg_output_manager_v1 = obj;
    }

    zxdg_output_manager_v1 *zxdg_output_manager_v1::fromObject(struct ::zxdg_output_manager_v1 *object)
    {
        return static_cast<zxdg_output_manager_v1 *>(zxdg_output_manager_v1_get_user_data(object));
    }

    bool zxdg_output_manager_v1::isInitialized() const
    {
        return m_zxdg_output_manager_v1 != nullptr;
    }

    const struct wl_interface *zxdg_output_manager_v1::interface()
    {
        return &::zxdg_output_manager_v1_interface;
    }

    void zxdg_output_manager_v1::destroy()
    {
        zxdg_output_manager_v1_destroy(
            m_zxdg_output_manager_v1);
        m_zxdg_output_manager_v1 = nullptr;
    }

    struct ::zxdg_output_v1 *zxdg_output_manager_v1::get_xdg_output(struct ::wl_output *output)
    {
        return zxdg_output_manager_v1_get_xdg_output(
            m_zxdg_output_manager_v1,
            output);
    }

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

    zxdg_output_v1::zxdg_output_v1(struct ::zxdg_output_v1 *obj)
        : m_zxdg_output_v1(obj)
    {
        init_listener();
    }

    zxdg_output_v1::zxdg_output_v1()
        : m_zxdg_output_v1(nullptr)
    {
    }

    zxdg_output_v1::~zxdg_output_v1()
    {
    }

    void zxdg_output_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zxdg_output_v1 = static_cast<struct ::zxdg_output_v1 *>(wlRegistryBind(registry, id, &zxdg_output_v1_interface, version));
        init_listener();
    }

    void zxdg_output_v1::init(struct ::zxdg_output_v1 *obj)
    {
        m_zxdg_output_v1 = obj;
        init_listener();
    }

    zxdg_output_v1 *zxdg_output_v1::fromObject(struct ::zxdg_output_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zxdg_output_v1_listener)
            return nullptr;
        return static_cast<zxdg_output_v1 *>(zxdg_output_v1_get_user_data(object));
    }

    bool zxdg_output_v1::isInitialized() const
    {
        return m_zxdg_output_v1 != nullptr;
    }

    const struct wl_interface *zxdg_output_v1::interface()
    {
        return &::zxdg_output_v1_interface;
    }

    void zxdg_output_v1::destroy()
    {
        zxdg_output_v1_destroy(
            m_zxdg_output_v1);
        m_zxdg_output_v1 = nullptr;
    }

    void zxdg_output_v1::zxdg_output_v1_logical_position(int32_t , int32_t )
    {
    }

    void zxdg_output_v1::handle_logical_position(
        void *data,
        struct ::zxdg_output_v1 *object,
        int32_t x,
        int32_t y)
    {
        Q_UNUSED(object);
        static_cast<zxdg_output_v1 *>(data)->zxdg_output_v1_logical_position(
            x,
            y);
    }

    void zxdg_output_v1::zxdg_output_v1_logical_size(int32_t , int32_t )
    {
    }

    void zxdg_output_v1::handle_logical_size(
        void *data,
        struct ::zxdg_output_v1 *object,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(object);
        static_cast<zxdg_output_v1 *>(data)->zxdg_output_v1_logical_size(
            width,
            height);
    }

    void zxdg_output_v1::zxdg_output_v1_done()
    {
    }

    void zxdg_output_v1::handle_done(
        void *data,
        struct ::zxdg_output_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<zxdg_output_v1 *>(data)->zxdg_output_v1_done();
    }

    void zxdg_output_v1::zxdg_output_v1_name(const QString &)
    {
    }

    void zxdg_output_v1::handle_name(
        void *data,
        struct ::zxdg_output_v1 *object,
        const char *name)
    {
        Q_UNUSED(object);
        static_cast<zxdg_output_v1 *>(data)->zxdg_output_v1_name(
            QString::fromUtf8(name));
    }

    void zxdg_output_v1::zxdg_output_v1_description(const QString &)
    {
    }

    void zxdg_output_v1::handle_description(
        void *data,
        struct ::zxdg_output_v1 *object,
        const char *description)
    {
        Q_UNUSED(object);
        static_cast<zxdg_output_v1 *>(data)->zxdg_output_v1_description(
            QString::fromUtf8(description));
    }

    const struct zxdg_output_v1_listener zxdg_output_v1::m_zxdg_output_v1_listener = {
        zxdg_output_v1::handle_logical_position,
        zxdg_output_v1::handle_logical_size,
        zxdg_output_v1::handle_done,
        zxdg_output_v1::handle_name,
        zxdg_output_v1::handle_description
    };

    void zxdg_output_v1::init_listener()
    {
        zxdg_output_v1_add_listener(m_zxdg_output_v1, &m_zxdg_output_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
