// This file was generated by qtwaylandscanner
// source file is ext-session-lock-v1.xml

#ifndef QT_WAYLAND_EXT_SESSION_LOCK_V1
#define QT_WAYLAND_EXT_SESSION_LOCK_V1

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

        virtual ~ext_session_lock_manager_v1();

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

        struct ::ext_session_lock_manager_v1 *object() { return m_ext_session_lock_manager_v1; }
        const struct ::ext_session_lock_manager_v1 *object() const { return m_ext_session_lock_manager_v1; }
        static ext_session_lock_manager_v1 *fromObject(struct ::ext_session_lock_manager_v1 *object);

        bool isInitialized() const;

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

        void destroy();
        struct ::ext_session_lock_v1 *lock();

    private:
        struct ::ext_session_lock_manager_v1 *m_ext_session_lock_manager_v1;
    };

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

        virtual ~ext_session_lock_v1();

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

        struct ::ext_session_lock_v1 *object() { return m_ext_session_lock_v1; }
        const struct ::ext_session_lock_v1 *object() const { return m_ext_session_lock_v1; }
        static ext_session_lock_v1 *fromObject(struct ::ext_session_lock_v1 *object);

        bool isInitialized() const;

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

        enum error {
            error_invalid_destroy = 0, // attempted to destroy session lock while locked
            error_invalid_unlock = 1, // unlock requested but locked event was never sent
            error_role = 2, // given wl_surface already has a role
            error_duplicate_output = 3, // given output already has a lock surface
            error_already_constructed = 4, // given wl_surface has a buffer attached or committed
        };

        void destroy();
        struct ::ext_session_lock_surface_v1 *get_lock_surface(struct ::wl_surface *surface, struct ::wl_output *output);
        void unlock_and_destroy();

    protected:
        virtual void ext_session_lock_v1_locked();
        virtual void ext_session_lock_v1_finished();

    private:
        void init_listener();
        static const struct ext_session_lock_v1_listener m_ext_session_lock_v1_listener;
        static void handle_locked(
            void *data,
            struct ::ext_session_lock_v1 *object);
        static void handle_finished(
            void *data,
            struct ::ext_session_lock_v1 *object);
        struct ::ext_session_lock_v1 *m_ext_session_lock_v1;
    };

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

        virtual ~ext_session_lock_surface_v1();

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

        struct ::ext_session_lock_surface_v1 *object() { return m_ext_session_lock_surface_v1; }
        const struct ::ext_session_lock_surface_v1 *object() const { return m_ext_session_lock_surface_v1; }
        static ext_session_lock_surface_v1 *fromObject(struct ::ext_session_lock_surface_v1 *object);

        bool isInitialized() const;

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

        enum error {
            error_commit_before_first_ack = 0, // surface committed before first ack_configure request
            error_null_buffer = 1, // surface committed with a null buffer
            error_dimensions_mismatch = 2, // failed to match ack'd width/height
            error_invalid_serial = 3, // serial provided in ack_configure is invalid
        };

        void destroy();
        void ack_configure(uint32_t serial);

    protected:
        virtual void ext_session_lock_surface_v1_configure(uint32_t serial, uint32_t width, uint32_t height);

    private:
        void init_listener();
        static const struct ext_session_lock_surface_v1_listener m_ext_session_lock_surface_v1_listener;
        static void handle_configure(
            void *data,
            struct ::ext_session_lock_surface_v1 *object,
            uint32_t serial,
            uint32_t width,
            uint32_t height);
        struct ::ext_session_lock_surface_v1 *m_ext_session_lock_surface_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
