#ifndef QT_WAYLAND_DRM_EGL_SERVER_BUFFER
#define QT_WAYLAND_DRM_EGL_SERVER_BUFFER

#include "wayland-drm-egl-server-buffer-client-protocol.h"
#include <QByteArray>
#include <QString>

struct wl_registry;

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")

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

        virtual ~qt_drm_egl_server_buffer();

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

        struct ::qt_drm_egl_server_buffer *object() { return m_qt_drm_egl_server_buffer; }
        const struct ::qt_drm_egl_server_buffer *object() const { return m_qt_drm_egl_server_buffer; }
        static qt_drm_egl_server_buffer *fromObject(struct ::qt_drm_egl_server_buffer *object);

        bool isInitialized() const;

        static const struct ::wl_interface *interface();

        enum format {
            format_RGBA32 = 0,
            format_A8 = 1
        };

    protected:
        virtual void drm_egl_server_buffer_server_buffer_created(struct ::qt_server_buffer *id, int32_t name, int32_t width, int32_t height, int32_t stride, int32_t format);

    private:
        void init_listener();
        static const struct qt_drm_egl_server_buffer_listener m_qt_drm_egl_server_buffer_listener;
        static void handle_server_buffer_created(
            void *data,
            struct ::qt_drm_egl_server_buffer *object,
            struct ::qt_server_buffer *id,
            int32_t name,
            int32_t width,
            int32_t height,
            int32_t stride,
            int32_t format);
        struct ::qt_drm_egl_server_buffer *m_qt_drm_egl_server_buffer;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
