// This file was generated by qtwaylandscanner
// source file is treeland-capture-unstable-v1.xml

#include "qwayland-treeland-capture-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);
}

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

    treeland_capture_session_v1::treeland_capture_session_v1(struct ::treeland_capture_session_v1 *obj)
        : m_treeland_capture_session_v1(obj)
    {
        init_listener();
    }

    treeland_capture_session_v1::treeland_capture_session_v1()
        : m_treeland_capture_session_v1(nullptr)
    {
    }

    treeland_capture_session_v1::~treeland_capture_session_v1()
    {
    }

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

    void treeland_capture_session_v1::init(struct ::treeland_capture_session_v1 *obj)
    {
        m_treeland_capture_session_v1 = obj;
        init_listener();
    }

    treeland_capture_session_v1 *treeland_capture_session_v1::fromObject(struct ::treeland_capture_session_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_capture_session_v1_listener)
            return nullptr;
        return static_cast<treeland_capture_session_v1 *>(treeland_capture_session_v1_get_user_data(object));
    }

    bool treeland_capture_session_v1::isInitialized() const
    {
        return m_treeland_capture_session_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_capture_session_v1::interface()
    {
        return &::treeland_capture_session_v1_interface;
    }

    void treeland_capture_session_v1::destroy()
    {
        ::treeland_capture_session_v1_destroy(
            m_treeland_capture_session_v1);
        m_treeland_capture_session_v1 = nullptr;
    }

    void treeland_capture_session_v1::start()
    {
        ::treeland_capture_session_v1_start(
            m_treeland_capture_session_v1);
    }

    void treeland_capture_session_v1::frame_done(uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_usec)
    {
        ::treeland_capture_session_v1_frame_done(
            m_treeland_capture_session_v1,
            tv_sec_hi,
            tv_sec_lo,
            tv_usec);
    }

    void treeland_capture_session_v1::treeland_capture_session_v1_frame(int32_t , int32_t , uint32_t , uint32_t , uint32_t , uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
    {
    }

    void treeland_capture_session_v1::handle_frame(
        void *data,
        struct ::treeland_capture_session_v1 *object,
        int32_t offset_x,
        int32_t offset_y,
        uint32_t width,
        uint32_t height,
        uint32_t buffer_flags,
        uint32_t flags,
        uint32_t format,
        uint32_t mod_high,
        uint32_t mod_low,
        uint32_t num_objects)
    {
        Q_UNUSED(object);
        static_cast<treeland_capture_session_v1 *>(data)->treeland_capture_session_v1_frame(
            offset_x,
            offset_y,
            width,
            height,
            buffer_flags,
            flags,
            format,
            mod_high,
            mod_low,
            num_objects);
    }

    void treeland_capture_session_v1::treeland_capture_session_v1_object(uint32_t , int32_t , uint32_t , uint32_t , uint32_t , uint32_t )
    {
    }

    void treeland_capture_session_v1::handle_object(
        void *data,
        struct ::treeland_capture_session_v1 *object,
        uint32_t index,
        int32_t fd,
        uint32_t size,
        uint32_t offset,
        uint32_t stride,
        uint32_t plane_index)
    {
        Q_UNUSED(object);
        static_cast<treeland_capture_session_v1 *>(data)->treeland_capture_session_v1_object(
            index,
            fd,
            size,
            offset,
            stride,
            plane_index);
    }

    void treeland_capture_session_v1::treeland_capture_session_v1_ready(uint32_t , uint32_t , uint32_t )
    {
    }

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

    void treeland_capture_session_v1::treeland_capture_session_v1_cancel(uint32_t )
    {
    }

    void treeland_capture_session_v1::handle_cancel(
        void *data,
        struct ::treeland_capture_session_v1 *object,
        uint32_t reason)
    {
        Q_UNUSED(object);
        static_cast<treeland_capture_session_v1 *>(data)->treeland_capture_session_v1_cancel(
            reason);
    }

    const struct treeland_capture_session_v1_listener treeland_capture_session_v1::m_treeland_capture_session_v1_listener = {
        treeland_capture_session_v1::handle_frame,
        treeland_capture_session_v1::handle_object,
        treeland_capture_session_v1::handle_ready,
        treeland_capture_session_v1::handle_cancel,
    };

    void treeland_capture_session_v1::init_listener()
    {
        treeland_capture_session_v1_add_listener(m_treeland_capture_session_v1, &m_treeland_capture_session_v1_listener, this);
    }

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

    treeland_capture_frame_v1::treeland_capture_frame_v1(struct ::treeland_capture_frame_v1 *obj)
        : m_treeland_capture_frame_v1(obj)
    {
        init_listener();
    }

    treeland_capture_frame_v1::treeland_capture_frame_v1()
        : m_treeland_capture_frame_v1(nullptr)
    {
    }

    treeland_capture_frame_v1::~treeland_capture_frame_v1()
    {
    }

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

    void treeland_capture_frame_v1::init(struct ::treeland_capture_frame_v1 *obj)
    {
        m_treeland_capture_frame_v1 = obj;
        init_listener();
    }

    treeland_capture_frame_v1 *treeland_capture_frame_v1::fromObject(struct ::treeland_capture_frame_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_capture_frame_v1_listener)
            return nullptr;
        return static_cast<treeland_capture_frame_v1 *>(treeland_capture_frame_v1_get_user_data(object));
    }

    bool treeland_capture_frame_v1::isInitialized() const
    {
        return m_treeland_capture_frame_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_capture_frame_v1::interface()
    {
        return &::treeland_capture_frame_v1_interface;
    }

    void treeland_capture_frame_v1::destroy()
    {
        ::treeland_capture_frame_v1_destroy(
            m_treeland_capture_frame_v1);
        m_treeland_capture_frame_v1 = nullptr;
    }

    void treeland_capture_frame_v1::copy(struct ::wl_buffer *buffer)
    {
        ::treeland_capture_frame_v1_copy(
            m_treeland_capture_frame_v1,
            buffer);
    }

    void treeland_capture_frame_v1::treeland_capture_frame_v1_buffer(uint32_t , uint32_t , uint32_t , uint32_t )
    {
    }

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

    void treeland_capture_frame_v1::treeland_capture_frame_v1_buffer_done()
    {
    }

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

    void treeland_capture_frame_v1::treeland_capture_frame_v1_flags(uint32_t )
    {
    }

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

    void treeland_capture_frame_v1::treeland_capture_frame_v1_ready()
    {
    }

    void treeland_capture_frame_v1::handle_ready(
        void *data,
        struct ::treeland_capture_frame_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<treeland_capture_frame_v1 *>(data)->treeland_capture_frame_v1_ready();
    }

    void treeland_capture_frame_v1::treeland_capture_frame_v1_failed()
    {
    }

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

    const struct treeland_capture_frame_v1_listener treeland_capture_frame_v1::m_treeland_capture_frame_v1_listener = {
        treeland_capture_frame_v1::handle_buffer,
        treeland_capture_frame_v1::handle_buffer_done,
        treeland_capture_frame_v1::handle_flags,
        treeland_capture_frame_v1::handle_ready,
        treeland_capture_frame_v1::handle_failed,
    };

    void treeland_capture_frame_v1::init_listener()
    {
        treeland_capture_frame_v1_add_listener(m_treeland_capture_frame_v1, &m_treeland_capture_frame_v1_listener, this);
    }

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

    treeland_capture_context_v1::treeland_capture_context_v1(struct ::treeland_capture_context_v1 *obj)
        : m_treeland_capture_context_v1(obj)
    {
        init_listener();
    }

    treeland_capture_context_v1::treeland_capture_context_v1()
        : m_treeland_capture_context_v1(nullptr)
    {
    }

    treeland_capture_context_v1::~treeland_capture_context_v1()
    {
    }

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

    void treeland_capture_context_v1::init(struct ::treeland_capture_context_v1 *obj)
    {
        m_treeland_capture_context_v1 = obj;
        init_listener();
    }

    treeland_capture_context_v1 *treeland_capture_context_v1::fromObject(struct ::treeland_capture_context_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_capture_context_v1_listener)
            return nullptr;
        return static_cast<treeland_capture_context_v1 *>(treeland_capture_context_v1_get_user_data(object));
    }

    bool treeland_capture_context_v1::isInitialized() const
    {
        return m_treeland_capture_context_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_capture_context_v1::interface()
    {
        return &::treeland_capture_context_v1_interface;
    }

    void treeland_capture_context_v1::destroy()
    {
        ::treeland_capture_context_v1_destroy(
            m_treeland_capture_context_v1);
        m_treeland_capture_context_v1 = nullptr;
    }

    void treeland_capture_context_v1::select_source(uint32_t source_hint, uint32_t freeze, uint32_t with_cursor, struct ::wl_surface *mask)
    {
        ::treeland_capture_context_v1_select_source(
            m_treeland_capture_context_v1,
            source_hint,
            freeze,
            with_cursor,
            mask);
    }

    struct ::treeland_capture_frame_v1 *treeland_capture_context_v1::capture()
    {
        struct ::treeland_capture_frame_v1 * frame = ::treeland_capture_context_v1_capture(
            m_treeland_capture_context_v1);
        return frame;
    }

    struct ::treeland_capture_session_v1 *treeland_capture_context_v1::create_session()
    {
        struct ::treeland_capture_session_v1 * session = ::treeland_capture_context_v1_create_session(
            m_treeland_capture_context_v1);
        return session;
    }

    void treeland_capture_context_v1::treeland_capture_context_v1_source_ready(int32_t , int32_t , uint32_t , uint32_t , uint32_t )
    {
    }

    void treeland_capture_context_v1::handle_source_ready(
        void *data,
        struct ::treeland_capture_context_v1 *object,
        int32_t region_x,
        int32_t region_y,
        uint32_t region_width,
        uint32_t region_height,
        uint32_t source_type)
    {
        Q_UNUSED(object);
        static_cast<treeland_capture_context_v1 *>(data)->treeland_capture_context_v1_source_ready(
            region_x,
            region_y,
            region_width,
            region_height,
            source_type);
    }

    void treeland_capture_context_v1::treeland_capture_context_v1_source_failed(uint32_t )
    {
    }

    void treeland_capture_context_v1::handle_source_failed(
        void *data,
        struct ::treeland_capture_context_v1 *object,
        uint32_t reason)
    {
        Q_UNUSED(object);
        static_cast<treeland_capture_context_v1 *>(data)->treeland_capture_context_v1_source_failed(
            reason);
    }

    const struct treeland_capture_context_v1_listener treeland_capture_context_v1::m_treeland_capture_context_v1_listener = {
        treeland_capture_context_v1::handle_source_ready,
        treeland_capture_context_v1::handle_source_failed,
    };

    void treeland_capture_context_v1::init_listener()
    {
        treeland_capture_context_v1_add_listener(m_treeland_capture_context_v1, &m_treeland_capture_context_v1_listener, this);
    }

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

    treeland_capture_manager_v1::treeland_capture_manager_v1(struct ::treeland_capture_manager_v1 *obj)
        : m_treeland_capture_manager_v1(obj)
    {
    }

    treeland_capture_manager_v1::treeland_capture_manager_v1()
        : m_treeland_capture_manager_v1(nullptr)
    {
    }

    treeland_capture_manager_v1::~treeland_capture_manager_v1()
    {
    }

    void treeland_capture_manager_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_treeland_capture_manager_v1 = static_cast<struct ::treeland_capture_manager_v1 *>(wlRegistryBind(registry, id, &treeland_capture_manager_v1_interface, version));
    }

    void treeland_capture_manager_v1::init(struct ::treeland_capture_manager_v1 *obj)
    {
        m_treeland_capture_manager_v1 = obj;
    }

    treeland_capture_manager_v1 *treeland_capture_manager_v1::fromObject(struct ::treeland_capture_manager_v1 *object)
    {
        return static_cast<treeland_capture_manager_v1 *>(treeland_capture_manager_v1_get_user_data(object));
    }

    bool treeland_capture_manager_v1::isInitialized() const
    {
        return m_treeland_capture_manager_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_capture_manager_v1::interface()
    {
        return &::treeland_capture_manager_v1_interface;
    }

    void treeland_capture_manager_v1::destroy()
    {
        ::treeland_capture_manager_v1_destroy(
            m_treeland_capture_manager_v1);
        m_treeland_capture_manager_v1 = nullptr;
    }

    struct ::treeland_capture_context_v1 *treeland_capture_manager_v1::get_context()
    {
        struct ::treeland_capture_context_v1 * context = ::treeland_capture_manager_v1_get_context(
            m_treeland_capture_manager_v1);
        return context;
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
