// This file was generated by qtwaylandscanner
// source file is /local/pobj/qt6-qtwayland-6.7.3/qtwayland-everywhere-src-6.7.3/src/client/../extensions/qt-text-input-method-unstable-v1.xml

#ifndef QT_WAYLAND_QT_TEXT_INPUT_METHOD_UNSTABLE_V1
#define QT_WAYLAND_QT_TEXT_INPUT_METHOD_UNSTABLE_V1

#include <QtWaylandClient/private/wayland-qt-text-input-method-unstable-v1-client-protocol.h>
#include <QByteArray>
#include <QString>

struct wl_registry;

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers")
#if !defined(Q_WAYLAND_CLIENT_QT_TEXT_INPUT_METHOD_UNSTABLE_V1_EXPORT)
#  if defined(QT_SHARED) && !defined(QT_STATIC)
#    if defined(QT_BUILD_WAYLANDCLIENT_LIB)
#      define Q_WAYLAND_CLIENT_QT_TEXT_INPUT_METHOD_UNSTABLE_V1_EXPORT Q_DECL_EXPORT
#    else
#      define Q_WAYLAND_CLIENT_QT_TEXT_INPUT_METHOD_UNSTABLE_V1_EXPORT Q_DECL_IMPORT
#    endif
#  else
#    define Q_WAYLAND_CLIENT_QT_TEXT_INPUT_METHOD_UNSTABLE_V1_EXPORT
#  endif
#endif

namespace QtWayland {
    class Q_WAYLAND_CLIENT_QT_TEXT_INPUT_METHOD_UNSTABLE_V1_EXPORT qt_text_input_method_v1
    {
    public:
        qt_text_input_method_v1(struct ::wl_registry *registry, uint32_t id, int version);
        qt_text_input_method_v1(struct ::qt_text_input_method_v1 *object);
        qt_text_input_method_v1();

        virtual ~qt_text_input_method_v1();

        void init(struct ::wl_registry *registry, uint32_t id, int version);
        void init(struct ::qt_text_input_method_v1 *object);

        struct ::qt_text_input_method_v1 *object() { return m_qt_text_input_method_v1; }
        const struct ::qt_text_input_method_v1 *object() const { return m_qt_text_input_method_v1; }
        static qt_text_input_method_v1 *fromObject(struct ::qt_text_input_method_v1 *object);

        bool isInitialized() const;

        uint32_t version() const;
        static const struct ::wl_interface *interface();

        void destroy();
        void enable(struct ::wl_surface *surface);
        void disable(struct ::wl_surface *surface);
        void reset();
        void commit();
        void invoke_action(int32_t type, int32_t cursor_position);
        void update_hints(int32_t hints);
        void update_cursor_rectangle(int32_t x, int32_t y, int32_t width, int32_t height);
        void update_cursor_position(int32_t cursor_position);
        void update_surrounding_text(const QString &surrounding_text, int32_t text_offset);
        void update_anchor_position(int32_t anchor_position);
        void update_absolute_position(int32_t absolute_position);
        void update_preferred_language(const QString &preferred_language);
        void start_update(int32_t queries);
        void end_update();
        void show_input_panel();
        void hide_input_panel();
        void acknowledge_input_method();

    protected:
        virtual void text_input_method_v1_enter(struct ::wl_surface *surface);
        virtual void text_input_method_v1_leave(struct ::wl_surface *surface);
        virtual void text_input_method_v1_key(int32_t type, int32_t key, int32_t modifiers, int32_t auto_repeat, int32_t count, int32_t native_scan_code, int32_t native_virtual_key, int32_t native_modifiers, const QString &text);
        virtual void text_input_method_v1_start_input_method_event(uint32_t serial, int32_t surrounding_text_offset);
        virtual void text_input_method_v1_input_method_event_attribute(uint32_t serial, int32_t type, int32_t start, int32_t length, const QString &value);
        virtual void text_input_method_v1_end_input_method_event(uint32_t serial, const QString &commit_string, const QString &preedit_string, int32_t replacement_start, int32_t replacement_length);
        virtual void text_input_method_v1_visible_changed(int32_t visible);
        virtual void text_input_method_v1_keyboard_rectangle_changed(wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height);
        virtual void text_input_method_v1_locale_changed(const QString &locale_name);
        virtual void text_input_method_v1_input_direction_changed(int32_t input_direction);

    private:
        void init_listener();
        static const struct qt_text_input_method_v1_listener m_qt_text_input_method_v1_listener;
        static void handle_enter(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            struct ::wl_surface *surface);
        static void handle_leave(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            struct ::wl_surface *surface);
        static void handle_key(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            int32_t type,
            int32_t key,
            int32_t modifiers,
            int32_t auto_repeat,
            int32_t count,
            int32_t native_scan_code,
            int32_t native_virtual_key,
            int32_t native_modifiers,
            const char *text);
        static void handle_start_input_method_event(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            uint32_t serial,
            int32_t surrounding_text_offset);
        static void handle_input_method_event_attribute(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            uint32_t serial,
            int32_t type,
            int32_t start,
            int32_t length,
            const char *value);
        static void handle_end_input_method_event(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            uint32_t serial,
            const char *commit_string,
            const char *preedit_string,
            int32_t replacement_start,
            int32_t replacement_length);
        static void handle_visible_changed(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            int32_t visible);
        static void handle_keyboard_rectangle_changed(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            wl_fixed_t x,
            wl_fixed_t y,
            wl_fixed_t width,
            wl_fixed_t height);
        static void handle_locale_changed(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            const char *locale_name);
        static void handle_input_direction_changed(
            void *data,
            struct ::qt_text_input_method_v1 *object,
            int32_t input_direction);
        struct ::qt_text_input_method_v1 *m_qt_text_input_method_v1;
    };

    class Q_WAYLAND_CLIENT_QT_TEXT_INPUT_METHOD_UNSTABLE_V1_EXPORT qt_text_input_method_manager_v1
    {
    public:
        qt_text_input_method_manager_v1(struct ::wl_registry *registry, uint32_t id, int version);
        qt_text_input_method_manager_v1(struct ::qt_text_input_method_manager_v1 *object);
        qt_text_input_method_manager_v1();

        virtual ~qt_text_input_method_manager_v1();

        void init(struct ::wl_registry *registry, uint32_t id, int version);
        void init(struct ::qt_text_input_method_manager_v1 *object);

        struct ::qt_text_input_method_manager_v1 *object() { return m_qt_text_input_method_manager_v1; }
        const struct ::qt_text_input_method_manager_v1 *object() const { return m_qt_text_input_method_manager_v1; }
        static qt_text_input_method_manager_v1 *fromObject(struct ::qt_text_input_method_manager_v1 *object);

        bool isInitialized() const;

        uint32_t version() const;
        static const struct ::wl_interface *interface();

        void destroy();
        struct ::qt_text_input_method_v1 *get_text_input_method(struct ::wl_seat *seat);

    private:
        struct ::qt_text_input_method_manager_v1 *m_qt_text_input_method_manager_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
