diff options
author | Benji Dial <benji@benjidial.net> | 2024-07-29 19:59:52 -0400 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2024-07-29 19:59:52 -0400 |
commit | e6c3a80b01ffb52079783cddd9be6d392d0f7039 (patch) | |
tree | 148276b9878f287bc81638f90249ec4d7b86eaf0 /documentation | |
parent | be691582ee12613278af24cb5a824eeb357f6324 (diff) | |
download | hilbert-os-e6c3a80b01ffb52079783cddd9be6d392d0f7039.tar.gz |
redesign compositor protocol, start widget library
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/compositor.txt | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/documentation/compositor.txt b/documentation/compositor.txt index 38bd482..8346db7 100644 --- a/documentation/compositor.txt +++ b/documentation/compositor.txt @@ -1,13 +1,9 @@ compositors listen on the socket id "hilbert.compositor". -when a window is opened by an application, that window can only be referred to -on that socket. the opaque value given in the "window opened" message refers to -that window in future messages on that socket. it is guaranteed to be distinct -for different windows on the same socket, and in no way guaranteed to be -distinct for different windows on different sockets. the window is bound -just to the socket, not to the application. if the socket where a window -was created is gifted to a new process, the new process has complete control -over the window, and the compositor does not need to be informed. +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: @@ -18,32 +14,28 @@ data types: color rectangle: multiple hilbert colors, top to bottom by row, left to right within row - window: - opaque word (given in "window opened" message after "open window" message) - messages from applications to compositor: - open window: + show window: byte: 0x00 - dword: window width - dword: window height - update window region: + hide window: byte: 0x01 - window: the window - dword: start x - dword: start y - dword: width - dword: height - color rectangle: the data - close window: + set window dimensions: byte: 0x02 - window: the window + dword: width + dword: height -messages from compositor to application: + set window title: + byte: 0x03 + dword: length in bytes + bytes: title - window opened: - byte: 0x00 - window: the window - these come in the order the open window requests were received + update window region: + byte: 0x04 + dword: start x + dword: start y + dword: width + dword: height + color rectangle: new content |