/*
 * AUTOGENERATED - DO NOT EDIT
 *
 * This file is generated from xdg-output-unstable-v1.xml
 * To regenerate, run the “refresh-wayland-wrapper” target.
 */

#ifndef MIR_FRONTEND_WAYLAND_XDG_OUTPUT_UNSTABLE_V1_XML_WRAPPER
#define MIR_FRONTEND_WAYLAND_XDG_OUTPUT_UNSTABLE_V1_XML_WRAPPER

#include <experimental/optional>

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

#include "mir/wayland/wayland_base.h"

namespace mir
{
namespace wayland
{

class XdgOutputManagerV1;
class XdgOutputV1;

class XdgOutputManagerV1 : public Resource
{
public:
    static char const constexpr* interface_name = "zxdg_output_manager_v1";

    static XdgOutputManagerV1* from(struct wl_resource*);

    XdgOutputManagerV1(struct wl_resource* resource, Version<3>);
    virtual ~XdgOutputManagerV1();

    void destroy_wayland_object() const;

    struct wl_client* const client;
    struct wl_resource* const resource;

    struct Thunks;

    static bool is_instance(wl_resource* resource);

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

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

    private:
        virtual void bind(wl_resource* new_zxdg_output_manager_v1) = 0;
        friend XdgOutputManagerV1::Thunks;
    };

private:
    virtual void destroy() = 0;
    virtual void get_xdg_output(struct wl_resource* id, struct wl_resource* output) = 0;
};

class XdgOutputV1 : public Resource
{
public:
    static char const constexpr* interface_name = "zxdg_output_v1";

    static XdgOutputV1* from(struct wl_resource*);

    XdgOutputV1(struct wl_resource* resource, Version<3>);
    virtual ~XdgOutputV1();

    void send_logical_position_event(int32_t x, int32_t y) const;
    void send_logical_size_event(int32_t width, int32_t height) const;
    void send_done_event() const;
    bool version_supports_name();
    void send_name_event(std::string const& name) const;
    bool version_supports_description();
    void send_description_event(std::string const& description) const;

    void destroy_wayland_object() const;

    struct wl_client* const client;
    struct wl_resource* const resource;

    struct Opcode
    {
        static uint32_t const logical_position = 0;
        static uint32_t const logical_size = 1;
        static uint32_t const done = 2;
        static uint32_t const name = 3;
        static uint32_t const description = 4;
    };

    struct Thunks;

    static bool is_instance(wl_resource* resource);

private:
    virtual void destroy() = 0;
};

}
}

#endif // MIR_FRONTEND_WAYLAND_XDG_OUTPUT_UNSTABLE_V1_XML_WRAPPER
