// This file was generated by qtwaylandscanner
// source file is treeland-foreign-toplevel-manager-v1.xml

#include "qwayland-treeland-foreign-toplevel-manager-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_foreign_toplevel_manager_v1::treeland_foreign_toplevel_manager_v1(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    treeland_foreign_toplevel_manager_v1::treeland_foreign_toplevel_manager_v1(struct ::treeland_foreign_toplevel_manager_v1 *obj)
        : m_treeland_foreign_toplevel_manager_v1(obj)
    {
        init_listener();
    }

    treeland_foreign_toplevel_manager_v1::treeland_foreign_toplevel_manager_v1()
        : m_treeland_foreign_toplevel_manager_v1(nullptr)
    {
    }

    treeland_foreign_toplevel_manager_v1::~treeland_foreign_toplevel_manager_v1()
    {
    }

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

    void treeland_foreign_toplevel_manager_v1::init(struct ::treeland_foreign_toplevel_manager_v1 *obj)
    {
        m_treeland_foreign_toplevel_manager_v1 = obj;
        init_listener();
    }

    treeland_foreign_toplevel_manager_v1 *treeland_foreign_toplevel_manager_v1::fromObject(struct ::treeland_foreign_toplevel_manager_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_foreign_toplevel_manager_v1_listener)
            return nullptr;
        return static_cast<treeland_foreign_toplevel_manager_v1 *>(treeland_foreign_toplevel_manager_v1_get_user_data(object));
    }

    bool treeland_foreign_toplevel_manager_v1::isInitialized() const
    {
        return m_treeland_foreign_toplevel_manager_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_foreign_toplevel_manager_v1::interface()
    {
        return &::treeland_foreign_toplevel_manager_v1_interface;
    }

    void treeland_foreign_toplevel_manager_v1::stop()
    {
        ::treeland_foreign_toplevel_manager_v1_stop(
            m_treeland_foreign_toplevel_manager_v1);
    }

    struct ::treeland_dock_preview_context_v1 *treeland_foreign_toplevel_manager_v1::get_dock_preview_context(struct ::wl_surface *relative_surface)
    {
        struct ::treeland_dock_preview_context_v1 * id = ::treeland_foreign_toplevel_manager_v1_get_dock_preview_context(
            m_treeland_foreign_toplevel_manager_v1,
            relative_surface);
        return id;
    }

    void treeland_foreign_toplevel_manager_v1::treeland_foreign_toplevel_manager_v1_toplevel(struct ::treeland_foreign_toplevel_handle_v1 *)
    {
    }

    void treeland_foreign_toplevel_manager_v1::handle_toplevel(
        void *data,
        struct ::treeland_foreign_toplevel_manager_v1 *object,
        struct ::treeland_foreign_toplevel_handle_v1 *toplevel)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_manager_v1 *>(data)->treeland_foreign_toplevel_manager_v1_toplevel(
            toplevel);
    }

    void treeland_foreign_toplevel_manager_v1::treeland_foreign_toplevel_manager_v1_finished()
    {
    }

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

    const struct treeland_foreign_toplevel_manager_v1_listener treeland_foreign_toplevel_manager_v1::m_treeland_foreign_toplevel_manager_v1_listener = {
        treeland_foreign_toplevel_manager_v1::handle_toplevel,
        treeland_foreign_toplevel_manager_v1::handle_finished,
    };

    void treeland_foreign_toplevel_manager_v1::init_listener()
    {
        treeland_foreign_toplevel_manager_v1_add_listener(m_treeland_foreign_toplevel_manager_v1, &m_treeland_foreign_toplevel_manager_v1_listener, this);
    }

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

    treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1(struct ::treeland_foreign_toplevel_handle_v1 *obj)
        : m_treeland_foreign_toplevel_handle_v1(obj)
    {
        init_listener();
    }

    treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1()
        : m_treeland_foreign_toplevel_handle_v1(nullptr)
    {
    }

    treeland_foreign_toplevel_handle_v1::~treeland_foreign_toplevel_handle_v1()
    {
    }

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

    void treeland_foreign_toplevel_handle_v1::init(struct ::treeland_foreign_toplevel_handle_v1 *obj)
    {
        m_treeland_foreign_toplevel_handle_v1 = obj;
        init_listener();
    }

    treeland_foreign_toplevel_handle_v1 *treeland_foreign_toplevel_handle_v1::fromObject(struct ::treeland_foreign_toplevel_handle_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_foreign_toplevel_handle_v1_listener)
            return nullptr;
        return static_cast<treeland_foreign_toplevel_handle_v1 *>(treeland_foreign_toplevel_handle_v1_get_user_data(object));
    }

    bool treeland_foreign_toplevel_handle_v1::isInitialized() const
    {
        return m_treeland_foreign_toplevel_handle_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_foreign_toplevel_handle_v1::interface()
    {
        return &::treeland_foreign_toplevel_handle_v1_interface;
    }

    void treeland_foreign_toplevel_handle_v1::set_maximized()
    {
        ::treeland_foreign_toplevel_handle_v1_set_maximized(
            m_treeland_foreign_toplevel_handle_v1);
    }

    void treeland_foreign_toplevel_handle_v1::unset_maximized()
    {
        ::treeland_foreign_toplevel_handle_v1_unset_maximized(
            m_treeland_foreign_toplevel_handle_v1);
    }

    void treeland_foreign_toplevel_handle_v1::set_minimized()
    {
        ::treeland_foreign_toplevel_handle_v1_set_minimized(
            m_treeland_foreign_toplevel_handle_v1);
    }

    void treeland_foreign_toplevel_handle_v1::unset_minimized()
    {
        ::treeland_foreign_toplevel_handle_v1_unset_minimized(
            m_treeland_foreign_toplevel_handle_v1);
    }

    void treeland_foreign_toplevel_handle_v1::activate(struct ::wl_seat *seat)
    {
        ::treeland_foreign_toplevel_handle_v1_activate(
            m_treeland_foreign_toplevel_handle_v1,
            seat);
    }

    void treeland_foreign_toplevel_handle_v1::close()
    {
        ::treeland_foreign_toplevel_handle_v1_close(
            m_treeland_foreign_toplevel_handle_v1);
    }

    void treeland_foreign_toplevel_handle_v1::set_rectangle(struct ::wl_surface *surface, int32_t x, int32_t y, int32_t width, int32_t height)
    {
        ::treeland_foreign_toplevel_handle_v1_set_rectangle(
            m_treeland_foreign_toplevel_handle_v1,
            surface,
            x,
            y,
            width,
            height);
    }

    void treeland_foreign_toplevel_handle_v1::destroy()
    {
        ::treeland_foreign_toplevel_handle_v1_destroy(
            m_treeland_foreign_toplevel_handle_v1);
        m_treeland_foreign_toplevel_handle_v1 = nullptr;
    }

    void treeland_foreign_toplevel_handle_v1::set_fullscreen(struct ::wl_output *output)
    {
        ::treeland_foreign_toplevel_handle_v1_set_fullscreen(
            m_treeland_foreign_toplevel_handle_v1,
            output);
    }

    void treeland_foreign_toplevel_handle_v1::unset_fullscreen()
    {
        ::treeland_foreign_toplevel_handle_v1_unset_fullscreen(
            m_treeland_foreign_toplevel_handle_v1);
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_pid(uint32_t )
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_pid(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        uint32_t pid)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_pid(
            pid);
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_title(const QString &)
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_title(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        const char *title)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_title(
            QString::fromUtf8(title));
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_app_id(const QString &)
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_app_id(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        const char *app_id)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_app_id(
            QString::fromUtf8(app_id));
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_identifier(uint32_t )
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_identifier(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        uint32_t identifier)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_identifier(
            identifier);
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_output_enter(struct ::wl_output *)
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_output_enter(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        struct ::wl_output *output)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_output_enter(
            output);
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_output_leave(struct ::wl_output *)
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_output_leave(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        struct ::wl_output *output)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_output_leave(
            output);
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_state(wl_array *)
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_state(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        wl_array *state)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_state(
            state);
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_done()
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_done(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_done();
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_closed()
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_closed(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_closed();
    }

    void treeland_foreign_toplevel_handle_v1::treeland_foreign_toplevel_handle_v1_parent(struct ::treeland_foreign_toplevel_handle_v1 *)
    {
    }

    void treeland_foreign_toplevel_handle_v1::handle_parent(
        void *data,
        struct ::treeland_foreign_toplevel_handle_v1 *object,
        struct ::treeland_foreign_toplevel_handle_v1 *parent)
    {
        Q_UNUSED(object);
        static_cast<treeland_foreign_toplevel_handle_v1 *>(data)->treeland_foreign_toplevel_handle_v1_parent(
            parent);
    }

    const struct treeland_foreign_toplevel_handle_v1_listener treeland_foreign_toplevel_handle_v1::m_treeland_foreign_toplevel_handle_v1_listener = {
        treeland_foreign_toplevel_handle_v1::handle_pid,
        treeland_foreign_toplevel_handle_v1::handle_title,
        treeland_foreign_toplevel_handle_v1::handle_app_id,
        treeland_foreign_toplevel_handle_v1::handle_identifier,
        treeland_foreign_toplevel_handle_v1::handle_output_enter,
        treeland_foreign_toplevel_handle_v1::handle_output_leave,
        treeland_foreign_toplevel_handle_v1::handle_state,
        treeland_foreign_toplevel_handle_v1::handle_done,
        treeland_foreign_toplevel_handle_v1::handle_closed,
        treeland_foreign_toplevel_handle_v1::handle_parent,
    };

    void treeland_foreign_toplevel_handle_v1::init_listener()
    {
        treeland_foreign_toplevel_handle_v1_add_listener(m_treeland_foreign_toplevel_handle_v1, &m_treeland_foreign_toplevel_handle_v1_listener, this);
    }

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

    treeland_dock_preview_context_v1::treeland_dock_preview_context_v1(struct ::treeland_dock_preview_context_v1 *obj)
        : m_treeland_dock_preview_context_v1(obj)
    {
        init_listener();
    }

    treeland_dock_preview_context_v1::treeland_dock_preview_context_v1()
        : m_treeland_dock_preview_context_v1(nullptr)
    {
    }

    treeland_dock_preview_context_v1::~treeland_dock_preview_context_v1()
    {
    }

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

    void treeland_dock_preview_context_v1::init(struct ::treeland_dock_preview_context_v1 *obj)
    {
        m_treeland_dock_preview_context_v1 = obj;
        init_listener();
    }

    treeland_dock_preview_context_v1 *treeland_dock_preview_context_v1::fromObject(struct ::treeland_dock_preview_context_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_dock_preview_context_v1_listener)
            return nullptr;
        return static_cast<treeland_dock_preview_context_v1 *>(treeland_dock_preview_context_v1_get_user_data(object));
    }

    bool treeland_dock_preview_context_v1::isInitialized() const
    {
        return m_treeland_dock_preview_context_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_dock_preview_context_v1::interface()
    {
        return &::treeland_dock_preview_context_v1_interface;
    }

    void treeland_dock_preview_context_v1::show(const QByteArray &surfaces, int32_t x, int32_t y, uint32_t direction)
    {
        struct wl_array surfaces_data;
        surfaces_data.size = surfaces.size();
        surfaces_data.data = static_cast<void *>(const_cast<char *>(surfaces.constData()));
        surfaces_data.alloc = 0;

        ::treeland_dock_preview_context_v1_show(
            m_treeland_dock_preview_context_v1,
            &surfaces_data,
            x,
            y,
            direction);
    }

    void treeland_dock_preview_context_v1::show_tooltip(const QString &tooltip, int32_t x, int32_t y, uint32_t direction)
    {
        ::treeland_dock_preview_context_v1_show_tooltip(
            m_treeland_dock_preview_context_v1,
            tooltip.toUtf8().constData(),
            x,
            y,
            direction);
    }

    void treeland_dock_preview_context_v1::close()
    {
        ::treeland_dock_preview_context_v1_close(
            m_treeland_dock_preview_context_v1);
    }

    void treeland_dock_preview_context_v1::destroy()
    {
        ::treeland_dock_preview_context_v1_destroy(
            m_treeland_dock_preview_context_v1);
        m_treeland_dock_preview_context_v1 = nullptr;
    }

    void treeland_dock_preview_context_v1::treeland_dock_preview_context_v1_enter()
    {
    }

    void treeland_dock_preview_context_v1::handle_enter(
        void *data,
        struct ::treeland_dock_preview_context_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<treeland_dock_preview_context_v1 *>(data)->treeland_dock_preview_context_v1_enter();
    }

    void treeland_dock_preview_context_v1::treeland_dock_preview_context_v1_leave()
    {
    }

    void treeland_dock_preview_context_v1::handle_leave(
        void *data,
        struct ::treeland_dock_preview_context_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<treeland_dock_preview_context_v1 *>(data)->treeland_dock_preview_context_v1_leave();
    }

    const struct treeland_dock_preview_context_v1_listener treeland_dock_preview_context_v1::m_treeland_dock_preview_context_v1_listener = {
        treeland_dock_preview_context_v1::handle_enter,
        treeland_dock_preview_context_v1::handle_leave,
    };

    void treeland_dock_preview_context_v1::init_listener()
    {
        treeland_dock_preview_context_v1_add_listener(m_treeland_dock_preview_context_v1, &m_treeland_dock_preview_context_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
