🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
4.5 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="fractional_scale_v1">
  3. <copyright>
  4. Copyright © 2022 Kenny Levinsen
  5. Permission is hereby granted, free of charge, to any person obtaining a
  6. copy of this software and associated documentation files (the "Software"),
  7. to deal in the Software without restriction, including without limitation
  8. the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. and/or sell copies of the Software, and to permit persons to whom the
  10. Software is furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice (including the next
  12. paragraph) shall be included in all copies or substantial portions of the
  13. Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. DEALINGS IN THE SOFTWARE.
  21. </copyright>
  22. <description summary="Protocol for requesting fractional surface scales">
  23. This protocol allows a compositor to suggest for surfaces to render at
  24. fractional scales.
  25. A client can submit scaled content by utilizing wp_viewport. This is done by
  26. creating a wp_viewport object for the surface and setting the destination
  27. rectangle to the surface size before the scale factor is applied.
  28. The buffer size is calculated by multiplying the surface size by the
  29. intended scale.
  30. The wl_surface buffer scale should remain set to 1.
  31. If a surface has a surface-local size of 100 px by 50 px and wishes to
  32. submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should
  33. be used and the wp_viewport destination rectangle should be 100 px by 50 px.
  34. For toplevel surfaces, the size is rounded halfway away from zero. The
  35. rounding algorithm for subsurface position and size is not defined.
  36. </description>
  37. <interface name="wp_fractional_scale_manager_v1" version="1">
  38. <description summary="fractional surface scale information">
  39. A global interface for requesting surfaces to use fractional scales.
  40. </description>
  41. <request name="destroy" type="destructor">
  42. <description summary="unbind the fractional surface scale interface">
  43. Informs the server that the client will not be using this protocol
  44. object anymore. This does not affect any other objects,
  45. wp_fractional_scale_v1 objects included.
  46. </description>
  47. </request>
  48. <enum name="error">
  49. <entry name="fractional_scale_exists" value="0"
  50. summary="the surface already has a fractional_scale object associated"/>
  51. </enum>
  52. <request name="get_fractional_scale">
  53. <description summary="extend surface interface for scale information">
  54. Create an add-on object for the the wl_surface to let the compositor
  55. request fractional scales. If the given wl_surface already has a
  56. wp_fractional_scale_v1 object associated, the fractional_scale_exists
  57. protocol error is raised.
  58. </description>
  59. <arg name="id" type="new_id" interface="wp_fractional_scale_v1"
  60. summary="the new surface scale info interface id"/>
  61. <arg name="surface" type="object" interface="wl_surface"
  62. summary="the surface"/>
  63. </request>
  64. </interface>
  65. <interface name="wp_fractional_scale_v1" version="1">
  66. <description summary="fractional scale interface to a wl_surface">
  67. An additional interface to a wl_surface object which allows the compositor
  68. to inform the client of the preferred scale.
  69. </description>
  70. <request name="destroy" type="destructor">
  71. <description summary="remove surface scale information for surface">
  72. Destroy the fractional scale object. When this object is destroyed,
  73. preferred_scale events will no longer be sent.
  74. </description>
  75. </request>
  76. <event name="preferred_scale">
  77. <description summary="notify of new preferred scale">
  78. Notification of a new preferred scale for this surface that the
  79. compositor suggests that the client should use.
  80. The sent scale is the numerator of a fraction with a denominator of 120.
  81. </description>
  82. <arg name="scale" type="uint" summary="the new preferred scale"/>
  83. </event>
  84. </interface>
  85. </protocol>