// This file was generated by qtwaylandscanner
// source file is treeland-shortcut-manager-v2.xml

#ifndef QT_WAYLAND_TREELAND_SHORTCUT_MANAGER_V2
#define QT_WAYLAND_TREELAND_SHORTCUT_MANAGER_V2

#include "wayland-treeland-shortcut-manager-v2-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_shortcut_manager_v2
    {
    public:
        treeland_shortcut_manager_v2(struct ::wl_registry *registry, uint32_t id, int version);
        treeland_shortcut_manager_v2(struct ::treeland_shortcut_manager_v2 *object);
        treeland_shortcut_manager_v2();

        virtual ~treeland_shortcut_manager_v2();

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

        struct ::treeland_shortcut_manager_v2 *object() { return m_treeland_shortcut_manager_v2; }
        const struct ::treeland_shortcut_manager_v2 *object() const { return m_treeland_shortcut_manager_v2; }
        static treeland_shortcut_manager_v2 *fromObject(struct ::treeland_shortcut_manager_v2 *object);

        bool isInitialized() const;

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

        enum direction {
            direction_down = 1,
            direction_left = 2,
            direction_up = 3,
            direction_right = 4,
        };

        enum action {
            action_notify = 1,
            action_workspace_1 = 2,
            action_workspace_2 = 3,
            action_workspace_3 = 4,
            action_workspace_4 = 5,
            action_workspace_5 = 6,
            action_workspace_6 = 7,
            action_prev_workspace = 8,
            action_next_workspace = 9,
            action_show_desktop = 10,
            action_maximize = 11,
            action_cancel_maximize = 12,
            action_move_window = 13,
            action_close_window = 14,
            action_show_window_menu = 15,
            action_open_multitask_view = 16,
            action_close_multitask_view = 17,
            action_toggle_multitask_view = 18,
            action_toggle_fps_display = 19,
            action_lockscreen = 20,
            action_shutdown_menu = 21,
            action_quit = 22,
            action_taskswitch_enter = 23,
            action_taskswitch_next = 24,
            action_taskswitch_prev = 25,
            action_taskswitch_sameapp_next = 26,
            action_taskswitch_sameapp_prev = 27,
            action_tile_left = 28,
            action_tile_right = 29,
        };

        enum keybind_flag {
            keybind_flag_key_press = 0x1, // bind key press events
            keybind_flag_key_release = 0x2, // bind key release events
            keybind_flag_repeat = 0x4, // bind autorepeat events.
        };

        enum bind_error {
            bind_error_name_conflict = 1,
            bind_error_duplicate_binding = 2,
            bind_error_invalid_argument = 3,
            bind_error_internal_error = 4,
        };

        enum error {
            error_occupied = 1,
            error_not_acquired = 2,
            error_invalid_commit = 3,
            error_invalid_surface = 4,
        };

        void destroy();
        void acquire();
        void bind_key(const QString &name, const QString &key, uint32_t flags, uint32_t action);
        void bind_swipe_gesture(const QString &name, uint32_t finger, uint32_t direction, uint32_t action);
        void bind_hold_gesture(const QString &name, uint32_t finger, uint32_t action);
        void commit();
        void unbind(const QString &name);
        struct ::treeland_shortcut_capture_v1 *capture_next_shortcut(struct ::wl_surface *surface, struct ::wl_seat *seat);

    protected:
        virtual void treeland_shortcut_manager_v2_activated(const QString &name, uint32_t flags);
        virtual void treeland_shortcut_manager_v2_commit_success();
        virtual void treeland_shortcut_manager_v2_commit_failure(const QString &name, uint32_t error);

    private:
        void init_listener();
        static const struct treeland_shortcut_manager_v2_listener m_treeland_shortcut_manager_v2_listener;
        static void handle_activated(
            void *data,
            struct ::treeland_shortcut_manager_v2 *object,
            const char *name,
            uint32_t flags);
        static void handle_commit_success(
            void *data,
            struct ::treeland_shortcut_manager_v2 *object);
        static void handle_commit_failure(
            void *data,
            struct ::treeland_shortcut_manager_v2 *object,
            const char *name,
            uint32_t error);
        struct ::treeland_shortcut_manager_v2 *m_treeland_shortcut_manager_v2;
    };

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

        virtual ~treeland_shortcut_capture_v1();

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

        struct ::treeland_shortcut_capture_v1 *object() { return m_treeland_shortcut_capture_v1; }
        const struct ::treeland_shortcut_capture_v1 *object() const { return m_treeland_shortcut_capture_v1; }
        static treeland_shortcut_capture_v1 *fromObject(struct ::treeland_shortcut_capture_v1 *object);

        bool isInitialized() const;

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

        enum failed_reason {
            failed_reason_busy = 1, // another capture is in progress
            failed_reason_aborted = 2, // capture was aborted by compositor policy
            failed_reason_not_active = 3, // surface focus or active validation failed
            failed_reason_interrupted = 4, // capture was interrupted by a non-shortcut intercepted input
        };

        void destroy();

    protected:
        virtual void treeland_shortcut_capture_v1_captured(const QString &key);
        virtual void treeland_shortcut_capture_v1_failed(uint32_t reason);

    private:
        void init_listener();
        static const struct treeland_shortcut_capture_v1_listener m_treeland_shortcut_capture_v1_listener;
        static void handle_captured(
            void *data,
            struct ::treeland_shortcut_capture_v1 *object,
            const char *key);
        static void handle_failed(
            void *data,
            struct ::treeland_shortcut_capture_v1 *object,
            uint32_t reason);
        struct ::treeland_shortcut_capture_v1 *m_treeland_shortcut_capture_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
