// This file was generated by qtwaylandscanner
// source file is ext-data-control-v1.xml

#include "qwayland-ext-data-control-v1.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);
}

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

    ext_data_control_manager_v1::ext_data_control_manager_v1(struct ::ext_data_control_manager_v1 *obj)
        : m_ext_data_control_manager_v1(obj)
    {
    }

    ext_data_control_manager_v1::ext_data_control_manager_v1()
        : m_ext_data_control_manager_v1(nullptr)
    {
    }

    ext_data_control_manager_v1::~ext_data_control_manager_v1()
    {
    }

    void ext_data_control_manager_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_ext_data_control_manager_v1 = static_cast<struct ::ext_data_control_manager_v1 *>(wlRegistryBind(registry, id, &ext_data_control_manager_v1_interface, version));
    }

    void ext_data_control_manager_v1::init(struct ::ext_data_control_manager_v1 *obj)
    {
        m_ext_data_control_manager_v1 = obj;
    }

    ext_data_control_manager_v1 *ext_data_control_manager_v1::fromObject(struct ::ext_data_control_manager_v1 *object)
    {
        return static_cast<ext_data_control_manager_v1 *>(ext_data_control_manager_v1_get_user_data(object));
    }

    bool ext_data_control_manager_v1::isInitialized() const
    {
        return m_ext_data_control_manager_v1 != nullptr;
    }

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

    const struct wl_interface *ext_data_control_manager_v1::interface()
    {
        return &::ext_data_control_manager_v1_interface;
    }

    struct ::ext_data_control_source_v1 *ext_data_control_manager_v1::create_data_source()
    {
        struct ::ext_data_control_source_v1 * id = ::ext_data_control_manager_v1_create_data_source(
            m_ext_data_control_manager_v1);
        return id;
    }

    struct ::ext_data_control_device_v1 *ext_data_control_manager_v1::get_data_device(struct ::wl_seat *seat)
    {
        struct ::ext_data_control_device_v1 * id = ::ext_data_control_manager_v1_get_data_device(
            m_ext_data_control_manager_v1,
            seat);
        return id;
    }

    void ext_data_control_manager_v1::destroy()
    {
        ::ext_data_control_manager_v1_destroy(
            m_ext_data_control_manager_v1);
        m_ext_data_control_manager_v1 = nullptr;
    }

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

    ext_data_control_device_v1::ext_data_control_device_v1(struct ::ext_data_control_device_v1 *obj)
        : m_ext_data_control_device_v1(obj)
    {
        init_listener();
    }

    ext_data_control_device_v1::ext_data_control_device_v1()
        : m_ext_data_control_device_v1(nullptr)
    {
    }

    ext_data_control_device_v1::~ext_data_control_device_v1()
    {
    }

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

    void ext_data_control_device_v1::init(struct ::ext_data_control_device_v1 *obj)
    {
        m_ext_data_control_device_v1 = obj;
        init_listener();
    }

    ext_data_control_device_v1 *ext_data_control_device_v1::fromObject(struct ::ext_data_control_device_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_ext_data_control_device_v1_listener)
            return nullptr;
        return static_cast<ext_data_control_device_v1 *>(ext_data_control_device_v1_get_user_data(object));
    }

    bool ext_data_control_device_v1::isInitialized() const
    {
        return m_ext_data_control_device_v1 != nullptr;
    }

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

    const struct wl_interface *ext_data_control_device_v1::interface()
    {
        return &::ext_data_control_device_v1_interface;
    }

    void ext_data_control_device_v1::set_selection(struct ::ext_data_control_source_v1 *source)
    {
        ::ext_data_control_device_v1_set_selection(
            m_ext_data_control_device_v1,
            source);
    }

    void ext_data_control_device_v1::destroy()
    {
        ::ext_data_control_device_v1_destroy(
            m_ext_data_control_device_v1);
        m_ext_data_control_device_v1 = nullptr;
    }

    void ext_data_control_device_v1::set_primary_selection(struct ::ext_data_control_source_v1 *source)
    {
        ::ext_data_control_device_v1_set_primary_selection(
            m_ext_data_control_device_v1,
            source);
    }

    void ext_data_control_device_v1::ext_data_control_device_v1_data_offer(struct ::ext_data_control_offer_v1 *)
    {
    }

    void ext_data_control_device_v1::handle_data_offer(
        void *data,
        struct ::ext_data_control_device_v1 *object,
        struct ::ext_data_control_offer_v1 *id)
    {
        Q_UNUSED(object);
        static_cast<ext_data_control_device_v1 *>(data)->ext_data_control_device_v1_data_offer(
            id);
    }

    void ext_data_control_device_v1::ext_data_control_device_v1_selection(struct ::ext_data_control_offer_v1 *)
    {
    }

    void ext_data_control_device_v1::handle_selection(
        void *data,
        struct ::ext_data_control_device_v1 *object,
        struct ::ext_data_control_offer_v1 *id)
    {
        Q_UNUSED(object);
        static_cast<ext_data_control_device_v1 *>(data)->ext_data_control_device_v1_selection(
            id);
    }

    void ext_data_control_device_v1::ext_data_control_device_v1_finished()
    {
    }

    void ext_data_control_device_v1::handle_finished(
        void *data,
        struct ::ext_data_control_device_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<ext_data_control_device_v1 *>(data)->ext_data_control_device_v1_finished();
    }

    void ext_data_control_device_v1::ext_data_control_device_v1_primary_selection(struct ::ext_data_control_offer_v1 *)
    {
    }

    void ext_data_control_device_v1::handle_primary_selection(
        void *data,
        struct ::ext_data_control_device_v1 *object,
        struct ::ext_data_control_offer_v1 *id)
    {
        Q_UNUSED(object);
        static_cast<ext_data_control_device_v1 *>(data)->ext_data_control_device_v1_primary_selection(
            id);
    }

    const struct ext_data_control_device_v1_listener ext_data_control_device_v1::m_ext_data_control_device_v1_listener = {
        ext_data_control_device_v1::handle_data_offer,
        ext_data_control_device_v1::handle_selection,
        ext_data_control_device_v1::handle_finished,
        ext_data_control_device_v1::handle_primary_selection,
    };

    void ext_data_control_device_v1::init_listener()
    {
        ext_data_control_device_v1_add_listener(m_ext_data_control_device_v1, &m_ext_data_control_device_v1_listener, this);
    }

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

    ext_data_control_source_v1::ext_data_control_source_v1(struct ::ext_data_control_source_v1 *obj)
        : m_ext_data_control_source_v1(obj)
    {
        init_listener();
    }

    ext_data_control_source_v1::ext_data_control_source_v1()
        : m_ext_data_control_source_v1(nullptr)
    {
    }

    ext_data_control_source_v1::~ext_data_control_source_v1()
    {
    }

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

    void ext_data_control_source_v1::init(struct ::ext_data_control_source_v1 *obj)
    {
        m_ext_data_control_source_v1 = obj;
        init_listener();
    }

    ext_data_control_source_v1 *ext_data_control_source_v1::fromObject(struct ::ext_data_control_source_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_ext_data_control_source_v1_listener)
            return nullptr;
        return static_cast<ext_data_control_source_v1 *>(ext_data_control_source_v1_get_user_data(object));
    }

    bool ext_data_control_source_v1::isInitialized() const
    {
        return m_ext_data_control_source_v1 != nullptr;
    }

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

    const struct wl_interface *ext_data_control_source_v1::interface()
    {
        return &::ext_data_control_source_v1_interface;
    }

    void ext_data_control_source_v1::offer(const QString &mime_type)
    {
        ::ext_data_control_source_v1_offer(
            m_ext_data_control_source_v1,
            mime_type.toUtf8().constData());
    }

    void ext_data_control_source_v1::destroy()
    {
        ::ext_data_control_source_v1_destroy(
            m_ext_data_control_source_v1);
        m_ext_data_control_source_v1 = nullptr;
    }

    void ext_data_control_source_v1::ext_data_control_source_v1_send(const QString &, int32_t )
    {
    }

    void ext_data_control_source_v1::handle_send(
        void *data,
        struct ::ext_data_control_source_v1 *object,
        const char *mime_type,
        int32_t fd)
    {
        Q_UNUSED(object);
        static_cast<ext_data_control_source_v1 *>(data)->ext_data_control_source_v1_send(
            QString::fromUtf8(mime_type),
            fd);
    }

    void ext_data_control_source_v1::ext_data_control_source_v1_cancelled()
    {
    }

    void ext_data_control_source_v1::handle_cancelled(
        void *data,
        struct ::ext_data_control_source_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<ext_data_control_source_v1 *>(data)->ext_data_control_source_v1_cancelled();
    }

    const struct ext_data_control_source_v1_listener ext_data_control_source_v1::m_ext_data_control_source_v1_listener = {
        ext_data_control_source_v1::handle_send,
        ext_data_control_source_v1::handle_cancelled,
    };

    void ext_data_control_source_v1::init_listener()
    {
        ext_data_control_source_v1_add_listener(m_ext_data_control_source_v1, &m_ext_data_control_source_v1_listener, this);
    }

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

    ext_data_control_offer_v1::ext_data_control_offer_v1(struct ::ext_data_control_offer_v1 *obj)
        : m_ext_data_control_offer_v1(obj)
    {
        init_listener();
    }

    ext_data_control_offer_v1::ext_data_control_offer_v1()
        : m_ext_data_control_offer_v1(nullptr)
    {
    }

    ext_data_control_offer_v1::~ext_data_control_offer_v1()
    {
    }

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

    void ext_data_control_offer_v1::init(struct ::ext_data_control_offer_v1 *obj)
    {
        m_ext_data_control_offer_v1 = obj;
        init_listener();
    }

    ext_data_control_offer_v1 *ext_data_control_offer_v1::fromObject(struct ::ext_data_control_offer_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_ext_data_control_offer_v1_listener)
            return nullptr;
        return static_cast<ext_data_control_offer_v1 *>(ext_data_control_offer_v1_get_user_data(object));
    }

    bool ext_data_control_offer_v1::isInitialized() const
    {
        return m_ext_data_control_offer_v1 != nullptr;
    }

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

    const struct wl_interface *ext_data_control_offer_v1::interface()
    {
        return &::ext_data_control_offer_v1_interface;
    }

    void ext_data_control_offer_v1::receive(const QString &mime_type, int32_t fd)
    {
        ::ext_data_control_offer_v1_receive(
            m_ext_data_control_offer_v1,
            mime_type.toUtf8().constData(),
            fd);
    }

    void ext_data_control_offer_v1::destroy()
    {
        ::ext_data_control_offer_v1_destroy(
            m_ext_data_control_offer_v1);
        m_ext_data_control_offer_v1 = nullptr;
    }

    void ext_data_control_offer_v1::ext_data_control_offer_v1_offer(const QString &)
    {
    }

    void ext_data_control_offer_v1::handle_offer(
        void *data,
        struct ::ext_data_control_offer_v1 *object,
        const char *mime_type)
    {
        Q_UNUSED(object);
        static_cast<ext_data_control_offer_v1 *>(data)->ext_data_control_offer_v1_offer(
            QString::fromUtf8(mime_type));
    }

    const struct ext_data_control_offer_v1_listener ext_data_control_offer_v1::m_ext_data_control_offer_v1_listener = {
        ext_data_control_offer_v1::handle_offer,
    };

    void ext_data_control_offer_v1::init_listener()
    {
        ext_data_control_offer_v1_add_listener(m_ext_data_control_offer_v1, &m_ext_data_control_offer_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
