// This file was generated by qtwaylandscanner
// source file is /usr/share/treeland-protocols/treeland-input-manager-unstable-v1.xml

#ifndef QT_WAYLAND_SERVER_TREELAND_INPUT_MANAGER_UNSTABLE_V1
#define QT_WAYLAND_SERVER_TREELAND_INPUT_MANAGER_UNSTABLE_V1

#include "wayland-server-core.h"
#include "wayland-treeland-input-manager-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")
QT_WARNING_DISABLE_GCC("-Wreorder")
QT_WARNING_DISABLE_CLANG("-Wreorder")

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

        virtual ~treeland_input_manager_v1();

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

            treeland_input_manager_v1 *treeland_input_manager_v1_object;
            treeland_input_manager_v1 *object() { return treeland_input_manager_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 *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        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 QByteArrayView interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum device_type {
            device_type_mouse = 1, // mouse input device
            device_type_touchpad = 2, // touchpad input device
            device_type_keyboard = 4, // keyboard input device
        };

        enum state {
            state_disabled = 0, // disabled state
            state_enabled = 1, // enabled state
        };

        void send_capability_available(uint32_t type, struct ::wl_resource *seat);
        void send_capability_available(struct ::wl_resource *resource, uint32_t type, struct ::wl_resource *seat);
        void send_capability_unavailable(uint32_t type, struct ::wl_resource *seat);
        void send_capability_unavailable(struct ::wl_resource *resource, uint32_t type, struct ::wl_resource *seat);
    protected:
        struct ::wl_global *m_global;

    protected:
        virtual Resource *allocate();

        virtual void destroy_global();

        virtual void bind_resource(Resource *resource);
        virtual void destroy_resource(Resource *resource);

        virtual void destroy(Resource *resource);
        virtual void get_mouse_settings(Resource *resource, uint32_t id, struct ::wl_resource *seat);
        virtual void get_touchpad_settings(Resource *resource, uint32_t id, struct ::wl_resource *seat);
        virtual void get_keyboard_settings(Resource *resource, uint32_t id, struct ::wl_resource *seat);

    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 ::treeland_input_manager_v1_interface m_treeland_input_manager_v1_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_get_mouse_settings(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            struct ::wl_resource *seat);
        static void handle_get_touchpad_settings(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            struct ::wl_resource *seat);
        static void handle_get_keyboard_settings(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            struct ::wl_resource *seat);

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

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

        virtual ~treeland_pointer_device_configuration_v1();

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

            treeland_pointer_device_configuration_v1 *treeland_pointer_device_configuration_v1_object;
            treeland_pointer_device_configuration_v1 *object() { return treeland_pointer_device_configuration_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 *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        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 QByteArrayView interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum feature {
            feature_scroll_factor = 1, // device supports configuring scroll factor
            feature_handed_mode = 2, // device supports configuring handed mode
            feature_accel_speed = 4, // device supports configuring acceleration speed
            feature_acceleration_profile = 8, // device supports configuring acceleration profile
            feature_send_events_mode = 16, // device supports configuring event delivery mode
            feature_natural_scroll = 32, // device supports configuring natural scrolling
            feature_disable_while_typing = 64, // device supports disable-while-typing
            feature_tap_to_click = 128, // device supports tap-to-click
        };

        enum handed_mode {
            handed_mode_right = 0, // right-handed mode
            handed_mode_left = 1, // left-handed mode
        };

        enum acceleration_profile {
            acceleration_profile_none = 0, // device does not have a configurable acceleration profile
            acceleration_profile_flat = 1, // use a flat acceleration profile
            acceleration_profile_adaptive = 2, // use an adaptive acceleration profile
            acceleration_profile_custom = 4, // use a custom acceleration profile
        };

        enum send_events_mode {
            send_events_mode_enabled = 0, // send events from this device normally
            send_events_mode_disabled = 1, // do not send events from this device
            send_events_mode_disabled_on_external_mouse = 2, // if an external pointer device is plugged in, do not send events from this device; may be available on built-in pointer devices
        };

        void send_feature(uint32_t feature);
        void send_feature(struct ::wl_resource *resource, uint32_t feature);
        void send_scroll_factor(wl_fixed_t factor);
        void send_scroll_factor(struct ::wl_resource *resource, wl_fixed_t factor);
        void send_handed_mode(uint32_t mode);
        void send_handed_mode(struct ::wl_resource *resource, uint32_t mode);
        void send_accel_speed(wl_fixed_t accel_speed);
        void send_accel_speed(struct ::wl_resource *resource, wl_fixed_t accel_speed);
        void send_acceleration_profile(uint32_t profile);
        void send_acceleration_profile(struct ::wl_resource *resource, uint32_t profile);
        void send_send_events_mode(uint32_t mode);
        void send_send_events_mode(struct ::wl_resource *resource, uint32_t mode);
        void send_natural_scroll(uint32_t state);
        void send_natural_scroll(struct ::wl_resource *resource, uint32_t state);
        void send_disable_while_typing(uint32_t state);
        void send_disable_while_typing(struct ::wl_resource *resource, uint32_t state);
        void send_tap_to_click(uint32_t state);
        void send_tap_to_click(struct ::wl_resource *resource, uint32_t state);
        void send_failed();
        void send_failed(struct ::wl_resource *resource);
        void send_done(uint32_t serial);
        void send_done(struct ::wl_resource *resource, uint32_t serial);
    protected:
        struct ::wl_global *m_global;

    protected:
        virtual Resource *allocate();

        virtual void destroy_global();

        virtual void bind_resource(Resource *resource);
        virtual void destroy_resource(Resource *resource);

        virtual void destroy(Resource *resource);
        virtual void set_scroll_factor(Resource *resource, wl_fixed_t factor);
        virtual void set_handed_mode(Resource *resource, uint32_t mode);
        virtual void set_accel_speed(Resource *resource, wl_fixed_t accel_speed);
        virtual void set_acceleration_profile(Resource *resource, uint32_t profile);
        virtual void set_send_events_mode(Resource *resource, uint32_t mode);
        virtual void set_natural_scroll(Resource *resource, uint32_t state);
        virtual void set_disable_while_typing(Resource *resource, uint32_t state);
        virtual void set_tap_to_click(Resource *resource, uint32_t state);
        virtual void apply(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 ::treeland_pointer_device_configuration_v1_interface m_treeland_pointer_device_configuration_v1_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_set_scroll_factor(
            ::wl_client *client,
            struct wl_resource *resource,
            wl_fixed_t factor);
        static void handle_set_handed_mode(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t mode);
        static void handle_set_accel_speed(
            ::wl_client *client,
            struct wl_resource *resource,
            wl_fixed_t accel_speed);
        static void handle_set_acceleration_profile(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t profile);
        static void handle_set_send_events_mode(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t mode);
        static void handle_set_natural_scroll(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t state);
        static void handle_set_disable_while_typing(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t state);
        static void handle_set_tap_to_click(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t state);
        static void handle_apply(
            ::wl_client *client,
            struct wl_resource *resource);

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

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

        virtual ~treeland_mouse_settings_v1();

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

            treeland_mouse_settings_v1 *treeland_mouse_settings_v1_object;
            treeland_mouse_settings_v1 *object() { return treeland_mouse_settings_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 *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        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 QByteArrayView interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }

    protected:
        struct ::wl_global *m_global;

    protected:
        virtual Resource *allocate();

        virtual void destroy_global();

        virtual void bind_resource(Resource *resource);
        virtual void destroy_resource(Resource *resource);

        virtual void destroy(Resource *resource);
        virtual void get_pointer_configuration(Resource *resource, uint32_t id, uint32_t serial);

    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 ::treeland_mouse_settings_v1_interface m_treeland_mouse_settings_v1_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_get_pointer_configuration(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            uint32_t serial);

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

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

        virtual ~treeland_touchpad_settings_v1();

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

            treeland_touchpad_settings_v1 *treeland_touchpad_settings_v1_object;
            treeland_touchpad_settings_v1 *object() { return treeland_touchpad_settings_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 *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        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 QByteArrayView interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }

    protected:
        struct ::wl_global *m_global;

    protected:
        virtual Resource *allocate();

        virtual void destroy_global();

        virtual void bind_resource(Resource *resource);
        virtual void destroy_resource(Resource *resource);

        virtual void destroy(Resource *resource);
        virtual void get_pointer_configuration(Resource *resource, uint32_t id, uint32_t serial);

    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 ::treeland_touchpad_settings_v1_interface m_treeland_touchpad_settings_v1_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_get_pointer_configuration(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t id,
            uint32_t serial);

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

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

        virtual ~treeland_keyboard_settings_v1();

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

            treeland_keyboard_settings_v1 *treeland_keyboard_settings_v1_object;
            treeland_keyboard_settings_v1 *object() { return treeland_keyboard_settings_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 *resource() { return m_resource; }
        const Resource *resource() const { return m_resource; }

        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 QByteArrayView interfaceName() { return interface()->name; }
        static int interfaceVersion() { return interface()->version; }


        enum toggle_state {
            toggle_state_off = 0, // off state
            toggle_state_on = 1, // on state
        };

        enum feature {
            feature_num_lock = 1, // device supports configuring num lock state
        };

        void send_feature(uint32_t feature);
        void send_feature(struct ::wl_resource *resource, uint32_t feature);
        void send_repeat(int32_t rate, int32_t delay);
        void send_repeat(struct ::wl_resource *resource, int32_t rate, int32_t delay);
        void send_num_lock(uint32_t state);
        void send_num_lock(struct ::wl_resource *resource, uint32_t state);
        void send_failed();
        void send_failed(struct ::wl_resource *resource);
        void send_done();
        void send_done(struct ::wl_resource *resource);
    protected:
        struct ::wl_global *m_global;

    protected:
        virtual Resource *allocate();

        virtual void destroy_global();

        virtual void bind_resource(Resource *resource);
        virtual void destroy_resource(Resource *resource);

        virtual void destroy(Resource *resource);
        virtual void set_repeat(Resource *resource, int32_t rate, int32_t delay);
        virtual void set_num_lock(Resource *resource, uint32_t state);
        virtual void apply(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 ::treeland_keyboard_settings_v1_interface m_treeland_keyboard_settings_v1_interface;

        static void handle_destroy(
            ::wl_client *client,
            struct wl_resource *resource);
        static void handle_set_repeat(
            ::wl_client *client,
            struct wl_resource *resource,
            int32_t rate,
            int32_t delay);
        static void handle_set_num_lock(
            ::wl_client *client,
            struct wl_resource *resource,
            uint32_t state);
        static void handle_apply(
            ::wl_client *client,
            struct wl_resource *resource);

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

QT_WARNING_POP
QT_END_NAMESPACE

#endif
