// This file was generated by qtwaylandscanner
// source file is xx-pip-v1.xml

#include "qwayland-xx-pip-v1.h"

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers")

namespace QtWayland {

static inline void *wlRegistryBind(struct ::wl_registry *registry, uint32_t name, const struct ::wl_interface *interface, uint32_t version)
{
    const uint32_t bindOpCode = 0;
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
    bindOpCode, interface, version, name, interface->name, version, nullptr);
}

    xx_pip_shell_v1::xx_pip_shell_v1(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    xx_pip_shell_v1::xx_pip_shell_v1(struct ::xx_pip_shell_v1 *obj)
        : m_xx_pip_shell_v1(obj)
    {
    }

    xx_pip_shell_v1::xx_pip_shell_v1()
        : m_xx_pip_shell_v1(nullptr)
    {
    }

    xx_pip_shell_v1::~xx_pip_shell_v1()
    {
    }

    void xx_pip_shell_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_xx_pip_shell_v1 = static_cast<struct ::xx_pip_shell_v1 *>(wlRegistryBind(registry, id, &xx_pip_shell_v1_interface, version));
    }

    void xx_pip_shell_v1::init(struct ::xx_pip_shell_v1 *obj)
    {
        m_xx_pip_shell_v1 = obj;
    }

    xx_pip_shell_v1 *xx_pip_shell_v1::fromObject(struct ::xx_pip_shell_v1 *object)
    {
        return static_cast<xx_pip_shell_v1 *>(xx_pip_shell_v1_get_user_data(object));
    }

    bool xx_pip_shell_v1::isInitialized() const
    {
        return m_xx_pip_shell_v1 != nullptr;
    }

    uint32_t xx_pip_shell_v1::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_xx_pip_shell_v1));
    }

    const struct wl_interface *xx_pip_shell_v1::interface()
    {
        return &::xx_pip_shell_v1_interface;
    }

    void xx_pip_shell_v1::destroy()
    {
        ::xx_pip_shell_v1_destroy(
            m_xx_pip_shell_v1);
        m_xx_pip_shell_v1 = nullptr;
    }

    struct ::xx_pip_v1 *xx_pip_shell_v1::get_pip(struct ::xdg_surface *xdg_surface)
    {
        struct ::xx_pip_v1 * id = ::xx_pip_shell_v1_get_pip(
            m_xx_pip_shell_v1,
            xdg_surface);
        return id;
    }

    xx_pip_v1::xx_pip_v1(struct ::wl_registry *registry, uint32_t id, int version)
    {
        init(registry, id, version);
    }

    xx_pip_v1::xx_pip_v1(struct ::xx_pip_v1 *obj)
        : m_xx_pip_v1(obj)
    {
        init_listener();
    }

    xx_pip_v1::xx_pip_v1()
        : m_xx_pip_v1(nullptr)
    {
    }

    xx_pip_v1::~xx_pip_v1()
    {
    }

    void xx_pip_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_xx_pip_v1 = static_cast<struct ::xx_pip_v1 *>(wlRegistryBind(registry, id, &xx_pip_v1_interface, version));
        init_listener();
    }

    void xx_pip_v1::init(struct ::xx_pip_v1 *obj)
    {
        m_xx_pip_v1 = obj;
        init_listener();
    }

    xx_pip_v1 *xx_pip_v1::fromObject(struct ::xx_pip_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_xx_pip_v1_listener)
            return nullptr;
        return static_cast<xx_pip_v1 *>(xx_pip_v1_get_user_data(object));
    }

    bool xx_pip_v1::isInitialized() const
    {
        return m_xx_pip_v1 != nullptr;
    }

    uint32_t xx_pip_v1::version() const
    {
        return wl_proxy_get_version(reinterpret_cast<wl_proxy*>(m_xx_pip_v1));
    }

    const struct wl_interface *xx_pip_v1::interface()
    {
        return &::xx_pip_v1_interface;
    }

    void xx_pip_v1::destroy()
    {
        ::xx_pip_v1_destroy(
            m_xx_pip_v1);
        m_xx_pip_v1 = nullptr;
    }

    void xx_pip_v1::set_app_id(const QString &app_id)
    {
        ::xx_pip_v1_set_app_id(
            m_xx_pip_v1,
            app_id.toUtf8().constData());
    }

    void xx_pip_v1::set_origin(struct ::wl_surface *origin)
    {
        ::xx_pip_v1_set_origin(
            m_xx_pip_v1,
            origin);
    }

    void xx_pip_v1::set_origin_rect(int32_t x, int32_t y, uint32_t width, uint32_t height)
    {
        ::xx_pip_v1_set_origin_rect(
            m_xx_pip_v1,
            x,
            y,
            width,
            height);
    }

    void xx_pip_v1::move(struct ::wl_seat *seat, uint32_t serial)
    {
        ::xx_pip_v1_move(
            m_xx_pip_v1,
            seat,
            serial);
    }

    void xx_pip_v1::resize(struct ::wl_seat *seat, uint32_t serial, uint32_t edges)
    {
        ::xx_pip_v1_resize(
            m_xx_pip_v1,
            seat,
            serial,
            edges);
    }

    void xx_pip_v1::xx_pip_v1_closed()
    {
    }

    void xx_pip_v1::handle_closed(
        void *data,
        struct ::xx_pip_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<xx_pip_v1 *>(data)->xx_pip_v1_closed();
    }

    void xx_pip_v1::xx_pip_v1_configure_bounds(int32_t , int32_t )
    {
    }

    void xx_pip_v1::handle_configure_bounds(
        void *data,
        struct ::xx_pip_v1 *object,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(object);
        static_cast<xx_pip_v1 *>(data)->xx_pip_v1_configure_bounds(
            width,
            height);
    }

    void xx_pip_v1::xx_pip_v1_configure_size(int32_t , int32_t )
    {
    }

    void xx_pip_v1::handle_configure_size(
        void *data,
        struct ::xx_pip_v1 *object,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(object);
        static_cast<xx_pip_v1 *>(data)->xx_pip_v1_configure_size(
            width,
            height);
    }

    const struct xx_pip_v1_listener xx_pip_v1::m_xx_pip_v1_listener = {
        xx_pip_v1::handle_closed,
        xx_pip_v1::handle_configure_bounds,
        xx_pip_v1::handle_configure_size,
    };

    void xx_pip_v1::init_listener()
    {
        xx_pip_v1_add_listener(m_xx_pip_v1, &m_xx_pip_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
