codemp/proto/cursor.proto

30 lines
457 B
Protocol Buffer

syntax = "proto3";
package codemp.cursor;
service Cursor {
rpc Moved (CursorEvent) returns (MovedResponse);
rpc Listen (UserIdentity) returns (stream CursorEvent);
}
message MovedResponse {}
message RowCol {
int32 row = 1;
int32 col = 2;
}
message CursorPosition {
string buffer = 1;
RowCol start = 2;
RowCol end = 3;
}
message CursorEvent {
string user = 1;
CursorPosition position = 2;
}
message UserIdentity {
string id = 1;
}