forked from BrewBlox/brewblox-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScreen.proto
49 lines (38 loc) · 932 Bytes
/
Screen.proto
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
syntax = "proto3";
import "nanopb.proto";
package screen;
message LayoutNode {
enum Type {
Row = 0;
Column = 1;
Content = 2;
}
uint32 parent = 1 [(nanopb).int_size = IS_8];
uint32 nodeId = 2 [(nanopb).int_size = IS_8];
Type type = 3;
uint32 weight = 4 [(nanopb).int_size = IS_16];
}
message Color {
uint32 r = 1 [(nanopb).int_size = IS_8];
uint32 g = 2 [(nanopb).int_size = IS_8];
uint32 b = 3 [(nanopb).int_size = IS_8];
}
message NumericValueWidget {
Color color = 1;
uint32 value = 2 [(nanopb).int_size = IS_8];
string label = 3 [(nanopb).max_length = 40];
}
message ColorWidget {
Color color = 1;
}
message ContentNode {
uint32 layoutNodeId = 1 [(nanopb).int_size = IS_8];
oneof content {
NumericValueWidget numericValueWidget = 2;
ColorWidget colorWidget = 3;
}
}
message Config {
repeated LayoutNode layoutNodes = 1 ;
repeated ContentNode contentNodes = 2;
}