16 |
17 |
30 |
31 |
32 | {deprecated ? (
33 |
39 | Deprecated
40 |
41 | ) : (
42 | <>>
43 | )}
44 | version {element.version}
45 |
46 |
47 |
48 | {element.description ? (
49 |
50 |
51 |
52 | ) : (
53 |
54 | )}
55 |
56 |
57 | {element.requests?.map((request, index) => (
58 |
63 | ))}
64 | {element.events?.map((event, index) => (
65 |
70 | ))}
71 | {element.enums?.map((childElement, index) => (
72 |
77 | ))}
78 |
79 |
80 | )
81 |
--------------------------------------------------------------------------------
/src/data/protocols/kde-idle.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "protocol",
3 | "name": "idle",
4 | "copyright": {
5 | "type": "copyright",
6 | "text": "\nSPDX-FileCopyrightText: 2015 Martin Gräßlin\n\nSPDX-License-Identifier: LGPL-2.1-or-later\n"
7 | },
8 | "interfaces": [
9 | {
10 | "type": "interface",
11 | "name": "org_kde_kwin_idle",
12 | "version": "1",
13 | "description": {
14 | "type": "description",
15 | "text": "This interface allows to monitor user idle time on a given seat. The interface\nallows to register timers which trigger after no user activity was registered\non the seat for a given interval. It notifies when user activity resumes.\n\nThis is useful for applications wanting to perform actions when the user is not\ninteracting with the system, e.g. chat applications setting the user as away, power\nmanagement features to dim screen, etc..",
16 | "summary": "User idle time manager"
17 | },
18 | "requests": [
19 | {
20 | "type": "request",
21 | "name": "get_idle_timeout",
22 | "args": [
23 | {
24 | "type": "arg",
25 | "name": "id",
26 | "argType": "new_id",
27 | "interface": "org_kde_kwin_idle_timeout"
28 | },
29 | {
30 | "type": "arg",
31 | "name": "seat",
32 | "argType": "object",
33 | "interface": "wl_seat",
34 | "protocol": "wayland"
35 | },
36 | {
37 | "type": "arg",
38 | "name": "timeout",
39 | "argType": "uint",
40 | "summary": "The idle timeout in msec"
41 | }
42 | ]
43 | }
44 | ],
45 | "events": [],
46 | "enums": []
47 | },
48 | {
49 | "type": "interface",
50 | "name": "org_kde_kwin_idle_timeout",
51 | "version": "1",
52 | "requests": [
53 | {
54 | "type": "request",
55 | "name": "release",
56 | "requestType": "destructor",
57 | "description": {
58 | "type": "description",
59 | "summary": "release the timeout object"
60 | },
61 | "args": []
62 | },
63 | {
64 | "type": "request",
65 | "name": "simulate_user_activity",
66 | "description": {
67 | "type": "description",
68 | "summary": "Simulates user activity for this timeout, behaves just like real user activity on the seat"
69 | },
70 | "args": []
71 | }
72 | ],
73 | "events": [
74 | {
75 | "type": "event",
76 | "name": "idle",
77 | "description": {
78 | "type": "description",
79 | "summary": "Triggered when there has not been any user activity in the requested idle time interval"
80 | },
81 | "args": []
82 | },
83 | {
84 | "type": "event",
85 | "name": "resumed",
86 | "description": {
87 | "type": "description",
88 | "summary": "Triggered on the first user activity after an idle event"
89 | },
90 | "args": []
91 | }
92 | ],
93 | "enums": []
94 | }
95 | ]
96 | }
97 |
--------------------------------------------------------------------------------
/src/data/compositors/mir.json:
--------------------------------------------------------------------------------
1 | {
2 | "generationTimestamp": 1733165065880,
3 | "version": "2.19",
4 | "globals": [
5 | {
6 | "interface": "ext_session_lock_manager_v1",
7 | "version": 1
8 | },
9 | {
10 | "interface": "mir_shell_v1",
11 | "version": 1
12 | },
13 | {
14 | "interface": "wl_compositor",
15 | "version": 4
16 | },
17 | {
18 | "interface": "wl_data_device_manager",
19 | "version": 3
20 | },
21 | {
22 | "interface": "wl_drm",
23 | "version": 2
24 | },
25 | {
26 | "interface": "wl_output",
27 | "version": 4
28 | },
29 | {
30 | "interface": "wl_seat",
31 | "version": 8
32 | },
33 | {
34 | "interface": "wl_shell",
35 | "version": 1
36 | },
37 | {
38 | "interface": "wl_shm",
39 | "version": 1
40 | },
41 | {
42 | "interface": "wl_subcompositor",
43 | "version": 1
44 | },
45 | {
46 | "interface": "wp_fractional_scale_manager_v1",
47 | "version": 1
48 | },
49 | {
50 | "interface": "wp_viewporter",
51 | "version": 1
52 | },
53 | {
54 | "interface": "xdg_activation_v1",
55 | "version": 1
56 | },
57 | {
58 | "interface": "xdg_wm_base",
59 | "version": 5
60 | },
61 | {
62 | "interface": "zwlr_foreign_toplevel_manager_v1",
63 | "version": 2
64 | },
65 | {
66 | "interface": "zwlr_layer_shell_v1",
67 | "version": 4
68 | },
69 | {
70 | "interface": "zwlr_screencopy_manager_v1",
71 | "version": 3
72 | },
73 | {
74 | "interface": "zwlr_virtual_pointer_manager_v1",
75 | "version": 2
76 | },
77 | {
78 | "interface": "zwp_idle_inhibit_manager_v1",
79 | "version": 1
80 | },
81 | {
82 | "interface": "zwp_input_method_manager_v2",
83 | "version": 1
84 | },
85 | {
86 | "interface": "zwp_input_method_v1",
87 | "version": 1
88 | },
89 | {
90 | "interface": "zwp_input_panel_v1",
91 | "version": 1
92 | },
93 | {
94 | "interface": "zwp_linux_dmabuf_v1",
95 | "version": 3
96 | },
97 | {
98 | "interface": "zwp_pointer_constraints_v1",
99 | "version": 1
100 | },
101 | {
102 | "interface": "zwp_primary_selection_device_manager_v1",
103 | "version": 1
104 | },
105 | {
106 | "interface": "zwp_relative_pointer_manager_v1",
107 | "version": 1
108 | },
109 | {
110 | "interface": "zwp_text_input_manager_v1",
111 | "version": 1
112 | },
113 | {
114 | "interface": "zwp_text_input_manager_v2",
115 | "version": 1
116 | },
117 | {
118 | "interface": "zwp_text_input_manager_v3",
119 | "version": 1
120 | },
121 | {
122 | "interface": "zwp_virtual_keyboard_manager_v1",
123 | "version": 1
124 | },
125 | {
126 | "interface": "zxdg_decoration_manager_v1",
127 | "version": 1
128 | },
129 | {
130 | "interface": "zxdg_output_manager_v1",
131 | "version": 3
132 | },
133 | {
134 | "interface": "zxdg_shell_v6",
135 | "version": 1
136 | }
137 | ]
138 | }
139 |
--------------------------------------------------------------------------------
/scripts/bin/render-static-html.tsx:
--------------------------------------------------------------------------------
1 | import * as fs from 'fs/promises'
2 | import { minify } from 'html-minifier'
3 | import * as path from 'path'
4 | import { renderToString } from 'react-dom/server'
5 | import { Router } from 'wouter'
6 | import staticLocationHook from 'wouter/static-location'
7 | import App from '../../src/App'
8 | import { waylandProtocolRegistry } from '../../src/data/protocol-registry'
9 |
10 | const buildDir = path.resolve(__dirname, '../../build/protocols')
11 |
12 | interface StaticPageDescriptor {
13 | routerPath: string
14 | fileName: string
15 | pageTitle: string
16 | }
17 |
18 | async function main() {
19 | const indexHTMLPlaceholder = await readIndexHTML()
20 |
21 | const renderPage = async (page: StaticPageDescriptor) => {
22 | await renderAndWriteHTML(indexHTMLPlaceholder, page)
23 | console.log(`✔ ${page.routerPath} rendered`)
24 | }
25 |
26 | await Promise.all(allPageDescriptors().map(renderPage))
27 | }
28 |
29 | function allPageDescriptors(): StaticPageDescriptor[] {
30 | const staticPages: StaticPageDescriptor[] = [
31 | {
32 | routerPath: '/',
33 | fileName: 'index.html',
34 | pageTitle: 'Wayland Protocol Documentation | Wayland Explorer',
35 | },
36 | {
37 | routerPath: '/404',
38 | fileName: '404.html',
39 | pageTitle: '404 - Page not found',
40 | },
41 | {
42 | routerPath: '/wayland-protocols/0',
43 | fileName: 'wayland-protocols-gitlab.html',
44 | pageTitle: 'Git',
45 | },
46 | ]
47 |
48 | const protocolPages: StaticPageDescriptor[] =
49 | waylandProtocolRegistry.protocols.map((protocol) => ({
50 | routerPath: `/${protocol.id}`,
51 | fileName: `${protocol.id}.html`,
52 | pageTitle: `${protocol.name} protocol | Wayland Explorer`,
53 | }))
54 |
55 | return [...staticPages, ...protocolPages]
56 | }
57 |
58 | async function renderAndWriteHTML(
59 | indexHTML: string,
60 | { routerPath, fileName, pageTitle }: StaticPageDescriptor
61 | ): Promise