-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgui.proto
85 lines (76 loc) · 1.56 KB
/
gui.proto
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
81
82
83
84
85
// SPDX-License-Identifier: MIT
// Copyright (c) 2025 Dennis Oberst <[email protected]>
syntax = "proto3";
package v0.api.gui;
message Server {
enum Api {
// Common
CREATE = 0;
DESTROY = 1;
SET_SCALE = 2;
GET_SIZE = 3;
SHOW = 4;
HIDE = 5;
// Embedded Window
CAN_RESIZE = 6;
GET_RESIZE_HINTS = 7;
ADJUST_SIZE = 8;
SET_SIZE = 9;
SET_PARENT = 10;
// Floating Window
SET_TRANSIENT = 11;
SUGGEST_TITLE = 12;
}
message Arg {
oneof arg {
double scale = 1;
Size size = 2;
ResizeHints hints = 3;
ClapWindow clap_window = 4;
string title = 5;
}
}
Api api = 1;
optional Arg arg = 2;
}
message Client {
enum Api {
GUI_CONNECT = 0;
RESIZE_HINTS_CHANGED = 1;
REQUEST_RESIZE = 2;
REQUEST_SHOW = 3;
REQUEST_HIDE = 4;
CLOSED = 5;
}
message Arg {
oneof arg {
Size size = 1;
bool was_destroyed = 2;
}
}
Api api = 1;
optional Arg arg = 2;
}
message ResizeHints {
bool can_resize_horizontally = 1;
bool can_resize_vertically = 2;
// only if can resize horizontally and vertically
message AspectRatio {
bool preserve = 1;
Size size = 2;
}
optional AspectRatio aspect_ratio = 3;
}
message ClapWindow {
string api = 1;
oneof window {
uint64 cocoa = 2;
uint64 x11 = 3;
uint64 win32 = 4;
uint64 ptr = 5;
}
}
message Size {
uint32 width = 1;
uint32 height = 2;
}