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

#include "qwayland-fullscreen-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);
}

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

    zwp_fullscreen_shell_v1::zwp_fullscreen_shell_v1(struct ::zwp_fullscreen_shell_v1 *obj)
        : m_zwp_fullscreen_shell_v1(obj)
    {
        init_listener();
    }

    zwp_fullscreen_shell_v1::zwp_fullscreen_shell_v1()
        : m_zwp_fullscreen_shell_v1(nullptr)
    {
    }

    zwp_fullscreen_shell_v1::~zwp_fullscreen_shell_v1()
    {
    }

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

    void zwp_fullscreen_shell_v1::init(struct ::zwp_fullscreen_shell_v1 *obj)
    {
        m_zwp_fullscreen_shell_v1 = obj;
        init_listener();
    }

    zwp_fullscreen_shell_v1 *zwp_fullscreen_shell_v1::fromObject(struct ::zwp_fullscreen_shell_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwp_fullscreen_shell_v1_listener)
            return nullptr;
        return static_cast<zwp_fullscreen_shell_v1 *>(zwp_fullscreen_shell_v1_get_user_data(object));
    }

    bool zwp_fullscreen_shell_v1::isInitialized() const
    {
        return m_zwp_fullscreen_shell_v1 != nullptr;
    }

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

    const struct wl_interface *zwp_fullscreen_shell_v1::interface()
    {
        return &::zwp_fullscreen_shell_v1_interface;
    }

    void zwp_fullscreen_shell_v1::release()
    {
        ::zwp_fullscreen_shell_v1_release(
            m_zwp_fullscreen_shell_v1);
        m_zwp_fullscreen_shell_v1 = nullptr;
    }

    void zwp_fullscreen_shell_v1::present_surface(struct ::wl_surface *surface, uint32_t method, struct ::wl_output *output)
    {
        ::zwp_fullscreen_shell_v1_present_surface(
            m_zwp_fullscreen_shell_v1,
            surface,
            method,
            output);
    }

    struct ::zwp_fullscreen_shell_mode_feedback_v1 *zwp_fullscreen_shell_v1::present_surface_for_mode(struct ::wl_surface *surface, struct ::wl_output *output, int32_t framerate)
    {
        return ::zwp_fullscreen_shell_v1_present_surface_for_mode(
            m_zwp_fullscreen_shell_v1,
            surface,
            output,
            framerate);
    }

    void zwp_fullscreen_shell_v1::zwp_fullscreen_shell_v1_capability(uint32_t )
    {
    }

    void zwp_fullscreen_shell_v1::handle_capability(
        void *data,
        struct ::zwp_fullscreen_shell_v1 *object,
        uint32_t capability)
    {
        Q_UNUSED(object);
        static_cast<zwp_fullscreen_shell_v1 *>(data)->zwp_fullscreen_shell_v1_capability(
            capability);
    }

    const struct zwp_fullscreen_shell_v1_listener zwp_fullscreen_shell_v1::m_zwp_fullscreen_shell_v1_listener = {
        zwp_fullscreen_shell_v1::handle_capability,
    };

    void zwp_fullscreen_shell_v1::init_listener()
    {
        zwp_fullscreen_shell_v1_add_listener(m_zwp_fullscreen_shell_v1, &m_zwp_fullscreen_shell_v1_listener, this);
    }

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

    zwp_fullscreen_shell_mode_feedback_v1::zwp_fullscreen_shell_mode_feedback_v1(struct ::zwp_fullscreen_shell_mode_feedback_v1 *obj)
        : m_zwp_fullscreen_shell_mode_feedback_v1(obj)
    {
        init_listener();
    }

    zwp_fullscreen_shell_mode_feedback_v1::zwp_fullscreen_shell_mode_feedback_v1()
        : m_zwp_fullscreen_shell_mode_feedback_v1(nullptr)
    {
    }

    zwp_fullscreen_shell_mode_feedback_v1::~zwp_fullscreen_shell_mode_feedback_v1()
    {
    }

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

    void zwp_fullscreen_shell_mode_feedback_v1::init(struct ::zwp_fullscreen_shell_mode_feedback_v1 *obj)
    {
        m_zwp_fullscreen_shell_mode_feedback_v1 = obj;
        init_listener();
    }

    zwp_fullscreen_shell_mode_feedback_v1 *zwp_fullscreen_shell_mode_feedback_v1::fromObject(struct ::zwp_fullscreen_shell_mode_feedback_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_zwp_fullscreen_shell_mode_feedback_v1_listener)
            return nullptr;
        return static_cast<zwp_fullscreen_shell_mode_feedback_v1 *>(zwp_fullscreen_shell_mode_feedback_v1_get_user_data(object));
    }

    bool zwp_fullscreen_shell_mode_feedback_v1::isInitialized() const
    {
        return m_zwp_fullscreen_shell_mode_feedback_v1 != nullptr;
    }

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

    const struct wl_interface *zwp_fullscreen_shell_mode_feedback_v1::interface()
    {
        return &::zwp_fullscreen_shell_mode_feedback_v1_interface;
    }

    void zwp_fullscreen_shell_mode_feedback_v1::zwp_fullscreen_shell_mode_feedback_v1_mode_successful()
    {
    }

    void zwp_fullscreen_shell_mode_feedback_v1::handle_mode_successful(
        void *data,
        struct ::zwp_fullscreen_shell_mode_feedback_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<zwp_fullscreen_shell_mode_feedback_v1 *>(data)->zwp_fullscreen_shell_mode_feedback_v1_mode_successful();
    }

    void zwp_fullscreen_shell_mode_feedback_v1::zwp_fullscreen_shell_mode_feedback_v1_mode_failed()
    {
    }

    void zwp_fullscreen_shell_mode_feedback_v1::handle_mode_failed(
        void *data,
        struct ::zwp_fullscreen_shell_mode_feedback_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<zwp_fullscreen_shell_mode_feedback_v1 *>(data)->zwp_fullscreen_shell_mode_feedback_v1_mode_failed();
    }

    void zwp_fullscreen_shell_mode_feedback_v1::zwp_fullscreen_shell_mode_feedback_v1_present_cancelled()
    {
    }

    void zwp_fullscreen_shell_mode_feedback_v1::handle_present_cancelled(
        void *data,
        struct ::zwp_fullscreen_shell_mode_feedback_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<zwp_fullscreen_shell_mode_feedback_v1 *>(data)->zwp_fullscreen_shell_mode_feedback_v1_present_cancelled();
    }

    const struct zwp_fullscreen_shell_mode_feedback_v1_listener zwp_fullscreen_shell_mode_feedback_v1::m_zwp_fullscreen_shell_mode_feedback_v1_listener = {
        zwp_fullscreen_shell_mode_feedback_v1::handle_mode_successful,
        zwp_fullscreen_shell_mode_feedback_v1::handle_mode_failed,
        zwp_fullscreen_shell_mode_feedback_v1::handle_present_cancelled,
    };

    void zwp_fullscreen_shell_mode_feedback_v1::init_listener()
    {
        zwp_fullscreen_shell_mode_feedback_v1_add_listener(m_zwp_fullscreen_shell_mode_feedback_v1, &m_zwp_fullscreen_shell_mode_feedback_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
