+ * - Message name
+ - Structure after header
+ - Action
+
+ * - MSG_CLIPBOARD_DATA
+ - amorphic blob (in protocol before 1.2, length determined by the “window” field, in 1.2 and later - by untrusted_len in the header)
+ - Store the received clipboard content (not parsed in any way)
+
+ * - MSG_CREATE
+ - .. code:: c
+
+ 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
-.. raw:: html
+ * - MSG_MAP
+ - .. code:: c
+
+ struct msg_map_info {
+ uint32_t transient_for;
+ uint32_t override_redirect;
+ };
-
+ - Map a window with given parameters
-.. raw:: html
+ * - MSG_UNMAP
+ - None
+ - Unmap a window
-
+ * - MSG_CONFIGURE
+ - .. code:: c
-Message name
+ struct msg_configure {
+ uint32_t x;
+ uint32_t y;
+ uint32_t width;
+ uint32_t height;
+ uint32_t override_redirect;
+ };
+
+ - Change window position/size/type
-.. raw:: html
+ * - MSG_MFNDUMP
+ - .. code:: c
- |
+ 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];
+ };
-.. raw:: html
+ - 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``.
-Structure after header
+ * - MSG_SHMIMAGE
+ - .. code:: c
-.. raw:: html
+ struct msg_shmimage {
+ uint32_t x;
+ uint32_t y;
+ uint32_t width;
+ uint32_t height;
+ };
- |
+ - Repaint the given window fragment
-.. raw:: html
+ * - MSG_WMNAME
+ - .. code:: c
-
+ struct msg_wmname {
+ char data[128];
+ };
-Action
+ - Set the window name. Only printable characters are allowed, and by default non-ASCII characters are not allowed.
-.. raw:: html
+ * - MSG_DOCK
+ - None
+ - Dock the window in the tray
- |
+ * - MSG_WINDOW_HINTS
+ - .. code:: c
-.. raw:: html
+ 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
-.. raw:: html
+ * - MSG_WINDOW_FLAGS
+ - .. code:: c
-
+ struct msg_window_flags {
+ uint32_t flags_set;
+ uint32_t flags_unset;
+ };
-.. raw:: html
+ - Change window state request; fields contains bitmask which flags request to be set and which unset
-
+ * - MSG_CURSOR
+ - .. code:: c
-MSG_CLIPBOARD_DATA
+ struct msg_cursor {
+ uint32_t cursor;
+ };
-.. raw:: html
+ - Update cursor pointer for a window. Supported cursor IDs are default cursor (0) and `X Font cursors `__ (with 0x100 bit set).
- |
+ * - MSG_WMCLASS
+ - .. code:: c
-.. raw:: html
+ struct msg_wmclass {
+ char res_class[64];
+ char res_name[64];
+ };
-
+ - Set the WM_CLASS property of a window.
-amorphic blob (in protocol before 1.2, length determined by the “window” field, in 1.2 and later - by untrusted_len in the header)
+ * - MSG_WINDOW_DUMP
+ - .. code:: c
-.. raw:: html
+ struct msg_window_dump_hdr {
+ uint32_t type;
+ uint32_t width;
+ uint32_t height;
+ uint32_t bpp;
+ };
- |
+ - Header for shared memory dump command of type hdr.type. Currently only ``WINDOW_DUMP_TYPE_GRANT_REFS`` (0) is supported.
+ * - WINDOW_DUMP_TYPE_GRANT_REFS
+ - .. code:: c
-.. raw:: html
+ struct msg_window_dump_grant_refs {
+ uint32_t refs[0];
+ };
-
-Store the received clipboard content (not parsed in any way)
+ - Grant references that should be mapped into the compositing buffer.
-.. raw:: html
- |
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CREATE
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_create {
- uint32_t x;
- uint32_t y;
- uint32_t width;
- uint32_t height;
- uint32_t parent;
- uint32_t override_redirect;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Create a window with given parameters
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_DESTROY
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-None
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Destroy a window
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_MAP
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_map_info {
- uint32_t transient_for;
- uint32_t override_redirect;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Map a window with given parameters
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_UNMAP
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-None
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Unmap a window
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CONFIGURE
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_configure {
- uint32_t x;
- uint32_t y;
- uint32_t width;
- uint32_t height;
- uint32_t override_redirect;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Change window position/size/type
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_MFNDUMP
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- 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];
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-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``.
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_SHMIMAGE
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_shmimage {
- uint32_t x;
- uint32_t y;
- uint32_t width;
- uint32_t height;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Repaint the given window fragment
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_WMNAME
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_wmname {
- char data[128];
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Set the window name. Only printable characters are allowed, and by default non-ASCII characters are not allowed.
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_DOCK
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-None
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Dock the window in the tray
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_WINDOW_HINTS
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- 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;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Size hints for window manager
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_WINDOW_FLAGS
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_window_flags {
- uint32_t flags_set;
- uint32_t flags_unset;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Change window state request; fields contains bitmask which flags request to be set and which unset
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CURSOR
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_cursor {
- uint32_t cursor;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Update cursor pointer for a window. Supported cursor IDs are default cursor (0) and `X Font cursors `__ (with 0x100 bit set).
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_WMCLASS
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_wmclass {
- char res_class[64];
- char res_name[64];
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Set the WM_CLASS property of a window.
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_WINDOW_DUMP
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_window_dump_hdr {
- uint32_t type;
- uint32_t width;
- uint32_t height;
- uint32_t bpp;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Header for shared memory dump command of type hdr.type. Currently only
-
-.. raw:: html
-
- WINDOW_DUMP_TYPE_GRANT_REFS
-
-(0) is supported.
-
- .. raw:: html
-
- |
-
- .. raw:: html
-
-
-
- .. raw:: html
-
-
-
- .. raw:: html
-
-
-
- WINDOW_DUMP_TYPE_GRANT_REFS
-
- .. raw:: html
-
- |
-
- .. raw:: html
-
-
-
- .. raw:: html
-
-
- struct msg_window_dump_grant_refs {
- uint32_t refs[0];
- };
-
-
- .. raw:: html
-
- |
-
- .. raw:: html
-
-
-
- Grant references that should be mapped into the compositing buffer.
-
- .. raw:: html
-
- |
-
- .. raw:: html
-
-
-
- .. raw:: html
-
-
-
- .. raw:: html
-
-
GuiVM -> AppVM messages
-----------------------
@@ -906,635 +300,126 @@ Each message starts with the following header
The header is followed by message-specific data:
-.. raw:: html
+.. list-table::
+
+ * - Message name
+ - Structure after header
+ - Action
+
+ * - MSG_KEYPRESS
+ - .. code:: c
+
+ 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
+ - .. code:: c
+ 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
+ - .. code:: c
+
+ 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
+ - .. code:: c
+
+ 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
+ - .. code:: c
+
+ 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
+ - .. code:: c
+
+ 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
+
+ - .. code:: c
+
+ 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
+ - .. code:: c
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-Message name
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Structure after header
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Action
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_KEYPRESS
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_keypress {
- uint32_t type;
- uint32_t x;
- uint32_t y;
- uint32_t state;
- uint32_t keycode;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Tell
-
-.. raw:: html
-
- qubes_drv
-
-driver to generate a keypress
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_BUTTON
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_button {
- uint32_t type;
- uint32_t x;
- uint32_t y;
- uint32_t state;
- uint32_t button;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Tell
-
-.. raw:: html
-
- qubes_drv
-
-driver to generate mouseclick
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_MOTION
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_motion {
- uint32_t x;
- uint32_t y;
- uint32_t state;
- uint32_t is_hint;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Tell
-
-.. raw:: html
-
- qubes_drv
-
-driver to generate motion event
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CONFIGURE
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_configure {
- uint32_t x;
- uint32_t y;
- uint32_t width;
- uint32_t height;
- uint32_t override_redirect;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Change window position/size/type
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_MAP
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_map_info {
- uint32_t transient_for;
- uint32_t override_redirect;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Map a window with given parameters
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CLOSE
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-None
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-send wmDeleteMessage to the window
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CROSSING
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_crossing {
- uint32_t type;
- uint32_t x;
- uint32_t y;
- uint32_t state;
- uint32_t mode;
- uint32_t detail;
- uint32_t focus;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Notify window about enter/leave event
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_FOCUS
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_focus {
- uint32_t type;
- uint32_t mode;
- uint32_t detail;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Raise a window, XSetInputFocus
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CLIPBOARD_REQ
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-None
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Retrieve the local clipboard, pass contents to gui-daemon
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_CLIPBOARD_DATA
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-amorphic blob
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Insert the received data into local clipboard
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_EXECUTE
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Obsolete
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Obsolete, unused
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_KEYMAP_NOTIFY
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-unsigned char remote_keys[32];
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Synchronize the keyboard state (key pressed/released) with dom0
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
-
-MSG_WINDOW_FLAGS
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
- struct msg_window_flags {
- uint32_t flags_set;
- uint32_t flags_unset;
- };
-
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-Window state change confirmation
-
-.. raw:: html
-
- |
-
-.. raw:: html
-
-
-
-.. raw:: html
-
-
+ struct msg_window_flags {
+ uint32_t flags_set;
+ uint32_t flags_unset;
+ };
+
+ - Window state change confirmation
``KEYPRESS``, ``BUTTON``, ``MOTION``, ``FOCUS`` messages pass information extracted from dom0 XEvent; see appropriate event documentation.
diff --git a/user/templates/templates.rst b/user/templates/templates.rst
index 941690d3..0cf9fccd 100644
--- a/user/templates/templates.rst
+++ b/user/templates/templates.rst
@@ -2,7 +2,6 @@
Templates
=========
-
In :doc:`Getting Started