summaryrefslogtreecommitdiff
path: root/documentation/compositor.txt
blob: 8346db74dcd38c51b847bc128473e178cc8bdd33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
compositors listen on the socket id "hilbert.compositor".

there is a one-to-one correspondence between sockets to the compositor and
windows. when a socket is opened, a window is created, and when a socket is
closed, its window is destroyed. this socket can be gifted to another process,
and the other process then becomes the window's owner.

data types:

  color:
    opaque dword (result of encode color system call).
    from c++, use euler::syscall::encode_color in euler/syscall.hpp.

  color rectangle:
    multiple hilbert colors, top to bottom by row, left to right within row

messages from applications to compositor:

  show window:
    byte: 0x00

  hide window:
    byte: 0x01

  set window dimensions:
    byte: 0x02
    dword: width
    dword: height

  set window title:
    byte: 0x03
    dword: length in bytes
    bytes: title

  update window region:
    byte: 0x04
    dword: start x
    dword: start y
    dword: width
    dword: height
    color rectangle: new content