// This file was generated by qtwaylandscanner
// source file is treeland-keyboard-state-notify-unstable-v1.xml

#ifndef QT_WAYLAND_TREELAND_KEYBOARD_STATE_NOTIFY_UNSTABLE_V1
#define QT_WAYLAND_TREELAND_KEYBOARD_STATE_NOTIFY_UNSTABLE_V1

#include "wayland-treeland-keyboard-state-notify-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")

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

        virtual ~treeland_keyboard_state_notify_manager_v1();

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

        struct ::treeland_keyboard_state_notify_manager_v1 *object() { return m_treeland_keyboard_state_notify_manager_v1; }
        const struct ::treeland_keyboard_state_notify_manager_v1 *object() const { return m_treeland_keyboard_state_notify_manager_v1; }
        static treeland_keyboard_state_notify_manager_v1 *fromObject(struct ::treeland_keyboard_state_notify_manager_v1 *object);

        bool isInitialized() const;

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

        void destroy();
        struct ::treeland_keyboard_state_watcher_v1 *get_keyboard_state_watcher(struct ::wl_seat *seat);

    private:
        struct ::treeland_keyboard_state_notify_manager_v1 *m_treeland_keyboard_state_notify_manager_v1;
    };

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

        virtual ~treeland_keyboard_state_watcher_v1();

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

        struct ::treeland_keyboard_state_watcher_v1 *object() { return m_treeland_keyboard_state_watcher_v1; }
        const struct ::treeland_keyboard_state_watcher_v1 *object() const { return m_treeland_keyboard_state_watcher_v1; }
        static treeland_keyboard_state_watcher_v1 *fromObject(struct ::treeland_keyboard_state_watcher_v1 *object);

        bool isInitialized() const;

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

        enum modifier {
            modifier_caps_lock = 1, // Caps Lock modifier
            modifier_num_lock = 2, // Num Lock modifier
        };

        enum watch_flag {
            watch_flag_locked = 1, // notify when modifier is locked
            watch_flag_unlocked = 2, // notify when modifier is unlocked
        };

        enum modifier_state {
            modifier_state_unlocked = 0, // modifier is now unlocked
            modifier_state_locked = 1, // modifier is now locked
        };

        void destroy();
        void set_modifiers(uint32_t modifiers);
        void set_flags(uint32_t flags);
        void apply();

    protected:
        virtual void treeland_keyboard_state_watcher_v1_current_state(uint32_t modifier, uint32_t state);
        virtual void treeland_keyboard_state_watcher_v1_state_changed(uint32_t modifier, uint32_t state);

    private:
        void init_listener();
        static const struct treeland_keyboard_state_watcher_v1_listener m_treeland_keyboard_state_watcher_v1_listener;
        static void handle_current_state(
            void *data,
            struct ::treeland_keyboard_state_watcher_v1 *object,
            uint32_t modifier,
            uint32_t state);
        static void handle_state_changed(
            void *data,
            struct ::treeland_keyboard_state_watcher_v1 *object,
            uint32_t modifier,
            uint32_t state);
        struct ::treeland_keyboard_state_watcher_v1 *m_treeland_keyboard_state_watcher_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
