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

#ifndef MIR_FRONTEND_WAYLAND_SERVER_DECORATION_XML_WRAPPER
#define MIR_FRONTEND_WAYLAND_SERVER_DECORATION_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 KwinServerDecorationManager;
class KwinServerDecoration;

class KwinServerDecorationManager : public Resource
{
public:
    static char const constexpr* interface_name = "org_kde_kwin_server_decoration_manager";

    static KwinServerDecorationManager* from(struct wl_resource*);

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

    void send_default_mode_event(uint32_t mode) const;

    void destroy_and_delete() const;

    struct Mode
    {
        static uint32_t const None = 0;
        static uint32_t const Client = 1;
        static uint32_t const Server = 2;
    };

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

    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_org_kde_kwin_server_decoration_manager) = 0;
        friend KwinServerDecorationManager::Thunks;
    };

private:
    virtual void create(struct wl_resource* id, struct wl_resource* surface) = 0;
};

class KwinServerDecoration : public Resource
{
public:
    static char const constexpr* interface_name = "org_kde_kwin_server_decoration";

    static KwinServerDecoration* from(struct wl_resource*);

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

    void send_mode_event(uint32_t mode) const;

    struct Mode
    {
        static uint32_t const None = 0;
        static uint32_t const Client = 1;
        static uint32_t const Server = 2;
    };

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

    struct Thunks;

    static bool is_instance(wl_resource* resource);

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

}
}

#endif // MIR_FRONTEND_WAYLAND_SERVER_DECORATION_XML_WRAPPER
