/*
 * AUTOGENERATED - DO NOT EDIT
 *
 * This file is generated from xdg-decoration-unstable-v1.xml by mir_wayland_generator
 */

#ifndef MIR_FRONTEND_WAYLAND_XDG_DECORATION_UNSTABLE_V1_XML_WRAPPER
#define MIR_FRONTEND_WAYLAND_XDG_DECORATION_UNSTABLE_V1_XML_WRAPPER

#include <optional>

#include "mir/fd.h"
#include <wayland-server-core.h>

#include "mir/wayland/resource.h"
#include "mir/wayland/global.h"

namespace mir
{
namespace wayland
{

class XdgDecorationManagerV1;
class XdgToplevelDecorationV1;

class XdgDecorationManagerV1 : public Resource
{
public:
    static char const constexpr* interface_name = "zxdg_decoration_manager_v1";

    static XdgDecorationManagerV1* from(struct wl_resource*);

    XdgDecorationManagerV1(struct wl_resource* resource, Version<1>);
    virtual ~XdgDecorationManagerV1();

    struct Thunks;

    static bool is_instance(wl_resource* resource);

    class Global : public wayland::Global
    {
    public:
        Global(wl_display* display, Version<1>);

        auto interface_name() const -> char const* override;

    private:
        virtual void bind(wl_resource* new_zxdg_decoration_manager_v1) = 0;
        friend XdgDecorationManagerV1::Thunks;
    };

private:
    virtual void get_toplevel_decoration(struct wl_resource* id, struct wl_resource* toplevel) = 0;
};

class XdgToplevelDecorationV1 : public Resource
{
public:
    static char const constexpr* interface_name = "zxdg_toplevel_decoration_v1";

    static XdgToplevelDecorationV1* from(struct wl_resource*);

    XdgToplevelDecorationV1(struct wl_resource* resource, Version<1>);
    virtual ~XdgToplevelDecorationV1();

    void send_configure_event(uint32_t mode) const;

    struct Error
    {
        static uint32_t const unconfigured_buffer = 0;
        static uint32_t const already_constructed = 1;
        static uint32_t const orphaned = 2;
    };

    struct Mode
    {
        static uint32_t const client_side = 1;
        static uint32_t const server_side = 2;
    };

    struct Opcode
    {
        static uint32_t const configure = 0;
    };

    struct Thunks;

    static bool is_instance(wl_resource* resource);

private:
    virtual void set_mode(uint32_t mode) = 0;
    virtual void unset_mode() = 0;
};

}
}

#endif // MIR_FRONTEND_WAYLAND_XDG_DECORATION_UNSTABLE_V1_XML_WRAPPER
