mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-26 21:58:10 +01:00
Add layout proto defs
This commit is contained in:
parent
9cdb662bbb
commit
77a3ae85a5
2 changed files with 47 additions and 11 deletions
47
api/protocol/pinnacle/layout/v0alpha1/layout.proto
Normal file
47
api/protocol/pinnacle/layout/v0alpha1/layout.proto
Normal file
|
@ -0,0 +1,47 @@
|
|||
syntax = "proto2";
|
||||
|
||||
package pinnacle.layout.v0alpha1;
|
||||
|
||||
import "pinnacle/v0alpha1/pinnacle.proto";
|
||||
|
||||
// Love how the response is the request and the request is the response
|
||||
|
||||
message LayoutRequest {
|
||||
// Respond to a layout request from the compositor.
|
||||
message Geometries {
|
||||
// The id of the request this layout response is responding to.
|
||||
//
|
||||
// Responding with a request_id that has already been responded to
|
||||
// or that doesn't exist will return an error.
|
||||
optional uint32 request_id = 1;
|
||||
// Target geometries of all windows being laid out.
|
||||
//
|
||||
// Responding with a different number of geometries than
|
||||
// requested windows will return an error.
|
||||
repeated .pinnacle.v0alpha1.Geometry geometries = 2;
|
||||
}
|
||||
// Request a layout explicitly.
|
||||
message ExplicitLayout {}
|
||||
|
||||
oneof body {
|
||||
Geometries geometries = 1;
|
||||
ExplicitLayout layout = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// The compositor requested a layout.
|
||||
//
|
||||
// The client must respond with `LayoutRequest.geometries`.
|
||||
message LayoutResponse {
|
||||
optional uint32 request_id = 1;
|
||||
optional string output_name = 2;
|
||||
repeated uint32 window_ids = 3;
|
||||
// Ids of all focused tags on the output.
|
||||
repeated uint32 tag_ids = 4;
|
||||
optional uint32 output_width = 5;
|
||||
optional uint32 output_height = 6;
|
||||
}
|
||||
|
||||
service LayoutService {
|
||||
rpc Layout(stream LayoutRequest) returns (stream LayoutResponse);
|
||||
}
|
|
@ -17,16 +17,6 @@ message OutputConnectResponse {
|
|||
optional string output_name = 1;
|
||||
}
|
||||
|
||||
message LayoutRequest {
|
||||
optional StreamControl control = 1;
|
||||
}
|
||||
message LayoutResponse {
|
||||
// The windows that need to be laid out.
|
||||
repeated uint32 window_ids = 1;
|
||||
// The tag that is being laid out.
|
||||
optional uint32 tag_id = 2;
|
||||
}
|
||||
|
||||
message WindowPointerEnterRequest {
|
||||
optional StreamControl control = 1;
|
||||
}
|
||||
|
@ -45,7 +35,6 @@ message WindowPointerLeaveResponse {
|
|||
|
||||
service SignalService {
|
||||
rpc OutputConnect(stream OutputConnectRequest) returns (stream OutputConnectResponse);
|
||||
rpc Layout(stream LayoutRequest) returns (stream LayoutResponse);
|
||||
rpc WindowPointerEnter(stream WindowPointerEnterRequest) returns (stream WindowPointerEnterResponse);
|
||||
rpc WindowPointerLeave(stream WindowPointerLeaveRequest) returns (stream WindowPointerLeaveResponse);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue