// This file was generated by qtwaylandscanner
// source file is plugin-manager-v1.xml

#include "qwayland-plugin-manager-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);
}

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

    plugin_manager_v1::plugin_manager_v1(struct ::plugin_manager_v1 *obj)
        : m_plugin_manager_v1(obj)
    {
        init_listener();
    }

    plugin_manager_v1::plugin_manager_v1()
        : m_plugin_manager_v1(nullptr)
    {
    }

    plugin_manager_v1::~plugin_manager_v1()
    {
    }

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

    void plugin_manager_v1::init(struct ::plugin_manager_v1 *obj)
    {
        m_plugin_manager_v1 = obj;
        init_listener();
    }

    plugin_manager_v1 *plugin_manager_v1::fromObject(struct ::plugin_manager_v1 *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_plugin_manager_v1_listener)
            return nullptr;
        return static_cast<plugin_manager_v1 *>(plugin_manager_v1_get_user_data(object));
    }

    bool plugin_manager_v1::isInitialized() const
    {
        return m_plugin_manager_v1 != nullptr;
    }

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

    const struct wl_interface *plugin_manager_v1::interface()
    {
        return &::plugin_manager_v1_interface;
    }

    void plugin_manager_v1::destroy()
    {
        ::plugin_manager_v1_destroy(
            m_plugin_manager_v1);
        m_plugin_manager_v1 = nullptr;
    }

    void plugin_manager_v1::request_message(const QString &plugin_id, const QString &item_key, const QString &msg)
    {
        ::plugin_manager_v1_request_message(
            m_plugin_manager_v1,
            plugin_id.toUtf8().constData(),
            item_key.toUtf8().constData(),
            msg.toUtf8().constData());
    }

    struct ::plugin_popup *plugin_manager_v1::create_popup_at(const QString &plugin_id, const QString &item_key, int32_t type, int32_t x, int32_t y, struct ::wl_surface *surface)
    {
        struct ::plugin_popup * id = ::plugin_manager_v1_create_popup_at(
            m_plugin_manager_v1,
            plugin_id.toUtf8().constData(),
            item_key.toUtf8().constData(),
            type,
            x,
            y,
            surface);
        return id;
    }

    struct ::plugin *plugin_manager_v1::create_plugin(const QString &plugin_id, const QString &item_key, const QString &display_name, int32_t plugin_flags, int32_t type, int32_t size_policy, struct ::wl_surface *surface)
    {
        struct ::plugin * id = ::plugin_manager_v1_create_plugin(
            m_plugin_manager_v1,
            plugin_id.toUtf8().constData(),
            item_key.toUtf8().constData(),
            display_name.toUtf8().constData(),
            plugin_flags,
            type,
            size_policy,
            surface);
        return id;
    }

    struct ::wl_callback *plugin_manager_v1::move_xembed_window(uint32_t xembed_winid, const QString &plugin_id, const QString &item_key)
    {
        struct ::wl_callback * callback = ::plugin_manager_v1_move_xembed_window(
            m_plugin_manager_v1,
            xembed_winid,
            plugin_id.toUtf8().constData(),
            item_key.toUtf8().constData());
        return callback;
    }

    void plugin_manager_v1::plugin_manager_v1_position_changed(uint32_t )
    {
    }

    void plugin_manager_v1::handle_position_changed(
        void *data,
        struct ::plugin_manager_v1 *object,
        uint32_t dock_position)
    {
        Q_UNUSED(object);
        static_cast<plugin_manager_v1 *>(data)->plugin_manager_v1_position_changed(
            dock_position);
    }

    void plugin_manager_v1::plugin_manager_v1_color_theme_changed(uint32_t )
    {
    }

    void plugin_manager_v1::handle_color_theme_changed(
        void *data,
        struct ::plugin_manager_v1 *object,
        uint32_t dock_color_theme)
    {
        Q_UNUSED(object);
        static_cast<plugin_manager_v1 *>(data)->plugin_manager_v1_color_theme_changed(
            dock_color_theme);
    }

    void plugin_manager_v1::plugin_manager_v1_active_color_changed(const QString &, const QString &)
    {
    }

    void plugin_manager_v1::handle_active_color_changed(
        void *data,
        struct ::plugin_manager_v1 *object,
        const char *active_color,
        const char *dark_active_color)
    {
        Q_UNUSED(object);
        static_cast<plugin_manager_v1 *>(data)->plugin_manager_v1_active_color_changed(
            QString::fromUtf8(active_color),
            QString::fromUtf8(dark_active_color));
    }

    void plugin_manager_v1::plugin_manager_v1_font_changed(const QString &, int32_t )
    {
    }

    void plugin_manager_v1::handle_font_changed(
        void *data,
        struct ::plugin_manager_v1 *object,
        const char *font_name,
        int32_t font_point_size)
    {
        Q_UNUSED(object);
        static_cast<plugin_manager_v1 *>(data)->plugin_manager_v1_font_changed(
            QString::fromUtf8(font_name),
            font_point_size);
    }

    void plugin_manager_v1::plugin_manager_v1_theme_changed(const QString &, const QString &)
    {
    }

    void plugin_manager_v1::handle_theme_changed(
        void *data,
        struct ::plugin_manager_v1 *object,
        const char *theme_name,
        const char *icon_theme_name)
    {
        Q_UNUSED(object);
        static_cast<plugin_manager_v1 *>(data)->plugin_manager_v1_theme_changed(
            QString::fromUtf8(theme_name),
            QString::fromUtf8(icon_theme_name));
    }

    void plugin_manager_v1::plugin_manager_v1_event_message(const QString &)
    {
    }

    void plugin_manager_v1::handle_event_message(
        void *data,
        struct ::plugin_manager_v1 *object,
        const char *msg)
    {
        Q_UNUSED(object);
        static_cast<plugin_manager_v1 *>(data)->plugin_manager_v1_event_message(
            QString::fromUtf8(msg));
    }

    const struct plugin_manager_v1_listener plugin_manager_v1::m_plugin_manager_v1_listener = {
        plugin_manager_v1::handle_position_changed,
        plugin_manager_v1::handle_color_theme_changed,
        plugin_manager_v1::handle_active_color_changed,
        plugin_manager_v1::handle_font_changed,
        plugin_manager_v1::handle_theme_changed,
        plugin_manager_v1::handle_event_message,
    };

    void plugin_manager_v1::init_listener()
    {
        plugin_manager_v1_add_listener(m_plugin_manager_v1, &m_plugin_manager_v1_listener, this);
    }

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

    plugin_popup::plugin_popup(struct ::plugin_popup *obj)
        : m_plugin_popup(obj)
    {
        init_listener();
    }

    plugin_popup::plugin_popup()
        : m_plugin_popup(nullptr)
    {
    }

    plugin_popup::~plugin_popup()
    {
    }

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

    void plugin_popup::init(struct ::plugin_popup *obj)
    {
        m_plugin_popup = obj;
        init_listener();
    }

    plugin_popup *plugin_popup::fromObject(struct ::plugin_popup *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_plugin_popup_listener)
            return nullptr;
        return static_cast<plugin_popup *>(plugin_popup_get_user_data(object));
    }

    bool plugin_popup::isInitialized() const
    {
        return m_plugin_popup != nullptr;
    }

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

    const struct wl_interface *plugin_popup::interface()
    {
        return &::plugin_popup_interface;
    }

    void plugin_popup::destroy()
    {
        ::plugin_popup_destroy(
            m_plugin_popup);
        m_plugin_popup = nullptr;
    }

    void plugin_popup::set_position(int32_t x, int32_t y)
    {
        ::plugin_popup_set_position(
            m_plugin_popup,
            x,
            y);
    }

    void plugin_popup::source_size(int32_t width, int32_t height)
    {
        ::plugin_popup_source_size(
            m_plugin_popup,
            width,
            height);
    }

    void plugin_popup::set_cursor(int32_t cursor_shape)
    {
        ::plugin_popup_set_cursor(
            m_plugin_popup,
            cursor_shape);
    }

    void plugin_popup::plugin_popup_close()
    {
    }

    void plugin_popup::handle_close(
        void *data,
        struct ::plugin_popup *object)
    {
        Q_UNUSED(object);
        static_cast<plugin_popup *>(data)->plugin_popup_close();
    }

    void plugin_popup::plugin_popup_geometry(int32_t , int32_t , int32_t , int32_t )
    {
    }

    void plugin_popup::handle_geometry(
        void *data,
        struct ::plugin_popup *object,
        int32_t x,
        int32_t y,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(object);
        static_cast<plugin_popup *>(data)->plugin_popup_geometry(
            x,
            y,
            width,
            height);
    }

    const struct plugin_popup_listener plugin_popup::m_plugin_popup_listener = {
        plugin_popup::handle_close,
        plugin_popup::handle_geometry,
    };

    void plugin_popup::init_listener()
    {
        plugin_popup_add_listener(m_plugin_popup, &m_plugin_popup_listener, this);
    }

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

    plugin::plugin(struct ::plugin *obj)
        : m_plugin(obj)
    {
        init_listener();
    }

    plugin::plugin()
        : m_plugin(nullptr)
    {
    }

    plugin::~plugin()
    {
    }

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

    void plugin::init(struct ::plugin *obj)
    {
        m_plugin = obj;
        init_listener();
    }

    plugin *plugin::fromObject(struct ::plugin *object)
    {
        if (wl_proxy_get_listener((struct ::wl_proxy *)object) != (void *)&m_plugin_listener)
            return nullptr;
        return static_cast<plugin *>(plugin_get_user_data(object));
    }

    bool plugin::isInitialized() const
    {
        return m_plugin != nullptr;
    }

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

    const struct wl_interface *plugin::interface()
    {
        return &::plugin_interface;
    }

    void plugin::destroy()
    {
        ::plugin_destroy(
            m_plugin);
        m_plugin = nullptr;
    }

    void plugin::mouse_event(int32_t type)
    {
        ::plugin_mouse_event(
            m_plugin,
            type);
    }

    void plugin::dcc_icon(const QString &type)
    {
        ::plugin_dcc_icon(
            m_plugin,
            type.toUtf8().constData());
    }

    void plugin::request_shutdown(const QString &type)
    {
        ::plugin_request_shutdown(
            m_plugin,
            type.toUtf8().constData());
    }

    void plugin::source_size(int32_t width, int32_t height)
    {
        ::plugin_source_size(
            m_plugin,
            width,
            height);
    }

    void plugin::close_quick_panel()
    {
        ::plugin_close_quick_panel(
            m_plugin);
    }

    void plugin::plugin_close()
    {
    }

    void plugin::handle_close(
        void *data,
        struct ::plugin *object)
    {
        Q_UNUSED(object);
        static_cast<plugin *>(data)->plugin_close();
    }

    void plugin::plugin_geometry(int32_t , int32_t , int32_t , int32_t )
    {
    }

    void plugin::handle_geometry(
        void *data,
        struct ::plugin *object,
        int32_t x,
        int32_t y,
        int32_t width,
        int32_t height)
    {
        Q_UNUSED(object);
        static_cast<plugin *>(data)->plugin_geometry(
            x,
            y,
            width,
            height);
    }

    void plugin::plugin_margin(int32_t )
    {
    }

    void plugin::handle_margin(
        void *data,
        struct ::plugin *object,
        int32_t spacing)
    {
        Q_UNUSED(object);
        static_cast<plugin *>(data)->plugin_margin(
            spacing);
    }

    void plugin::plugin_raw_global_pos(int32_t , int32_t )
    {
    }

    void plugin::handle_raw_global_pos(
        void *data,
        struct ::plugin *object,
        int32_t x,
        int32_t y)
    {
        Q_UNUSED(object);
        static_cast<plugin *>(data)->plugin_raw_global_pos(
            x,
            y);
    }

    const struct plugin_listener plugin::m_plugin_listener = {
        plugin::handle_close,
        plugin::handle_geometry,
        plugin::handle_margin,
        plugin::handle_raw_global_pos,
    };

    void plugin::init_listener()
    {
        plugin_add_listener(m_plugin, &m_plugin_listener, this);
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
