mirror of https://github.com/cutefishos/dock
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
#include "dbustypes.h"
|
|
|
|
// Marshall the IconPixmap data into a D-Bus argument
|
|
QDBusArgument &operator<<(QDBusArgument &argument, const IconPixmap &icon)
|
|
{
|
|
argument.beginStructure();
|
|
argument << icon.width;
|
|
argument << icon.height;
|
|
argument << icon.bytes;
|
|
argument.endStructure();
|
|
return argument;
|
|
}
|
|
|
|
// Retrieve the ImageStruct data from the D-Bus argument
|
|
const QDBusArgument &operator>>(const QDBusArgument &argument, IconPixmap &icon)
|
|
{
|
|
argument.beginStructure();
|
|
argument >> icon.width;
|
|
argument >> icon.height;
|
|
argument >> icon.bytes;
|
|
argument.endStructure();
|
|
return argument;
|
|
}
|
|
|
|
// Marshall the ToolTip data into a D-Bus argument
|
|
QDBusArgument &operator<<(QDBusArgument &argument, const ToolTip &toolTip)
|
|
{
|
|
argument.beginStructure();
|
|
argument << toolTip.iconName;
|
|
argument << toolTip.iconPixmap;
|
|
argument << toolTip.title;
|
|
argument << toolTip.description;
|
|
argument.endStructure();
|
|
return argument;
|
|
}
|
|
|
|
// Retrieve the ToolTip data from the D-Bus argument
|
|
const QDBusArgument &operator>>(const QDBusArgument &argument, ToolTip &toolTip)
|
|
{
|
|
argument.beginStructure();
|
|
argument >> toolTip.iconName;
|
|
argument >> toolTip.iconPixmap;
|
|
argument >> toolTip.title;
|
|
argument >> toolTip.description;
|
|
argument.endStructure();
|
|
return argument;
|
|
}
|