// This file was generated by qtwaylandscanner
// source file is xdg-toplevel-icon-v1.xml

#ifndef QT_WAYLAND_XDG_TOPLEVEL_ICON_V1
#define QT_WAYLAND_XDG_TOPLEVEL_ICON_V1

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

        virtual ~xdg_toplevel_icon_manager_v1();

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

        struct ::xdg_toplevel_icon_manager_v1 *object() { return m_xdg_toplevel_icon_manager_v1; }
        const struct ::xdg_toplevel_icon_manager_v1 *object() const { return m_xdg_toplevel_icon_manager_v1; }
        static xdg_toplevel_icon_manager_v1 *fromObject(struct ::xdg_toplevel_icon_manager_v1 *object);

        bool isInitialized() const;

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

        void destroy();
        struct ::xdg_toplevel_icon_v1 *create_icon();
        void set_icon(struct ::xdg_toplevel *toplevel, struct ::xdg_toplevel_icon_v1 *icon);

    protected:
        virtual void xdg_toplevel_icon_manager_v1_icon_size(int32_t size);
        virtual void xdg_toplevel_icon_manager_v1_done();

    private:
        void init_listener();
        static const struct xdg_toplevel_icon_manager_v1_listener m_xdg_toplevel_icon_manager_v1_listener;
        static void handle_icon_size(
            void *data,
            struct ::xdg_toplevel_icon_manager_v1 *object,
            int32_t size);
        static void handle_done(
            void *data,
            struct ::xdg_toplevel_icon_manager_v1 *object);
        struct ::xdg_toplevel_icon_manager_v1 *m_xdg_toplevel_icon_manager_v1;
    };

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

        virtual ~xdg_toplevel_icon_v1();

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

        struct ::xdg_toplevel_icon_v1 *object() { return m_xdg_toplevel_icon_v1; }
        const struct ::xdg_toplevel_icon_v1 *object() const { return m_xdg_toplevel_icon_v1; }
        static xdg_toplevel_icon_v1 *fromObject(struct ::xdg_toplevel_icon_v1 *object);

        bool isInitialized() const;

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

        enum error {
            error_invalid_buffer = 1, // the provided buffer does not satisfy requirements
            error_immutable = 2, // the icon has already been assigned to a toplevel and must not be changed
            error_no_buffer = 3, // the provided buffer has been destroyed before the toplevel icon
        };

        void destroy();
        void set_name(const QString &icon_name);
        void add_buffer(struct ::wl_buffer *buffer, int32_t scale);

    private:
        struct ::xdg_toplevel_icon_v1 *m_xdg_toplevel_icon_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
