// This file was generated by qtwaylandscanner
// source file is org-kde-plasma-virtual-desktop.xml

#include "qwayland-org-kde-plasma-virtual-desktop.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);
}

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

    org_kde_plasma_virtual_desktop_management::org_kde_plasma_virtual_desktop_management(struct ::org_kde_plasma_virtual_desktop_management *obj)
        : m_org_kde_plasma_virtual_desktop_management(obj)
    {
        init_listener();
    }

    org_kde_plasma_virtual_desktop_management::org_kde_plasma_virtual_desktop_management()
        : m_org_kde_plasma_virtual_desktop_management(nullptr)
    {
    }

    org_kde_plasma_virtual_desktop_management::~org_kde_plasma_virtual_desktop_management()
    {
    }

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

    void org_kde_plasma_virtual_desktop_management::init(struct ::org_kde_plasma_virtual_desktop_management *obj)
    {
        m_org_kde_plasma_virtual_desktop_management = obj;
        init_listener();
    }

    org_kde_plasma_virtual_desktop_management *org_kde_plasma_virtual_desktop_management::fromObject(struct ::org_kde_plasma_virtual_desktop_management *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_org_kde_plasma_virtual_desktop_management_listener)
            return nullptr;
        return static_cast<org_kde_plasma_virtual_desktop_management *>(org_kde_plasma_virtual_desktop_management_get_user_data(object));
    }

    bool org_kde_plasma_virtual_desktop_management::isInitialized() const
    {
        return m_org_kde_plasma_virtual_desktop_management != nullptr;
    }

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

    const struct wl_interface *org_kde_plasma_virtual_desktop_management::interface()
    {
        return &::org_kde_plasma_virtual_desktop_management_interface;
    }

    struct ::org_kde_plasma_virtual_desktop *org_kde_plasma_virtual_desktop_management::get_virtual_desktop(const QString &desktop_id)
    {
        struct ::org_kde_plasma_virtual_desktop * id = ::org_kde_plasma_virtual_desktop_management_get_virtual_desktop(
            m_org_kde_plasma_virtual_desktop_management,
            desktop_id.toUtf8().constData());
        return id;
    }

    void org_kde_plasma_virtual_desktop_management::request_create_virtual_desktop(const QString &name, uint32_t position)
    {
        ::org_kde_plasma_virtual_desktop_management_request_create_virtual_desktop(
            m_org_kde_plasma_virtual_desktop_management,
            name.toUtf8().constData(),
            position);
    }

    void org_kde_plasma_virtual_desktop_management::request_remove_virtual_desktop(const QString &desktop_id)
    {
        ::org_kde_plasma_virtual_desktop_management_request_remove_virtual_desktop(
            m_org_kde_plasma_virtual_desktop_management,
            desktop_id.toUtf8().constData());
    }

    void org_kde_plasma_virtual_desktop_management::org_kde_plasma_virtual_desktop_management_desktop_created(const QString &, uint32_t )
    {
    }

    void org_kde_plasma_virtual_desktop_management::handle_desktop_created(
        void *data,
        struct ::org_kde_plasma_virtual_desktop_management *object,
        const char *desktop_id,
        uint32_t position)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop_management *>(data)->org_kde_plasma_virtual_desktop_management_desktop_created(
            QString::fromUtf8(desktop_id),
            position);
    }

    void org_kde_plasma_virtual_desktop_management::org_kde_plasma_virtual_desktop_management_desktop_removed(const QString &)
    {
    }

    void org_kde_plasma_virtual_desktop_management::handle_desktop_removed(
        void *data,
        struct ::org_kde_plasma_virtual_desktop_management *object,
        const char *desktop_id)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop_management *>(data)->org_kde_plasma_virtual_desktop_management_desktop_removed(
            QString::fromUtf8(desktop_id));
    }

    void org_kde_plasma_virtual_desktop_management::org_kde_plasma_virtual_desktop_management_done()
    {
    }

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

    void org_kde_plasma_virtual_desktop_management::org_kde_plasma_virtual_desktop_management_rows(uint32_t )
    {
    }

    void org_kde_plasma_virtual_desktop_management::handle_rows(
        void *data,
        struct ::org_kde_plasma_virtual_desktop_management *object,
        uint32_t rows)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop_management *>(data)->org_kde_plasma_virtual_desktop_management_rows(
            rows);
    }

    const struct org_kde_plasma_virtual_desktop_management_listener org_kde_plasma_virtual_desktop_management::m_org_kde_plasma_virtual_desktop_management_listener = {
        org_kde_plasma_virtual_desktop_management::handle_desktop_created,
        org_kde_plasma_virtual_desktop_management::handle_desktop_removed,
        org_kde_plasma_virtual_desktop_management::handle_done,
        org_kde_plasma_virtual_desktop_management::handle_rows,
    };

    void org_kde_plasma_virtual_desktop_management::init_listener()
    {
        org_kde_plasma_virtual_desktop_management_add_listener(m_org_kde_plasma_virtual_desktop_management, &m_org_kde_plasma_virtual_desktop_management_listener, this);
    }

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

    org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop(struct ::org_kde_plasma_virtual_desktop *obj)
        : m_org_kde_plasma_virtual_desktop(obj)
    {
        init_listener();
    }

    org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop()
        : m_org_kde_plasma_virtual_desktop(nullptr)
    {
    }

    org_kde_plasma_virtual_desktop::~org_kde_plasma_virtual_desktop()
    {
    }

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

    void org_kde_plasma_virtual_desktop::init(struct ::org_kde_plasma_virtual_desktop *obj)
    {
        m_org_kde_plasma_virtual_desktop = obj;
        init_listener();
    }

    org_kde_plasma_virtual_desktop *org_kde_plasma_virtual_desktop::fromObject(struct ::org_kde_plasma_virtual_desktop *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_org_kde_plasma_virtual_desktop_listener)
            return nullptr;
        return static_cast<org_kde_plasma_virtual_desktop *>(org_kde_plasma_virtual_desktop_get_user_data(object));
    }

    bool org_kde_plasma_virtual_desktop::isInitialized() const
    {
        return m_org_kde_plasma_virtual_desktop != nullptr;
    }

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

    const struct wl_interface *org_kde_plasma_virtual_desktop::interface()
    {
        return &::org_kde_plasma_virtual_desktop_interface;
    }

    void org_kde_plasma_virtual_desktop::request_activate()
    {
        ::org_kde_plasma_virtual_desktop_request_activate(
            m_org_kde_plasma_virtual_desktop);
    }

    void org_kde_plasma_virtual_desktop::request_enter_output(const QString &output_name)
    {
        ::org_kde_plasma_virtual_desktop_request_enter_output(
            m_org_kde_plasma_virtual_desktop,
            output_name.toUtf8().constData());
    }

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_desktop_id(const QString &)
    {
    }

    void org_kde_plasma_virtual_desktop::handle_desktop_id(
        void *data,
        struct ::org_kde_plasma_virtual_desktop *object,
        const char *desktop_id)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop *>(data)->org_kde_plasma_virtual_desktop_desktop_id(
            QString::fromUtf8(desktop_id));
    }

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_name(const QString &)
    {
    }

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

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_activated()
    {
    }

    void org_kde_plasma_virtual_desktop::handle_activated(
        void *data,
        struct ::org_kde_plasma_virtual_desktop *object)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop *>(data)->org_kde_plasma_virtual_desktop_activated();
    }

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_deactivated()
    {
    }

    void org_kde_plasma_virtual_desktop::handle_deactivated(
        void *data,
        struct ::org_kde_plasma_virtual_desktop *object)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop *>(data)->org_kde_plasma_virtual_desktop_deactivated();
    }

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_done()
    {
    }

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

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_removed()
    {
    }

    void org_kde_plasma_virtual_desktop::handle_removed(
        void *data,
        struct ::org_kde_plasma_virtual_desktop *object)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop *>(data)->org_kde_plasma_virtual_desktop_removed();
    }

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_position(uint32_t )
    {
    }

    void org_kde_plasma_virtual_desktop::handle_position(
        void *data,
        struct ::org_kde_plasma_virtual_desktop *object,
        uint32_t index)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop *>(data)->org_kde_plasma_virtual_desktop_position(
            index);
    }

    void org_kde_plasma_virtual_desktop::org_kde_plasma_virtual_desktop_output_entered(const QString &)
    {
    }

    void org_kde_plasma_virtual_desktop::handle_output_entered(
        void *data,
        struct ::org_kde_plasma_virtual_desktop *object,
        const char *output_name)
    {
        Q_UNUSED(object);
        static_cast<org_kde_plasma_virtual_desktop *>(data)->org_kde_plasma_virtual_desktop_output_entered(
            QString::fromUtf8(output_name));
    }

    const struct org_kde_plasma_virtual_desktop_listener org_kde_plasma_virtual_desktop::m_org_kde_plasma_virtual_desktop_listener = {
        org_kde_plasma_virtual_desktop::handle_desktop_id,
        org_kde_plasma_virtual_desktop::handle_name,
        org_kde_plasma_virtual_desktop::handle_activated,
        org_kde_plasma_virtual_desktop::handle_deactivated,
        org_kde_plasma_virtual_desktop::handle_done,
        org_kde_plasma_virtual_desktop::handle_removed,
        org_kde_plasma_virtual_desktop::handle_position,
        org_kde_plasma_virtual_desktop::handle_output_entered,
    };

    void org_kde_plasma_virtual_desktop::init_listener()
    {
        org_kde_plasma_virtual_desktop_add_listener(m_org_kde_plasma_virtual_desktop, &m_org_kde_plasma_virtual_desktop_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
