void QWaylandWindow::setProperty(const QString &name, const QVariant &value) { m_properties.insert(name, value); QWaylandNativeInterface *nativeInterface = static_cast<QWaylandNativeInterface *>( QGuiApplication::platformNativeInterface()); nativeInterface->emitWindowPropertyChanged(this, name); }
void QWaylandExtendedSurface::updateGenericProperty(const QString &name, const QVariant &value) { QByteArray byteValue; QDataStream ds(&byteValue, QIODevice::WriteOnly); ds << value; update_generic_property(name, byteValue); m_properties.insert(name, value); QWaylandNativeInterface *nativeInterface = static_cast<QWaylandNativeInterface *>( QGuiApplication::platformNativeInterface()); nativeInterface->emitWindowPropertyChanged(m_window, name); }
void QWaylandExtendedSurface::extended_surface_set_generic_property(const QString &name, wl_array *value) { QByteArray data = QByteArray::fromRawData(static_cast<char *>(value->data), value->size); QVariant variantValue; QDataStream ds(data); ds >> variantValue; m_properties.insert(name, variantValue); QWaylandNativeInterface *nativeInterface = static_cast<QWaylandNativeInterface *>( QGuiApplication::platformNativeInterface()); nativeInterface->emitWindowPropertyChanged(m_window, name); }
void QWaylandExtendedSurface::set_generic_property(void *data, wl_extended_surface *wl_extended_surface, const char *name, wl_array *value) { Q_UNUSED(wl_extended_surface); QWaylandExtendedSurface *extended_window = static_cast<QWaylandExtendedSurface *>(data); QVariant variantValue; QByteArray baValue = QByteArray((const char*)value->data, value->size); QDataStream ds(&baValue, QIODevice::ReadOnly); ds >> variantValue; QString qstring_name = QString::fromLatin1(name); extended_window->m_properties.insert(qstring_name,variantValue); QWaylandNativeInterface *nativeInterface = static_cast<QWaylandNativeInterface *>( QGuiApplication::platformNativeInterface()); nativeInterface->emitWindowPropertyChanged(extended_window->m_window,QString::fromLatin1(name)); }
void QWaylandExtendedSurface::updateGenericProperty(const QString &name, const QVariant &value) { QByteArray byteValue; QDataStream ds(&byteValue, QIODevice::WriteOnly); ds << value; struct wl_array data; data.size = byteValue.size(); data.data = (void*)byteValue.constData(); data.alloc = 0; wl_extended_surface_update_generic_property(m_extended_surface,qPrintable(name),&data); m_properties.insert(name,value); QWaylandNativeInterface *nativeInterface = static_cast<QWaylandNativeInterface *>( QGuiApplication::platformNativeInterface()); nativeInterface->emitWindowPropertyChanged(m_window,name); }