summaryrefslogtreecommitdiff
path: root/gocuiView.proto
blob: 5dab35d18242c292da3a1c6189f275e48e0d32f6 (plain)
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
syntax = "proto3";

// including this in a plugin seems to keep it from loading at this point

package main;

import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp

// maybe put all the gocui specific stuff here.
message GocuiState {                              // `autogenpb:nomutex`
        bool                  visible       = 1;
        bool                  internal      = 2;
        int64                 w0            = 3;
        int64                 h0            = 4;
        int64                 w1            = 5;
        int64                 h1            = 6;
}

message ViewSettings {                            // `autogenpb:nomutex`
        bool                  pack          = 1;
        int64                 framesize     = 5;
}

message Tree {
        View                  parent        = 1;
        repeated View         children      = 2;
        View                  node          = 3;
}

// this is the gocui 'view' in binary tree form
message GocuiView {
        int64                 widgetId      = 3;  // `autogenpb:unique` `autogenpb:sort`
        string                name          = 4;  // `autogenpb:unique` `autogenpb:sort`
        GocuiState            state         = 7;
}

message GocuiViews {                                   // `autogenpb:marshal` `autogenpb:mutex`
        string                uuid          = 1;  // `autogenpb:uuid:d19c1fbb-32c2-4957-aee6-f8128a511dca`
        string                version       = 2;  // `autogenpb:version:v0.0.1`
        repeated GocuiView         GocuiViews         = 3;
        Tree                  tree          = 4;
        map<string, string>   junk          = 5;
        ViewSettings          settings      = 6;
}