Debian Codegraph @

experimental/xx-fractional-scale/xx-fractional-scale-v2.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="xx_fractional_scale_v2">
3 <copyright>
4 Copyright © 2022 Xaver Hugl
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice (including the next
14 paragraph) shall be included in all copies or substantial portions of the
15 Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE.
24 </copyright>
25
26 <description summary="Protocol for fractional scaling">
27 This protocol allows compositors and clients to communicate the
28 coordinate space their surfaces act in.
29 </description>
30
31 <interface name="xx_fractional_scale_manager_v2" version="1">
32 <description summary="creates surface scale interfaces">
33 A global interface to create xx_fractional_scale_v2 interfaces.
34 </description>
35
36 <request name="destroy" type="destructor">
37 <description summary="release the global">
38 Informs the server that the client will not be using this protocol
39 object anymore. This does not affect any other objects.
40 </description>
41 </request>
42
43 <enum name="error">
44 <entry name="fractional_scale_exists" value="0"
45 summary="xx_fractional_scale_v2 for the surface already exists"/>
46 </enum>
47
48 <request name="get_fractional_scale">
49 <description summary="create an interface to enable fractional scaling">
50 Create an interface object for a wl_surface to communicate scale.
51 If the given wl_surface already has a xx_fractional_scale_v2 object
52 associated, the fractional_scale_exists protocol error is raised.
53 </description>
54 <arg name="id" type="new_id" interface="xx_fractional_scale_v2"
55 summary="the new scale interface"/>
56 <arg name="surface" type="object" interface="wl_surface"
57 summary="the surface"/>
58 </request>
59 </interface>
60
61 <interface name="xx_fractional_scale_v2" version="1">
62 <description summary="interface for fractional scaling">
63 An additional interface for a wl_surface object that allows compositor and
64 client to communicate in a different coordinate space, in order to enable
65 them to accurately describe coordinates and sizes in pixels.
66 The two coordinate spaces in consideration are logical and pixels, where
67 logical coordinates describe the size content should have and pixels
68 describe the size of buffers.
69
70 A scale of one equals a lack of scaling, where the communicated values
71 define both logical coordinates and pixels.
72 A scale greater than one describes that for every logical coordinate,
73 more than one pixel is used, and a scale less than one describes that
74 multiple logical coordinates make up one pixel.
75 In mathematical terms, logical coordinates can be obtained by dividing
76 the provided values by the currently active scale.
77
78 The initial compositor and client coordinate scale factors are 1.
79 </description>
80
81 <event name="scale_factor">
82 <description summary="set the compositor coordinate space scale factor">
83 This event sets a scale factor for the associated wl_surface that
84 describes the coordinate system the compositor will use for events
85 following xx_fractional_scale_v2.scale_factor.
86
87 The scale factor is encoded in a 8.24 fixed point format.
88
89 The compositor must not send a scale of zero.
90
91 The client should re-render and commit a new buffer with the new scale
92 as soon as possible, in order to avoid artifacts caused by the mismatch
93 in compositor and client scales.
94 </description>
95 <arg name="scale_8_24" type="uint" summary="surface scale factor"/>
96 </event>
97
98 <request name="set_scale_factor">
99 <description summary="set the client coordinate space scale factor">
100 This request sets a scale factor for the associated wl_surface that
101 describes the coordinate system the client uses for requests following
102 xx_fractional_scale_v2.set_scale_factor.
103
104 The scale factor is encoded in a 8.24 fixed point format.
105
106 If this scale factor does not match the scale factor provided by the
107 compositor with xx_fractional_scale_v2.scale_factor, the compositor may
108 apply transformations to the wl_surface that can result in blurriness
109 or other artifacts.
110
111 If scale_8_24 is zero, the error invalid_scale will be raised.
112 </description>
113 <arg name="scale_8_24" type="uint" summary="surface scale factor"/>
114 </request>
115
116 <request name="destroy" type="destructor">
117 <description summary="remove the scale interface from the surface">
118 The wl_surface's xx_fractional_scale_v2 object is destroyed, and the
119 associated scale is reset to 1.
120 </description>
121 </request>
122
123 <enum name="error">
124 <entry name="invalid_scale" value="0"
125 summary="scale value is not valid"/>
126 </enum>
127 </interface>
128 </protocol>