// This file was generated by qtwaylandscanner
// source file is /usr/share/plasma-wayland-protocols/kde-output-management-v2.xml

#include "qwayland-kde-output-management-v2.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;
#if (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR > 10) || WAYLAND_VERSION_MAJOR > 1
    return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,
        bindOpCode, interface, version, name, interface->name, version, nullptr);
#else
    return (void *) wl_proxy_marshal_constructor((struct wl_proxy *) registry,
        bindOpCode, interface, name, interface->name, version, nullptr);
#endif
}

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

    kde_output_management_v2::kde_output_management_v2(struct ::kde_output_management_v2 *obj)
        : m_kde_output_management_v2(obj)
    {
    }

    kde_output_management_v2::kde_output_management_v2()
        : m_kde_output_management_v2(nullptr)
    {
    }

    kde_output_management_v2::~kde_output_management_v2()
    {
    }

    void kde_output_management_v2::init(struct ::wl_registry *registry, int id, int version)
    {
        m_kde_output_management_v2 = static_cast<struct ::kde_output_management_v2 *>(wlRegistryBind(registry, id, &kde_output_management_v2_interface, version));
    }

    void kde_output_management_v2::init(struct ::kde_output_management_v2 *obj)
    {
        m_kde_output_management_v2 = obj;
    }

    kde_output_management_v2 *kde_output_management_v2::fromObject(struct ::kde_output_management_v2 *object)
    {
        return static_cast<kde_output_management_v2 *>(kde_output_management_v2_get_user_data(object));
    }

    bool kde_output_management_v2::isInitialized() const
    {
        return m_kde_output_management_v2 != nullptr;
    }

    const struct wl_interface *kde_output_management_v2::interface()
    {
        return &::kde_output_management_v2_interface;
    }

    struct ::kde_output_configuration_v2 *kde_output_management_v2::create_configuration()
    {
        return kde_output_management_v2_create_configuration(
            m_kde_output_management_v2);
    }

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

    kde_output_configuration_v2::kde_output_configuration_v2(struct ::kde_output_configuration_v2 *obj)
        : m_kde_output_configuration_v2(obj)
    {
        init_listener();
    }

    kde_output_configuration_v2::kde_output_configuration_v2()
        : m_kde_output_configuration_v2(nullptr)
    {
    }

    kde_output_configuration_v2::~kde_output_configuration_v2()
    {
    }

    void kde_output_configuration_v2::init(struct ::wl_registry *registry, int id, int version)
    {
        m_kde_output_configuration_v2 = static_cast<struct ::kde_output_configuration_v2 *>(wlRegistryBind(registry, id, &kde_output_configuration_v2_interface, version));
        init_listener();
    }

    void kde_output_configuration_v2::init(struct ::kde_output_configuration_v2 *obj)
    {
        m_kde_output_configuration_v2 = obj;
        init_listener();
    }

    kde_output_configuration_v2 *kde_output_configuration_v2::fromObject(struct ::kde_output_configuration_v2 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_kde_output_configuration_v2_listener)
            return nullptr;
        return static_cast<kde_output_configuration_v2 *>(kde_output_configuration_v2_get_user_data(object));
    }

    bool kde_output_configuration_v2::isInitialized() const
    {
        return m_kde_output_configuration_v2 != nullptr;
    }

    const struct wl_interface *kde_output_configuration_v2::interface()
    {
        return &::kde_output_configuration_v2_interface;
    }

    void kde_output_configuration_v2::enable(struct ::kde_output_device_v2 *outputdevice, int32_t enable)
    {
        kde_output_configuration_v2_enable(
            m_kde_output_configuration_v2,
            outputdevice,
            enable);
    }

    void kde_output_configuration_v2::mode(struct ::kde_output_device_v2 *outputdevice, struct ::kde_output_device_mode_v2 *mode)
    {
        kde_output_configuration_v2_mode(
            m_kde_output_configuration_v2,
            outputdevice,
            mode);
    }

    void kde_output_configuration_v2::transform(struct ::kde_output_device_v2 *outputdevice, int32_t transform)
    {
        kde_output_configuration_v2_transform(
            m_kde_output_configuration_v2,
            outputdevice,
            transform);
    }

    void kde_output_configuration_v2::position(struct ::kde_output_device_v2 *outputdevice, int32_t x, int32_t y)
    {
        kde_output_configuration_v2_position(
            m_kde_output_configuration_v2,
            outputdevice,
            x,
            y);
    }

    void kde_output_configuration_v2::scale(struct ::kde_output_device_v2 *outputdevice, wl_fixed_t scale)
    {
        kde_output_configuration_v2_scale(
            m_kde_output_configuration_v2,
            outputdevice,
            scale);
    }

    void kde_output_configuration_v2::apply()
    {
        kde_output_configuration_v2_apply(
            m_kde_output_configuration_v2);
    }

    void kde_output_configuration_v2::destroy()
    {
        kde_output_configuration_v2_destroy(
            m_kde_output_configuration_v2);
        m_kde_output_configuration_v2 = nullptr;
    }

    void kde_output_configuration_v2::overscan(struct ::kde_output_device_v2 *outputdevice, uint32_t overscan)
    {
        kde_output_configuration_v2_overscan(
            m_kde_output_configuration_v2,
            outputdevice,
            overscan);
    }

    void kde_output_configuration_v2::set_vrr_policy(struct ::kde_output_device_v2 *outputdevice, uint32_t policy)
    {
        kde_output_configuration_v2_set_vrr_policy(
            m_kde_output_configuration_v2,
            outputdevice,
            policy);
    }

    void kde_output_configuration_v2::set_rgb_range(struct ::kde_output_device_v2 *outputdevice, uint32_t rgb_range)
    {
        kde_output_configuration_v2_set_rgb_range(
            m_kde_output_configuration_v2,
            outputdevice,
            rgb_range);
    }

    void kde_output_configuration_v2::set_primary_output(struct ::kde_output_device_v2 *output)
    {
        kde_output_configuration_v2_set_primary_output(
            m_kde_output_configuration_v2,
            output);
    }

    void kde_output_configuration_v2::kde_output_configuration_v2_applied()
    {
    }

    void kde_output_configuration_v2::handle_applied(
        void *data,
        struct ::kde_output_configuration_v2 *object)
    {
        Q_UNUSED(object);
        static_cast<kde_output_configuration_v2 *>(data)->kde_output_configuration_v2_applied();
    }

    void kde_output_configuration_v2::kde_output_configuration_v2_failed()
    {
    }

    void kde_output_configuration_v2::handle_failed(
        void *data,
        struct ::kde_output_configuration_v2 *object)
    {
        Q_UNUSED(object);
        static_cast<kde_output_configuration_v2 *>(data)->kde_output_configuration_v2_failed();
    }

    const struct kde_output_configuration_v2_listener kde_output_configuration_v2::m_kde_output_configuration_v2_listener = {
        kde_output_configuration_v2::handle_applied,
        kde_output_configuration_v2::handle_failed,
    };

    void kde_output_configuration_v2::init_listener()
    {
        kde_output_configuration_v2_add_listener(m_kde_output_configuration_v2, &m_kde_output_configuration_v2_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
