~aleteoryx/TabbDE

ref: b733a5568e2b746bb15804f57b07b95b033d3b36 TabbDE/proto/uri_shell.xml -rw-r--r-- 7.9 KiB
b733a556aleteoryx roadmap, more core proto a month ago
                                                                                
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="uri_shell">
  <copyright>This file is in the Public Domain, and the author
             waives all legal rights to it.</copyright>

  <description summary="A better way to use the computer">
    Most programs operate on data with a known location. This protocol
    provides the base for a windowing system centered around URIs.

    Individual windows are not provided by single apps. Instead they
    are made up of a scheme handler, which uses a URI to retrieve some
    data, and an ad-hoc series of renderers which produces the final
    wl_surface to be rendered.

    This protocol only defines the interface for scheme handlers and
    renderers to connect and facilitate the rendering of windows. The
    mechanism by which such clients are started, routed, or otherwise
    configured is out-of-scope for this protocol. Similarly, client
    enumeration, surface enumeration, and other forms of generic IPC
    are out-of-scope.

    This document is currently unstable, and should be used with the
    assumption of breaking protocol changes without version bumps.
  </description>

  <interface name="urish_wm_base" version="1">
    <request name="register_scheme">
      <description summary="Used by all scheme handlers.">
        This is what a program wishing to handle a specific scheme
        uses to inform the WM that it will do so. Only one of these may
        exist for any scheme, in all clients. Creating a new one
        for a given scheme invalidates all others.</description>
      <arg name="handle" type="new_id" interface="urish_scheme" />
      <arg name="scheme" type="string" />
      <arg name="flags" type="uint" enum="ctor_flags" />
    </request>
    <request name="register_renderer">
      <description summary="Used by all renderers.">
        This is what any renderer uses to advertise to the WM. Slugs
        must be globally unique, and attempting to reregister one
        should error.</description>
      <arg name="handle" type="new_id" interface="urish_renderer" />
      <arg name="slug" type="string" />
      <arg name="flags" type="uint" enum="ctor_flags" />
    </request>

    <request name="open_read">
      <arg name="uri" type="string" />
    </request>
    <request name="open_write">
      <arg name="uri" type="string" />
      <arg name="mime_type" type="string" />
      <arg name="data" type="fd" />
    </request>

    <enum name="ctor_flags" bitfield="true">
      <entry name="supercedable" value="1" />
    </enum>

    <enum name="error">
      <entry name="cannot_supercede" value="1" />
    </enum>
  </interface>

  <interface name="urish_scheme" version="1">
    <description summary="The service used to start rendering a page">
      
    <event name="read_request">
      <arg name="response" type="new_id" interface="urish_response" />
      <arg name="uri" type="string" />
      <arg name="flags" type="uint" enum="request_flags" />
    </event>
    <event name="write_request">
      <arg name="response" type="new_id" interface="urish_response" />
      <arg name="uri" type="string" />
      <arg name="flags" type="uint" enum="request_flags" />
      <arg name="mime_type" type="string" />
      <arg name="data" type="fd" />
    </event>

    <enum name="request_flags" bitfield="true">
      <entry name="skip_cache" value="1" />
    </enum>

    <event name="superceded" type="destructor" />
  </interface>

  <interface name="urish_renderer" version="1">
    <event name="render">
      <arg name="response" type="new_id" interface="urish_response" />
      <arg name="uri" type="string" />
      <arg name="flags" type="uint" enum="render_flags" />
      <arg name="mime_type" type="string" />
      <arg name="data" type="fd" />
    </event>

    <enum name="render_flags" bitfield="true">
      <entry name="was_write" value="1" />
    </enum>

    <event name="superceded" type="destructor" />
  </interface>

  <interface name="urish_response" version="1">
    <request name="surface" type="destructor">
      <arg name="page" type="new_id" interface="urish_page" />
      <arg name="surface" type="new_id" interface="urish_surface" />
      <arg name="raw_surface" type="object" interface="wl_surface" />
    </request>
    <request name="chain" type="destructor">
      <arg name="chain" type="new_id" interface="urish_chain" />
    </request>
    <request name="error" type="destructor">
      <arg name="title" type="string" />
      <arg name="message" type="string" />
    </request>

    <event name="metadata_int">
      <arg name="field" type="string" />
      <arg name="value" type="int" />
    </event>
    <event name="metadata_uint">
      <arg name="field" type="string" />
      <arg name="value" type="uint" />
    </event>
    <event name="metadata_fd">
      <arg name="field" type="string" />
      <arg name="value" type="fd" />
    </event>
    <event name="metadata_string">
      <arg name="field" type="string" />
      <arg name="value" type="string" />
    </event>
    <event name="metadata_fixed">
      <arg name="field" type="string" />
      <arg name="value" type="fixed" />
    </event>
    <event name="metadata_array">
      <arg name="field" type="string" />
      <arg name="value" type="array" />
    </event>

    <event name="cancel" type="destructor" />
  </interface>

  <interface name="urish_chain" version="1">
    <request name="finish" type="destructor">
      <arg name="page" type="new_id" interface="urish_page" />
      <arg name="mime_type" type="string" />
      <arg name="data" type="fd" />
    </request>
    <request name="cancel" type="destructor">
      <arg name="new_response" type="object" interface="urish_response" />
    </request>

    <event name="metadata_int">
      <arg name="field" type="string" />
      <arg name="value" type="int" />
    </event>
    <event name="metadata_uint">
      <arg name="field" type="string" />
      <arg name="value" type="uint" />
    </event>
    <event name="metadata_fd">
      <arg name="field" type="string" />
      <arg name="value" type="fd" />
    </event>
    <event name="metadata_string">
      <arg name="field" type="string" />
      <arg name="value" type="string" />
    </event>
    <event name="metadata_fixed">
      <arg name="field" type="string" />
      <arg name="value" type="fixed" />
    </event>
    <event name="metadata_array">
      <arg name="field" type="string" />
      <arg name="value" type="array" />
    </event>

    <event name="cancel" type="destructor" />
  </interface>

  <interface name="urish_page" version="1">
    <request name="close" type="destructor" />
    <event name="closed" type="destructor" />

    <request name="refresh" type="destructor" />
    <request name="hard_refresh" type="destructor" />

    <!-- link -->
    <request name="navigate_read" type="destructor">
      <arg name="uri" type="string" />
    </request>
    <request name="navigate_write" type="destructor">
      <arg name="uri" type="string" />
      <arg name="mime_type" type="string" />
      <arg name="data" type="fd" />
    </request>

    <!-- new tab -->
    <request name="open_read">
      <arg name="uri" type="string" />
    </request>
    <request name="open_write">
      <arg name="uri" type="string" />
      <arg name="mime_type" type="string" />
      <arg name="data" type="fd" />
    </request>

    <!-- as in, fork the renderer chain -->
    <request name="fork" type="destructor">
      <arg name="new_response" type="object" interface="urish_response" />
    </request>

    <!-- this exists to facilitate bookmarklets -->
    <request name="enable_intercept">
      <arg name="scheme" type="string" />
    </request>
    <request name="disable_intercept">
      <arg name="scheme" type="string" />
    </request>
    <event name="intercept">
      <arg name="uri" type="string" />
    </event>
  </interface>

  <interface name="urish_surface" version="1">
    <!-- TODO: steal from https://wayland.app/protocols/xdg-shell#xdg_toplevel -->
  </interface>
</protocol>