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

#ifndef MIR_FRONTEND_WAYLAND_RELATIVE_POINTER_UNSTABLE_V1_XML_WRAPPER
#define MIR_FRONTEND_WAYLAND_RELATIVE_POINTER_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 RelativePointerManagerV1;
class RelativePointerV1;

class RelativePointerManagerV1 : public Resource
{
public:
    static char const constexpr* interface_name = "zwp_relative_pointer_manager_v1";

    static RelativePointerManagerV1* from(struct wl_resource*);

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

    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<1>);

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

    private:
        virtual void bind(wl_resource* new_zwp_relative_pointer_manager_v1) = 0;
        friend RelativePointerManagerV1::Thunks;
    };

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

class RelativePointerV1 : public Resource
{
public:
    static char const constexpr* interface_name = "zwp_relative_pointer_v1";

    static RelativePointerV1* from(struct wl_resource*);

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

    void send_relative_motion_event(uint32_t utime_hi, uint32_t utime_lo, double dx, double dy, double dx_unaccel, double dy_unaccel) const;

    void destroy_wayland_object() const;

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

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

    struct Thunks;

    static bool is_instance(wl_resource* resource);

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

}
}

#endif // MIR_FRONTEND_WAYLAND_RELATIVE_POINTER_UNSTABLE_V1_XML_WRAPPER
