// This file was generated by qtwaylandscanner
// source file is idle.xml

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

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

    org_kde_kwin_idle::org_kde_kwin_idle(struct ::org_kde_kwin_idle *obj)
        : m_org_kde_kwin_idle(obj)
    {
    }

    org_kde_kwin_idle::org_kde_kwin_idle()
        : m_org_kde_kwin_idle(nullptr)
    {
    }

    org_kde_kwin_idle::~org_kde_kwin_idle()
    {
    }

    void org_kde_kwin_idle::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_org_kde_kwin_idle = static_cast<struct ::org_kde_kwin_idle *>(wlRegistryBind(registry, id, &org_kde_kwin_idle_interface, version));
    }

    void org_kde_kwin_idle::init(struct ::org_kde_kwin_idle *obj)
    {
        m_org_kde_kwin_idle = obj;
    }

    org_kde_kwin_idle *org_kde_kwin_idle::fromObject(struct ::org_kde_kwin_idle *object)
    {
        return static_cast<org_kde_kwin_idle *>(org_kde_kwin_idle_get_user_data(object));
    }

    bool org_kde_kwin_idle::isInitialized() const
    {
        return m_org_kde_kwin_idle != nullptr;
    }

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

    const struct wl_interface *org_kde_kwin_idle::interface()
    {
        return &::org_kde_kwin_idle_interface;
    }

    struct ::org_kde_kwin_idle_timeout *org_kde_kwin_idle::get_idle_timeout(struct ::wl_seat *seat, uint32_t timeout)
    {
        struct ::org_kde_kwin_idle_timeout * id = ::org_kde_kwin_idle_get_idle_timeout(
            m_org_kde_kwin_idle,
            seat,
            timeout);
        return id;
    }

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

    org_kde_kwin_idle_timeout::org_kde_kwin_idle_timeout(struct ::org_kde_kwin_idle_timeout *obj)
        : m_org_kde_kwin_idle_timeout(obj)
    {
        init_listener();
    }

    org_kde_kwin_idle_timeout::org_kde_kwin_idle_timeout()
        : m_org_kde_kwin_idle_timeout(nullptr)
    {
    }

    org_kde_kwin_idle_timeout::~org_kde_kwin_idle_timeout()
    {
    }

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

    void org_kde_kwin_idle_timeout::init(struct ::org_kde_kwin_idle_timeout *obj)
    {
        m_org_kde_kwin_idle_timeout = obj;
        init_listener();
    }

    org_kde_kwin_idle_timeout *org_kde_kwin_idle_timeout::fromObject(struct ::org_kde_kwin_idle_timeout *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_org_kde_kwin_idle_timeout_listener)
            return nullptr;
        return static_cast<org_kde_kwin_idle_timeout *>(org_kde_kwin_idle_timeout_get_user_data(object));
    }

    bool org_kde_kwin_idle_timeout::isInitialized() const
    {
        return m_org_kde_kwin_idle_timeout != nullptr;
    }

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

    const struct wl_interface *org_kde_kwin_idle_timeout::interface()
    {
        return &::org_kde_kwin_idle_timeout_interface;
    }

    void org_kde_kwin_idle_timeout::release()
    {
        ::org_kde_kwin_idle_timeout_release(
            m_org_kde_kwin_idle_timeout);
        m_org_kde_kwin_idle_timeout = nullptr;
    }

    void org_kde_kwin_idle_timeout::simulate_user_activity()
    {
        ::org_kde_kwin_idle_timeout_simulate_user_activity(
            m_org_kde_kwin_idle_timeout);
    }

    void org_kde_kwin_idle_timeout::org_kde_kwin_idle_timeout_idle()
    {
    }

    void org_kde_kwin_idle_timeout::handle_idle(
        void *data,
        struct ::org_kde_kwin_idle_timeout *object)
    {
        Q_UNUSED(object);
        static_cast<org_kde_kwin_idle_timeout *>(data)->org_kde_kwin_idle_timeout_idle();
    }

    void org_kde_kwin_idle_timeout::org_kde_kwin_idle_timeout_resumed()
    {
    }

    void org_kde_kwin_idle_timeout::handle_resumed(
        void *data,
        struct ::org_kde_kwin_idle_timeout *object)
    {
        Q_UNUSED(object);
        static_cast<org_kde_kwin_idle_timeout *>(data)->org_kde_kwin_idle_timeout_resumed();
    }

    const struct org_kde_kwin_idle_timeout_listener org_kde_kwin_idle_timeout::m_org_kde_kwin_idle_timeout_listener = {
        org_kde_kwin_idle_timeout::handle_idle,
        org_kde_kwin_idle_timeout::handle_resumed,
    };

    void org_kde_kwin_idle_timeout::init_listener()
    {
        org_kde_kwin_idle_timeout_add_listener(m_org_kde_kwin_idle_timeout, &m_org_kde_kwin_idle_timeout_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
