alpha-modifier-v1.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="alpha_modifier_v1">
  3. <copyright>
  4. Copyright © 2024 Xaver Hugl
  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. <interface name="wp_alpha_modifier_v1" version="1">
  23. <description summary="surface alpha modifier manager">
  24. This interface allows a client to set a factor for the alpha values on a
  25. surface, which can be used to offload such operations to the compositor,
  26. which can in turn for example offload them to KMS.
  27. Warning! The protocol described in this file is currently in the testing
  28. phase. Backward compatible changes may be added together with the
  29. corresponding interface version bump. Backward incompatible changes can
  30. only be done by creating a new major version of the extension.
  31. </description>
  32. <request name="destroy" type="destructor">
  33. <description summary="destroy the alpha modifier manager object">
  34. Destroy the alpha modifier manager. This doesn't destroy objects
  35. created with the manager.
  36. </description>
  37. </request>
  38. <enum name="error">
  39. <entry name="already_constructed" value="0"
  40. summary="wl_surface already has a alpha modifier object"/>
  41. </enum>
  42. <request name="get_surface">
  43. <description summary="create a new toplevel decoration object">
  44. Create a new alpha modifier surface object associated with the
  45. given wl_surface. If there is already such an object associated with
  46. the wl_surface, the already_constructed error will be raised.
  47. </description>
  48. <arg name="id" type="new_id" interface="wp_alpha_modifier_surface_v1"/>
  49. <arg name="surface" type="object" interface="wl_surface"/>
  50. </request>
  51. </interface>
  52. <interface name="wp_alpha_modifier_surface_v1" version="1">
  53. <description summary="alpha modifier object for a surface">
  54. This interface allows the client to set a factor for the alpha values on
  55. a surface, which can be used to offload such operations to the compositor.
  56. The default factor is UINT32_MAX.
  57. This object has to be destroyed before the associated wl_surface. Once the
  58. wl_surface is destroyed, all request on this object will raise the
  59. no_surface error.
  60. </description>
  61. <enum name="error">
  62. <entry name="no_surface" value="0" summary="wl_surface was destroyed"/>
  63. </enum>
  64. <request name="destroy" type="destructor">
  65. <description summary="destroy the alpha modifier object">
  66. This destroys the object, and is equivalent to set_multiplier with
  67. a value of UINT32_MAX, with the same double-buffered semantics as
  68. set_multiplier.
  69. </description>
  70. </request>
  71. <request name="set_multiplier">
  72. <description summary="specify the alpha multiplier">
  73. Sets the alpha multiplier for the surface. The alpha multiplier is
  74. double-buffered state, see wl_surface.commit for details.
  75. This factor is applied in the compositor's blending space, as an
  76. additional step after the processing of per-pixel alpha values for the
  77. wl_surface. The exact meaning of the factor is thus undefined, unless
  78. the blending space is specified in a different extension.
  79. This multiplier is applied even if the buffer attached to the
  80. wl_surface doesn't have an alpha channel; in that case an alpha value
  81. of one is used instead.
  82. Zero means completely transparent, UINT32_MAX means completely opaque.
  83. </description>
  84. <arg name="factor" type="uint"/>
  85. </request>
  86. </interface>
  87. </protocol>