// This file was generated by qtwaylandscanner
// source file is /scratch/jenkins-BUILDS-eSDK-2024.1_stable-pipeline-build-179_VckScFull/build/tmp/work/vck_sc_zynqmp-xilinx-linux/qtwayland/5.15.4+gitAUTOINC+f1e6c8764d-r0/git/src/3rdparty/protocol/wp-primary-selection-unstable-v1.xml

#include <QtWaylandClient/private/qwayland-wp-primary-selection-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
}

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

    zwp_primary_selection_device_manager_v1::zwp_primary_selection_device_manager_v1(struct ::zwp_primary_selection_device_manager_v1 *obj)
        : m_zwp_primary_selection_device_manager_v1(obj)
    {
    }

    zwp_primary_selection_device_manager_v1::zwp_primary_selection_device_manager_v1()
        : m_zwp_primary_selection_device_manager_v1(nullptr)
    {
    }

    zwp_primary_selection_device_manager_v1::~zwp_primary_selection_device_manager_v1()
    {
    }

    void zwp_primary_selection_device_manager_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwp_primary_selection_device_manager_v1 = static_cast<struct ::zwp_primary_selection_device_manager_v1 *>(wlRegistryBind(registry, id, &zwp_primary_selection_device_manager_v1_interface, version));
    }

    void zwp_primary_selection_device_manager_v1::init(struct ::zwp_primary_selection_device_manager_v1 *obj)
    {
        m_zwp_primary_selection_device_manager_v1 = obj;
    }

    zwp_primary_selection_device_manager_v1 *zwp_primary_selection_device_manager_v1::fromObject(struct ::zwp_primary_selection_device_manager_v1 *object)
    {
        return static_cast<zwp_primary_selection_device_manager_v1 *>(zwp_primary_selection_device_manager_v1_get_user_data(object));
    }

    bool zwp_primary_selection_device_manager_v1::isInitialized() const
    {
        return m_zwp_primary_selection_device_manager_v1 != nullptr;
    }

    const struct wl_interface *zwp_primary_selection_device_manager_v1::interface()
    {
        return &::zwp_primary_selection_device_manager_v1_interface;
    }

    struct ::zwp_primary_selection_source_v1 *zwp_primary_selection_device_manager_v1::create_source()
    {
        return zwp_primary_selection_device_manager_v1_create_source(
            m_zwp_primary_selection_device_manager_v1);
    }

    struct ::zwp_primary_selection_device_v1 *zwp_primary_selection_device_manager_v1::get_device(struct ::wl_seat *seat)
    {
        return zwp_primary_selection_device_manager_v1_get_device(
            m_zwp_primary_selection_device_manager_v1,
            seat);
    }

    void zwp_primary_selection_device_manager_v1::destroy()
    {
        zwp_primary_selection_device_manager_v1_destroy(
            m_zwp_primary_selection_device_manager_v1);
        m_zwp_primary_selection_device_manager_v1 = nullptr;
    }

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

    zwp_primary_selection_device_v1::zwp_primary_selection_device_v1(struct ::zwp_primary_selection_device_v1 *obj)
        : m_zwp_primary_selection_device_v1(obj)
    {
        init_listener();
    }

    zwp_primary_selection_device_v1::zwp_primary_selection_device_v1()
        : m_zwp_primary_selection_device_v1(nullptr)
    {
    }

    zwp_primary_selection_device_v1::~zwp_primary_selection_device_v1()
    {
    }

    void zwp_primary_selection_device_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwp_primary_selection_device_v1 = static_cast<struct ::zwp_primary_selection_device_v1 *>(wlRegistryBind(registry, id, &zwp_primary_selection_device_v1_interface, version));
        init_listener();
    }

    void zwp_primary_selection_device_v1::init(struct ::zwp_primary_selection_device_v1 *obj)
    {
        m_zwp_primary_selection_device_v1 = obj;
        init_listener();
    }

    zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1::fromObject(struct ::zwp_primary_selection_device_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwp_primary_selection_device_v1_listener)
            return nullptr;
        return static_cast<zwp_primary_selection_device_v1 *>(zwp_primary_selection_device_v1_get_user_data(object));
    }

    bool zwp_primary_selection_device_v1::isInitialized() const
    {
        return m_zwp_primary_selection_device_v1 != nullptr;
    }

    const struct wl_interface *zwp_primary_selection_device_v1::interface()
    {
        return &::zwp_primary_selection_device_v1_interface;
    }

    void zwp_primary_selection_device_v1::set_selection(struct ::zwp_primary_selection_source_v1 *source, uint32_t serial)
    {
        zwp_primary_selection_device_v1_set_selection(
            m_zwp_primary_selection_device_v1,
            source,
            serial);
    }

    void zwp_primary_selection_device_v1::destroy()
    {
        zwp_primary_selection_device_v1_destroy(
            m_zwp_primary_selection_device_v1);
        m_zwp_primary_selection_device_v1 = nullptr;
    }

    void zwp_primary_selection_device_v1::zwp_primary_selection_device_v1_data_offer(struct ::zwp_primary_selection_offer_v1 *)
    {
    }

    void zwp_primary_selection_device_v1::handle_data_offer(
        void *data,
        struct ::zwp_primary_selection_device_v1 *object,
        struct ::zwp_primary_selection_offer_v1 *offer)
    {
        Q_UNUSED(object);
        static_cast<zwp_primary_selection_device_v1 *>(data)->zwp_primary_selection_device_v1_data_offer(
            offer);
    }

    void zwp_primary_selection_device_v1::zwp_primary_selection_device_v1_selection(struct ::zwp_primary_selection_offer_v1 *)
    {
    }

    void zwp_primary_selection_device_v1::handle_selection(
        void *data,
        struct ::zwp_primary_selection_device_v1 *object,
        struct ::zwp_primary_selection_offer_v1 *id)
    {
        Q_UNUSED(object);
        static_cast<zwp_primary_selection_device_v1 *>(data)->zwp_primary_selection_device_v1_selection(
            id);
    }

    const struct zwp_primary_selection_device_v1_listener zwp_primary_selection_device_v1::m_zwp_primary_selection_device_v1_listener = {
        zwp_primary_selection_device_v1::handle_data_offer,
        zwp_primary_selection_device_v1::handle_selection,
    };

    void zwp_primary_selection_device_v1::init_listener()
    {
        zwp_primary_selection_device_v1_add_listener(m_zwp_primary_selection_device_v1, &m_zwp_primary_selection_device_v1_listener, this);
    }

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

    zwp_primary_selection_offer_v1::zwp_primary_selection_offer_v1(struct ::zwp_primary_selection_offer_v1 *obj)
        : m_zwp_primary_selection_offer_v1(obj)
    {
        init_listener();
    }

    zwp_primary_selection_offer_v1::zwp_primary_selection_offer_v1()
        : m_zwp_primary_selection_offer_v1(nullptr)
    {
    }

    zwp_primary_selection_offer_v1::~zwp_primary_selection_offer_v1()
    {
    }

    void zwp_primary_selection_offer_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwp_primary_selection_offer_v1 = static_cast<struct ::zwp_primary_selection_offer_v1 *>(wlRegistryBind(registry, id, &zwp_primary_selection_offer_v1_interface, version));
        init_listener();
    }

    void zwp_primary_selection_offer_v1::init(struct ::zwp_primary_selection_offer_v1 *obj)
    {
        m_zwp_primary_selection_offer_v1 = obj;
        init_listener();
    }

    zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1::fromObject(struct ::zwp_primary_selection_offer_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwp_primary_selection_offer_v1_listener)
            return nullptr;
        return static_cast<zwp_primary_selection_offer_v1 *>(zwp_primary_selection_offer_v1_get_user_data(object));
    }

    bool zwp_primary_selection_offer_v1::isInitialized() const
    {
        return m_zwp_primary_selection_offer_v1 != nullptr;
    }

    const struct wl_interface *zwp_primary_selection_offer_v1::interface()
    {
        return &::zwp_primary_selection_offer_v1_interface;
    }

    void zwp_primary_selection_offer_v1::receive(const QString &mime_type, int32_t fd)
    {
        zwp_primary_selection_offer_v1_receive(
            m_zwp_primary_selection_offer_v1,
            mime_type.toUtf8().constData(),
            fd);
    }

    void zwp_primary_selection_offer_v1::destroy()
    {
        zwp_primary_selection_offer_v1_destroy(
            m_zwp_primary_selection_offer_v1);
        m_zwp_primary_selection_offer_v1 = nullptr;
    }

    void zwp_primary_selection_offer_v1::zwp_primary_selection_offer_v1_offer(const QString &)
    {
    }

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

    const struct zwp_primary_selection_offer_v1_listener zwp_primary_selection_offer_v1::m_zwp_primary_selection_offer_v1_listener = {
        zwp_primary_selection_offer_v1::handle_offer,
    };

    void zwp_primary_selection_offer_v1::init_listener()
    {
        zwp_primary_selection_offer_v1_add_listener(m_zwp_primary_selection_offer_v1, &m_zwp_primary_selection_offer_v1_listener, this);
    }

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

    zwp_primary_selection_source_v1::zwp_primary_selection_source_v1(struct ::zwp_primary_selection_source_v1 *obj)
        : m_zwp_primary_selection_source_v1(obj)
    {
        init_listener();
    }

    zwp_primary_selection_source_v1::zwp_primary_selection_source_v1()
        : m_zwp_primary_selection_source_v1(nullptr)
    {
    }

    zwp_primary_selection_source_v1::~zwp_primary_selection_source_v1()
    {
    }

    void zwp_primary_selection_source_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwp_primary_selection_source_v1 = static_cast<struct ::zwp_primary_selection_source_v1 *>(wlRegistryBind(registry, id, &zwp_primary_selection_source_v1_interface, version));
        init_listener();
    }

    void zwp_primary_selection_source_v1::init(struct ::zwp_primary_selection_source_v1 *obj)
    {
        m_zwp_primary_selection_source_v1 = obj;
        init_listener();
    }

    zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1::fromObject(struct ::zwp_primary_selection_source_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwp_primary_selection_source_v1_listener)
            return nullptr;
        return static_cast<zwp_primary_selection_source_v1 *>(zwp_primary_selection_source_v1_get_user_data(object));
    }

    bool zwp_primary_selection_source_v1::isInitialized() const
    {
        return m_zwp_primary_selection_source_v1 != nullptr;
    }

    const struct wl_interface *zwp_primary_selection_source_v1::interface()
    {
        return &::zwp_primary_selection_source_v1_interface;
    }

    void zwp_primary_selection_source_v1::offer(const QString &mime_type)
    {
        zwp_primary_selection_source_v1_offer(
            m_zwp_primary_selection_source_v1,
            mime_type.toUtf8().constData());
    }

    void zwp_primary_selection_source_v1::destroy()
    {
        zwp_primary_selection_source_v1_destroy(
            m_zwp_primary_selection_source_v1);
        m_zwp_primary_selection_source_v1 = nullptr;
    }

    void zwp_primary_selection_source_v1::zwp_primary_selection_source_v1_send(const QString &, int32_t )
    {
    }

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

    void zwp_primary_selection_source_v1::zwp_primary_selection_source_v1_cancelled()
    {
    }

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

    const struct zwp_primary_selection_source_v1_listener zwp_primary_selection_source_v1::m_zwp_primary_selection_source_v1_listener = {
        zwp_primary_selection_source_v1::handle_send,
        zwp_primary_selection_source_v1::handle_cancelled,
    };

    void zwp_primary_selection_source_v1::init_listener()
    {
        zwp_primary_selection_source_v1_add_listener(m_zwp_primary_selection_source_v1, &m_zwp_primary_selection_source_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
