This commit is contained in:
root 2023-08-20 17:47:56 +08:00
parent cee83d820a
commit d3e9856295
6 changed files with 10 additions and 406 deletions

View File

@ -1,62 +0,0 @@
From 0d440c579b0f364bd655d97d1976d4eeddecf488 Mon Sep 17 00:00:00 2001
From: Demi Marie Obenour <demi@invisiblethingslab.com>
Date: Fri, 23 Jul 2021 14:02:12 -0400
Subject: [PATCH] Add documentation for XFixes v6
This was previously added but was not documented.
Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
---
src/xfixes.xml | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/xfixes.xml b/src/xfixes.xml
index a01cd7b..442bc02 100644
--- a/src/xfixes.xml
+++ b/src/xfixes.xml
@@ -365,10 +365,28 @@ authorization from the authors.
<enum name="ClientDisconnectFlags">
<item name="Default"><value>0</value></item>
<item name="Terminate"><bit>0</bit></item>
+ <doc>
+ <field name="Default"><![CDATA[
+The default behavior for regular clients: the X11 server won't terminate as long
+as such clients are still connected, and should this client disconnect, the
+server will continue running so long as other clients (that have not set
+XFixesClientDisconnectFlagTerminate) are connected.
+ ]]></field>
+ <field name="Terminate"><![CDATA[
+Indicates to the X11 server that it can ignore the client and terminate itself
+even though the client is still connected to the X11 server.
+ ]]></field>
+ </doc>
</enum>
<request name="SetClientDisconnectMode" opcode="33">
<field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
+ <doc>
+ <brief>Sets the disconnect mode for the client.</brief>
+ <field name="disconnect_mode"><![CDATA[
+The new disconnect mode.
+ ]]></field>
+ </doc>
</request>
<request name="GetClientDisconnectMode" opcode="34">
@@ -376,7 +394,12 @@ authorization from the authors.
<pad bytes="1" />
<field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
<pad bytes="20" />
+ <doc>
+ <brief>Gets the disconnect mode for the client.</brief>
+ <field name="disconnect_mode"><![CDATA[
+The current disconnect mode.
+ ]]></field>
+ </doc>
</reply>
</request>
-
</xcb>
--
2.40.0.windows.1

View File

@ -1,38 +0,0 @@
From bf228d330ed0be8bfb5d9055febabf81b785b8fa Mon Sep 17 00:00:00 2001
From: Demi Marie Obenour <demiobenour@gmail.com>
Date: Sun, 21 Aug 2022 10:26:47 -0400
Subject: [PATCH] Document BIG-REQUESTS
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
---
src/bigreq.xml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/bigreq.xml b/src/bigreq.xml
index 3cca2f7..ddd1e21 100644
--- a/src/bigreq.xml
+++ b/src/bigreq.xml
@@ -33,6 +33,20 @@ authorization from the authors.
<reply>
<pad bytes="1" />
<field type="CARD32" name="maximum_request_length" />
+ <doc>
+ <field name="maximum_request_length">
+The maximum length of requests supported by the server, in 4-byte units.
+ </field>
+ </doc>
</reply>
+ <doc>
+ <brief>Enable the BIG-REQUESTS extension</brief>
+ <description>
+This enables the BIG-REQUESTS extension, which allows for requests larger than
+262140 bytes in length. When enabled, if the 16-bit length field is zero, it
+is immediately followed by a 32-bit length field specifying the length of the
+request in 4-byte units.
+ </description>
+ </doc>
</request>
</xcb>
--
2.36.0.windows.1

View File

@ -1,295 +0,0 @@
From 0fc6197034c49d9fdf5607cae201f1ac3270e7de Mon Sep 17 00:00:00 2001
From: Demi Marie Obenour <demiobenour@gmail.com>
Date: Sun, 3 Jul 2022 18:01:40 -0400
Subject: [PATCH] Document the MIT-SHM extension
This adds documentation for the entire MIT-SHM extension.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
---
src/shm.xml | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 214 insertions(+)
diff --git a/src/shm.xml b/src/shm.xml
index c2605da..41fb1c1 100644
--- a/src/shm.xml
+++ b/src/shm.xml
@@ -39,6 +39,29 @@ authorization from the authors.
<pad bytes="1" />
<field type="SEG" name="shmseg" />
<field type="CARD32" name="offset" />
+ <doc>
+ <brief>Report that an XCB_SHM_PUT_IMAGE request has completed</brief>
+ <description><![CDATA[
+This is generated by the X server to report that an XCB_SHM_PUT_IMAGE request
+has been successfully processed.
+ ]]></description>
+ <field name="drawable"><![CDATA[
+The drawable used in the XCB_SHM_PUT_IMAGE request.
+ ]]></field>
+ <field name="minor_event"><![CDATA[
+The minor opcode used in the request. Always XCB_SHM_PUT_IMAGE.
+ ]]></field>
+ <field name="major_event"><![CDATA[
+The major opcode used in the request. Always the opcode of the MIT-SHM
+extension.
+ ]]></field>
+ <field name="shmseg"><![CDATA[
+The shared memory segment used in the request.
+ ]]></field>
+ <field name="offset"><![CDATA[
+The offset in the shared memory segment used in the request.
+ ]]></field>
+ </doc>
</event>
<errorcopy name="BadSeg" number="0" ref="Value" />
@@ -52,7 +75,39 @@ authorization from the authors.
<field type="CARD16" name="gid" />
<field type="CARD8" name="pixmap_format" />
<pad bytes="15" />
+ <doc>
+ <brief>The version of the MIT-SHM extension supported by the server</brief>
+ <description><![CDATA[
+This contains the version of the MIT-SHM extension supported by the server, as
+well as the servers UID and GID. Clients MUST obtain the version supproted by
+the server before making other requests from this extension. To prevent local
+privilege escalation and local information leak security vulnerabilities,
+clients MUST ensure that System V shared memory objects they use with this
+extension can only be accessed by the client and the X server. If this is not
+possible, the requests in this extension that use System V shared memory MUST
+NOT be used. The file descriptor-passing versions provide an alternative.
+ ]]></description>
+ <field name="shared_pixmaps"><![CDATA[
+True if the server supports shared pixmaps, otherwise false.
+ ]]></field>
+ <field name="major_version"><![CDATA[
+The major version of the extension supported.
+ ]]></field>
+ <field name="minor_version"><![CDATA[
+The minor version of the extension supported.
+ ]]></field>
+ <field name="uid">The UID of the server.</field>
+ <field name="gid">The GID of the server.</field>
+ </doc>
</reply>
+ <doc>
+ <brief>Query the version of the MIT-SHM extension.</brief>
+ <description><![CDATA[
+This is used to determine the version of the MIT-SHM extension supported by the
+X server. Clients MUST NOT make other requests in this extension until a reply
+to this requests indicates the X server supports them.
+ ]]></description>
+ </doc>
</request>
<request name="Attach" opcode="1">
@@ -60,10 +115,36 @@ authorization from the authors.
<field type="CARD32" name="shmid" />
<field type="BOOL" name="read_only" />
<pad bytes="3" />
+ <doc>
+ <brief>Attach a System V shared memory segment.</brief>
+ <description><![CDATA[
+Attach a System V shared memory segment to the server. This will fail unless
+the server has permission to map the segment. The client may destroy the segment
+as soon as it receives a XCB_SHM_COMPLETION event with the shmseg value in this
+request and with the appropriate serial number.
+ ]]></description>
+ <field name="shmseg"><![CDATA[
+A shared memory segment ID created with xcb_generate_id().
+ ]]></field>
+ <field name="shmid"><![CDATA[
+The System V shared memory segment the server should map.
+ ]]></field>
+ <field name="read_only"><![CDATA[
+True if the segment shall be mapped read only by the X11 server, otherwise false.
+ ]]></field>
+ </doc>
</request>
<request name="Detach" opcode="2">
<field type="SEG" name="shmseg" />
+ <doc>
+ <brief>Destroys the specified shared memory segment.</brief>
+ <description><![CDATA[
+Destroys the specified shared memory segment. This will never fail unless the
+segment number is incorrect.
+ ]]></description>
+ <field name="shmseg">The segment to be destroyed.</field>
+ </doc>
</request>
<request name="PutImage" opcode="3">
@@ -83,6 +164,49 @@ authorization from the authors.
<pad bytes="1" />
<field type="SEG" name="shmseg" />
<field type="CARD32" name="offset" />
+ <doc>
+ <brief>Copy data from the shared memory to the specified drawable.</brief>
+ <description><![CDATA[
+Copy data from the shared memory to the specified drawable. The amount of bytes
+written to the destination image is always equal to the number of bytes read
+from the shared memory segment.
+ ]]></description>
+ <field name="drawable">The drawable to draw to.</field>
+ <field name="gc">The graphics context to use.</field>
+ <field name="total_width">The total width of the source image.</field>
+ <field name="total_height">The total height of the source image.</field>
+ <field name="src_x">The source X coordinate of the sub-image to copy.</field>
+ <field name="src_y">The source Y coordinate of the sub-image to copy.</field>
+ <field name="src_width"><![CDATA[
+The width, in source image coordinates, of the data to copy from the source.
+The X server will use this to determine the amount of data to copy. The amount
+of the destination image that is overwritten is determined automatically.
+ ]]></field>
+ <field name="src_height"><![CDATA[
+The height, in source image coordinates, of the data to copy from the source.
+The X server will use this to determine the amount of data to copy. The amount
+of the destination image that is overwritten is determined automatically.
+ ]]></field>
+ <field name="dst_x"><![CDATA[
+The X coordinate on the destination drawable to copy to.
+ ]]></field>
+ <field name="dst_y"><![CDATA[
+The Y coordinate on the destination drawable to copy to.
+ ]]></field>
+ <field name="depth">The depth to use.</field>
+ <field name="format"><![CDATA[
+The format of the image being drawn. If it is XYBitmap, depth must be 1, or a
+“BadMatch” error results. The foreground pixel in the GC determines the source
+for the one bits in the image, and the background pixel determines the source
+for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of
+the drawable, or a “BadMatch” error results.
+ ]]></field>
+ <field name="send_event"><![CDATA[
+True if the server should send an XCB_SHM_COMPLETION event when the blit
+completes.
+ ]]></field>
+ <field name="offset">The offset that the source image starts at.</field>
+ </doc>
</request>
<request name="GetImage" opcode="4">
@@ -100,7 +224,33 @@ authorization from the authors.
<field type="CARD8" name="depth" />
<field type="VISUALID" name="visual" />
<field type="CARD32" name="size" />
+ <doc>
+ <brief>Indicates the result of the copy.</brief>
+ <description><![CDATA[
+The result of the copy.
+ ]]></description>
+ <field name="depth">The depth of the source drawable.</field>
+ <field name="visual">The visual ID of the source drawable.</field>
+ <field name="size">The number of bytes copied.</field>
+ </doc>
</reply>
+ <doc>
+ <brief>Copies data from the specified drawable to the shared memory segment.</brief>
+ <description><![CDATA[
+Copy data from the specified drawable to the shared memory segment. The amount
+of bytes written to the destination image is always equal to the number of bytes
+read from the shared memory segment.
+ ]]></description>
+ <field name="drawable">The drawable to copy the image out of.</field>
+ <field name="x">The X coordinate in the drawable to begin copying at.</field>
+ <field name="y">The Y coordinate in the drawable to begin copying at.</field>
+ <field name="width">The width of the image to copy.</field>
+ <field name="height">The height of the image to copy.</field>
+ <field name="plane_mask">A mask that determines which planes are used.</field>
+ <field name="format">The format to use for the copy (???).</field>
+ <field name="shmseg">The destination shared memory segment.</field>
+ <field name="offset">The offset in the shared memory segment to copy data to.</field>
+ </doc>
</request>
<request name="CreatePixmap" opcode="5">
@@ -112,6 +262,31 @@ authorization from the authors.
<pad bytes="3" />
<field type="SEG" name="shmseg" />
<field type="CARD32" name="offset" />
+ <doc>
+ <brief>Create a pixmap backed by shared memory.</brief>
+ <description>
+Create a pixmap backed by shared memory. Writes to the shared memory will be
+reflected in the contents of the pixmap, and writes to the pixmap will be
+reflected in the contents of the shared memory.
+ </description>
+ <field name="pid">A pixmap ID created with xcb_generate_id().</field>
+ <field name="drawable">The drawable to create the pixmap in.</field>
+ <field name="width"><![CDATA[
+The width of the pixmap to create. Must be nonzero, or a Value error results.
+ ]]></field>
+ <field name="height"><![CDATA[
+The height of the pixmap to create. Must be nonzero, or a Value error results.
+ ]]></field>
+ <field name="depth"><![CDATA[
+The depth of the pixmap to create. Must be nonzero, or a Value error results.
+ ]]></field>
+ <field name="shmseg"><![CDATA[
+The shared memory segment to use to create the pixmap.
+ ]]></field>
+ <field name="offset"><![CDATA[
+The offset in the segment to create the pixmap at.
+ ]]></field>
+ </doc>
</request>
<request name="AttachFd" opcode="6">
@@ -119,6 +294,21 @@ authorization from the authors.
<fd name="shm_fd" />
<field type="BOOL" name="read_only" />
<pad bytes="3" />
+ <doc>
+ <brief>Create a shared memory segment</brief>
+ <description><![CDATA[
+Create a shared memory segment. The file descriptor will be mapped at offset
+zero, and the size will be obtained using fstat(). A zero size will result in a
+Value error.
+ ]]></description>
+ <field name="shmseg"><![CDATA[
+A shared memory segment ID created with xcb_generate_id().
+ ]]></field>
+ <field name="shm_fd">The file descriptor the server should mmap().</field>
+ <field name="read_only"><![CDATA[
+True if the segment shall be mapped read only by the X11 server, otherwise false.
+ ]]></field>
+ </doc>
</request>
<request name="CreateSegment" opcode="7">
@@ -130,6 +320,30 @@ authorization from the authors.
<field type="CARD8" name="nfd" />
<fd name="shm_fd" />
<pad bytes="24" />
+ <doc>
+ <brief>The returned file descriptor.</brief>
+ <description><![CDATA[
+The file descriptor returned by the server. The client may call mmap() on it to
+map the memory allocated by the server.
+ ]]></description>
+ <field name="nfd"><![CDATA[
+The number of file descriptors sent by the server. Will always be 1.
+ ]]></field>
+ </doc>
</reply>
+ <doc>
+ <brief>Asks the server to allocate a shared memory segment.</brief>
+ <description><![CDATA[
+Asks the server to allocate a shared memory segment. The servers reply will
+include a file descriptor for the client to pass to mmap().
+ ]]></description>
+ <field name="shmseg"><![CDATA[
+A shared memory segment ID created with xcb_generate_id().
+ ]]></field>
+ <field name="size">The size of the segment to create.</field>
+ <field name="read_only"><![CDATA[
+True if the server should map the segment read-only; otherwise false.
+ ]]></field>
+ </doc>
</request>
</xcb>
--
2.39.0.windows.2

Binary file not shown.

BIN
xcb-proto-1.16.0.tar.xz Normal file

Binary file not shown.

View File

@ -1,21 +1,16 @@
%define debug_package %{nil}
Name: xcb-proto
Version: 1.15.2
Release: 3
Version: 1.16.0
Release: 1
Summary: XCB protocol descriptions
License: MIT
URL: https://gitlab.freedesktop.org/xorg/proto/xcbproto/
Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.gz
URL: https://xcb.freedesktop.org
Source0: https://www.x.org/releases/individual/proto/%{name}-%{version}.tar.xz
BuildArch: noarch
BuildRequires: python3-devel
Requires: pkgconfig
Patch0001: backport-0001-Document-the-MIT-SHM-extension.patch
Patch0002: Add-documentation-for-XFixes-v6.patch
Patch0003: Document-BIG-REQUESTS.patch
%description
The X protocol C-language Binding (XCB) is a replacement for
Xlib featuring a small footprint, latency hiding, direct access
@ -25,14 +20,15 @@ to the protocol, improved threading support, and extensibility.
%autosetup -n %{name}-%{version} -p1
%build
%configure --libdir=%{_datadir}
%configure
%make_build
%install
%make_install
%files
%doc COPYING NEWS README.md TODO doc/xml-xcb.txt
%license COPYING
%doc NEWS README.md TODO doc/xml-xcb.txt
%{_datadir}/pkgconfig/xcb-proto.pc
%dir %{_datadir}/xcb/
%{_datadir}/xcb/*.xsd
@ -40,6 +36,9 @@ to the protocol, improved threading support, and extensibility.
%{python3_sitelib}/xcbgen
%changelog
* Sun Aug 20 2023 Funda Wang <fundawang@yeah.net> - 1.16.0-1
- update to 1.16.0
* Sat Jul 15 2023 yaozile <yaozile@xfusion.com> - 1.15.2-3
- Add-documentation-for-XFixes-v6.patch