aboutsummaryrefslogtreecommitdiffstats
path: root/sl0ppij/zellij-utils/src/nested_session_contract/nested_session_message.proto
blob: dfe2f62a0649b90fe8d1bcdbab90a384561e4401 (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
syntax = "proto3";
package nested_session_contract;

message NestedSessionMessage {
  oneof payload {
    Announce announce = 1;
    FocusHost focus_host = 2;
    ToggleHostFullscreen host_fullscreen = 3;
    Pong pong = 4;
    Bye bye = 5;
    AnnounceAck announce_ack = 8;
    FocusGained focus_gained = 9;
    FocusLost focus_lost = 10;
    FullscreenState fullscreen_state = 11;
    AncestryUpdate ancestry_update = 12;
    Ping ping = 13;
    ShortcutUpdate shortcut_update = 14;
  }
}

enum NestedCapability {
  NESTED_CAPABILITY_UNSPECIFIED = 0;
  NESTED_CAPABILITY_NESTED_CONTROL = 1;
}

enum NestedDirection {
  NESTED_DIRECTION_UNSPECIFIED = 0;
  NESTED_DIRECTION_LEFT = 1;
  NESTED_DIRECTION_RIGHT = 2;
  NESTED_DIRECTION_UP = 3;
  NESTED_DIRECTION_DOWN = 4;
}

message Announce {
  string session_name = 1;
  repeated NestedCapability capabilities = 2;
}

message FocusHost {
  NestedDirection direction = 1;
}

message ToggleHostFullscreen {
  bool fullscreen = 1;
}

message Pong {
}

message Bye {
}

message AnnounceAck {
  repeated string ancestry = 1;
  repeated NestedCapability capabilities = 2;
  repeated string descend_keys = 3;
}

message ShortcutUpdate {
  repeated string ascend_keys = 1;
  repeated string descend_keys = 2;
}

message FocusGained {
  NestedDirection from_direction = 1;
}

message FocusLost {
}

message FullscreenState {
  bool fullscreen = 1;
}

message AncestryUpdate {
  repeated string ancestry = 1;
}

message Ping {
}