Implement surface names
[staging/windowmanager.git] / layers.json
1 {
2    "comment": "Surface ID to Layer ID mapping",
3
4    "main_surface": {
5       "surface_id": 1000,
6       "surface_role": "HomeScreen",
7       "comment": "This surface should never be made invisible (The HomeScreen)"
8    },
9
10    "dynamic_ids_start": 16777216,
11
12    "layers": [
13       {
14          "name": "HomeScreen",
15          "layer_id": 1000,
16          "area": { "type": "full" }
17       },
18       {
19          "name": "Apps",
20          "layer_id": 1001,
21          "area": { "type": "rect", "rect": { "x": 0, "y": 100, "width": -1, "height": -201 } }
22       },
23       {
24          "name": "Popups",
25          "layer_id": 9999,
26          "area": { "type": "rect", "rect": { "x": 0, "y": 100, "width": -1, "height": -201 } }
27       }
28    ],
29
30    "mappings": [
31       {
32          "type": "single",
33          "surface_id": 1000,
34          "role": "^HomeScreen$",
35          "name": "HomeScreen",
36          "layer_id": 1000,
37          "area": { "type": "full" },
38          "comment": "Single layer map for the HomeScreen, XXX: type is redundant, could also check existence of id/first_id+last_id"
39       },
40       {
41          "type": "range",
42          "first_surface_id": 2000,
43          "last_surface_id": 2999,
44          "role": "^App.*",
45          "name": "apps",
46          "layer_id": 1001,
47          "area": { "type": "rect", "rect": { "x": 0, "y": 100, "width": -1, "height": -201 } },
48          "comment": "Range of IDs that will always be placed on layer 1001, negative rect values are interpreted as output_size.dimension - $value"
49       },
50       {
51          "type": "range",
52          "first_surface_id": 3000,
53          "last_surface_id": 3999,
54          "role": "^OnScreen.*",
55          "name": "popups",
56          "layer_id": 9999,
57          "area": { "type": "rect", "rect": { "x": 0, "y": 100, "width": -1, "height": -201 } },
58          "comment": "Range of IDs that will always be placed on the popup layer, that gets a very high 'dummy' id of 9999"
59       }
60    ],
61
62    "tests": [
63       { "surface_id": 1000, "expect_layer_id": 1000 },
64       { "surface_id": 1001, "expect_layer_id": -1, "comment": "check against -1 for not found entries" },
65       { "surface_id": 1999, "expect_layer_id": -1 },
66       { "surface_id": 2000, "expect_layer_id": 1001 },
67       { "surface_id": 2500, "expect_layer_id": 1001 },
68       { "surface_id": 2999, "expect_layer_id": 1001 },
69       { "surface_id": 3000, "expect_layer_id": 9999 },
70       { "surface_id": 3500, "expect_layer_id": 9999 },
71       { "surface_id": 3999, "expect_layer_id": 9999 },
72       { "surface_id": 4711, "expect_layer_id": -1 }
73    ]
74 }