Fix GUI protocol doc formatting

This commit is contained in:
Marek Marczykowski-Górecki 2016-02-07 20:40:16 +01:00
parent 88afdd9c3c
commit 0af53d1e78
No known key found for this signature in database
GPG key ID: F32894BE9684938A

View file

@ -119,68 +119,138 @@ struct msghdr {
The header is followed by message-specific data. The header is followed by message-specific data.
~~~ <table class="table">
|Message name|Structure after header|Action| <tr>
|:-----------|:---------------------|:-----| <th>Message name</th>
|MSG_CLIPBOARD_DATA|amorphic blob (length determined by the "window" field)|Store the received clipboard content (not parsing in any way)| <th>Structure after header</th>
|MSG_CREATE|` struct msg_create { ` <th>Action</th>
` uint32_t x; ` </tr>
` uint32_t y; ` <tr>
` uint32_t width; ` <td>MSG_CLIPBOARD_DATA</td>
` uint32_t height; ` <td>amorphic blob (length determined by the "window" field)</td>
` uint32_t parent; ` <td>Store the received clipboard content (not parsing in any way)</td>
` uint32_t override_redirect; ` </tr>
` }; `|Create a window with given parameters| <tr>
|MSG_DESTROY|None|Destroy a window| <td>MSG_CREATE</td>
|MSG_MAP|` struct msg_map_info { ` <td><pre>
` uint32_t transient_for; ` struct msg_create {
` uint32_t override_redirect; ` uint32_t x;
` }; `|Map a window with given parameters| uint32_t y;
|MSG_UNMAP|None|Unmap a window| uint32_t width;
|MSG_CONFIGURE|` struct msg_configure { ` uint32_t height;
` uint32_t x; ` uint32_t parent;
` uint32_t y; ` uint32_t override_redirect;
` uint32_t width; ` };
` uint32_t height; ` </pre>
` uint32_t override_redirect; ` </td>
` }; `|Change window position/size/type| <td>Create a window with given parameters</td>
|MSG_MFNDUMP|` struct shm_cmd { ` </tr>
` uint32_t shmid; ` <tr>
` uint32_t width; ` <td>MSG_DESTROY</td>
` uint32_t height; ` <td>None</td>
` uint32_t bpp; ` <td>Destroy a window</td>
` uint32_t off; ` </tr>
` uint32_t num_mfn; ` <tr>
` uint32_t domid; ` <td>MSG_MAP</td>
` uint32_t mfns[0]; ` <td><pre>
` }; `|Retrieve the array of mfns that constitute the composition buffer of a remote window. struct msg_map_info {
uint32_t transient_for;
uint32_t override_redirect;
};
</pre></td>
<td>Map a window with given parameters</td>
</tr>
<tr>
<td>MSG_UNMAP</td>
<td>None</td>
<td>Unmap a window</td>
</tr>
<tr>
<td>MSG_CONFIGURE</td>
<td><pre>
struct msg_configure {
uint32_t x;
uint32_t y;
uint32_t width;
uint32_t height;
uint32_t override_redirect;
};
</pre></td>
<td>Change window position/size/type</td>
</tr>
<tr>
<td>MSG_MFNDUMP</td>
<td><pre>
struct shm_cmd {
uint32_t shmid;
uint32_t width;
uint32_t height;
uint32_t bpp;
uint32_t off;
uint32_t num_mfn;
uint32_t domid;
uint32_t mfns[0];
};
</pre></td>
<td>Retrieve the array of mfns that constitute the composition buffer of a remote window.
The "num_mfn" 32bit integers follow the shm_cmd structure; "off" is the offset of the composite buffer start in the first frame; "shmid" and "domid" parameters are just placeholders (to be filled by *qubes_guid*), so that we can use the same structure when talking to *shmoverride.so*| The "num_mfn" 32bit integers follow the shm_cmd structure; "off" is the offset of the composite buffer start in the first frame; "shmid" and "domid" parameters are just placeholders (to be filled by *qubes_guid*), so that we can use the same structure when talking to *shmoverride.so*|
|MSG_SHMIMAGE|` struct msg_shmimage { ` </td>
` uint32_t x; ` </tr>
` uint32_t y;` <tr>
` uint32_t width;` <td>MSG_SHMIMAGE</td>
` uint32_t height;` <td><pre>
` }; `|Repaint the given window fragment| struct msg_shmimage {
|MSG_WMNAME|` struct msg_wmname { ` uint32_t x;
` char data[128]; ` uint32_t y;
` } ; `|Set the window name; only printable characters are allowed| uint32_t width;
|MSG_DOCK|None|Dock the window in the tray| uint32_t height;
|MSG_WINDOW_HINTS|` struct msg_window_hints { ` };
` uint32_t flags; ` </pre> </td>
` uint32_t min_width; ` <td>Repaint the given window fragment</td>
` uint32_t min_height; ` </tr>
` uint32_t max_width; ` <tr>
` uint32_t max_height; ` <td>MSG_WMNAME</td>
` uint32_t width_inc; ` <td><pre>
` uint32_t height_inc; ` struct msg_wmname {
` uint32_t base_width; ` char data[128];
` uint32_t base_height; ` };
` }; `|Size hints for window manager| </pre></td>
|MSG_WINDOW_FLAGS|` struct msg_window_flags { ` <td>Set the window name; only printable characters are allowed</td>
` uint32_t flags_set; ` </tr>
` uint32_t flags_unset;` <tr>
` }; `|Change window state request; fields contains bitmask which flags request to be set and which unset| <td>MSG_DOCK</td>
~~~ <td>None</td>
<td>Dock the window in the tray</td>
</tr>
<tr>
<td>MSG_WINDOW_HINTS</td>
<td><pre>
struct msg_window_hints {
uint32_t flags;
uint32_t min_width;
uint32_t min_height;
uint32_t max_width;
uint32_t max_height;
uint32_t width_inc;
uint32_t height_inc;
uint32_t base_width;
uint32_t base_height;
};
</pre> </td>
<td>Size hints for window manager</td>
</tr>
<tr>
<td>MSG_WINDOW_FLAGS</td>
<td><pre>
struct msg_window_flags {
uint32_t flags_set;
uint32_t flags_unset;
};
</pre> </td>
<td>Change window state request; fields contains bitmask which flags request to be set and which unset</td>
</tr>
</table>
Dom0 -> AppVM messages Dom0 -> AppVM messages
----------------------- -----------------------
@ -197,63 +267,134 @@ struct msghdr {
~~~ ~~~
The header is followed by message-specific data. The header is followed by message-specific data.
` KEYPRESS, BUTTON, MOTION, FOCUS ` messages pass information extracted from dom0 XEvent; see appropriate event documentation. `KEYPRESS`, `BUTTON`, `MOTION`, `FOCUS` messages pass information extracted from dom0 XEvent; see appropriate event documentation.
~~~ <table class="table">
|Message name|Structure after header|Action| <tr>
|:-----------|:---------------------|:-----| <th>Message name</th>
|MSG_KEYPRESS|` struct msg_keypress { ` <th>Structure after header</th>
` uint32_t type; ` <th>Action</th>
` uint32_t x; ` </tr>
` uint32_t y; ` <tr>
` uint32_t state; ` <td>MSG_KEYPRESS</td>
` uint32_t keycode; ` <td><pre>
` }; `|Tell *qubes_drv* driver to generate a keypress| struct msg_keypress {
|MSG_BUTTON|` struct msg_button { ` uint32_t type;
` uint32_t type; ` uint32_t x;
` uint32_t x; ` uint32_t y;
` uint32_t y; ` uint32_t state;
` uint32_t state; ` uint32_t keycode;
` uint32_t button; ` };
` }; `|Tell *qubes_drv* driver to generate mouseclick| </pre> </td>
|MSG_MOTION|` struct msg_motion { ` <td>Tell *qubes_drv* driver to generate a keypress</td>
` uint32_t x; ` </tr>
` uint32_t y; ` <tr>
` uint32_t state; ` <td>MSG_BUTTON</td>
` uint32_t is_hint; ` <td><pre>
` }; `|Tell *qubes_drv* driver to generate motion event| struct msg_button {
|MSG_CONFIGURE|` struct msg_configure { ` uint32_t type;
` uint32_t x; ` uint32_t x;
` uint32_t y; ` uint32_t y;
` uint32_t width; ` uint32_t state;
` uint32_t height; ` uint32_t button;
` uint32_t override_redirect; ` };
` }; `|Change window position/size/type| </pre> </td>
|MSG_MAP|` struct msg_map_info { ` <td>Tell *qubes_drv* driver to generate mouseclick</td>
` uint32_t transient_for; ` </tr>
` uint32_t override_redirect; ` <tr>
` }; `|Map a window with given parameters| <td>MSG_MOTION</td>
|MSG_CLOSE|None|send wmDeleteMessage to the window| <td><pre>
|MSG_CROSSING|` struct msg_crossing { ` struct msg_motion {
` uint32_t type; ` uint32_t x;
` uint32_t x; ` uint32_t y;
` uint32_t y; ` uint32_t state;
` uint32_t state; ` uint32_t is_hint;
` uint32_t mode; ` };
` uint32_t detail; ` </pre> </td>
` uint32_t focus; ` <td>Tell *qubes_drv* driver to generate motion event</td>
` }; `|Notify window about enter/leave event| </tr>
|MSG_FOCUS|` struct msg_focus { ` <tr>
` uint32_t type; ` <td>MSG_CONFIGURE</td>
` uint32_t mode; ` <td><pre>
` uint32_t detail; ` struct msg_configure {
` }; `|Raise a window, XSetInputFocus| uint32_t x;
|MSG_CLIPBOARD_REQ|None|Retrieve the local clipboard, pass contents to gui-daemon| uint32_t y;
|MSG_CLIPBOARD_DATA|amorphic blob|Insert the received data into local clipboard| uint32_t width;
|MSG_EXECUTE|Obsolete|Obsolete, unused| uint32_t height;
|MSG_KEYMAP_NOTIFY|` unsigned char remote_keys[32]; `|Synchronize the keyboard state (key pressed/released) with dom0| uint32_t override_redirect;
|MSG_WINDOW_FLAGS|` struct msg_window_flags { ` };
` uint32_t flags_set; ` </pre> </td>
` uint32_t flags_unset;` <td>Change window position/size/type</td>
` }; `|Window state change confirmation| </tr>
~~~ <tr>
<td>MSG_MAP</td>
<td><pre>
struct msg_map_info {
uint32_t transient_for;
uint32_t override_redirect;
};
</pre> </td>
<td>Map a window with given parameters</td>
</tr>
<tr>
<td>MSG_CLOSE</td>
<td>None</td>
<td>send wmDeleteMessage to the window</td>
</tr>
<tr>
<td>MSG_CROSSING</td>
<td><pre>
struct msg_crossing {
uint32_t type;
uint32_t x;
uint32_t y;
uint32_t state;
uint32_t mode;
uint32_t detail;
uint32_t focus;
};
</pre> </td>
<td>Notify window about enter/leave event</td>
</tr>
<tr>
<td>MSG_FOCUS</td>
<td><pre>
struct msg_focus {
uint32_t type;
uint32_t mode;
uint32_t detail;
};
</pre> </td>
<td>Raise a window, XSetInputFocus</td>
</tr>
<tr>
<td>MSG_CLIPBOARD_REQ</td>
<td>None</td>
<td>Retrieve the local clipboard, pass contents to gui-daemon</td>
</tr>
<tr>
<td>MSG_CLIPBOARD_DATA</td>
<td>amorphic blob</td>
<td>Insert the received data into local clipboard</td>
</tr>
<tr>
<td>MSG_EXECUTE</td>
<td>Obsolete</td>
<td>Obsolete, unused</td>
</tr>
<tr>
<td>MSG_KEYMAP_NOTIFY</td>
<td> unsigned char remote_keys[32]; </td>
<td>Synchronize the keyboard state (key pressed/released) with dom0</td>
</tr>
<tr>
<td>MSG_WINDOW_FLAGS</td>
<td><pre>
struct msg_window_flags {
uint32_t flags_set;
uint32_t flags_unset;
};
</pre> </td>
<td>Window state change confirmation</td>
</tr>
</table>