// This file was generated by qtwaylandscanner
// source file is wlr-foreign-toplevel-management-unstable-v1.xml

#ifndef QT_WAYLAND_WLR_FOREIGN_TOPLEVEL_MANAGEMENT_UNSTABLE_V1
#define QT_WAYLAND_WLR_FOREIGN_TOPLEVEL_MANAGEMENT_UNSTABLE_V1

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

        virtual ~zwlr_foreign_toplevel_manager_v1();

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

        struct ::zwlr_foreign_toplevel_manager_v1 *object() { return m_zwlr_foreign_toplevel_manager_v1; }
        const struct ::zwlr_foreign_toplevel_manager_v1 *object() const { return m_zwlr_foreign_toplevel_manager_v1; }
        static zwlr_foreign_toplevel_manager_v1 *fromObject(struct ::zwlr_foreign_toplevel_manager_v1 *object);

        bool isInitialized() const;

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

        void stop();

    protected:
        virtual void zwlr_foreign_toplevel_manager_v1_toplevel(struct ::zwlr_foreign_toplevel_handle_v1 *toplevel);
        virtual void zwlr_foreign_toplevel_manager_v1_finished();

    private:
        void init_listener();
        static const struct zwlr_foreign_toplevel_manager_v1_listener m_zwlr_foreign_toplevel_manager_v1_listener;
        static void handle_toplevel(
            void *data,
            struct ::zwlr_foreign_toplevel_manager_v1 *object,
            struct ::zwlr_foreign_toplevel_handle_v1 *toplevel);
        static void handle_finished(
            void *data,
            struct ::zwlr_foreign_toplevel_manager_v1 *object);
        struct ::zwlr_foreign_toplevel_manager_v1 *m_zwlr_foreign_toplevel_manager_v1;
    };

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

        virtual ~zwlr_foreign_toplevel_handle_v1();

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

        struct ::zwlr_foreign_toplevel_handle_v1 *object() { return m_zwlr_foreign_toplevel_handle_v1; }
        const struct ::zwlr_foreign_toplevel_handle_v1 *object() const { return m_zwlr_foreign_toplevel_handle_v1; }
        static zwlr_foreign_toplevel_handle_v1 *fromObject(struct ::zwlr_foreign_toplevel_handle_v1 *object);

        bool isInitialized() const;

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

        enum state {
            state_maximized = 0, // the toplevel is maximized
            state_minimized = 1, // the toplevel is minimized
            state_activated = 2, // the toplevel is active
            state_fullscreen = 3, // the toplevel is fullscreen
        };

        enum error {
            error_invalid_rectangle = 0, // the provided rectangle is invalid
        };

        void set_maximized();
        void unset_maximized();
        void set_minimized();
        void unset_minimized();
        void activate(struct ::wl_seat *seat);
        void close();
        void set_rectangle(struct ::wl_surface *surface, int32_t x, int32_t y, int32_t width, int32_t height);
        void destroy();
        void set_fullscreen(struct ::wl_output *output);
        void unset_fullscreen();

    protected:
        virtual void zwlr_foreign_toplevel_handle_v1_title(const QString &title);
        virtual void zwlr_foreign_toplevel_handle_v1_app_id(const QString &app_id);
        virtual void zwlr_foreign_toplevel_handle_v1_output_enter(struct ::wl_output *output);
        virtual void zwlr_foreign_toplevel_handle_v1_output_leave(struct ::wl_output *output);
        virtual void zwlr_foreign_toplevel_handle_v1_state(wl_array *state);
        virtual void zwlr_foreign_toplevel_handle_v1_done();
        virtual void zwlr_foreign_toplevel_handle_v1_closed();
        virtual void zwlr_foreign_toplevel_handle_v1_parent(struct ::zwlr_foreign_toplevel_handle_v1 *parent);

    private:
        void init_listener();
        static const struct zwlr_foreign_toplevel_handle_v1_listener m_zwlr_foreign_toplevel_handle_v1_listener;
        static void handle_title(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object,
            const char *title);
        static void handle_app_id(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object,
            const char *app_id);
        static void handle_output_enter(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object,
            struct ::wl_output *output);
        static void handle_output_leave(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object,
            struct ::wl_output *output);
        static void handle_state(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object,
            wl_array *state);
        static void handle_done(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object);
        static void handle_closed(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object);
        static void handle_parent(
            void *data,
            struct ::zwlr_foreign_toplevel_handle_v1 *object,
            struct ::zwlr_foreign_toplevel_handle_v1 *parent);
        struct ::zwlr_foreign_toplevel_handle_v1 *m_zwlr_foreign_toplevel_handle_v1;
    };
}

QT_WARNING_POP
QT_END_NAMESPACE

#endif
