mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-04-10 10:29:03 -04:00
Fix GUI protocol doc formatting
This commit is contained in:
parent
88afdd9c3c
commit
0af53d1e78
@ -119,68 +119,138 @@ struct msghdr {
|
||||
|
||||
The header is followed by message-specific data.
|
||||
|
||||
~~~
|
||||
|Message name|Structure after header|Action|
|
||||
|:-----------|:---------------------|:-----|
|
||||
|MSG_CLIPBOARD_DATA|amorphic blob (length determined by the "window" field)|Store the received clipboard content (not parsing in any way)|
|
||||
|MSG_CREATE|` struct msg_create { `
|
||||
` uint32_t x; `
|
||||
` uint32_t y; `
|
||||
` uint32_t width; `
|
||||
` uint32_t height; `
|
||||
` uint32_t parent; `
|
||||
` uint32_t override_redirect; `
|
||||
` }; `|Create a window with given parameters|
|
||||
|MSG_DESTROY|None|Destroy a window|
|
||||
|MSG_MAP|` struct msg_map_info { `
|
||||
` uint32_t transient_for; `
|
||||
` uint32_t override_redirect; `
|
||||
` }; `|Map a window with given parameters|
|
||||
|MSG_UNMAP|None|Unmap a window|
|
||||
|MSG_CONFIGURE|` struct msg_configure { `
|
||||
` uint32_t x; `
|
||||
` uint32_t y; `
|
||||
` uint32_t width; `
|
||||
` uint32_t height; `
|
||||
` uint32_t override_redirect; `
|
||||
` }; `|Change window position/size/type|
|
||||
|MSG_MFNDUMP|` 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]; `
|
||||
` }; `|Retrieve the array of mfns that constitute the composition buffer of a remote window.
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Message name</th>
|
||||
<th>Structure after header</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_CLIPBOARD_DATA</td>
|
||||
<td>amorphic blob (length determined by the "window" field)</td>
|
||||
<td>Store the received clipboard content (not parsing in any way)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_CREATE</td>
|
||||
<td><pre>
|
||||
struct msg_create {
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t parent;
|
||||
uint32_t override_redirect;
|
||||
};
|
||||
</pre>
|
||||
</td>
|
||||
<td>Create a window with given parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_DESTROY</td>
|
||||
<td>None</td>
|
||||
<td>Destroy a window</td>
|
||||
</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_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*|
|
||||
|MSG_SHMIMAGE|` struct msg_shmimage { `
|
||||
` uint32_t x; `
|
||||
` uint32_t y;`
|
||||
` uint32_t width;`
|
||||
` uint32_t height;`
|
||||
` }; `|Repaint the given window fragment|
|
||||
|MSG_WMNAME|` struct msg_wmname { `
|
||||
` char data[128]; `
|
||||
` } ; `|Set the window name; only printable characters are allowed|
|
||||
|MSG_DOCK|None|Dock the window in the tray|
|
||||
|MSG_WINDOW_HINTS|` 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; `
|
||||
` }; `|Size hints for window manager|
|
||||
|MSG_WINDOW_FLAGS|` struct msg_window_flags { `
|
||||
` uint32_t flags_set; `
|
||||
` uint32_t flags_unset;`
|
||||
` }; `|Change window state request; fields contains bitmask which flags request to be set and which unset|
|
||||
~~~
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_SHMIMAGE</td>
|
||||
<td><pre>
|
||||
struct msg_shmimage {
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
};
|
||||
</pre> </td>
|
||||
<td>Repaint the given window fragment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_WMNAME</td>
|
||||
<td><pre>
|
||||
struct msg_wmname {
|
||||
char data[128];
|
||||
};
|
||||
</pre></td>
|
||||
<td>Set the window name; only printable characters are allowed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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
|
||||
-----------------------
|
||||
@ -197,63 +267,134 @@ struct msghdr {
|
||||
~~~
|
||||
|
||||
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.
|
||||
|
||||
~~~
|
||||
|Message name|Structure after header|Action|
|
||||
|:-----------|:---------------------|:-----|
|
||||
|MSG_KEYPRESS|` struct msg_keypress { `
|
||||
` uint32_t type; `
|
||||
` uint32_t x; `
|
||||
` uint32_t y; `
|
||||
` uint32_t state; `
|
||||
` uint32_t keycode; `
|
||||
` }; `|Tell *qubes_drv* driver to generate a keypress|
|
||||
|MSG_BUTTON|` struct msg_button { `
|
||||
` uint32_t type; `
|
||||
` uint32_t x; `
|
||||
` uint32_t y; `
|
||||
` uint32_t state; `
|
||||
` uint32_t button; `
|
||||
` }; `|Tell *qubes_drv* driver to generate mouseclick|
|
||||
|MSG_MOTION|` struct msg_motion { `
|
||||
` uint32_t x; `
|
||||
` uint32_t y; `
|
||||
` uint32_t state; `
|
||||
` uint32_t is_hint; `
|
||||
` }; `|Tell *qubes_drv* driver to generate motion event|
|
||||
|MSG_CONFIGURE|` struct msg_configure { `
|
||||
` uint32_t x; `
|
||||
` uint32_t y; `
|
||||
` uint32_t width; `
|
||||
` uint32_t height; `
|
||||
` uint32_t override_redirect; `
|
||||
` }; `|Change window position/size/type|
|
||||
|MSG_MAP|` struct msg_map_info { `
|
||||
` uint32_t transient_for; `
|
||||
` uint32_t override_redirect; `
|
||||
` }; `|Map a window with given parameters|
|
||||
|MSG_CLOSE|None|send wmDeleteMessage to the window|
|
||||
|MSG_CROSSING|` struct msg_crossing { `
|
||||
` uint32_t type; `
|
||||
` uint32_t x; `
|
||||
` uint32_t y; `
|
||||
` uint32_t state; `
|
||||
` uint32_t mode; `
|
||||
` uint32_t detail; `
|
||||
` uint32_t focus; `
|
||||
` }; `|Notify window about enter/leave event|
|
||||
|MSG_FOCUS|` struct msg_focus { `
|
||||
` uint32_t type; `
|
||||
` uint32_t mode; `
|
||||
` uint32_t detail; `
|
||||
` }; `|Raise a window, XSetInputFocus|
|
||||
|MSG_CLIPBOARD_REQ|None|Retrieve the local clipboard, pass contents to gui-daemon|
|
||||
|MSG_CLIPBOARD_DATA|amorphic blob|Insert the received data into local clipboard|
|
||||
|MSG_EXECUTE|Obsolete|Obsolete, unused|
|
||||
|MSG_KEYMAP_NOTIFY|` unsigned char remote_keys[32]; `|Synchronize the keyboard state (key pressed/released) with dom0|
|
||||
|MSG_WINDOW_FLAGS|` struct msg_window_flags { `
|
||||
` uint32_t flags_set; `
|
||||
` uint32_t flags_unset;`
|
||||
` }; `|Window state change confirmation|
|
||||
~~~
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Message name</th>
|
||||
<th>Structure after header</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_KEYPRESS</td>
|
||||
<td><pre>
|
||||
struct msg_keypress {
|
||||
uint32_t type;
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
uint32_t state;
|
||||
uint32_t keycode;
|
||||
};
|
||||
</pre> </td>
|
||||
<td>Tell *qubes_drv* driver to generate a keypress</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_BUTTON</td>
|
||||
<td><pre>
|
||||
struct msg_button {
|
||||
uint32_t type;
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
uint32_t state;
|
||||
uint32_t button;
|
||||
};
|
||||
</pre> </td>
|
||||
<td>Tell *qubes_drv* driver to generate mouseclick</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG_MOTION</td>
|
||||
<td><pre>
|
||||
struct msg_motion {
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
uint32_t state;
|
||||
uint32_t is_hint;
|
||||
};
|
||||
</pre> </td>
|
||||
<td>Tell *qubes_drv* driver to generate motion event</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_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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user