// This file was generated by qtwaylandscanner
// source file is hyprland-focus-grab-v1.xml

#include "qwayland-hyprland-focus-grab-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);
}

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

    hyprland_focus_grab_manager_v1::hyprland_focus_grab_manager_v1(struct ::hyprland_focus_grab_manager_v1 *obj)
        : m_hyprland_focus_grab_manager_v1(obj)
    {
    }

    hyprland_focus_grab_manager_v1::hyprland_focus_grab_manager_v1()
        : m_hyprland_focus_grab_manager_v1(nullptr)
    {
    }

    hyprland_focus_grab_manager_v1::~hyprland_focus_grab_manager_v1()
    {
    }

    void hyprland_focus_grab_manager_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_hyprland_focus_grab_manager_v1 = static_cast<struct ::hyprland_focus_grab_manager_v1 *>(wlRegistryBind(registry, id, &hyprland_focus_grab_manager_v1_interface, version));
    }

    void hyprland_focus_grab_manager_v1::init(struct ::hyprland_focus_grab_manager_v1 *obj)
    {
        m_hyprland_focus_grab_manager_v1 = obj;
    }

    hyprland_focus_grab_manager_v1 *hyprland_focus_grab_manager_v1::fromObject(struct ::hyprland_focus_grab_manager_v1 *object)
    {
        return static_cast<hyprland_focus_grab_manager_v1 *>(hyprland_focus_grab_manager_v1_get_user_data(object));
    }

    bool hyprland_focus_grab_manager_v1::isInitialized() const
    {
        return m_hyprland_focus_grab_manager_v1 != nullptr;
    }

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

    const struct wl_interface *hyprland_focus_grab_manager_v1::interface()
    {
        return &::hyprland_focus_grab_manager_v1_interface;
    }

    struct ::hyprland_focus_grab_v1 *hyprland_focus_grab_manager_v1::create_grab()
    {
        struct ::hyprland_focus_grab_v1 * grab = ::hyprland_focus_grab_manager_v1_create_grab(
            m_hyprland_focus_grab_manager_v1);
        return grab;
    }

    void hyprland_focus_grab_manager_v1::destroy()
    {
        ::hyprland_focus_grab_manager_v1_destroy(
            m_hyprland_focus_grab_manager_v1);
        m_hyprland_focus_grab_manager_v1 = nullptr;
    }

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

    hyprland_focus_grab_v1::hyprland_focus_grab_v1(struct ::hyprland_focus_grab_v1 *obj)
        : m_hyprland_focus_grab_v1(obj)
    {
        init_listener();
    }

    hyprland_focus_grab_v1::hyprland_focus_grab_v1()
        : m_hyprland_focus_grab_v1(nullptr)
    {
    }

    hyprland_focus_grab_v1::~hyprland_focus_grab_v1()
    {
    }

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

    void hyprland_focus_grab_v1::init(struct ::hyprland_focus_grab_v1 *obj)
    {
        m_hyprland_focus_grab_v1 = obj;
        init_listener();
    }

    hyprland_focus_grab_v1 *hyprland_focus_grab_v1::fromObject(struct ::hyprland_focus_grab_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_hyprland_focus_grab_v1_listener)
            return nullptr;
        return static_cast<hyprland_focus_grab_v1 *>(hyprland_focus_grab_v1_get_user_data(object));
    }

    bool hyprland_focus_grab_v1::isInitialized() const
    {
        return m_hyprland_focus_grab_v1 != nullptr;
    }

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

    const struct wl_interface *hyprland_focus_grab_v1::interface()
    {
        return &::hyprland_focus_grab_v1_interface;
    }

    void hyprland_focus_grab_v1::add_surface(struct ::wl_surface *surface)
    {
        ::hyprland_focus_grab_v1_add_surface(
            m_hyprland_focus_grab_v1,
            surface);
    }

    void hyprland_focus_grab_v1::remove_surface(struct ::wl_surface *surface)
    {
        ::hyprland_focus_grab_v1_remove_surface(
            m_hyprland_focus_grab_v1,
            surface);
    }

    void hyprland_focus_grab_v1::commit()
    {
        ::hyprland_focus_grab_v1_commit(
            m_hyprland_focus_grab_v1);
    }

    void hyprland_focus_grab_v1::destroy()
    {
        ::hyprland_focus_grab_v1_destroy(
            m_hyprland_focus_grab_v1);
        m_hyprland_focus_grab_v1 = nullptr;
    }

    void hyprland_focus_grab_v1::hyprland_focus_grab_v1_cleared()
    {
    }

    void hyprland_focus_grab_v1::handle_cleared(
        void *data,
        struct ::hyprland_focus_grab_v1 *object)
    {
        Q_UNUSED(object);
        static_cast<hyprland_focus_grab_v1 *>(data)->hyprland_focus_grab_v1_cleared();
    }

    const struct hyprland_focus_grab_v1_listener hyprland_focus_grab_v1::m_hyprland_focus_grab_v1_listener = {
        hyprland_focus_grab_v1::handle_cleared,
    };

    void hyprland_focus_grab_v1::init_listener()
    {
        hyprland_focus_grab_v1_add_listener(m_hyprland_focus_grab_v1, &m_hyprland_focus_grab_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
