// This file was generated by qtwaylandscanner
// source file is wlr-screencopy-unstable-v1.xml

#include "qwayland-wlr-screencopy-unstable-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);
}

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

    zwlr_screencopy_manager_v1::zwlr_screencopy_manager_v1(struct ::zwlr_screencopy_manager_v1 *obj)
        : m_zwlr_screencopy_manager_v1(obj)
    {
    }

    zwlr_screencopy_manager_v1::zwlr_screencopy_manager_v1()
        : m_zwlr_screencopy_manager_v1(nullptr)
    {
    }

    zwlr_screencopy_manager_v1::~zwlr_screencopy_manager_v1()
    {
    }

    void zwlr_screencopy_manager_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_zwlr_screencopy_manager_v1 = static_cast<struct ::zwlr_screencopy_manager_v1 *>(wlRegistryBind(registry, id, &zwlr_screencopy_manager_v1_interface, version));
    }

    void zwlr_screencopy_manager_v1::init(struct ::zwlr_screencopy_manager_v1 *obj)
    {
        m_zwlr_screencopy_manager_v1 = obj;
    }

    zwlr_screencopy_manager_v1 *zwlr_screencopy_manager_v1::fromObject(struct ::zwlr_screencopy_manager_v1 *object)
    {
        return static_cast<zwlr_screencopy_manager_v1 *>(zwlr_screencopy_manager_v1_get_user_data(object));
    }

    bool zwlr_screencopy_manager_v1::isInitialized() const
    {
        return m_zwlr_screencopy_manager_v1 != nullptr;
    }

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

    const struct wl_interface *zwlr_screencopy_manager_v1::interface()
    {
        return &::zwlr_screencopy_manager_v1_interface;
    }

    struct ::zwlr_screencopy_frame_v1 *zwlr_screencopy_manager_v1::capture_output(int32_t overlay_cursor, struct ::wl_output *output)
    {
        struct ::zwlr_screencopy_frame_v1 * frame = ::zwlr_screencopy_manager_v1_capture_output(
            m_zwlr_screencopy_manager_v1,
            overlay_cursor,
            output);
        return frame;
    }

    struct ::zwlr_screencopy_frame_v1 *zwlr_screencopy_manager_v1::capture_output_region(int32_t overlay_cursor, struct ::wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height)
    {
        struct ::zwlr_screencopy_frame_v1 * frame = ::zwlr_screencopy_manager_v1_capture_output_region(
            m_zwlr_screencopy_manager_v1,
            overlay_cursor,
            output,
            x,
            y,
            width,
            height);
        return frame;
    }

    void zwlr_screencopy_manager_v1::destroy()
    {
        ::zwlr_screencopy_manager_v1_destroy(
            m_zwlr_screencopy_manager_v1);
        m_zwlr_screencopy_manager_v1 = nullptr;
    }

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

    zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1(struct ::zwlr_screencopy_frame_v1 *obj)
        : m_zwlr_screencopy_frame_v1(obj)
    {
        init_listener();
    }

    zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1()
        : m_zwlr_screencopy_frame_v1(nullptr)
    {
    }

    zwlr_screencopy_frame_v1::~zwlr_screencopy_frame_v1()
    {
    }

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

    void zwlr_screencopy_frame_v1::init(struct ::zwlr_screencopy_frame_v1 *obj)
    {
        m_zwlr_screencopy_frame_v1 = obj;
        init_listener();
    }

    zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1::fromObject(struct ::zwlr_screencopy_frame_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwlr_screencopy_frame_v1_listener)
            return nullptr;
        return static_cast<zwlr_screencopy_frame_v1 *>(zwlr_screencopy_frame_v1_get_user_data(object));
    }

    bool zwlr_screencopy_frame_v1::isInitialized() const
    {
        return m_zwlr_screencopy_frame_v1 != nullptr;
    }

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

    const struct wl_interface *zwlr_screencopy_frame_v1::interface()
    {
        return &::zwlr_screencopy_frame_v1_interface;
    }

    void zwlr_screencopy_frame_v1::copy(struct ::wl_buffer *buffer)
    {
        ::zwlr_screencopy_frame_v1_copy(
            m_zwlr_screencopy_frame_v1,
            buffer);
    }

    void zwlr_screencopy_frame_v1::destroy()
    {
        ::zwlr_screencopy_frame_v1_destroy(
            m_zwlr_screencopy_frame_v1);
        m_zwlr_screencopy_frame_v1 = nullptr;
    }

    void zwlr_screencopy_frame_v1::copy_with_damage(struct ::wl_buffer *buffer)
    {
        ::zwlr_screencopy_frame_v1_copy_with_damage(
            m_zwlr_screencopy_frame_v1,
            buffer);
    }

    void zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1_buffer(uint32_t , uint32_t , uint32_t , uint32_t )
    {
    }

    void zwlr_screencopy_frame_v1::handle_buffer(
        void *data,
        struct ::zwlr_screencopy_frame_v1 *object,
        uint32_t format,
        uint32_t width,
        uint32_t height,
        uint32_t stride)
    {
        Q_UNUSED(object);
        static_cast<zwlr_screencopy_frame_v1 *>(data)->zwlr_screencopy_frame_v1_buffer(
            format,
            width,
            height,
            stride);
    }

    void zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1_flags(uint32_t )
    {
    }

    void zwlr_screencopy_frame_v1::handle_flags(
        void *data,
        struct ::zwlr_screencopy_frame_v1 *object,
        uint32_t flags)
    {
        Q_UNUSED(object);
        static_cast<zwlr_screencopy_frame_v1 *>(data)->zwlr_screencopy_frame_v1_flags(
            flags);
    }

    void zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1_ready(uint32_t , uint32_t , uint32_t )
    {
    }

    void zwlr_screencopy_frame_v1::handle_ready(
        void *data,
        struct ::zwlr_screencopy_frame_v1 *object,
        uint32_t tv_sec_hi,
        uint32_t tv_sec_lo,
        uint32_t tv_nsec)
    {
        Q_UNUSED(object);
        static_cast<zwlr_screencopy_frame_v1 *>(data)->zwlr_screencopy_frame_v1_ready(
            tv_sec_hi,
            tv_sec_lo,
            tv_nsec);
    }

    void zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1_failed()
    {
    }

    void zwlr_screencopy_frame_v1::handle_failed(
        void *data,
        struct ::zwlr_screencopy_frame_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<zwlr_screencopy_frame_v1 *>(data)->zwlr_screencopy_frame_v1_failed();
    }

    void zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1_damage(uint32_t , uint32_t , uint32_t , uint32_t )
    {
    }

    void zwlr_screencopy_frame_v1::handle_damage(
        void *data,
        struct ::zwlr_screencopy_frame_v1 *object,
        uint32_t x,
        uint32_t y,
        uint32_t width,
        uint32_t height)
    {
        Q_UNUSED(object);
        static_cast<zwlr_screencopy_frame_v1 *>(data)->zwlr_screencopy_frame_v1_damage(
            x,
            y,
            width,
            height);
    }

    void zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1_linux_dmabuf(uint32_t , uint32_t , uint32_t )
    {
    }

    void zwlr_screencopy_frame_v1::handle_linux_dmabuf(
        void *data,
        struct ::zwlr_screencopy_frame_v1 *object,
        uint32_t format,
        uint32_t width,
        uint32_t height)
    {
        Q_UNUSED(object);
        static_cast<zwlr_screencopy_frame_v1 *>(data)->zwlr_screencopy_frame_v1_linux_dmabuf(
            format,
            width,
            height);
    }

    void zwlr_screencopy_frame_v1::zwlr_screencopy_frame_v1_buffer_done()
    {
    }

    void zwlr_screencopy_frame_v1::handle_buffer_done(
        void *data,
        struct ::zwlr_screencopy_frame_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<zwlr_screencopy_frame_v1 *>(data)->zwlr_screencopy_frame_v1_buffer_done();
    }

    const struct zwlr_screencopy_frame_v1_listener zwlr_screencopy_frame_v1::m_zwlr_screencopy_frame_v1_listener = {
        zwlr_screencopy_frame_v1::handle_buffer,
        zwlr_screencopy_frame_v1::handle_flags,
        zwlr_screencopy_frame_v1::handle_ready,
        zwlr_screencopy_frame_v1::handle_failed,
        zwlr_screencopy_frame_v1::handle_damage,
        zwlr_screencopy_frame_v1::handle_linux_dmabuf,
        zwlr_screencopy_frame_v1::handle_buffer_done,
    };

    void zwlr_screencopy_frame_v1::init_listener()
    {
        zwlr_screencopy_frame_v1_add_listener(m_zwlr_screencopy_frame_v1, &m_zwlr_screencopy_frame_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
