2023-08-16 17:08:31 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package codemp.cursor;
|
|
|
|
|
|
|
|
service Cursor {
|
2023-08-16 23:09:47 +02:00
|
|
|
rpc Moved (CursorEvent) returns (MovedResponse);
|
|
|
|
rpc Listen (UserIdentity) returns (stream CursorEvent);
|
2023-08-16 17:08:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message MovedResponse {}
|
|
|
|
|
2023-08-16 23:09:47 +02:00
|
|
|
message RowCol {
|
2023-08-16 17:08:31 +02:00
|
|
|
int32 row = 1;
|
|
|
|
int32 col = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CursorPosition {
|
2023-08-16 23:09:47 +02:00
|
|
|
string buffer = 1;
|
|
|
|
RowCol start = 2;
|
|
|
|
RowCol end = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CursorEvent {
|
2023-08-16 17:08:31 +02:00
|
|
|
string user = 1;
|
2023-08-16 23:09:47 +02:00
|
|
|
CursorPosition position = 2;
|
2023-08-16 17:08:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserIdentity {
|
|
|
|
string id = 1;
|
|
|
|
}
|