// This file was generated by qtwaylandscanner
// source file is /build/qt6-wayland/src/qtwayland-everywhere-src-6.3.0/src/plugins/shellintegration/qt-shell/../../../extensions/qt-shell-unstable-v1.xml

#include "qwayland-qt-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;
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
    bindOpCode, interface, version, name, interface->name, version, nullptr);
}

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

    zqt_shell_surface_v1::zqt_shell_surface_v1(struct ::zqt_shell_surface_v1 *obj)
        : m_zqt_shell_surface_v1(obj)
    {
        init_listener();
    }

    zqt_shell_surface_v1::zqt_shell_surface_v1()
        : m_zqt_shell_surface_v1(nullptr)
    {
    }

    zqt_shell_surface_v1::~zqt_shell_surface_v1()
    {
    }

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

    void zqt_shell_surface_v1::init(struct ::zqt_shell_surface_v1 *obj)
    {
        m_zqt_shell_surface_v1 = obj;
        init_listener();
    }

    zqt_shell_surface_v1 *zqt_shell_surface_v1::fromObject(struct ::zqt_shell_surface_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zqt_shell_surface_v1_listener)
            return nullptr;
        return static_cast<zqt_shell_surface_v1 *>(zqt_shell_surface_v1_get_user_data(object));
    }

    bool zqt_shell_surface_v1::isInitialized() const
    {
        return m_zqt_shell_surface_v1 != nullptr;
    }

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

    const struct wl_interface *zqt_shell_surface_v1::interface()
    {
        return &::zqt_shell_surface_v1_interface;
    }

    void zqt_shell_surface_v1::destroy()
    {
        ::zqt_shell_surface_v1_destroy(
            m_zqt_shell_surface_v1);
        m_zqt_shell_surface_v1 = nullptr;
    }

    void zqt_shell_surface_v1::reposition(int32_t x, int32_t y)
    {
        ::zqt_shell_surface_v1_reposition(
            m_zqt_shell_surface_v1,
            x,
            y);
    }

    void zqt_shell_surface_v1::request_activate()
    {
        ::zqt_shell_surface_v1_request_activate(
            m_zqt_shell_surface_v1);
    }

    void zqt_shell_surface_v1::set_size(int32_t width, int32_t height)
    {
        ::zqt_shell_surface_v1_set_size(
            m_zqt_shell_surface_v1,
            width,
            height);
    }

    void zqt_shell_surface_v1::set_minimum_size(int32_t width, int32_t height)
    {
        ::zqt_shell_surface_v1_set_minimum_size(
            m_zqt_shell_surface_v1,
            width,
            height);
    }

    void zqt_shell_surface_v1::set_maximum_size(int32_t width, int32_t height)
    {
        ::zqt_shell_surface_v1_set_maximum_size(
            m_zqt_shell_surface_v1,
            width,
            height);
    }

    void zqt_shell_surface_v1::set_window_title(const QString &window_title)
    {
        ::zqt_shell_surface_v1_set_window_title(
            m_zqt_shell_surface_v1,
            window_title.toUtf8().constData());
    }

    void zqt_shell_surface_v1::set_window_flags(uint32_t flags)
    {
        ::zqt_shell_surface_v1_set_window_flags(
            m_zqt_shell_surface_v1,
            flags);
    }

    void zqt_shell_surface_v1::start_system_resize(uint32_t serial, uint32_t edge)
    {
        ::zqt_shell_surface_v1_start_system_resize(
            m_zqt_shell_surface_v1,
            serial,
            edge);
    }

    void zqt_shell_surface_v1::start_system_move(uint32_t serial)
    {
        ::zqt_shell_surface_v1_start_system_move(
            m_zqt_shell_surface_v1,
            serial);
    }

    void zqt_shell_surface_v1::change_window_state(uint32_t state)
    {
        ::zqt_shell_surface_v1_change_window_state(
            m_zqt_shell_surface_v1,
            state);
    }

    void zqt_shell_surface_v1::raise()
    {
        ::zqt_shell_surface_v1_raise(
            m_zqt_shell_surface_v1);
    }

    void zqt_shell_surface_v1::lower()
    {
        ::zqt_shell_surface_v1_lower(
            m_zqt_shell_surface_v1);
    }

    void zqt_shell_surface_v1::ack_configure(uint32_t serial)
    {
        ::zqt_shell_surface_v1_ack_configure(
            m_zqt_shell_surface_v1,
            serial);
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_resize(uint32_t , int32_t , int32_t )
    {
    }

    void zqt_shell_surface_v1::handle_resize(
        void *data,
        struct ::zqt_shell_surface_v1 *object,
        uint32_t serial,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(object);
        static_cast<zqt_shell_surface_v1 *>(data)->zqt_shell_surface_v1_resize(
            serial,
            width,
            height);
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_position(uint32_t , int32_t , int32_t )
    {
    }

    void zqt_shell_surface_v1::handle_set_position(
        void *data,
        struct ::zqt_shell_surface_v1 *object,
        uint32_t serial,
        int32_t x,
        int32_t y)
    {
        Q_UNUSED(object);
        static_cast<zqt_shell_surface_v1 *>(data)->zqt_shell_surface_v1_set_position(
            serial,
            x,
            y);
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_window_state(uint32_t , uint32_t )
    {
    }

    void zqt_shell_surface_v1::handle_set_window_state(
        void *data,
        struct ::zqt_shell_surface_v1 *object,
        uint32_t serial,
        uint32_t state)
    {
        Q_UNUSED(object);
        static_cast<zqt_shell_surface_v1 *>(data)->zqt_shell_surface_v1_set_window_state(
            serial,
            state);
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_configure(uint32_t )
    {
    }

    void zqt_shell_surface_v1::handle_configure(
        void *data,
        struct ::zqt_shell_surface_v1 *object,
        uint32_t serial)
    {
        Q_UNUSED(object);
        static_cast<zqt_shell_surface_v1 *>(data)->zqt_shell_surface_v1_configure(
            serial);
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_frame_margins(uint32_t , uint32_t , uint32_t , uint32_t )
    {
    }

    void zqt_shell_surface_v1::handle_set_frame_margins(
        void *data,
        struct ::zqt_shell_surface_v1 *object,
        uint32_t left,
        uint32_t right,
        uint32_t top,
        uint32_t bottom)
    {
        Q_UNUSED(object);
        static_cast<zqt_shell_surface_v1 *>(data)->zqt_shell_surface_v1_set_frame_margins(
            left,
            right,
            top,
            bottom);
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_close()
    {
    }

    void zqt_shell_surface_v1::handle_close(
        void *data,
        struct ::zqt_shell_surface_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<zqt_shell_surface_v1 *>(data)->zqt_shell_surface_v1_close();
    }

    void zqt_shell_surface_v1::zqt_shell_surface_v1_set_capabilities(uint32_t )
    {
    }

    void zqt_shell_surface_v1::handle_set_capabilities(
        void *data,
        struct ::zqt_shell_surface_v1 *object,
        uint32_t capabilities)
    {
        Q_UNUSED(object);
        static_cast<zqt_shell_surface_v1 *>(data)->zqt_shell_surface_v1_set_capabilities(
            capabilities);
    }

    const struct zqt_shell_surface_v1_listener zqt_shell_surface_v1::m_zqt_shell_surface_v1_listener = {
        zqt_shell_surface_v1::handle_resize,
        zqt_shell_surface_v1::handle_set_position,
        zqt_shell_surface_v1::handle_set_window_state,
        zqt_shell_surface_v1::handle_configure,
        zqt_shell_surface_v1::handle_set_frame_margins,
        zqt_shell_surface_v1::handle_close,
        zqt_shell_surface_v1::handle_set_capabilities,
    };

    void zqt_shell_surface_v1::init_listener()
    {
        zqt_shell_surface_v1_add_listener(m_zqt_shell_surface_v1, &m_zqt_shell_surface_v1_listener, this);
    }

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

    zqt_shell_v1::zqt_shell_v1(struct ::zqt_shell_v1 *obj)
        : m_zqt_shell_v1(obj)
    {
    }

    zqt_shell_v1::zqt_shell_v1()
        : m_zqt_shell_v1(nullptr)
    {
    }

    zqt_shell_v1::~zqt_shell_v1()
    {
    }

    void zqt_shell_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_zqt_shell_v1 = static_cast<struct ::zqt_shell_v1 *>(wlRegistryBind(registry, id, &zqt_shell_v1_interface, version));
    }

    void zqt_shell_v1::init(struct ::zqt_shell_v1 *obj)
    {
        m_zqt_shell_v1 = obj;
    }

    zqt_shell_v1 *zqt_shell_v1::fromObject(struct ::zqt_shell_v1 *object)
    {
        return static_cast<zqt_shell_v1 *>(zqt_shell_v1_get_user_data(object));
    }

    bool zqt_shell_v1::isInitialized() const
    {
        return m_zqt_shell_v1 != nullptr;
    }

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

    const struct wl_interface *zqt_shell_v1::interface()
    {
        return &::zqt_shell_v1_interface;
    }

    struct ::zqt_shell_surface_v1 *zqt_shell_v1::surface_create(struct ::wl_surface *surface)
    {
        return ::zqt_shell_v1_surface_create(
            m_zqt_shell_v1,
            surface);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
