// This file was generated by qtwaylandscanner
// source file is treeland-shortcut-manager-v2.xml

#include "qwayland-treeland-shortcut-manager-v2.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_shortcut_manager_v2::treeland_shortcut_manager_v2(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    treeland_shortcut_manager_v2::treeland_shortcut_manager_v2(struct ::treeland_shortcut_manager_v2 *obj)
        : m_treeland_shortcut_manager_v2(obj)
    {
        init_listener();
    }

    treeland_shortcut_manager_v2::treeland_shortcut_manager_v2()
        : m_treeland_shortcut_manager_v2(nullptr)
    {
    }

    treeland_shortcut_manager_v2::~treeland_shortcut_manager_v2()
    {
    }

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

    void treeland_shortcut_manager_v2::init(struct ::treeland_shortcut_manager_v2 *obj)
    {
        m_treeland_shortcut_manager_v2 = obj;
        init_listener();
    }

    treeland_shortcut_manager_v2 *treeland_shortcut_manager_v2::fromObject(struct ::treeland_shortcut_manager_v2 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_shortcut_manager_v2_listener)
            return nullptr;
        return static_cast<treeland_shortcut_manager_v2 *>(treeland_shortcut_manager_v2_get_user_data(object));
    }

    bool treeland_shortcut_manager_v2::isInitialized() const
    {
        return m_treeland_shortcut_manager_v2 != nullptr;
    }

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

    const struct wl_interface *treeland_shortcut_manager_v2::interface()
    {
        return &::treeland_shortcut_manager_v2_interface;
    }

    void treeland_shortcut_manager_v2::destroy()
    {
        ::treeland_shortcut_manager_v2_destroy(
            m_treeland_shortcut_manager_v2);
        m_treeland_shortcut_manager_v2 = nullptr;
    }

    void treeland_shortcut_manager_v2::acquire()
    {
        ::treeland_shortcut_manager_v2_acquire(
            m_treeland_shortcut_manager_v2);
    }

    void treeland_shortcut_manager_v2::bind_key(const QString &name, const QString &key, uint32_t flags, uint32_t action)
    {
        ::treeland_shortcut_manager_v2_bind_key(
            m_treeland_shortcut_manager_v2,
            name.toUtf8().constData(),
            key.toUtf8().constData(),
            flags,
            action);
    }

    void treeland_shortcut_manager_v2::bind_swipe_gesture(const QString &name, uint32_t finger, uint32_t direction, uint32_t action)
    {
        ::treeland_shortcut_manager_v2_bind_swipe_gesture(
            m_treeland_shortcut_manager_v2,
            name.toUtf8().constData(),
            finger,
            direction,
            action);
    }

    void treeland_shortcut_manager_v2::bind_hold_gesture(const QString &name, uint32_t finger, uint32_t action)
    {
        ::treeland_shortcut_manager_v2_bind_hold_gesture(
            m_treeland_shortcut_manager_v2,
            name.toUtf8().constData(),
            finger,
            action);
    }

    void treeland_shortcut_manager_v2::commit()
    {
        ::treeland_shortcut_manager_v2_commit(
            m_treeland_shortcut_manager_v2);
    }

    void treeland_shortcut_manager_v2::unbind(const QString &name)
    {
        ::treeland_shortcut_manager_v2_unbind(
            m_treeland_shortcut_manager_v2,
            name.toUtf8().constData());
    }

    struct ::treeland_shortcut_capture_v1 *treeland_shortcut_manager_v2::capture_next_shortcut(struct ::wl_surface *surface, struct ::wl_seat *seat)
    {
        struct ::treeland_shortcut_capture_v1 * capture = ::treeland_shortcut_manager_v2_capture_next_shortcut(
            m_treeland_shortcut_manager_v2,
            surface,
            seat);
        return capture;
    }

    void treeland_shortcut_manager_v2::treeland_shortcut_manager_v2_activated(const QString &, uint32_t )
    {
    }

    void treeland_shortcut_manager_v2::handle_activated(
        void *data,
        struct ::treeland_shortcut_manager_v2 *object,
        const char *name,
        uint32_t flags)
    {
        Q_UNUSED(object);
        static_cast<treeland_shortcut_manager_v2 *>(data)->treeland_shortcut_manager_v2_activated(
            QString::fromUtf8(name),
            flags);
    }

    void treeland_shortcut_manager_v2::treeland_shortcut_manager_v2_commit_success()
    {
    }

    void treeland_shortcut_manager_v2::handle_commit_success(
        void *data,
        struct ::treeland_shortcut_manager_v2 *object)
    {
        Q_UNUSED(object);
        static_cast<treeland_shortcut_manager_v2 *>(data)->treeland_shortcut_manager_v2_commit_success();
    }

    void treeland_shortcut_manager_v2::treeland_shortcut_manager_v2_commit_failure(const QString &, uint32_t )
    {
    }

    void treeland_shortcut_manager_v2::handle_commit_failure(
        void *data,
        struct ::treeland_shortcut_manager_v2 *object,
        const char *name,
        uint32_t error)
    {
        Q_UNUSED(object);
        static_cast<treeland_shortcut_manager_v2 *>(data)->treeland_shortcut_manager_v2_commit_failure(
            QString::fromUtf8(name),
            error);
    }

    const struct treeland_shortcut_manager_v2_listener treeland_shortcut_manager_v2::m_treeland_shortcut_manager_v2_listener = {
        treeland_shortcut_manager_v2::handle_activated,
        treeland_shortcut_manager_v2::handle_commit_success,
        treeland_shortcut_manager_v2::handle_commit_failure,
    };

    void treeland_shortcut_manager_v2::init_listener()
    {
        treeland_shortcut_manager_v2_add_listener(m_treeland_shortcut_manager_v2, &m_treeland_shortcut_manager_v2_listener, this);
    }

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

    treeland_shortcut_capture_v1::treeland_shortcut_capture_v1(struct ::treeland_shortcut_capture_v1 *obj)
        : m_treeland_shortcut_capture_v1(obj)
    {
        init_listener();
    }

    treeland_shortcut_capture_v1::treeland_shortcut_capture_v1()
        : m_treeland_shortcut_capture_v1(nullptr)
    {
    }

    treeland_shortcut_capture_v1::~treeland_shortcut_capture_v1()
    {
    }

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

    void treeland_shortcut_capture_v1::init(struct ::treeland_shortcut_capture_v1 *obj)
    {
        m_treeland_shortcut_capture_v1 = obj;
        init_listener();
    }

    treeland_shortcut_capture_v1 *treeland_shortcut_capture_v1::fromObject(struct ::treeland_shortcut_capture_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_treeland_shortcut_capture_v1_listener)
            return nullptr;
        return static_cast<treeland_shortcut_capture_v1 *>(treeland_shortcut_capture_v1_get_user_data(object));
    }

    bool treeland_shortcut_capture_v1::isInitialized() const
    {
        return m_treeland_shortcut_capture_v1 != nullptr;
    }

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

    const struct wl_interface *treeland_shortcut_capture_v1::interface()
    {
        return &::treeland_shortcut_capture_v1_interface;
    }

    void treeland_shortcut_capture_v1::destroy()
    {
        ::treeland_shortcut_capture_v1_destroy(
            m_treeland_shortcut_capture_v1);
        m_treeland_shortcut_capture_v1 = nullptr;
    }

    void treeland_shortcut_capture_v1::treeland_shortcut_capture_v1_captured(const QString &)
    {
    }

    void treeland_shortcut_capture_v1::handle_captured(
        void *data,
        struct ::treeland_shortcut_capture_v1 *object,
        const char *key)
    {
        Q_UNUSED(object);
        static_cast<treeland_shortcut_capture_v1 *>(data)->treeland_shortcut_capture_v1_captured(
            QString::fromUtf8(key));
    }

    void treeland_shortcut_capture_v1::treeland_shortcut_capture_v1_failed(uint32_t )
    {
    }

    void treeland_shortcut_capture_v1::handle_failed(
        void *data,
        struct ::treeland_shortcut_capture_v1 *object,
        uint32_t reason)
    {
        Q_UNUSED(object);
        static_cast<treeland_shortcut_capture_v1 *>(data)->treeland_shortcut_capture_v1_failed(
            reason);
    }

    const struct treeland_shortcut_capture_v1_listener treeland_shortcut_capture_v1::m_treeland_shortcut_capture_v1_listener = {
        treeland_shortcut_capture_v1::handle_captured,
        treeland_shortcut_capture_v1::handle_failed,
    };

    void treeland_shortcut_capture_v1::init_listener()
    {
        treeland_shortcut_capture_v1_add_listener(m_treeland_shortcut_capture_v1, &m_treeland_shortcut_capture_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
