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

#ifndef QT_WAYLAND_WLR_LAYER_SHELL_UNSTABLE_V1
#define QT_WAYLAND_WLR_LAYER_SHELL_UNSTABLE_V1

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

        virtual ~zwlr_layer_shell_v1();

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

        struct ::zwlr_layer_shell_v1 *object() { return m_zwlr_layer_shell_v1; }
        const struct ::zwlr_layer_shell_v1 *object() const { return m_zwlr_layer_shell_v1; }
        static zwlr_layer_shell_v1 *fromObject(struct ::zwlr_layer_shell_v1 *object);

        bool isInitialized() const;

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

        enum error {
            error_role = 0, // wl_surface has another role
            error_invalid_layer = 1, // layer value is invalid
            error_already_constructed = 2, // wl_surface has a buffer attached or committed
        };

        enum layer {
            layer_background = 0,
            layer_bottom = 1,
            layer_top = 2,
            layer_overlay = 3,
        };

        struct ::zwlr_layer_surface_v1 *get_layer_surface(struct ::wl_surface *surface, struct ::wl_output *output, uint32_t layer, const QString &scope);
        void destroy();

    private:
        struct ::zwlr_layer_shell_v1 *m_zwlr_layer_shell_v1;
    };

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

        virtual ~zwlr_layer_surface_v1();

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

        struct ::zwlr_layer_surface_v1 *object() { return m_zwlr_layer_surface_v1; }
        const struct ::zwlr_layer_surface_v1 *object() const { return m_zwlr_layer_surface_v1; }
        static zwlr_layer_surface_v1 *fromObject(struct ::zwlr_layer_surface_v1 *object);

        bool isInitialized() const;

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

        enum keyboard_interactivity {
            keyboard_interactivity_none = 0,
            keyboard_interactivity_exclusive = 1,
            keyboard_interactivity_on_demand = 2,
        };

        enum error {
            error_invalid_surface_state = 0, // provided surface state is invalid
            error_invalid_size = 1, // size is invalid
            error_invalid_anchor = 2, // anchor bitfield is invalid
            error_invalid_keyboard_interactivity = 3, // keyboard interactivity is invalid
            error_invalid_exclusive_edge = 4, // exclusive edge is invalid given the surface anchors
        };

        enum anchor {
            anchor_top = 1, // the top edge of the anchor rectangle
            anchor_bottom = 2, // the bottom edge of the anchor rectangle
            anchor_left = 4, // the left edge of the anchor rectangle
            anchor_right = 8, // the right edge of the anchor rectangle
        };

        void set_size(uint32_t width, uint32_t height);
        void set_anchor(uint32_t anchor);
        void set_exclusive_zone(int32_t zone);
        void set_margin(int32_t top, int32_t right, int32_t bottom, int32_t left);
        void set_keyboard_interactivity(uint32_t keyboard_interactivity);
        void get_popup(struct ::xdg_popup *popup);
        void ack_configure(uint32_t serial);
        void destroy();
        void set_layer(uint32_t layer);
        void set_exclusive_edge(uint32_t edge);

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

    private:
        void init_listener();
        static const struct zwlr_layer_surface_v1_listener m_zwlr_layer_surface_v1_listener;
        static void handle_configure(
            void *data,
            struct ::zwlr_layer_surface_v1 *object,
            uint32_t serial,
            uint32_t width,
            uint32_t height);
        static void handle_closed(
            void *data,
            struct ::zwlr_layer_surface_v1 *object);
        struct ::zwlr_layer_surface_v1 *m_zwlr_layer_surface_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
