summaryrefslogtreecommitdiffstats
path: root/layers.json
blob: 0d5a817605e362c0016c7a3401351064fa06c659 (plain)
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
{
   "comment": "Surface ID to Layer ID mapping",

   "main_surface": {
      "surface_id": 1000,
      "surface_role": "HomeScreen",
      "comment": "This surface should never be made invisible (The HomeScreen)"
   },

   "mappings": [
      {
         "type": "single",
         "surface_id": 1000,
         "role": "^HomeScreen$",
         "name": "HomeScreen",
         "layer_id": 1000,
         "area": { "type": "full" },
         "comment": "Single layer map for the HomeScreen, XXX: type is redundant, could also check existence of id/first_id+last_id"
      },
      {
         "type": "range",
         "first_surface_id": 2000,
         "last_surface_id": 2999,
         "role": "^App.*",
         "name": "apps",
         "layer_id": 1001,
         "area": { "type": "rect", "rect": { "x": 0, "y": 100, "width": -1, "height": -201 } },
         "comment": "Range of IDs that will always be placed on layer 1001, negative rect values are interpreted as output_size.dimension - $value",

         "split_layouts": [
            {
               "name": "Media Player",
               "main_match": "^App MPlayer Main$",
               "sub_match": "^App MPlayer Sub",
               "priority": 500,
               "comment": "All Media Player sub surfaces can be put in a sub layout with the Media Player"
            },
            {
               "name": "Playlist",
               "main_match": "",
               "sub_match": "^App MPlayer Sub Playlist$",
               "priority": 100,
               "comment": "Always allow the media player playlist to be displayed as sub surface"
            },
            {
               "name": "Map",
               "main_match": "^App Navi Map",
               "sub_match": "^App Navi Guidance",
               "priority": 1000
            },
            {
               "name": "App1 example",
               "main_match": "^App1",
               "sub_match": ".*",
               "priority": 1000
            }
         ]
      },
      {
         "type": "range",
         "first_surface_id": 3000,
         "last_surface_id": 3999,
         "role": "^OnScreen.*",
         "name": "popups",
         "layer_id": 9999,
         "area": { "type": "rect", "rect": { "x": 0, "y": 100, "width": -1, "height": -201 } },
         "comment": "Range of IDs that will always be placed on the popup layer, that gets a very high 'dummy' id of 9999"
      }
   ],

   "tests": [
      { "surface_id": 1000, "expect_layer_id": 1000 },
      { "surface_id": 1001, "expect_layer_id": -1, "comment": "check against -1 for not found entries" },
      { "surface_id": 1999, "expect_layer_id": -1 },
      { "surface_id": 2000, "expect_layer_id": 1001 },
      { "surface_id": 2500, "expect_layer_id": 1001 },
      { "surface_id": 2999, "expect_layer_id": 1001 },
      { "surface_id": 3000, "expect_layer_id": 9999 },
      { "surface_id": 3500, "expect_layer_id": 9999 },
      { "surface_id": 3999, "expect_layer_id": 9999 },
      { "surface_id": 4711, "expect_layer_id": -1 }
   ]
}