// This file was generated by qtwaylandscanner
// source file is /build/qt6-wayland/src/qtwayland-everywhere-src-6.4.0/src/client/../3rdparty/protocol/text-input-unstable-v1.xml

#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
#include <QtWaylandClient/private/qwayland-text-input-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;
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
    bindOpCode, interface, version, name, interface->name, version, nullptr);
}

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

    zwp_text_input_v1::zwp_text_input_v1(struct ::zwp_text_input_v1 *obj)
        : m_zwp_text_input_v1(obj)
    {
        init_listener();
    }

    zwp_text_input_v1::zwp_text_input_v1()
        : m_zwp_text_input_v1(nullptr)
    {
    }

    zwp_text_input_v1::~zwp_text_input_v1()
    {
    }

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

    void zwp_text_input_v1::init(struct ::zwp_text_input_v1 *obj)
    {
        m_zwp_text_input_v1 = obj;
        init_listener();
    }

    zwp_text_input_v1 *zwp_text_input_v1::fromObject(struct ::zwp_text_input_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwp_text_input_v1_listener)
            return nullptr;
        return static_cast<zwp_text_input_v1 *>(zwp_text_input_v1_get_user_data(object));
    }

    bool zwp_text_input_v1::isInitialized() const
    {
        return m_zwp_text_input_v1 != nullptr;
    }

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

    const struct wl_interface *zwp_text_input_v1::interface()
    {
        return &::zwp_text_input_v1_interface;
    }

    void zwp_text_input_v1::activate(struct ::wl_seat *seat, struct ::wl_surface *surface)
    {
        ::zwp_text_input_v1_activate(
            m_zwp_text_input_v1,
            seat,
            surface);
    }

    void zwp_text_input_v1::deactivate(struct ::wl_seat *seat)
    {
        ::zwp_text_input_v1_deactivate(
            m_zwp_text_input_v1,
            seat);
    }

    void zwp_text_input_v1::show_input_panel()
    {
        ::zwp_text_input_v1_show_input_panel(
            m_zwp_text_input_v1);
    }

    void zwp_text_input_v1::hide_input_panel()
    {
        ::zwp_text_input_v1_hide_input_panel(
            m_zwp_text_input_v1);
    }

    void zwp_text_input_v1::reset()
    {
        ::zwp_text_input_v1_reset(
            m_zwp_text_input_v1);
    }

    void zwp_text_input_v1::set_surrounding_text(const QString &text, uint32_t cursor, uint32_t anchor)
    {
        ::zwp_text_input_v1_set_surrounding_text(
            m_zwp_text_input_v1,
            text.toUtf8().constData(),
            cursor,
            anchor);
    }

    void zwp_text_input_v1::set_content_type(uint32_t hint, uint32_t purpose)
    {
        ::zwp_text_input_v1_set_content_type(
            m_zwp_text_input_v1,
            hint,
            purpose);
    }

    void zwp_text_input_v1::set_cursor_rectangle(int32_t x, int32_t y, int32_t width, int32_t height)
    {
        ::zwp_text_input_v1_set_cursor_rectangle(
            m_zwp_text_input_v1,
            x,
            y,
            width,
            height);
    }

    void zwp_text_input_v1::set_preferred_language(const QString &language)
    {
        ::zwp_text_input_v1_set_preferred_language(
            m_zwp_text_input_v1,
            language.toUtf8().constData());
    }

    void zwp_text_input_v1::commit_state(uint32_t serial)
    {
        ::zwp_text_input_v1_commit_state(
            m_zwp_text_input_v1,
            serial);
    }

    void zwp_text_input_v1::invoke_action(uint32_t button, uint32_t index)
    {
        ::zwp_text_input_v1_invoke_action(
            m_zwp_text_input_v1,
            button,
            index);
    }

    void zwp_text_input_v1::zwp_text_input_v1_enter(struct ::wl_surface *)
    {
    }

    void zwp_text_input_v1::handle_enter(
        void *data,
        struct ::zwp_text_input_v1 *object,
        struct ::wl_surface *surface)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_enter(
            surface);
    }

    void zwp_text_input_v1::zwp_text_input_v1_leave()
    {
    }

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

    void zwp_text_input_v1::zwp_text_input_v1_modifiers_map(wl_array *)
    {
    }

    void zwp_text_input_v1::handle_modifiers_map(
        void *data,
        struct ::zwp_text_input_v1 *object,
        wl_array *map)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_modifiers_map(
            map);
    }

    void zwp_text_input_v1::zwp_text_input_v1_input_panel_state(uint32_t )
    {
    }

    void zwp_text_input_v1::handle_input_panel_state(
        void *data,
        struct ::zwp_text_input_v1 *object,
        uint32_t state)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_input_panel_state(
            state);
    }

    void zwp_text_input_v1::zwp_text_input_v1_preedit_string(uint32_t , const QString &, const QString &)
    {
    }

    void zwp_text_input_v1::handle_preedit_string(
        void *data,
        struct ::zwp_text_input_v1 *object,
        uint32_t serial,
        const char *text,
        const char *commit)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_preedit_string(
            serial,
            QString::fromUtf8(text),
            QString::fromUtf8(commit));
    }

    void zwp_text_input_v1::zwp_text_input_v1_preedit_styling(uint32_t , uint32_t , uint32_t )
    {
    }

    void zwp_text_input_v1::handle_preedit_styling(
        void *data,
        struct ::zwp_text_input_v1 *object,
        uint32_t index,
        uint32_t length,
        uint32_t style)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_preedit_styling(
            index,
            length,
            style);
    }

    void zwp_text_input_v1::zwp_text_input_v1_preedit_cursor(int32_t )
    {
    }

    void zwp_text_input_v1::handle_preedit_cursor(
        void *data,
        struct ::zwp_text_input_v1 *object,
        int32_t index)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_preedit_cursor(
            index);
    }

    void zwp_text_input_v1::zwp_text_input_v1_commit_string(uint32_t , const QString &)
    {
    }

    void zwp_text_input_v1::handle_commit_string(
        void *data,
        struct ::zwp_text_input_v1 *object,
        uint32_t serial,
        const char *text)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_commit_string(
            serial,
            QString::fromUtf8(text));
    }

    void zwp_text_input_v1::zwp_text_input_v1_cursor_position(int32_t , int32_t )
    {
    }

    void zwp_text_input_v1::handle_cursor_position(
        void *data,
        struct ::zwp_text_input_v1 *object,
        int32_t index,
        int32_t anchor)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_cursor_position(
            index,
            anchor);
    }

    void zwp_text_input_v1::zwp_text_input_v1_delete_surrounding_text(int32_t , uint32_t )
    {
    }

    void zwp_text_input_v1::handle_delete_surrounding_text(
        void *data,
        struct ::zwp_text_input_v1 *object,
        int32_t index,
        uint32_t length)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_delete_surrounding_text(
            index,
            length);
    }

    void zwp_text_input_v1::zwp_text_input_v1_keysym(uint32_t , uint32_t , uint32_t , uint32_t , uint32_t )
    {
    }

    void zwp_text_input_v1::handle_keysym(
        void *data,
        struct ::zwp_text_input_v1 *object,
        uint32_t serial,
        uint32_t time,
        uint32_t sym,
        uint32_t state,
        uint32_t modifiers)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_keysym(
            serial,
            time,
            sym,
            state,
            modifiers);
    }

    void zwp_text_input_v1::zwp_text_input_v1_language(uint32_t , const QString &)
    {
    }

    void zwp_text_input_v1::handle_language(
        void *data,
        struct ::zwp_text_input_v1 *object,
        uint32_t serial,
        const char *language)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_language(
            serial,
            QString::fromUtf8(language));
    }

    void zwp_text_input_v1::zwp_text_input_v1_text_direction(uint32_t , uint32_t )
    {
    }

    void zwp_text_input_v1::handle_text_direction(
        void *data,
        struct ::zwp_text_input_v1 *object,
        uint32_t serial,
        uint32_t direction)
    {
        Q_UNUSED(object);
        static_cast<zwp_text_input_v1 *>(data)->zwp_text_input_v1_text_direction(
            serial,
            direction);
    }

    const struct zwp_text_input_v1_listener zwp_text_input_v1::m_zwp_text_input_v1_listener = {
        zwp_text_input_v1::handle_enter,
        zwp_text_input_v1::handle_leave,
        zwp_text_input_v1::handle_modifiers_map,
        zwp_text_input_v1::handle_input_panel_state,
        zwp_text_input_v1::handle_preedit_string,
        zwp_text_input_v1::handle_preedit_styling,
        zwp_text_input_v1::handle_preedit_cursor,
        zwp_text_input_v1::handle_commit_string,
        zwp_text_input_v1::handle_cursor_position,
        zwp_text_input_v1::handle_delete_surrounding_text,
        zwp_text_input_v1::handle_keysym,
        zwp_text_input_v1::handle_language,
        zwp_text_input_v1::handle_text_direction,
    };

    void zwp_text_input_v1::init_listener()
    {
        zwp_text_input_v1_add_listener(m_zwp_text_input_v1, &m_zwp_text_input_v1_listener, this);
    }

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

    zwp_text_input_manager_v1::zwp_text_input_manager_v1(struct ::zwp_text_input_manager_v1 *obj)
        : m_zwp_text_input_manager_v1(obj)
    {
    }

    zwp_text_input_manager_v1::zwp_text_input_manager_v1()
        : m_zwp_text_input_manager_v1(nullptr)
    {
    }

    zwp_text_input_manager_v1::~zwp_text_input_manager_v1()
    {
    }

    void zwp_text_input_manager_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_zwp_text_input_manager_v1 = static_cast<struct ::zwp_text_input_manager_v1 *>(wlRegistryBind(registry, id, &zwp_text_input_manager_v1_interface, version));
    }

    void zwp_text_input_manager_v1::init(struct ::zwp_text_input_manager_v1 *obj)
    {
        m_zwp_text_input_manager_v1 = obj;
    }

    zwp_text_input_manager_v1 *zwp_text_input_manager_v1::fromObject(struct ::zwp_text_input_manager_v1 *object)
    {
        return static_cast<zwp_text_input_manager_v1 *>(zwp_text_input_manager_v1_get_user_data(object));
    }

    bool zwp_text_input_manager_v1::isInitialized() const
    {
        return m_zwp_text_input_manager_v1 != nullptr;
    }

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

    const struct wl_interface *zwp_text_input_manager_v1::interface()
    {
        return &::zwp_text_input_manager_v1_interface;
    }

    struct ::zwp_text_input_v1 *zwp_text_input_manager_v1::create_text_input()
    {
        return ::zwp_text_input_manager_v1_create_text_input(
            m_zwp_text_input_manager_v1);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
