// This file was generated by qtwaylandscanner
// source file is /usr/share/plasma-wayland-protocols/server-decoration-palette.xml

#include "qwayland-server-decoration-palette.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
}

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

    org_kde_kwin_server_decoration_palette_manager::org_kde_kwin_server_decoration_palette_manager(struct ::org_kde_kwin_server_decoration_palette_manager *obj)
        : m_org_kde_kwin_server_decoration_palette_manager(obj)
    {
    }

    org_kde_kwin_server_decoration_palette_manager::org_kde_kwin_server_decoration_palette_manager()
        : m_org_kde_kwin_server_decoration_palette_manager(nullptr)
    {
    }

    org_kde_kwin_server_decoration_palette_manager::~org_kde_kwin_server_decoration_palette_manager()
    {
    }

    void org_kde_kwin_server_decoration_palette_manager::init(struct ::wl_registry *registry, int id, int version)
    {
        m_org_kde_kwin_server_decoration_palette_manager = static_cast<struct ::org_kde_kwin_server_decoration_palette_manager *>(wlRegistryBind(registry, id, &org_kde_kwin_server_decoration_palette_manager_interface, version));
    }

    void org_kde_kwin_server_decoration_palette_manager::init(struct ::org_kde_kwin_server_decoration_palette_manager *obj)
    {
        m_org_kde_kwin_server_decoration_palette_manager = obj;
    }

    org_kde_kwin_server_decoration_palette_manager *org_kde_kwin_server_decoration_palette_manager::fromObject(struct ::org_kde_kwin_server_decoration_palette_manager *object)
    {
        return static_cast<org_kde_kwin_server_decoration_palette_manager *>(org_kde_kwin_server_decoration_palette_manager_get_user_data(object));
    }

    bool org_kde_kwin_server_decoration_palette_manager::isInitialized() const
    {
        return m_org_kde_kwin_server_decoration_palette_manager != nullptr;
    }

    const struct wl_interface *org_kde_kwin_server_decoration_palette_manager::interface()
    {
        return &::org_kde_kwin_server_decoration_palette_manager_interface;
    }

    struct ::org_kde_kwin_server_decoration_palette *org_kde_kwin_server_decoration_palette_manager::create(struct ::wl_surface *surface)
    {
        return org_kde_kwin_server_decoration_palette_manager_create(
            m_org_kde_kwin_server_decoration_palette_manager,
            surface);
    }

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

    org_kde_kwin_server_decoration_palette::org_kde_kwin_server_decoration_palette(struct ::org_kde_kwin_server_decoration_palette *obj)
        : m_org_kde_kwin_server_decoration_palette(obj)
    {
    }

    org_kde_kwin_server_decoration_palette::org_kde_kwin_server_decoration_palette()
        : m_org_kde_kwin_server_decoration_palette(nullptr)
    {
    }

    org_kde_kwin_server_decoration_palette::~org_kde_kwin_server_decoration_palette()
    {
    }

    void org_kde_kwin_server_decoration_palette::init(struct ::wl_registry *registry, int id, int version)
    {
        m_org_kde_kwin_server_decoration_palette = static_cast<struct ::org_kde_kwin_server_decoration_palette *>(wlRegistryBind(registry, id, &org_kde_kwin_server_decoration_palette_interface, version));
    }

    void org_kde_kwin_server_decoration_palette::init(struct ::org_kde_kwin_server_decoration_palette *obj)
    {
        m_org_kde_kwin_server_decoration_palette = obj;
    }

    org_kde_kwin_server_decoration_palette *org_kde_kwin_server_decoration_palette::fromObject(struct ::org_kde_kwin_server_decoration_palette *object)
    {
        return static_cast<org_kde_kwin_server_decoration_palette *>(org_kde_kwin_server_decoration_palette_get_user_data(object));
    }

    bool org_kde_kwin_server_decoration_palette::isInitialized() const
    {
        return m_org_kde_kwin_server_decoration_palette != nullptr;
    }

    const struct wl_interface *org_kde_kwin_server_decoration_palette::interface()
    {
        return &::org_kde_kwin_server_decoration_palette_interface;
    }

    void org_kde_kwin_server_decoration_palette::set_palette(const QString &palette)
    {
        org_kde_kwin_server_decoration_palette_set_palette(
            m_org_kde_kwin_server_decoration_palette,
            palette.toUtf8().constData());
    }

    void org_kde_kwin_server_decoration_palette::release()
    {
        org_kde_kwin_server_decoration_palette_release(
            m_org_kde_kwin_server_decoration_palette);
        m_org_kde_kwin_server_decoration_palette = nullptr;
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
