// This file was generated by qtwaylandscanner
// source file is input-method-unstable-v1.xml

#ifndef QT_WAYLAND_SERVER_INPUT_METHOD_UNSTABLE_V1
#define QT_WAYLAND_SERVER_INPUT_METHOD_UNSTABLE_V1

#include "wayland-server-core.h"
#include "wayland-input-method-unstable-v1-server-protocol.h"
#include <QByteArray>
#include <QMultiMap>
#include <QString>

#include <unistd.h>

#ifndef WAYLAND_VERSION_CHECK
#define WAYLAND_VERSION_CHECK(major, minor, micro) \
    ((WAYLAND_VERSION_MAJOR > (major)) || \
    (WAYLAND_VERSION_MAJOR == (major) && WAYLAND_VERSION_MINOR > (minor)) || \
    (WAYLAND_VERSION_MAJOR == (major) && WAYLAND_VERSION_MINOR == (minor) && WAYLAND_VERSION_MICRO >= (micro)))
#endif

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers")

namespace QtWaylandServer {
    class  zwp_input_method_context_v1
    {
    public:
        zwp_input_method_context_v1(struct ::wl_client *client, int id, int version);
        zwp_input_method_context_v1(struct ::wl_display *display, int version);
        zwp_input_method_context_v1(struct ::wl_resource *resource);
        zwp_input_method_context_v1();

        virtual ~zwp_input_method_context_v1();

        class Resource
        {
        public:
            Resource() : zwp_input_method_context_v1_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            zwp_input_method_context_v1 *zwp_input_method_context_v1_object;
            zwp_input_method_context_v1 *object() { return zwp_input_method_context_v1_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);
        Resource *add(struct ::wl_resource *resource);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        void send_surrounding_text(const QString &text, uint32_t cursor, uint32_t anchor);
        void send_surrounding_text(struct ::wl_resource *resource, const QString &text, uint32_t cursor, uint32_t anchor);
        void send_reset();
        void send_reset(struct ::wl_resource *resource);
        void send_content_type(uint32_t hint, uint32_t purpose);
        void send_content_type(struct ::wl_resource *resource, uint32_t hint, uint32_t purpose);
        void send_invoke_action(uint32_t button, uint32_t index);
        void send_invoke_action(struct ::wl_resource *resource, uint32_t button, uint32_t index);
        void send_commit_state(uint32_t serial);
        void send_commit_state(struct ::wl_resource *resource, uint32_t serial);
        void send_preferred_language(const QString &language);
        void send_preferred_language(struct ::wl_resource *resource, const QString &language);

    protected:
        virtual Resource *zwp_input_method_context_v1_allocate();

        virtual void zwp_input_method_context_v1_destroy_global();

        virtual void zwp_input_method_context_v1_bind_resource(Resource *resource);
        virtual void zwp_input_method_context_v1_destroy_resource(Resource *resource);

        virtual void zwp_input_method_context_v1_destroy(Resource *resource);
        virtual void zwp_input_method_context_v1_commit_string(Resource *resource, uint32_t serial, const QString &text);
        virtual void zwp_input_method_context_v1_preedit_string(Resource *resource, uint32_t serial, const QString &text, const QString &commit);
        virtual void zwp_input_method_context_v1_preedit_styling(Resource *resource, uint32_t index, uint32_t length, uint32_t style);
        virtual void zwp_input_method_context_v1_preedit_cursor(Resource *resource, int32_t index);
        virtual void zwp_input_method_context_v1_delete_surrounding_text(Resource *resource, int32_t index, uint32_t length);
        virtual void zwp_input_method_context_v1_cursor_position(Resource *resource, int32_t index, int32_t anchor);
        virtual void zwp_input_method_context_v1_modifiers_map(Resource *resource, wl_array *map);
        virtual void zwp_input_method_context_v1_keysym(Resource *resource, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers);
        virtual void zwp_input_method_context_v1_grab_keyboard(Resource *resource, uint32_t keyboard);
        virtual void zwp_input_method_context_v1_key(Resource *resource, uint32_t serial, uint32_t time, uint32_t key, uint32_t state);
        virtual void zwp_input_method_context_v1_modifiers(Resource *resource, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group);
        virtual void zwp_input_method_context_v1_language(Resource *resource, uint32_t serial, const QString &language);
        virtual void zwp_input_method_context_v1_text_direction(Resource *resource, uint32_t serial, uint32_t direction);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::zwp_input_method_context_v1_interface m_zwp_input_method_context_v1_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_commit_string(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t serial,
            const char *text);
        static void handle_preedit_string(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t serial,
            const char *text,
            const char *commit);
        static void handle_preedit_styling(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t index,
            uint32_t length,
            uint32_t style);
        static void handle_preedit_cursor(
            ::wl_client *client,
            struct wl_resource *resource,
            int32_t index);
        static void handle_delete_surrounding_text(
            ::wl_client *client,
            struct wl_resource *resource,
            int32_t index,
            uint32_t length);
        static void handle_cursor_position(
            ::wl_client *client,
            struct wl_resource *resource,
            int32_t index,
            int32_t anchor);
        static void handle_modifiers_map(
            ::wl_client *client,
            struct wl_resource *resource,
            wl_array *map);
        static void handle_keysym(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t serial,
            uint32_t time,
            uint32_t sym,
            uint32_t state,
            uint32_t modifiers);
        static void handle_grab_keyboard(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t keyboard);
        static void handle_key(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t serial,
            uint32_t time,
            uint32_t key,
            uint32_t state);
        static void handle_modifiers(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t serial,
            uint32_t mods_depressed,
            uint32_t mods_latched,
            uint32_t mods_locked,
            uint32_t group);
        static void handle_language(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t serial,
            const char *language);
        static void handle_text_direction(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t serial,
            uint32_t direction);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            zwp_input_method_context_v1 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  zwp_input_method_v1
    {
    public:
        zwp_input_method_v1(struct ::wl_client *client, int id, int version);
        zwp_input_method_v1(struct ::wl_display *display, int version);
        zwp_input_method_v1(struct ::wl_resource *resource);
        zwp_input_method_v1();

        virtual ~zwp_input_method_v1();

        class Resource
        {
        public:
            Resource() : zwp_input_method_v1_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            zwp_input_method_v1 *zwp_input_method_v1_object;
            zwp_input_method_v1 *object() { return zwp_input_method_v1_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);
        Resource *add(struct ::wl_resource *resource);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        void send_activate(struct ::wl_resource *id);
        void send_activate(struct ::wl_resource *resource, struct ::wl_resource *id);
        void send_deactivate(struct ::wl_resource *context);
        void send_deactivate(struct ::wl_resource *resource, struct ::wl_resource *context);

    protected:
        virtual Resource *zwp_input_method_v1_allocate();

        virtual void zwp_input_method_v1_destroy_global();

        virtual void zwp_input_method_v1_bind_resource(Resource *resource);
        virtual void zwp_input_method_v1_destroy_resource(Resource *resource);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            zwp_input_method_v1 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  zwp_input_panel_v1
    {
    public:
        zwp_input_panel_v1(struct ::wl_client *client, int id, int version);
        zwp_input_panel_v1(struct ::wl_display *display, int version);
        zwp_input_panel_v1(struct ::wl_resource *resource);
        zwp_input_panel_v1();

        virtual ~zwp_input_panel_v1();

        class Resource
        {
        public:
            Resource() : zwp_input_panel_v1_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            zwp_input_panel_v1 *zwp_input_panel_v1_object;
            zwp_input_panel_v1 *object() { return zwp_input_panel_v1_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);
        Resource *add(struct ::wl_resource *resource);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


    protected:
        virtual Resource *zwp_input_panel_v1_allocate();

        virtual void zwp_input_panel_v1_destroy_global();

        virtual void zwp_input_panel_v1_bind_resource(Resource *resource);
        virtual void zwp_input_panel_v1_destroy_resource(Resource *resource);

        virtual void zwp_input_panel_v1_get_input_panel_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::zwp_input_panel_v1_interface m_zwp_input_panel_v1_interface;

        static void handle_get_input_panel_surface(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            struct ::wl_resource *surface);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            zwp_input_panel_v1 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };

    class  zwp_input_panel_surface_v1
    {
    public:
        zwp_input_panel_surface_v1(struct ::wl_client *client, int id, int version);
        zwp_input_panel_surface_v1(struct ::wl_display *display, int version);
        zwp_input_panel_surface_v1(struct ::wl_resource *resource);
        zwp_input_panel_surface_v1();

        virtual ~zwp_input_panel_surface_v1();

        class Resource
        {
        public:
            Resource() : zwp_input_panel_surface_v1_object(nullptr), handle(nullptr) {}
            virtual ~Resource() {}

            zwp_input_panel_surface_v1 *zwp_input_panel_surface_v1_object;
            zwp_input_panel_surface_v1 *object() { return zwp_input_panel_surface_v1_object; } 
            struct ::wl_resource *handle;

            struct ::wl_client *client() const { return wl_resource_get_client(handle); }
            int version() const { return wl_resource_get_version(handle); }

            static Resource *fromResource(struct ::wl_resource *resource);
        };

        void init(struct ::wl_client *client, int id, int version);
        void init(struct ::wl_display *display, int version);
        void init(struct ::wl_resource *resource);

        Resource *add(struct ::wl_client *client, int version);
        Resource *add(struct ::wl_client *client, int id, int version);
        Resource *add(struct wl_list *resource_list, struct ::wl_client *client, int id, int version);
        Resource *add(struct ::wl_resource *resource);

        Resource *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        QMultiMap<struct ::wl_client*, Resource*> resourceMap() { return m_resource_map; }
        const QMultiMap<struct ::wl_client*, Resource*> resourceMap() const { return m_resource_map; }

        bool isGlobalRemoved() const { return m_globalRemovedEvent; }
        void globalRemove();

        bool isGlobal() const { return m_global != nullptr; }
        bool isResource() const { return m_resource != nullptr; }

        static const struct ::wl_interface *interface();
        static QByteArray interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum position {
            position_center_bottom = 0,
        };

    protected:
        virtual Resource *zwp_input_panel_surface_v1_allocate();

        virtual void zwp_input_panel_surface_v1_destroy_global();

        virtual void zwp_input_panel_surface_v1_bind_resource(Resource *resource);
        virtual void zwp_input_panel_surface_v1_destroy_resource(Resource *resource);

        virtual void zwp_input_panel_surface_v1_set_toplevel(Resource *resource, struct ::wl_resource *output, uint32_t position);
        virtual void zwp_input_panel_surface_v1_set_overlay_panel(Resource *resource);

    private:
        static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
        static void destroy_func(struct ::wl_resource *client_resource);
        static void display_destroy_func(struct ::wl_listener *listener, void *data);
        static int deferred_destroy_global_func(void *data);

        Resource *bind(struct ::wl_client *client, uint32_t id, int version);
        Resource *bind(struct ::wl_resource *handle);

        static const struct ::zwp_input_panel_surface_v1_interface m_zwp_input_panel_surface_v1_interface;

        static void handle_set_toplevel(
            ::wl_client *client,
            struct wl_resource *resource,
            struct ::wl_resource *output,
            uint32_t position);
        static void handle_set_overlay_panel(
            ::wl_client *client,
            struct wl_resource *resource);

        QMultiMap<struct ::wl_client*, Resource*> m_resource_map;
        Resource *m_resource;
        struct ::wl_global *m_global;
        struct ::wl_display *m_display;
        struct wl_event_source *m_globalRemovedEvent;
        struct DisplayDestroyedListener : ::wl_listener {
            zwp_input_panel_surface_v1 *parent;
        };
        DisplayDestroyedListener m_displayDestroyedListener;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
