forked from tetzank/qmenu_hud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgtkmenutypes.cpp
54 lines (47 loc) · 1.54 KB
/
gtkmenutypes.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "gtkmenutypes.h"
#include <QDBusArgument>
#include <QDBusMetaType>
QDBusArgument &operator<<(QDBusArgument &argument, const GtkMenuEntry &item){
argument.beginStructure();
argument << item.first << item.second << item.entry;
argument.endStructure();
return argument;
}
const QDBusArgument &operator>>(const QDBusArgument &argument, GtkMenuEntry &item){
argument.beginStructure();
argument >> item.first >> item.second >> item.entry;
argument.endStructure();
return argument;
}
QDBusArgument& operator<<(QDBusArgument &argument, const SimplePair &item){
argument.beginStructure();
argument << item.first << item.second;
argument.endStructure();
return argument;
}
const QDBusArgument& operator>>(const QDBusArgument& argument, SimplePair& item){
argument.beginStructure();
argument >> item.first >> item.second;
argument.endStructure();
return argument;
}
QDBusArgument& operator<<(QDBusArgument &argument, const GtkMenuDesc &item){
argument.beginStructure();
argument << item.enabled << item.sig << item.props;
argument.endStructure();
return argument;
}
const QDBusArgument& operator>>(const QDBusArgument &argument, GtkMenuDesc &item){
argument.beginStructure();
argument >> item.enabled >> item.sig >> item.props;
argument.endStructure();
return argument;
}
void GtkMenuTypes_register(){
qDBusRegisterMetaType<SillyList>();
qDBusRegisterMetaType<GtkMenuEntry>();
qDBusRegisterMetaType<GtkMenuEntryList>();
qDBusRegisterMetaType<SimplePair>();
qDBusRegisterMetaType<GtkMenuDesc>();
qDBusRegisterMetaType<GtkMenuDescMap>();
}