// This file was generated by qtwaylandscanner
// source file is /build/layer-shell-qt/src/layer-shell-qt-5.25.1/src/wlr-layer-shell-unstable-v1.xml

#include "qwayland-wlr-layer-shell-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
}

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

    zwlr_layer_shell_v1::zwlr_layer_shell_v1(struct ::zwlr_layer_shell_v1 *obj)
        : m_zwlr_layer_shell_v1(obj)
    {
    }

    zwlr_layer_shell_v1::zwlr_layer_shell_v1()
        : m_zwlr_layer_shell_v1(nullptr)
    {
    }

    zwlr_layer_shell_v1::~zwlr_layer_shell_v1()
    {
    }

    void zwlr_layer_shell_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwlr_layer_shell_v1 = static_cast<struct ::zwlr_layer_shell_v1 *>(wlRegistryBind(registry, id, &zwlr_layer_shell_v1_interface, version));
    }

    void zwlr_layer_shell_v1::init(struct ::zwlr_layer_shell_v1 *obj)
    {
        m_zwlr_layer_shell_v1 = obj;
    }

    zwlr_layer_shell_v1 *zwlr_layer_shell_v1::fromObject(struct ::zwlr_layer_shell_v1 *object)
    {
        return static_cast<zwlr_layer_shell_v1 *>(zwlr_layer_shell_v1_get_user_data(object));
    }

    bool zwlr_layer_shell_v1::isInitialized() const
    {
        return m_zwlr_layer_shell_v1 != nullptr;
    }

    const struct wl_interface *zwlr_layer_shell_v1::interface()
    {
        return &::zwlr_layer_shell_v1_interface;
    }

    struct ::zwlr_layer_surface_v1 *zwlr_layer_shell_v1::get_layer_surface(struct ::wl_surface *surface, struct ::wl_output *output, uint32_t layer, const QString &scope)
    {
        return zwlr_layer_shell_v1_get_layer_surface(
            m_zwlr_layer_shell_v1,
            surface,
            output,
            layer,
            scope.toUtf8().constData());
    }

    void zwlr_layer_shell_v1::destroy()
    {
        zwlr_layer_shell_v1_destroy(
            m_zwlr_layer_shell_v1);
        m_zwlr_layer_shell_v1 = nullptr;
    }

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

    zwlr_layer_surface_v1::zwlr_layer_surface_v1(struct ::zwlr_layer_surface_v1 *obj)
        : m_zwlr_layer_surface_v1(obj)
    {
        init_listener();
    }

    zwlr_layer_surface_v1::zwlr_layer_surface_v1()
        : m_zwlr_layer_surface_v1(nullptr)
    {
    }

    zwlr_layer_surface_v1::~zwlr_layer_surface_v1()
    {
    }

    void zwlr_layer_surface_v1::init(struct ::wl_registry *registry, int id, int version)
    {
        m_zwlr_layer_surface_v1 = static_cast<struct ::zwlr_layer_surface_v1 *>(wlRegistryBind(registry, id, &zwlr_layer_surface_v1_interface, version));
        init_listener();
    }

    void zwlr_layer_surface_v1::init(struct ::zwlr_layer_surface_v1 *obj)
    {
        m_zwlr_layer_surface_v1 = obj;
        init_listener();
    }

    zwlr_layer_surface_v1 *zwlr_layer_surface_v1::fromObject(struct ::zwlr_layer_surface_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwlr_layer_surface_v1_listener)
            return nullptr;
        return static_cast<zwlr_layer_surface_v1 *>(zwlr_layer_surface_v1_get_user_data(object));
    }

    bool zwlr_layer_surface_v1::isInitialized() const
    {
        return m_zwlr_layer_surface_v1 != nullptr;
    }

    const struct wl_interface *zwlr_layer_surface_v1::interface()
    {
        return &::zwlr_layer_surface_v1_interface;
    }

    void zwlr_layer_surface_v1::set_size(uint32_t width, uint32_t height)
    {
        zwlr_layer_surface_v1_set_size(
            m_zwlr_layer_surface_v1,
            width,
            height);
    }

    void zwlr_layer_surface_v1::set_anchor(uint32_t anchor)
    {
        zwlr_layer_surface_v1_set_anchor(
            m_zwlr_layer_surface_v1,
            anchor);
    }

    void zwlr_layer_surface_v1::set_exclusive_zone(int32_t zone)
    {
        zwlr_layer_surface_v1_set_exclusive_zone(
            m_zwlr_layer_surface_v1,
            zone);
    }

    void zwlr_layer_surface_v1::set_margin(int32_t top, int32_t right, int32_t bottom, int32_t left)
    {
        zwlr_layer_surface_v1_set_margin(
            m_zwlr_layer_surface_v1,
            top,
            right,
            bottom,
            left);
    }

    void zwlr_layer_surface_v1::set_keyboard_interactivity(uint32_t keyboard_interactivity)
    {
        zwlr_layer_surface_v1_set_keyboard_interactivity(
            m_zwlr_layer_surface_v1,
            keyboard_interactivity);
    }

    void zwlr_layer_surface_v1::get_popup(struct ::xdg_popup *popup)
    {
        zwlr_layer_surface_v1_get_popup(
            m_zwlr_layer_surface_v1,
            popup);
    }

    void zwlr_layer_surface_v1::ack_configure(uint32_t serial)
    {
        zwlr_layer_surface_v1_ack_configure(
            m_zwlr_layer_surface_v1,
            serial);
    }

    void zwlr_layer_surface_v1::destroy()
    {
        zwlr_layer_surface_v1_destroy(
            m_zwlr_layer_surface_v1);
        m_zwlr_layer_surface_v1 = nullptr;
    }

    void zwlr_layer_surface_v1::set_layer(uint32_t layer)
    {
        zwlr_layer_surface_v1_set_layer(
            m_zwlr_layer_surface_v1,
            layer);
    }

    void zwlr_layer_surface_v1::zwlr_layer_surface_v1_configure(uint32_t , uint32_t , uint32_t )
    {
    }

    void zwlr_layer_surface_v1::handle_configure(
        void *data,
        struct ::zwlr_layer_surface_v1 *object,
        uint32_t serial,
        uint32_t width,
        uint32_t height)
    {
        Q_UNUSED(object);
        static_cast<zwlr_layer_surface_v1 *>(data)->zwlr_layer_surface_v1_configure(
            serial,
            width,
            height);
    }

    void zwlr_layer_surface_v1::zwlr_layer_surface_v1_closed()
    {
    }

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

    const struct zwlr_layer_surface_v1_listener zwlr_layer_surface_v1::m_zwlr_layer_surface_v1_listener = {
        zwlr_layer_surface_v1::handle_configure,
        zwlr_layer_surface_v1::handle_closed,
    };

    void zwlr_layer_surface_v1::init_listener()
    {
        zwlr_layer_surface_v1_add_listener(m_zwlr_layer_surface_v1, &m_zwlr_layer_surface_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
