// This file was generated by qtwaylandscanner
// source file is /build/kguiaddons/src/kguiaddons-5.97.0/src/systemclipboard/wlr-data-control-unstable-v1.xml

#include "qwayland-wlr-data-control-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
}

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

    zwlr_data_control_manager_v1::zwlr_data_control_manager_v1(struct ::zwlr_data_control_manager_v1 *obj)
        : m_zwlr_data_control_manager_v1(obj)
    {
    }

    zwlr_data_control_manager_v1::zwlr_data_control_manager_v1()
        : m_zwlr_data_control_manager_v1(nullptr)
    {
    }

    zwlr_data_control_manager_v1::~zwlr_data_control_manager_v1()
    {
    }

    void zwlr_data_control_manager_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwlr_data_control_manager_v1 = static_cast<struct ::zwlr_data_control_manager_v1 *>(wlRegistryBind(registry, id, &zwlr_data_control_manager_v1_interface, version));
    }

    void zwlr_data_control_manager_v1::init(struct ::zwlr_data_control_manager_v1 *obj)
    {
        m_zwlr_data_control_manager_v1 = obj;
    }

    zwlr_data_control_manager_v1 *zwlr_data_control_manager_v1::fromObject(struct ::zwlr_data_control_manager_v1 *object)
    {
        return static_cast<zwlr_data_control_manager_v1 *>(zwlr_data_control_manager_v1_get_user_data(object));
    }

    bool zwlr_data_control_manager_v1::isInitialized() const
    {
        return m_zwlr_data_control_manager_v1 != nullptr;
    }

    const struct wl_interface *zwlr_data_control_manager_v1::interface()
    {
        return &::zwlr_data_control_manager_v1_interface;
    }

    struct ::zwlr_data_control_source_v1 *zwlr_data_control_manager_v1::create_data_source()
    {
        return zwlr_data_control_manager_v1_create_data_source(
            m_zwlr_data_control_manager_v1);
    }

    struct ::zwlr_data_control_device_v1 *zwlr_data_control_manager_v1::get_data_device(struct ::wl_seat *seat)
    {
        return zwlr_data_control_manager_v1_get_data_device(
            m_zwlr_data_control_manager_v1,
            seat);
    }

    void zwlr_data_control_manager_v1::destroy()
    {
        zwlr_data_control_manager_v1_destroy(
            m_zwlr_data_control_manager_v1);
        m_zwlr_data_control_manager_v1 = nullptr;
    }

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

    zwlr_data_control_device_v1::zwlr_data_control_device_v1(struct ::zwlr_data_control_device_v1 *obj)
        : m_zwlr_data_control_device_v1(obj)
    {
        init_listener();
    }

    zwlr_data_control_device_v1::zwlr_data_control_device_v1()
        : m_zwlr_data_control_device_v1(nullptr)
    {
    }

    zwlr_data_control_device_v1::~zwlr_data_control_device_v1()
    {
    }

    void zwlr_data_control_device_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwlr_data_control_device_v1 = static_cast<struct ::zwlr_data_control_device_v1 *>(wlRegistryBind(registry, id, &zwlr_data_control_device_v1_interface, version));
        init_listener();
    }

    void zwlr_data_control_device_v1::init(struct ::zwlr_data_control_device_v1 *obj)
    {
        m_zwlr_data_control_device_v1 = obj;
        init_listener();
    }

    zwlr_data_control_device_v1 *zwlr_data_control_device_v1::fromObject(struct ::zwlr_data_control_device_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwlr_data_control_device_v1_listener)
            return nullptr;
        return static_cast<zwlr_data_control_device_v1 *>(zwlr_data_control_device_v1_get_user_data(object));
    }

    bool zwlr_data_control_device_v1::isInitialized() const
    {
        return m_zwlr_data_control_device_v1 != nullptr;
    }

    const struct wl_interface *zwlr_data_control_device_v1::interface()
    {
        return &::zwlr_data_control_device_v1_interface;
    }

    void zwlr_data_control_device_v1::set_selection(struct ::zwlr_data_control_source_v1 *source)
    {
        zwlr_data_control_device_v1_set_selection(
            m_zwlr_data_control_device_v1,
            source);
    }

    void zwlr_data_control_device_v1::destroy()
    {
        zwlr_data_control_device_v1_destroy(
            m_zwlr_data_control_device_v1);
        m_zwlr_data_control_device_v1 = nullptr;
    }

    void zwlr_data_control_device_v1::set_primary_selection(struct ::zwlr_data_control_source_v1 *source)
    {
        zwlr_data_control_device_v1_set_primary_selection(
            m_zwlr_data_control_device_v1,
            source);
    }

    void zwlr_data_control_device_v1::zwlr_data_control_device_v1_data_offer(struct ::zwlr_data_control_offer_v1 *)
    {
    }

    void zwlr_data_control_device_v1::handle_data_offer(
        void *data,
        struct ::zwlr_data_control_device_v1 *object,
        struct ::zwlr_data_control_offer_v1 *id)
    {
        Q_UNUSED(object);
        static_cast<zwlr_data_control_device_v1 *>(data)->zwlr_data_control_device_v1_data_offer(
            id);
    }

    void zwlr_data_control_device_v1::zwlr_data_control_device_v1_selection(struct ::zwlr_data_control_offer_v1 *)
    {
    }

    void zwlr_data_control_device_v1::handle_selection(
        void *data,
        struct ::zwlr_data_control_device_v1 *object,
        struct ::zwlr_data_control_offer_v1 *id)
    {
        Q_UNUSED(object);
        static_cast<zwlr_data_control_device_v1 *>(data)->zwlr_data_control_device_v1_selection(
            id);
    }

    void zwlr_data_control_device_v1::zwlr_data_control_device_v1_finished()
    {
    }

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

    void zwlr_data_control_device_v1::zwlr_data_control_device_v1_primary_selection(struct ::zwlr_data_control_offer_v1 *)
    {
    }

    void zwlr_data_control_device_v1::handle_primary_selection(
        void *data,
        struct ::zwlr_data_control_device_v1 *object,
        struct ::zwlr_data_control_offer_v1 *id)
    {
        Q_UNUSED(object);
        static_cast<zwlr_data_control_device_v1 *>(data)->zwlr_data_control_device_v1_primary_selection(
            id);
    }

    const struct zwlr_data_control_device_v1_listener zwlr_data_control_device_v1::m_zwlr_data_control_device_v1_listener = {
        zwlr_data_control_device_v1::handle_data_offer,
        zwlr_data_control_device_v1::handle_selection,
        zwlr_data_control_device_v1::handle_finished,
        zwlr_data_control_device_v1::handle_primary_selection,
    };

    void zwlr_data_control_device_v1::init_listener()
    {
        zwlr_data_control_device_v1_add_listener(m_zwlr_data_control_device_v1, &m_zwlr_data_control_device_v1_listener, this);
    }

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

    zwlr_data_control_source_v1::zwlr_data_control_source_v1(struct ::zwlr_data_control_source_v1 *obj)
        : m_zwlr_data_control_source_v1(obj)
    {
        init_listener();
    }

    zwlr_data_control_source_v1::zwlr_data_control_source_v1()
        : m_zwlr_data_control_source_v1(nullptr)
    {
    }

    zwlr_data_control_source_v1::~zwlr_data_control_source_v1()
    {
    }

    void zwlr_data_control_source_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwlr_data_control_source_v1 = static_cast<struct ::zwlr_data_control_source_v1 *>(wlRegistryBind(registry, id, &zwlr_data_control_source_v1_interface, version));
        init_listener();
    }

    void zwlr_data_control_source_v1::init(struct ::zwlr_data_control_source_v1 *obj)
    {
        m_zwlr_data_control_source_v1 = obj;
        init_listener();
    }

    zwlr_data_control_source_v1 *zwlr_data_control_source_v1::fromObject(struct ::zwlr_data_control_source_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwlr_data_control_source_v1_listener)
            return nullptr;
        return static_cast<zwlr_data_control_source_v1 *>(zwlr_data_control_source_v1_get_user_data(object));
    }

    bool zwlr_data_control_source_v1::isInitialized() const
    {
        return m_zwlr_data_control_source_v1 != nullptr;
    }

    const struct wl_interface *zwlr_data_control_source_v1::interface()
    {
        return &::zwlr_data_control_source_v1_interface;
    }

    void zwlr_data_control_source_v1::offer(const QString &mime_type)
    {
        zwlr_data_control_source_v1_offer(
            m_zwlr_data_control_source_v1,
            mime_type.toUtf8().constData());
    }

    void zwlr_data_control_source_v1::destroy()
    {
        zwlr_data_control_source_v1_destroy(
            m_zwlr_data_control_source_v1);
        m_zwlr_data_control_source_v1 = nullptr;
    }

    void zwlr_data_control_source_v1::zwlr_data_control_source_v1_send(const QString &, int32_t )
    {
    }

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

    void zwlr_data_control_source_v1::zwlr_data_control_source_v1_cancelled()
    {
    }

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

    const struct zwlr_data_control_source_v1_listener zwlr_data_control_source_v1::m_zwlr_data_control_source_v1_listener = {
        zwlr_data_control_source_v1::handle_send,
        zwlr_data_control_source_v1::handle_cancelled,
    };

    void zwlr_data_control_source_v1::init_listener()
    {
        zwlr_data_control_source_v1_add_listener(m_zwlr_data_control_source_v1, &m_zwlr_data_control_source_v1_listener, this);
    }

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

    zwlr_data_control_offer_v1::zwlr_data_control_offer_v1(struct ::zwlr_data_control_offer_v1 *obj)
        : m_zwlr_data_control_offer_v1(obj)
    {
        init_listener();
    }

    zwlr_data_control_offer_v1::zwlr_data_control_offer_v1()
        : m_zwlr_data_control_offer_v1(nullptr)
    {
    }

    zwlr_data_control_offer_v1::~zwlr_data_control_offer_v1()
    {
    }

    void zwlr_data_control_offer_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwlr_data_control_offer_v1 = static_cast<struct ::zwlr_data_control_offer_v1 *>(wlRegistryBind(registry, id, &zwlr_data_control_offer_v1_interface, version));
        init_listener();
    }

    void zwlr_data_control_offer_v1::init(struct ::zwlr_data_control_offer_v1 *obj)
    {
        m_zwlr_data_control_offer_v1 = obj;
        init_listener();
    }

    zwlr_data_control_offer_v1 *zwlr_data_control_offer_v1::fromObject(struct ::zwlr_data_control_offer_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwlr_data_control_offer_v1_listener)
            return nullptr;
        return static_cast<zwlr_data_control_offer_v1 *>(zwlr_data_control_offer_v1_get_user_data(object));
    }

    bool zwlr_data_control_offer_v1::isInitialized() const
    {
        return m_zwlr_data_control_offer_v1 != nullptr;
    }

    const struct wl_interface *zwlr_data_control_offer_v1::interface()
    {
        return &::zwlr_data_control_offer_v1_interface;
    }

    void zwlr_data_control_offer_v1::receive(const QString &mime_type, int32_t fd)
    {
        zwlr_data_control_offer_v1_receive(
            m_zwlr_data_control_offer_v1,
            mime_type.toUtf8().constData(),
            fd);
    }

    void zwlr_data_control_offer_v1::destroy()
    {
        zwlr_data_control_offer_v1_destroy(
            m_zwlr_data_control_offer_v1);
        m_zwlr_data_control_offer_v1 = nullptr;
    }

    void zwlr_data_control_offer_v1::zwlr_data_control_offer_v1_offer(const QString &)
    {
    }

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

    const struct zwlr_data_control_offer_v1_listener zwlr_data_control_offer_v1::m_zwlr_data_control_offer_v1_listener = {
        zwlr_data_control_offer_v1::handle_offer,
    };

    void zwlr_data_control_offer_v1::init_listener()
    {
        zwlr_data_control_offer_v1_add_listener(m_zwlr_data_control_offer_v1, &m_zwlr_data_control_offer_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
