// This file was generated by qtwaylandscanner
// source file is kde-external-brightness-v1.xml

#include "qwayland-kde-external-brightness-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);
}

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

    kde_external_brightness_v1::kde_external_brightness_v1(struct ::kde_external_brightness_v1 *obj)
        : m_kde_external_brightness_v1(obj)
    {
    }

    kde_external_brightness_v1::kde_external_brightness_v1()
        : m_kde_external_brightness_v1(nullptr)
    {
    }

    kde_external_brightness_v1::~kde_external_brightness_v1()
    {
    }

    void kde_external_brightness_v1::init(struct ::wl_registry *registry, uint32_t id, int version)
    {
        m_kde_external_brightness_v1 = static_cast<struct ::kde_external_brightness_v1 *>(wlRegistryBind(registry, id, &kde_external_brightness_v1_interface, version));
    }

    void kde_external_brightness_v1::init(struct ::kde_external_brightness_v1 *obj)
    {
        m_kde_external_brightness_v1 = obj;
    }

    kde_external_brightness_v1 *kde_external_brightness_v1::fromObject(struct ::kde_external_brightness_v1 *object)
    {
        return static_cast<kde_external_brightness_v1 *>(kde_external_brightness_v1_get_user_data(object));
    }

    bool kde_external_brightness_v1::isInitialized() const
    {
        return m_kde_external_brightness_v1 != nullptr;
    }

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

    const struct wl_interface *kde_external_brightness_v1::interface()
    {
        return &::kde_external_brightness_v1_interface;
    }

    void kde_external_brightness_v1::destroy()
    {
        ::kde_external_brightness_v1_destroy(
            m_kde_external_brightness_v1);
        m_kde_external_brightness_v1 = nullptr;
    }

    struct ::kde_external_brightness_device_v1 *kde_external_brightness_v1::create_brightness_control()
    {
        struct ::kde_external_brightness_device_v1 * id = ::kde_external_brightness_v1_create_brightness_control(
            m_kde_external_brightness_v1);
        return id;
    }

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

    kde_external_brightness_device_v1::kde_external_brightness_device_v1(struct ::kde_external_brightness_device_v1 *obj)
        : m_kde_external_brightness_device_v1(obj)
    {
        init_listener();
    }

    kde_external_brightness_device_v1::kde_external_brightness_device_v1()
        : m_kde_external_brightness_device_v1(nullptr)
    {
    }

    kde_external_brightness_device_v1::~kde_external_brightness_device_v1()
    {
    }

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

    void kde_external_brightness_device_v1::init(struct ::kde_external_brightness_device_v1 *obj)
    {
        m_kde_external_brightness_device_v1 = obj;
        init_listener();
    }

    kde_external_brightness_device_v1 *kde_external_brightness_device_v1::fromObject(struct ::kde_external_brightness_device_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_kde_external_brightness_device_v1_listener)
            return nullptr;
        return static_cast<kde_external_brightness_device_v1 *>(kde_external_brightness_device_v1_get_user_data(object));
    }

    bool kde_external_brightness_device_v1::isInitialized() const
    {
        return m_kde_external_brightness_device_v1 != nullptr;
    }

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

    const struct wl_interface *kde_external_brightness_device_v1::interface()
    {
        return &::kde_external_brightness_device_v1_interface;
    }

    void kde_external_brightness_device_v1::destroy()
    {
        ::kde_external_brightness_device_v1_destroy(
            m_kde_external_brightness_device_v1);
        m_kde_external_brightness_device_v1 = nullptr;
    }

    void kde_external_brightness_device_v1::set_internal(uint32_t internal)
    {
        ::kde_external_brightness_device_v1_set_internal(
            m_kde_external_brightness_device_v1,
            internal);
    }

    void kde_external_brightness_device_v1::set_edid(const QString &string)
    {
        ::kde_external_brightness_device_v1_set_edid(
            m_kde_external_brightness_device_v1,
            string.toUtf8().constData());
    }

    void kde_external_brightness_device_v1::set_max_brightness(uint32_t value)
    {
        ::kde_external_brightness_device_v1_set_max_brightness(
            m_kde_external_brightness_device_v1,
            value);
    }

    void kde_external_brightness_device_v1::commit()
    {
        ::kde_external_brightness_device_v1_commit(
            m_kde_external_brightness_device_v1);
    }

    void kde_external_brightness_device_v1::set_observed_brightness(uint32_t value)
    {
        ::kde_external_brightness_device_v1_set_observed_brightness(
            m_kde_external_brightness_device_v1,
            value);
    }

    void kde_external_brightness_device_v1::set_uses_ddc_ci(uint32_t value)
    {
        ::kde_external_brightness_device_v1_set_uses_ddc_ci(
            m_kde_external_brightness_device_v1,
            value);
    }

    void kde_external_brightness_device_v1::kde_external_brightness_device_v1_requested_brightness(uint32_t )
    {
    }

    void kde_external_brightness_device_v1::handle_requested_brightness(
        void *data,
        struct ::kde_external_brightness_device_v1 *object,
        uint32_t value)
    {
        Q_UNUSED(object);
        static_cast<kde_external_brightness_device_v1 *>(data)->kde_external_brightness_device_v1_requested_brightness(
            value);
    }

    const struct kde_external_brightness_device_v1_listener kde_external_brightness_device_v1::m_kde_external_brightness_device_v1_listener = {
        kde_external_brightness_device_v1::handle_requested_brightness,
    };

    void kde_external_brightness_device_v1::init_listener()
    {
        kde_external_brightness_device_v1_add_listener(m_kde_external_brightness_device_v1, &m_kde_external_brightness_device_v1_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
