|
| 1 | +import type { Layout } from '../../common/layout/types.js'; |
1 | 2 | import type { Maybe } from '../../common/types.js';
|
2 | 3 |
|
3 |
| -export interface Layout { |
4 |
| - window: WindowLayout; |
5 |
| - streams: Array<StreamLayout>; |
6 |
| -} |
7 |
| - |
8 |
| -/** |
9 |
| - * Layout configuration for the app window. |
10 |
| - */ |
11 |
| -export interface WindowLayout { |
12 |
| - x: number; |
13 |
| - y: number; |
14 |
| - width: number; |
15 |
| - height: number; |
16 |
| -} |
17 |
| - |
18 |
| -/** |
19 |
| - * Layout configuration for a game stream. |
20 |
| - */ |
21 |
| -export interface StreamLayout { |
22 |
| - /** |
23 |
| - * Game-specific identifier for the stream. |
24 |
| - * For example, "percWindow" for the active spells stream. |
25 |
| - */ |
26 |
| - id: string; |
27 |
| - /** |
28 |
| - * Title to display for the stream in the app. |
29 |
| - */ |
30 |
| - title: string; |
31 |
| - /** |
32 |
| - * Whether the stream is displayed in the app. |
33 |
| - * When false then this stream's content can be redirected to |
34 |
| - * another stream window using the `whenHiddenStreamToId` property. |
35 |
| - */ |
36 |
| - visible: boolean; |
37 |
| - /** |
38 |
| - * The x-coordinate of the stream window, in pixels. |
39 |
| - * Relative to where the streams are displayed within the app. |
40 |
| - * This is not the absolute position on the monitor screen. |
41 |
| - */ |
42 |
| - x: number; |
43 |
| - /** |
44 |
| - * The y-coordinate of the stream window, in pixels. |
45 |
| - * Relative to where the streams are displayed within the app. |
46 |
| - * This is not the absolute position on the monitor screen. |
47 |
| - */ |
48 |
| - y: number; |
49 |
| - /** |
50 |
| - * The width of the stream window, in pixels. |
51 |
| - */ |
52 |
| - width: number; |
53 |
| - /** |
54 |
| - * The height of the stream window, in pixels. |
55 |
| - */ |
56 |
| - height: number; |
57 |
| - /** |
58 |
| - * The font family to use for the stream content. |
59 |
| - * Example: 'Verdana' or 'Courier New'. |
60 |
| - */ |
61 |
| - textFont: string; |
62 |
| - /** |
63 |
| - * The font size to use for the stream content, in pixels. |
64 |
| - */ |
65 |
| - textSize: number; |
66 |
| - /** |
67 |
| - * The color of the text in the stream content. |
68 |
| - */ |
69 |
| - foregroundColor: string; |
70 |
| - /** |
71 |
| - * The color of the background in the stream content. |
72 |
| - */ |
73 |
| - backgroundColor: string; |
74 |
| - /** |
75 |
| - * When this stream is not visible, redirect its content to another stream. |
76 |
| - * If that stream is also not visible, then it continues to be redirected |
77 |
| - * until either a visible stream in the chain is found or not. |
78 |
| - * |
79 |
| - * Example Scenario |
80 |
| - * ---------------- |
81 |
| - * When StreamA is hidden it redirects to StreamB. |
82 |
| - * When StreamB is hidden it redirects to STreamC. |
83 |
| - * When StreamC is hidden it does not redirect anywhere. |
84 |
| - * |
85 |
| - * When all streams are visible then their content is displayed as normal. |
86 |
| - * When StreamA is hidden, its content is redirected to StreamB. |
87 |
| - * When StreamB is also hidden, both StreamA and StreamB redirect to StreamC. |
88 |
| - * When StreamC is also hidden, no content is displayed. |
89 |
| - */ |
90 |
| - whenHiddenStreamToId: string; |
91 |
| -} |
92 |
| - |
93 | 4 | export interface LayoutService {
|
94 | 5 | /**
|
95 | 6 | * Gets a layout by name.
|
|
0 commit comments