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

#include "qwayland-appmenu.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_appmenu_manager::org_kde_kwin_appmenu_manager(struct ::wl_registry *registry, int id, int version)
    {
        init(registry, id, version);
    }

    org_kde_kwin_appmenu_manager::org_kde_kwin_appmenu_manager(struct ::org_kde_kwin_appmenu_manager *obj)
        : m_org_kde_kwin_appmenu_manager(obj)
    {
    }

    org_kde_kwin_appmenu_manager::org_kde_kwin_appmenu_manager()
        : m_org_kde_kwin_appmenu_manager(nullptr)
    {
    }

    org_kde_kwin_appmenu_manager::~org_kde_kwin_appmenu_manager()
    {
    }

    void org_kde_kwin_appmenu_manager::init(struct ::wl_registry *registry, int id, int version)
    {
        m_org_kde_kwin_appmenu_manager = static_cast<struct ::org_kde_kwin_appmenu_manager *>(wlRegistryBind(registry, id, &org_kde_kwin_appmenu_manager_interface, version));
    }

    void org_kde_kwin_appmenu_manager::init(struct ::org_kde_kwin_appmenu_manager *obj)
    {
        m_org_kde_kwin_appmenu_manager = obj;
    }

    org_kde_kwin_appmenu_manager *org_kde_kwin_appmenu_manager::fromObject(struct ::org_kde_kwin_appmenu_manager *object)
    {
        return static_cast<org_kde_kwin_appmenu_manager *>(org_kde_kwin_appmenu_manager_get_user_data(object));
    }

    bool org_kde_kwin_appmenu_manager::isInitialized() const
    {
        return m_org_kde_kwin_appmenu_manager != nullptr;
    }

    const struct wl_interface *org_kde_kwin_appmenu_manager::interface()
    {
        return &::org_kde_kwin_appmenu_manager_interface;
    }

    struct ::org_kde_kwin_appmenu *org_kde_kwin_appmenu_manager::create(struct ::wl_surface *surface)
    {
        return org_kde_kwin_appmenu_manager_create(
            m_org_kde_kwin_appmenu_manager,
            surface);
    }

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

    org_kde_kwin_appmenu::org_kde_kwin_appmenu(struct ::org_kde_kwin_appmenu *obj)
        : m_org_kde_kwin_appmenu(obj)
    {
    }

    org_kde_kwin_appmenu::org_kde_kwin_appmenu()
        : m_org_kde_kwin_appmenu(nullptr)
    {
    }

    org_kde_kwin_appmenu::~org_kde_kwin_appmenu()
    {
    }

    void org_kde_kwin_appmenu::init(struct ::wl_registry *registry, int id, int version)
    {
        m_org_kde_kwin_appmenu = static_cast<struct ::org_kde_kwin_appmenu *>(wlRegistryBind(registry, id, &org_kde_kwin_appmenu_interface, version));
    }

    void org_kde_kwin_appmenu::init(struct ::org_kde_kwin_appmenu *obj)
    {
        m_org_kde_kwin_appmenu = obj;
    }

    org_kde_kwin_appmenu *org_kde_kwin_appmenu::fromObject(struct ::org_kde_kwin_appmenu *object)
    {
        return static_cast<org_kde_kwin_appmenu *>(org_kde_kwin_appmenu_get_user_data(object));
    }

    bool org_kde_kwin_appmenu::isInitialized() const
    {
        return m_org_kde_kwin_appmenu != nullptr;
    }

    const struct wl_interface *org_kde_kwin_appmenu::interface()
    {
        return &::org_kde_kwin_appmenu_interface;
    }

    void org_kde_kwin_appmenu::set_address(const QString &service_name, const QString &object_path)
    {
        org_kde_kwin_appmenu_set_address(
            m_org_kde_kwin_appmenu,
            service_name.toUtf8().constData(),
            object_path.toUtf8().constData());
    }

    void org_kde_kwin_appmenu::release()
    {
        org_kde_kwin_appmenu_release(
            m_org_kde_kwin_appmenu);
        m_org_kde_kwin_appmenu = nullptr;
    }
}

QT_WARNING_POP
QT_END_NAMESPACE
