diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/protocols | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/doc/protocols b/doc/protocols index fc9ac69..d40123b 100644 --- a/doc/protocols +++ b/doc/protocols @@ -307,6 +307,11 @@ Conditionally required header: Bytes 24-bit colours will have this set to 1 because each subpixel has 8 bits, 48-bit colours will have this set to 2 because each subpixel has 16 bits + Allowed values are: 1, 2, 4 and 8. These values are + used used so that CPU:s with any endianness can be + trivially used as the words sizes are guaranteed to + be supported in C, and mixed/middle-endiannes gets + complicated if we go outside this. Conditionally optional/required header: Colour Available and optional if: `Length`-header is not used @@ -327,9 +332,11 @@ Optional header: Use urgency no) The icon tray may not blink Message: Raw binary encoding of the background image, bytes - are orders: row, pixel, channel (red, green, blue, - then optionally alpha), subpixel value (most - significant byte first) + are orders: row, pixel, channel (alpha, red, green, + blue), subpixel value (native CPU encoding). The + Alpha channel should be included but ignored if + `Has alpha: no`, in such as it is best to set it to + full. Example image (with `Bytes: 2`, `Has alpha: no` and `Size: 3`): sRGB(x0102, 0, 0), sRGB(0, x0304, 0), sRGB(0, 0, x0506) @@ -337,10 +344,19 @@ Message: Raw binary encoding of the background image, bytes sRGB(x0D0E, 0, 0), sRGB(0, x0F10, 0), sRGB(0, 0, x1112) Encoding of example image (hexadecimal): - 0102 0000 0000 0000 0304 0000 0000 0000 0506 - 0708 0000 0000 0000 090A 0000 0000 0000 0B0C - 0D0E 0000 0000 0000 0F10 0000 0000 0000 1112 - + FFFF 0102 0000 0000 FFFF 0000 0304 0000 FFFF 0000 0000 0506 + FFFF 0708 0000 0000 FFFF 0000 090A 0000 FFFF 0000 0000 0B0C + FFFF 0D0E 0000 0000 FFFF 0000 0F10 0000 FFFF 0000 0000 1112 + + Note that on a big-endian system this would be: + FF FF 02 01 00 00 00 00 FF FF 00 00 04 03 00 00 FF FF 00 00 00 00 06 05 + FF FF 08 07 00 00 00 00 FF FF 00 00 0A 09 00 00 FF FF 00 00 00 00 0C 0B + FF FF 0E 0D 00 00 00 00 FF FF 00 00 10 0F 00 00 FF FF 00 00 00 00 12 11 + (x86_64 computers are big-endian) + + It is up to the networking servers to translate + the encoding between machines. (The host translates to big-endian + unless they can confirm that they have the same endianness.) Purpose: Enable clients to be aware of the appearance of the tray, such as colours, transparency and background image |