single-pixel-buffer-v1.xml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <protocol name="single_pixel_buffer_v1">
  3. <copyright>
  4. Copyright © 2022 Simon Ser
  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="single pixel buffer factory">
  23. This protocol extension allows clients to create single-pixel buffers.
  24. Compositors supporting this protocol extension should also support the
  25. viewporter protocol extension. Clients may use viewporter to scale a
  26. single-pixel buffer to a desired size.
  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. <interface name="wp_single_pixel_buffer_manager_v1" version="1">
  33. <description summary="global factory for single-pixel buffers">
  34. The wp_single_pixel_buffer_manager_v1 interface is a factory for
  35. single-pixel buffers.
  36. </description>
  37. <request name="destroy" type="destructor">
  38. <description summary="destroy the manager">
  39. Destroy the wp_single_pixel_buffer_manager_v1 object.
  40. The child objects created via this interface are unaffected.
  41. </description>
  42. </request>
  43. <request name="create_u32_rgba_buffer">
  44. <description summary="create a 1×1 buffer from 32-bit RGBA values">
  45. Create a single-pixel buffer from four 32-bit RGBA values.
  46. Unless specified in another protocol extension, the RGBA values use
  47. pre-multiplied alpha.
  48. The width and height of the buffer are 1.
  49. The r, g, b and a arguments valid range is from UINT32_MIN (0)
  50. to UINT32_MAX (0xffffffff).
  51. These arguments should be interpreted as a percentage, i.e.
  52. - UINT32_MIN = 0% of the given color component
  53. - UINT32_MAX = 100% of the given color component
  54. </description>
  55. <arg name="id" type="new_id" interface="wl_buffer"/>
  56. <arg name="r" type="uint" summary="value of the buffer's red channel"/>
  57. <arg name="g" type="uint" summary="value of the buffer's green channel"/>
  58. <arg name="b" type="uint" summary="value of the buffer's blue channel"/>
  59. <arg name="a" type="uint" summary="value of the buffer's alpha channel"/>
  60. </request>
  61. </interface>
  62. </protocol>