1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="overlay_prioritizer">
3
4  <copyright>
5    Copyright 2021 The Chromium Authors
6
7    Permission is hereby granted, free of charge, to any person obtaining a
8    copy of this software and associated documentation files (the "Software"),
9    to deal in the Software without restriction, including without limitation
10    the rights to use, copy, modify, merge, publish, distribute, sublicense,
11    and/or sell copies of the Software, and to permit persons to whom the
12    Software is furnished to do so, subject to the following conditions:
13
14    The above copyright notice and this permission notice (including the next
15    paragraph) shall be included in all copies or substantial portions of the
16    Software.
17
18    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24    DEALINGS IN THE SOFTWARE.
25  </copyright>
26
27  <interface name="overlay_prioritizer" version="1">
28    <description summary="overlay hint prioritization">
29      The global interface exposing overlay delegated prioritization
30      hint capabilities is used to instantiate an interface extension for a
31      wl_surface object. This extended interface will then allow
32      delegated overlay prioritization of the surface.
33    </description>
34
35    <request name="destroy" type="destructor">
36      <description summary="Destroy the overlay prioritizer.">
37        Informs the server that the client will not be using this
38        protocol object anymore. This does not affect any other objects,
39        prioritizer objects included.
40      </description>
41    </request>
42
43    <enum name="error">
44      <entry name="overlay_hinted_surface_exists" value="0"
45             summary="the surface already has a prioritizer object
46             associated"/>
47    </enum>
48
49    <request name="get_overlay_prioritized_surface">
50      <description summary="extend surface interface for overlay prioritization hint">
51	Instantiate an interface extension for the given wl_surface to
52	add support for overlay prioritization hinting. If the given wl_surface already has
53	a prioritization object associated, the delegate_exists protocol error is
54  raised.
55      </description>
56      <arg name="id" type="new_id" interface="overlay_prioritized_surface"
57           summary="the new prioritized interface id"/>
58      <arg name="surface" type="object" interface="wl_surface"
59           summary="the surface"/>
60    </request>
61  </interface>
62
63  <interface name="overlay_prioritized_surface" version="1">
64    <description summary="delegate overlay prioritization hint of a wl_surface">
65      An additional interface to a wl_surface object, which allows the
66      client to specify hints for the overlay prioritization of the surface.
67    </description>
68     <request name="destroy" type="destructor">
69      <description summary="remove overlay prioritization the surface">
70	The associated wl_surface's overlay prioritization is removed.
71	The change is applied on the next wl_surface.commit.
72      </description>
73    </request>
74
75    <enum name="error">
76      <entry name="bad_value" value="0"
77	     summary="negative values in radius or size"/>
78      <entry name="no_surface" value="1"
79	     summary="the wl_surface was destroyed"/>
80    </enum>
81
82    <enum name="overlay_priority">
83    <description summary="hints for overlay prioritization">
84    </description>
85      <entry name="none" value="0" summary="overlay promotion is not necessary for this surface" />
86      <entry name="regular" value="1" summary="surface could be considered as a candidate for promotion" />
87      <entry name="preferred_low_latency_canvas" value="2" summary="the surface is a low latency canvas that works better if promoted to overlay" />
88      <entry name="required_hardware_protection" value="3" summary="the surface contains protected content and requires to be promoted to overlay" />
89    </enum>
90
91    <request name="set_overlay_priority">
92      <description summary="set the surface overlay priority">
93      </description>
94      <arg name="priority" type="uint" />
95    </request>
96
97  </interface>
98
99</protocol>
100