From e6c3a80b01ffb52079783cddd9be6d392d0f7039 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 29 Jul 2024 19:59:52 -0400 Subject: redesign compositor protocol, start widget library --- documentation/compositor.txt | 48 ++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) (limited to 'documentation/compositor.txt') 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 -- cgit v1.2.3