-
Notifications
You must be signed in to change notification settings - Fork 0
/
oitvar.h
61 lines (52 loc) · 1.57 KB
/
oitvar.h
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
55
56
57
58
59
60
61
#pragma once
#include <QDataStream>
// send to seer
#define SEER_OIT_MSG_W32 6500
#define SEER_OIT_SUB_W32_LOAD_ERR 6501
#define SEER_OIT_SUB_W32_LOAD_OK 6502
#define SEER_OIT_SUB_W32_KEY_PRESS 6503
#define SEER_OIT_SUB_W32_WAGGLE 6504
#define SEER_OIT_SUB_W32_TOAST 6505
// exe return
#define ERR_BAD_ARG (-1)
#define ERR_FILE_NOT_FOUND (-2)
#define ERR_PROCESS (-3)
#define SEER_CLASSNAME "SeerWindowClass"
// json key for msg data
#define SERR_MSG_KEY_WID "window_index"
#define SERR_MSG_KEY_SUB_ID "msg_sub_id"
#define SERR_MSG_KEY_TOAST "toast_text"
//////////////////////////
/// bad idea
#define SEER_OIT_MSG 6000
#define SEER_OIT_SUB_LOAD_ERR 6001
#define SEER_OIT_SUB_LOAD_OK 6002
#define SEER_OIT_SUB_KEY_PRESS 6003
#define SEER_OIT_SUB_WAGGLE 6004
#define SEER_OIT_SUB_TOAST 6005
// msg from seer
// first msg from seer
// then the following three msg will be sent immediately
#define SEER_OIT_ATTACHED 6102
// will be messaged anytime it changed
#define SEER_OIT_SIZE_CHANGED 6101
// will be messaged anytime it changed
#define SEER_OIT_DPI_CHANGED 6100
// only once, no preview window when changing theme setttings
#define SEER_OIT_THEME_CHANGED 6103
struct OITData {
// sub_type -> SEER_OIT_SUB_*
int sub_type = 0;
int wnd_index = 0;
QByteArray data;
};
inline QDataStream& operator<<(QDataStream& out, const OITData& v) {
out << v.sub_type << v.wnd_index << v.data;
return out;
}
inline QDataStream& operator>>(QDataStream& in, OITData& v) {
in >> v.sub_type;
in >> v.wnd_index;
in >> v.data;
return in;
}