// This file was generated by qtwaylandscanner
// source file is /scratch/jenkins-BUILDS-eSDK-2023.2_stable-pipeline-build-150_Ultra96Full/build/tmp/work/ultra96_zynqmp-xilinx-linux/qtwayland/5.15.4+gitAUTOINC+f1e6c8764d-r0/git/src/3rdparty/protocol/xdg-decoration-unstable-v1.xml

#include "qwayland-xdg-decoration-unstable-v1.h"

QT_BEGIN_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-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;
#if (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR > 10) || WAYLAND_VERSION_MAJOR > 1
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
        bindOpCode, interface, version, name, interface->name, version, nullptr);
#else
    return (void *) wl_proxy_marshal_constructor((struct wl_proxy *) registry,
        bindOpCode, interface, name, interface->name, version, nullptr);
#endif
}

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

    zxdg_decoration_manager_v1::zxdg_decoration_manager_v1(struct ::zxdg_decoration_manager_v1 *obj)
        : m_zxdg_decoration_manager_v1(obj)
    {
    }

    zxdg_decoration_manager_v1::zxdg_decoration_manager_v1()
        : m_zxdg_decoration_manager_v1(nullptr)
    {
    }

    zxdg_decoration_manager_v1::~zxdg_decoration_manager_v1()
    {
    }

    void zxdg_decoration_manager_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zxdg_decoration_manager_v1 = static_cast<struct ::zxdg_decoration_manager_v1 *>(wlRegistryBind(registry, id, &zxdg_decoration_manager_v1_interface, version));
    }

    void zxdg_decoration_manager_v1::init(struct ::zxdg_decoration_manager_v1 *obj)
    {
        m_zxdg_decoration_manager_v1 = obj;
    }

    zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1::fromObject(struct ::zxdg_decoration_manager_v1 *object)
    {
        return static_cast<zxdg_decoration_manager_v1 *>(zxdg_decoration_manager_v1_get_user_data(object));
    }

    bool zxdg_decoration_manager_v1::isInitialized() const
    {
        return m_zxdg_decoration_manager_v1 != nullptr;
    }

    const struct wl_interface *zxdg_decoration_manager_v1::interface()
    {
        return &::zxdg_decoration_manager_v1_interface;
    }

    void zxdg_decoration_manager_v1::destroy()
    {
        zxdg_decoration_manager_v1_destroy(
            m_zxdg_decoration_manager_v1);
        m_zxdg_decoration_manager_v1 = nullptr;
    }

    struct ::zxdg_toplevel_decoration_v1 *zxdg_decoration_manager_v1::get_toplevel_decoration(struct ::xdg_toplevel *toplevel)
    {
        return zxdg_decoration_manager_v1_get_toplevel_decoration(
            m_zxdg_decoration_manager_v1,
            toplevel);
    }

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

    zxdg_toplevel_decoration_v1::zxdg_toplevel_decoration_v1(struct ::zxdg_toplevel_decoration_v1 *obj)
        : m_zxdg_toplevel_decoration_v1(obj)
    {
        init_listener();
    }

    zxdg_toplevel_decoration_v1::zxdg_toplevel_decoration_v1()
        : m_zxdg_toplevel_decoration_v1(nullptr)
    {
    }

    zxdg_toplevel_decoration_v1::~zxdg_toplevel_decoration_v1()
    {
    }

    void zxdg_toplevel_decoration_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zxdg_toplevel_decoration_v1 = static_cast<struct ::zxdg_toplevel_decoration_v1 *>(wlRegistryBind(registry, id, &zxdg_toplevel_decoration_v1_interface, version));
        init_listener();
    }

    void zxdg_toplevel_decoration_v1::init(struct ::zxdg_toplevel_decoration_v1 *obj)
    {
        m_zxdg_toplevel_decoration_v1 = obj;
        init_listener();
    }

    zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1::fromObject(struct ::zxdg_toplevel_decoration_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zxdg_toplevel_decoration_v1_listener)
            return nullptr;
        return static_cast<zxdg_toplevel_decoration_v1 *>(zxdg_toplevel_decoration_v1_get_user_data(object));
    }

    bool zxdg_toplevel_decoration_v1::isInitialized() const
    {
        return m_zxdg_toplevel_decoration_v1 != nullptr;
    }

    const struct wl_interface *zxdg_toplevel_decoration_v1::interface()
    {
        return &::zxdg_toplevel_decoration_v1_interface;
    }

    void zxdg_toplevel_decoration_v1::destroy()
    {
        zxdg_toplevel_decoration_v1_destroy(
            m_zxdg_toplevel_decoration_v1);
        m_zxdg_toplevel_decoration_v1 = nullptr;
    }

    void zxdg_toplevel_decoration_v1::set_mode(uint32_t mode)
    {
        zxdg_toplevel_decoration_v1_set_mode(
            m_zxdg_toplevel_decoration_v1,
            mode);
    }

    void zxdg_toplevel_decoration_v1::unset_mode()
    {
        zxdg_toplevel_decoration_v1_unset_mode(
            m_zxdg_toplevel_decoration_v1);
    }

    void zxdg_toplevel_decoration_v1::zxdg_toplevel_decoration_v1_configure(uint32_t )
    {
    }

    void zxdg_toplevel_decoration_v1::handle_configure(
        void *data,
        struct ::zxdg_toplevel_decoration_v1 *object,
        uint32_t mode)
    {
        Q_UNUSED(object);
        static_cast<zxdg_toplevel_decoration_v1 *>(data)->zxdg_toplevel_decoration_v1_configure(
            mode);
    }

    const struct zxdg_toplevel_decoration_v1_listener zxdg_toplevel_decoration_v1::m_zxdg_toplevel_decoration_v1_listener = {
        zxdg_toplevel_decoration_v1::handle_configure,
    };

    void zxdg_toplevel_decoration_v1::init_listener()
    {
        zxdg_toplevel_decoration_v1_add_listener(m_zxdg_toplevel_decoration_v1, &m_zxdg_toplevel_decoration_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
