// This file was generated by qtwaylandscanner
// source file is xx-pip-v1.xml

#ifndef QT_WAYLAND_XX_PIP_V1
#define QT_WAYLAND_XX_PIP_V1

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

        virtual ~xx_pip_shell_v1();

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

        struct ::xx_pip_shell_v1 *object() { return m_xx_pip_shell_v1; }
        const struct ::xx_pip_shell_v1 *object() const { return m_xx_pip_shell_v1; }
        static xx_pip_shell_v1 *fromObject(struct ::xx_pip_shell_v1 *object);

        bool isInitialized() const;

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

        enum error {
            error_role = 0, // given wl_surface has another role
            error_already_constructed = 1, // wl_surface has a buffer attached or committed
        };

        void destroy();
        struct ::xx_pip_v1 *get_pip(struct ::xdg_surface *xdg_surface);

    private:
        struct ::xx_pip_shell_v1 *m_xx_pip_shell_v1;
    };

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

        virtual ~xx_pip_v1();

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

        struct ::xx_pip_v1 *object() { return m_xx_pip_v1; }
        const struct ::xx_pip_v1 *object() const { return m_xx_pip_v1; }
        static xx_pip_v1 *fromObject(struct ::xx_pip_v1 *object);

        bool isInitialized() const;

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

        enum error {
            error_invalid_size = 0, // invalid surface size provided
            error_invalid_origin = 1, // invalid origin
            error_invalid_resize_edge = 2, // invalid resize edge
        };

        enum resize_edge {
            resize_edge_none = 0,
            resize_edge_top = 1,
            resize_edge_bottom = 2,
            resize_edge_left = 4,
            resize_edge_top_left = 5,
            resize_edge_bottom_left = 6,
            resize_edge_right = 8,
            resize_edge_top_right = 9,
            resize_edge_bottom_right = 10,
        };

        void destroy();
        void set_app_id(const QString &app_id);
        void set_origin(struct ::wl_surface *origin);
        void set_origin_rect(int32_t x, int32_t y, uint32_t width, uint32_t height);
        void move(struct ::wl_seat *seat, uint32_t serial);
        void resize(struct ::wl_seat *seat, uint32_t serial, uint32_t edges);

    protected:
        virtual void xx_pip_v1_closed();
        virtual void xx_pip_v1_configure_bounds(int32_t width, int32_t height);
        virtual void xx_pip_v1_configure_size(int32_t width, int32_t height);

    private:
        void init_listener();
        static const struct xx_pip_v1_listener m_xx_pip_v1_listener;
        static void handle_closed(
            void *data,
            struct ::xx_pip_v1 *object);
        static void handle_configure_bounds(
            void *data,
            struct ::xx_pip_v1 *object,
            int32_t width,
            int32_t height);
        static void handle_configure_size(
            void *data,
            struct ::xx_pip_v1 *object,
            int32_t width,
            int32_t height);
        struct ::xx_pip_v1 *m_xx_pip_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
