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