// This file was generated by qtwaylandscanner
// source file is wlr-screencopy-unstable-v1.xml

#ifndef QT_WAYLAND_WLR_SCREENCOPY_UNSTABLE_V1
#define QT_WAYLAND_WLR_SCREENCOPY_UNSTABLE_V1

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

        virtual ~zwlr_screencopy_manager_v1();

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

        struct ::zwlr_screencopy_manager_v1 *object() { return m_zwlr_screencopy_manager_v1; }
        const struct ::zwlr_screencopy_manager_v1 *object() const { return m_zwlr_screencopy_manager_v1; }
        static zwlr_screencopy_manager_v1 *fromObject(struct ::zwlr_screencopy_manager_v1 *object);

        bool isInitialized() const;

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

        struct ::zwlr_screencopy_frame_v1 *capture_output(int32_t overlay_cursor, struct ::wl_output *output);
        struct ::zwlr_screencopy_frame_v1 *capture_output_region(int32_t overlay_cursor, struct ::wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height);
        void destroy();

    private:
        struct ::zwlr_screencopy_manager_v1 *m_zwlr_screencopy_manager_v1;
    };

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

        virtual ~zwlr_screencopy_frame_v1();

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

        struct ::zwlr_screencopy_frame_v1 *object() { return m_zwlr_screencopy_frame_v1; }
        const struct ::zwlr_screencopy_frame_v1 *object() const { return m_zwlr_screencopy_frame_v1; }
        static zwlr_screencopy_frame_v1 *fromObject(struct ::zwlr_screencopy_frame_v1 *object);

        bool isInitialized() const;

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

        enum error {
            error_already_used = 0, // the object has already been used to copy a wl_buffer
            error_invalid_buffer = 1, // buffer attributes are invalid
        };

        enum flags {
            flags_y_invert = 1, // contents are y-inverted
        };

        void copy(struct ::wl_buffer *buffer);
        void destroy();
        void copy_with_damage(struct ::wl_buffer *buffer);

    protected:
        virtual void zwlr_screencopy_frame_v1_buffer(uint32_t format, uint32_t width, uint32_t height, uint32_t stride);
        virtual void zwlr_screencopy_frame_v1_flags(uint32_t flags);
        virtual void zwlr_screencopy_frame_v1_ready(uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec);
        virtual void zwlr_screencopy_frame_v1_failed();
        virtual void zwlr_screencopy_frame_v1_damage(uint32_t x, uint32_t y, uint32_t width, uint32_t height);
        virtual void zwlr_screencopy_frame_v1_linux_dmabuf(uint32_t format, uint32_t width, uint32_t height);
        virtual void zwlr_screencopy_frame_v1_buffer_done();

    private:
        void init_listener();
        static const struct zwlr_screencopy_frame_v1_listener m_zwlr_screencopy_frame_v1_listener;
        static void handle_buffer(
            void *data,
            struct ::zwlr_screencopy_frame_v1 *object,
            uint32_t format,
            uint32_t width,
            uint32_t height,
            uint32_t stride);
        static void handle_flags(
            void *data,
            struct ::zwlr_screencopy_frame_v1 *object,
            uint32_t flags);
        static void handle_ready(
            void *data,
            struct ::zwlr_screencopy_frame_v1 *object,
            uint32_t tv_sec_hi,
            uint32_t tv_sec_lo,
            uint32_t tv_nsec);
        static void handle_failed(
            void *data,
            struct ::zwlr_screencopy_frame_v1 *object);
        static void handle_damage(
            void *data,
            struct ::zwlr_screencopy_frame_v1 *object,
            uint32_t x,
            uint32_t y,
            uint32_t width,
            uint32_t height);
        static void handle_linux_dmabuf(
            void *data,
            struct ::zwlr_screencopy_frame_v1 *object,
            uint32_t format,
            uint32_t width,
            uint32_t height);
        static void handle_buffer_done(
            void *data,
            struct ::zwlr_screencopy_frame_v1 *object);
        struct ::zwlr_screencopy_frame_v1 *m_zwlr_screencopy_frame_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
