// This file was generated by qtwaylandscanner
// source file is keystate.xml

#ifndef QT_WAYLAND_KEYSTATE
#define QT_WAYLAND_KEYSTATE

#include "wayland-keystate-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  org_kde_kwin_keystate
    {
    public:
        org_kde_kwin_keystate(struct ::wl_registry *registry, uint32_t id, int version);
        org_kde_kwin_keystate(struct ::org_kde_kwin_keystate *object);
        org_kde_kwin_keystate();

        virtual ~org_kde_kwin_keystate();

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

        struct ::org_kde_kwin_keystate *object() { return m_org_kde_kwin_keystate; }
        const struct ::org_kde_kwin_keystate *object() const { return m_org_kde_kwin_keystate; }
        static org_kde_kwin_keystate *fromObject(struct ::org_kde_kwin_keystate *object);

        bool isInitialized() const;

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

        enum key {
            key_capslock = 0,
            key_numlock = 1,
            key_scrolllock = 2,
            key_alt = 3,
            key_control = 4,
            key_shift = 5,
            key_meta = 6,
            key_altgr = 7,
        };

        enum state {
            state_unlocked = 0,
            state_latched = 1,
            state_locked = 2,
            state_pressed = 3,
        };

        void fetchStates();
        void destroy();

    protected:
        virtual void org_kde_kwin_keystate_stateChanged(uint32_t key, uint32_t state);

    private:
        void init_listener();
        static const struct org_kde_kwin_keystate_listener m_org_kde_kwin_keystate_listener;
        static void handle_stateChanged(
            void *data,
            struct ::org_kde_kwin_keystate *object,
            uint32_t key,
            uint32_t state);
        struct ::org_kde_kwin_keystate *m_org_kde_kwin_keystate;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
