diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ae5a6d9b3..c05f4c047 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,8 +14,8 @@ jobs: strategy: fail-fast: false matrix: - zig-version: [master] - os: [ubuntu-latest, windows-latest] + zig-version: [0.15.0] + os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -38,4 +38,6 @@ jobs: - name: Build for macOS if: runner.os == 'macOS' - run: zig build example -Dtarget=x86_64-macos-gnu --summary all + # We don't support cross compiling for macOS, so don't set a target just build + # the native target + run: zig build example --summary all diff --git a/build.zig.zon b/build.zig.zon index 12341ab4c..157f746a9 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,9 +5,9 @@ .minimum_zig_version = "0.15.0", .dependencies = .{ .sdl = .{ - .url = "https://github.com/libsdl-org/SDL/archive/refs/tags/release-3.2.22.tar.gz", - .hash = "N-V-__8AAKFOjAPblBRKaUrjSSH-09iZsd0hSjTHMs3Wj2BE", - .version = "3.2.22", + .url = "https://github.com/libsdl-org/SDL/archive/refs/tags/release-3.4.0.tar.gz", + .hash = "N-V-__8AABtk8gIAP7ZQ4yacjIPcrx3btsH0bGNpJG4MPpm6", + .version = "3.4.0", }, .dbus = .{ .version = "1.16.0", @@ -23,13 +23,14 @@ .hash = "N-V-__8AAMlebQAc6dRDTEIyEn_i5KeO8qNg3YdK_Sg1KgDT", }, .wayland = .{ - .version = "1.23.91", - .url = "https://gitlab.freedesktop.org/wayland/wayland/-/archive/1.23.91/wayland-1.23.91.tar.gz", - .hash = "N-V-__8AAKwRGQDuKfsGZKYj0NR5UBS8cR6-VKgoYzbRcqbY", + .version = "1.24.0", + .url = "git+https://gitlab.freedesktop.org/wayland/wayland#736d12ac67c20c60dc406dc49bb06be878501f86", + .hash = "N-V-__8AAGoeGQBEn6KguTJUXrCE0tIRrrXfQX7hYHoKCJwZ", }, .xkbcommon = .{ - .url = "https://github.com/xkbcommon/libxkbcommon/archive/refs/tags/xkbcommon-1.10.0.tar.gz", - .hash = "N-V-__8AAEq0XgBjGDGxFauY884ZX6kSkgXmismD6G5l5Su9", + .version = "1.9.2", + .url = "https://github.com/xkbcommon/libxkbcommon/archive/refs/tags/xkbcommon-1.9.2.tar.gz", + .hash = "N-V-__8AAEg7XADqmm_Axa-ISq9_0pDsCLjf9Xd8NIOndVMH", }, .xorgproto = .{ .url = "https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/archive/xorgproto-2024.1/xorgproto-xorgproto-2024.1.tar.gz", @@ -125,6 +126,17 @@ .url = "https://sndio.org/sndio-1.10.0.tar.gz", .hash = "N-V-__8AAKA0CgB5SuKmufbOKBnZsjDFZuUTNO70MHQEf1p8", }, + .fribidi = .{ + .version = "1.0.16", + .interface_version = 4, + .unicode_version = "16.0.0", + .url = "https://github.com/fribidi/fribidi/archive/refs/tags/v1.0.16.tar.gz", + .hash = "N-V-__8AABbxDAFJr4_dchs33gEqLRpBMP2oUBTuIueW9u_h", + }, + .thai = .{ + .url = "https://github.com/tlwg/libthai/archive/refs/tags/v0.1.30.tar.gz", + .hash = "N-V-__8AAAqMIgArahV5mT0LGKWmDhZC9QtlMIZlaT9yp_lP", + }, }, .paths = .{ "build.zig", diff --git a/deps/wayland/protocols/color-management-v1-client-protocol.h b/deps/wayland/protocols/color-management-v1-client-protocol.h index 55ff9f35d..edd3f1132 100644 --- a/deps/wayland/protocols/color-management-v1-client-protocol.h +++ b/deps/wayland/protocols/color-management-v1-client-protocol.h @@ -19,9 +19,14 @@ extern "C" { * * The aim of the color management extension is to allow clients to know * the color properties of outputs, and to tell the compositor about the color - * properties of their content on surfaces. Doing this enables a compositor - * to perform automatic color management of content for different outputs - * according to how content is intended to look like. + * properties of their content on surfaces. All surface contents must be + * readily intended for some display, but not necessarily for the display at + * hand. Doing this enables a compositor to perform automatic color management + * of content for different outputs according to how content is intended to + * look like. + * + * For an introduction, see the section "Color management" in the Wayland + * documentation at https://wayland.freedesktop.org/docs/html/ . * * The color properties are represented as an image description object which * is immutable after it has been created. A wl_output always has an @@ -31,16 +36,17 @@ extern "C" { * description on a wl_surface to denote the color characteristics of the * surface contents. * - * An image description includes SDR and HDR colorimetry and encoding, HDR - * metadata, and viewing environment parameters. An image description does - * not include the properties set through color-representation extension. - * It is expected that the color-representation extension is used in - * conjunction with the color management extension when necessary, - * particularly with the YUV family of pixel formats. + * An image description essentially defines a display and (indirectly) its + * viewing environment. An image description includes SDR and HDR colorimetry + * and encoding, HDR metadata, and some parameters related to the viewing + * environment. An image description does not include the properties set + * through color-representation extension. It is expected that the + * color-representation extension is used in conjunction with the + * color-management extension when necessary, particularly with the YUV family + * of pixel formats. * - * Recommendation ITU-T H.273 - * "Coding-independent code points for video signal type identification" - * shall be referred to as simply H.273 here. + * The normative appendix for this protocol is in the appendix.md file beside + * this XML file. * * The color-and-hdr repository * (https://gitlab.freedesktop.org/pq/color-and-hdr) contains @@ -67,6 +73,7 @@ extern "C" { * - @subpage page_iface_wp_image_description_creator_params_v1 - holder of image description parameters * - @subpage page_iface_wp_image_description_v1 - Colorimetric image description * - @subpage page_iface_wp_image_description_info_v1 - Colorimetric image description information + * - @subpage page_iface_wp_image_description_reference_v1 - Reference to an image description * @section page_copyright_color_management_v1 Copyright *
*
@@ -106,6 +113,7 @@ struct wp_color_manager_v1;
struct wp_image_description_creator_icc_v1;
struct wp_image_description_creator_params_v1;
struct wp_image_description_info_v1;
+struct wp_image_description_reference_v1;
struct wp_image_description_v1;
#ifndef WP_COLOR_MANAGER_V1_INTERFACE
@@ -236,6 +244,10 @@ extern const struct wl_interface wp_color_management_surface_feedback_v1_interfa
* Once all properties have been set, the create request must be used to
* create the image description object, destroying the creator in the
* process.
+ *
+ * The link between a pixel value (a device value in ICC) and its respective
+ * colorimetry is defined by the details of the particular ICC profile.
+ * Those details also determine when colorimetry becomes undefined.
* @section page_iface_wp_image_description_creator_icc_v1_api API
* See @ref iface_wp_image_description_creator_icc_v1.
*/
@@ -256,6 +268,10 @@ extern const struct wl_interface wp_color_management_surface_feedback_v1_interfa
* Once all properties have been set, the create request must be used to
* create the image description object, destroying the creator in the
* process.
+ *
+ * The link between a pixel value (a device value in ICC) and its respective
+ * colorimetry is defined by the details of the particular ICC profile.
+ * Those details also determine when colorimetry becomes undefined.
*/
extern const struct wl_interface wp_image_description_creator_icc_v1_interface;
#endif
@@ -292,6 +308,20 @@ extern const struct wl_interface wp_image_description_creator_icc_v1_interface;
* Once all properties have been set, the create request must be used to
* create the image description object, destroying the creator in the
* process.
+ *
+ * A viewer, who is viewing the display defined by the resulting image
+ * description (the viewing environment included), is assumed to be fully
+ * adapted to the primary color volume's white point.
+ *
+ * Any of the following conditions will cause the colorimetry of a pixel
+ * to become undefined:
+ * - Values outside of the defined range of the transfer characteristic.
+ * - Tristimulus that exceeds the target color volume.
+ * - If extended_target_volume is not supported: tristimulus that exceeds
+ * the primary color volume.
+ *
+ * The closest correspondence to an image description created through this
+ * interface is the Display class of profiles in ICC.
* @section page_iface_wp_image_description_creator_params_v1_api API
* See @ref iface_wp_image_description_creator_params_v1.
*/
@@ -325,6 +355,20 @@ extern const struct wl_interface wp_image_description_creator_icc_v1_interface;
* Once all properties have been set, the create request must be used to
* create the image description object, destroying the creator in the
* process.
+ *
+ * A viewer, who is viewing the display defined by the resulting image
+ * description (the viewing environment included), is assumed to be fully
+ * adapted to the primary color volume's white point.
+ *
+ * Any of the following conditions will cause the colorimetry of a pixel
+ * to become undefined:
+ * - Values outside of the defined range of the transfer characteristic.
+ * - Tristimulus that exceeds the target color volume.
+ * - If extended_target_volume is not supported: tristimulus that exceeds
+ * the primary color volume.
+ *
+ * The closest correspondence to an image description created through this
+ * interface is the Display class of profiles in ICC.
*/
extern const struct wl_interface wp_image_description_creator_params_v1_interface;
#endif
@@ -334,11 +378,13 @@ extern const struct wl_interface wp_image_description_creator_params_v1_interfac
* @page page_iface_wp_image_description_v1 wp_image_description_v1
* @section page_iface_wp_image_description_v1_desc Description
*
- * An image description carries information about the color encoding used on
- * a surface when attached to a wl_surface via
+ * An image description carries information about the pixel color encoding
+ * and its intended display and viewing environment. The image description is
+ * attached to a wl_surface via
* wp_color_management_surface_v1.set_image_description. A compositor can use
* this information to decode pixel values into colorimetrically meaningful
- * quantities.
+ * quantities, which allows the compositor to transform the surface contents
+ * to become suitable for various displays and viewing environments.
*
* Note, that the wp_image_description_v1 object is not ready to be used
* immediately after creation. The object eventually delivers either the
@@ -359,11 +405,13 @@ extern const struct wl_interface wp_image_description_creator_params_v1_interfac
/**
* @defgroup iface_wp_image_description_v1 The wp_image_description_v1 interface
*
- * An image description carries information about the color encoding used on
- * a surface when attached to a wl_surface via
+ * An image description carries information about the pixel color encoding
+ * and its intended display and viewing environment. The image description is
+ * attached to a wl_surface via
* wp_color_management_surface_v1.set_image_description. A compositor can use
* this information to decode pixel values into colorimetrically meaningful
- * quantities.
+ * quantities, which allows the compositor to transform the surface contents
+ * to become suitable for various displays and viewing environments.
*
* Note, that the wp_image_description_v1 object is not ready to be used
* immediately after creation. The object eventually delivers either the
@@ -440,6 +488,33 @@ extern const struct wl_interface wp_image_description_v1_interface;
*/
extern const struct wl_interface wp_image_description_info_v1_interface;
#endif
+#ifndef WP_IMAGE_DESCRIPTION_REFERENCE_V1_INTERFACE
+#define WP_IMAGE_DESCRIPTION_REFERENCE_V1_INTERFACE
+/**
+ * @page page_iface_wp_image_description_reference_v1 wp_image_description_reference_v1
+ * @section page_iface_wp_image_description_reference_v1_desc Description
+ *
+ * This object is a reference to an image description. This interface is
+ * frozen at version 1 to allow other protocols to create
+ * wp_image_description_v1 objects.
+ *
+ * The wp_color_manager_v1.get_image_description request can be used to
+ * retrieve the underlying image description.
+ * @section page_iface_wp_image_description_reference_v1_api API
+ * See @ref iface_wp_image_description_reference_v1.
+ */
+/**
+ * @defgroup iface_wp_image_description_reference_v1 The wp_image_description_reference_v1 interface
+ *
+ * This object is a reference to an image description. This interface is
+ * frozen at version 1 to allow other protocols to create
+ * wp_image_description_v1 objects.
+ *
+ * The wp_color_manager_v1.get_image_description request can be used to
+ * retrieve the underlying image description.
+ */
+extern const struct wl_interface wp_image_description_reference_v1_interface;
+#endif
#ifndef WP_COLOR_MANAGER_V1_ERROR_ENUM
#define WP_COLOR_MANAGER_V1_ERROR_ENUM
@@ -491,7 +566,21 @@ enum wp_color_manager_v1_render_intent {
* media-relative colorimetric + black point compensation
*/
WP_COLOR_MANAGER_V1_RENDER_INTENT_RELATIVE_BPC = 4,
+ /**
+ * ICC-absolute colorimetric without adaptation
+ *
+ * This rendering intent is a modified absolute rendering intent
+ * that assumes the viewer is not adapted to the display white
+ * point, so no chromatic adaptation between surface and display is
+ * done. This can be useful for color proofing applications.
+ * @since 2
+ */
+ WP_COLOR_MANAGER_V1_RENDER_INTENT_ABSOLUTE_NO_ADAPTATION = 5,
};
+/**
+ * @ingroup iface_wp_color_manager_v1
+ */
+#define WP_COLOR_MANAGER_V1_RENDER_INTENT_ABSOLUTE_NO_ADAPTATION_SINCE_VERSION 2
#endif /* WP_COLOR_MANAGER_V1_RENDER_INTENT_ENUM */
#ifndef WP_COLOR_MANAGER_V1_FEATURE_ENUM
@@ -540,7 +629,7 @@ enum wp_color_manager_v1_feature {
*/
WP_COLOR_MANAGER_V1_FEATURE_EXTENDED_TARGET_VOLUME = 6,
/**
- * get_windows_scrgb request
+ * create_windows_scrgb request
*/
WP_COLOR_MANAGER_V1_FEATURE_WINDOWS_SCRGB = 7,
};
@@ -552,13 +641,9 @@ enum wp_color_manager_v1_feature {
* @ingroup iface_wp_color_manager_v1
* named color primaries
*
- * Named color primaries used to encode well-known sets of primaries. H.273
- * is the authority, when it comes to the exact values of primaries and
- * authoritative specifications, where an equivalent code point exists.
+ * Named color primaries used to encode well-known sets of primaries.
*
* A value of 0 is invalid and will never be present in the list of enums.
- *
- * Descriptions do list the specifications for convenience.
*/
enum wp_color_manager_v1_primaries {
/**
@@ -568,8 +653,7 @@ enum wp_color_manager_v1_primaries {
* ITU-R BT.1361-0 conventional colour gamut system and extended
* colour gamut system (historical) - IEC 61966-2-1 sRGB or sYCC -
* IEC 61966-2-4 - Society of Motion Picture and Television
- * Engineers (SMPTE) RP 177 (1993) Annex B Equivalent to H.273
- * ColourPrimaries code point 1.
+ * Engineers (SMPTE) RP 177 (1993) Annex B
*/
WP_COLOR_MANAGER_V1_PRIMARIES_SRGB = 1,
/**
@@ -580,7 +664,7 @@ enum wp_color_manager_v1_primaries {
* Committee 1953 Recommendation for transmission standards for
* color television - United States Federal Communications
* Commission (2003) Title 47 Code of Federal Regulations 73.682
- * (a)(20) Equivalent to H.273 ColourPrimaries code point 4.
+ * (a)(20)
*/
WP_COLOR_MANAGER_V1_PRIMARIES_PAL_M = 2,
/**
@@ -589,7 +673,6 @@ enum wp_color_manager_v1_primaries {
* Color primaries as defined by - Rec. ITU-R BT.470-6 System B,
* G (historical) - Rec. ITU-R BT.601-7 625 - Rec. ITU-R BT.1358-0
* 625 (historical) - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
- * Equivalent to H.273 ColourPrimaries code point 5.
*/
WP_COLOR_MANAGER_V1_PRIMARIES_PAL = 3,
/**
@@ -598,22 +681,21 @@ enum wp_color_manager_v1_primaries {
* Color primaries as defined by - Rec. ITU-R BT.601-7 525 - Rec.
* ITU-R BT.1358-1 525 or 625 (historical) - Rec. ITU-R BT.1700-0
* NTSC - SMPTE 170M (2004) - SMPTE 240M (1999) (historical)
- * Equivalent to H.273 ColourPrimaries code point 6 and 7.
*/
WP_COLOR_MANAGER_V1_PRIMARIES_NTSC = 4,
/**
* Generic film with colour filters using Illuminant C
*
- * Color primaries as defined by H.273 for generic film.
- * Equivalent to H.273 ColourPrimaries code point 8.
+ * Color primaries as defined by Recommendation ITU-T H.273
+ * "Coding-independent code points for video signal type
+ * identification" for "generic film".
*/
WP_COLOR_MANAGER_V1_PRIMARIES_GENERIC_FILM = 5,
/**
* Color primaries as defined by the BT.2020 and BT.2100 standard
*
* Color primaries as defined by - Rec. ITU-R BT.2020-2 - Rec.
- * ITU-R BT.2100-0 Equivalent to H.273 ColourPrimaries code point
- * 9.
+ * ITU-R BT.2100-0
*/
WP_COLOR_MANAGER_V1_PRIMARIES_BT2020 = 6,
/**
@@ -621,23 +703,21 @@ enum wp_color_manager_v1_primaries {
*
* Color primaries as defined as the maximum of the CIE 1931 XYZ
* color space by - SMPTE ST 428-1 - (CIE 1931 XYZ as in ISO
- * 11664-1) Equivalent to H.273 ColourPrimaries code point 10.
+ * 11664-1)
*/
WP_COLOR_MANAGER_V1_PRIMARIES_CIE1931_XYZ = 7,
/**
* Color primaries of the DCI P3 color space as defined by the SMPTE RP 431 standard
*
* Color primaries as defined by Digital Cinema System and
- * published in SMPTE RP 431-2 (2011). Equivalent to H.273
- * ColourPrimaries code point 11.
+ * published in SMPTE RP 431-2 (2011).
*/
WP_COLOR_MANAGER_V1_PRIMARIES_DCI_P3 = 8,
/**
* Color primaries of Display P3 variant of the DCI-P3 color space as defined by the SMPTE EG 432 standard
*
* Color primaries as defined by Digital Cinema System and
- * published in SMPTE EG 432-1 (2010). Equivalent to H.273
- * ColourPrimaries code point 12.
+ * published in SMPTE EG 432-1 (2010).
*/
WP_COLOR_MANAGER_V1_PRIMARIES_DISPLAY_P3 = 9,
/**
@@ -657,13 +737,11 @@ enum wp_color_manager_v1_primaries {
* named transfer functions
*
* Named transfer functions used to represent well-known transfer
- * characteristics. H.273 is the authority, when it comes to the exact
- * formulas and authoritative specifications, where an equivalent code
- * point exists.
+ * characteristics of displays.
*
* A value of 0 is invalid and will never be present in the list of enums.
*
- * Descriptions do list the specifications for convenience.
+ * See appendix.md for the formulae.
*/
enum wp_color_manager_v1_transfer_function {
/**
@@ -671,9 +749,7 @@ enum wp_color_manager_v1_transfer_function {
*
* Rec. ITU-R BT.1886 is the display transfer characteristic
* assumed by - Rec. ITU-R BT.601-7 525 and 625 - Rec. ITU-R
- * BT.709-6 - Rec. ITU-R BT.2020-2 These recommendations are
- * referred to by H.273 TransferCharacteristics code points 1, 6,
- * 14, and 15, which are all equivalent.
+ * BT.709-6 - Rec. ITU-R BT.2020-2
*
* This TF implies these default luminances from Rec. ITU-R
* BT.2035: - primary color volume minimum: 0.01 cd/m² - primary
@@ -688,23 +764,21 @@ enum wp_color_manager_v1_transfer_function {
* Committee 1953 Recommendation for transmission standards for
* color television - United States Federal Communications
* Commission (2003) Title 47 Code of Federal Regulations 73.682
- * (a) (20) - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM Equivalent
- * to H.273 TransferCharacteristics code point 4.
+ * (a) (20) - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM - IEC
+ * 61966-2-1 (reference display)
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA22 = 2,
/**
* Assumed display gamma 2.8 transfer function
*
* Transfer characteristics as defined by - Rec. ITU-R BT.470-6
- * System B, G (historical) Equivalent to H.273
- * TransferCharacteristics code point 5.
+ * System B, G (historical)
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA28 = 3,
/**
* SMPTE ST 240 transfer function
*
* Transfer characteristics as defined by - SMPTE ST 240 (1999)
- * Equivalent to H.273 TransferCharacteristics code point 7.
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST240 = 4,
/**
@@ -713,47 +787,43 @@ enum wp_color_manager_v1_transfer_function {
* Linear transfer function defined over all real numbers.
* Normalised electrical values are equal the normalised optical
* values.
- *
- * The differences to H.273 TransferCharacteristics code point 8
- * are the definition over all real numbers.
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_EXT_LINEAR = 5,
/**
* logarithmic 100:1 transfer function
*
- * Logarithmic transfer characteristic (100:1 range). Equivalent
- * to H.273 TransferCharacteristics code point 9.
+ * Logarithmic transfer characteristic (100:1 range).
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_LOG_100 = 6,
/**
* logarithmic (100*Sqrt(10) : 1) transfer function
*
* Logarithmic transfer characteristic (100 * Sqrt(10) : 1
- * range). Equivalent to H.273 TransferCharacteristics code point
- * 10.
+ * range).
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_LOG_316 = 7,
/**
* IEC 61966-2-4 transfer function
*
* Transfer characteristics as defined by - IEC 61966-2-4
- * Equivalent to H.273 TransferCharacteristics code point 11.
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_XVYCC = 8,
/**
- * sRGB piece-wise transfer function
+ * Deprecated (ambiguous sRGB transfer function)
*
* Transfer characteristics as defined by - IEC 61966-2-1 sRGB
- * Equivalent to H.273 TransferCharacteristics code point 13 with
- * MatrixCoefficients set to 0.
+ *
+ * As a rule of thumb, use gamma22 for video, motion picture and
+ * computer graphics, or compound_power_2_4 for ICC calibrated
+ * print workflows.
+ * @deprecated Deprecated since version 2
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_SRGB = 9,
/**
- * Extended sRGB piece-wise transfer function
+ * Deprecated (Extended sRGB piece-wise transfer function)
*
* Transfer characteristics as defined by - IEC 61966-2-1 sYCC
- * Equivalent to H.273 TransferCharacteristics code point 13 with
- * MatrixCoefficients set to anything but 0.
+ * @deprecated Deprecated since version 2
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_EXT_SRGB = 10,
/**
@@ -761,8 +831,7 @@ enum wp_color_manager_v1_transfer_function {
*
* Transfer characteristics as defined by - SMPTE ST 2084 (2014)
* for 10-, 12-, 14- and 16-bit systems - Rec. ITU-R BT.2100-2
- * perceptual quantization (PQ) system Equivalent to H.273
- * TransferCharacteristics code point 16.
+ * perceptual quantization (PQ) system
*
* This TF implies these default luminances - primary color volume
* minimum: 0.005 cd/m² - primary color volume maximum: 10000
@@ -779,15 +848,13 @@ enum wp_color_manager_v1_transfer_function {
* SMPTE ST 428 transfer function
*
* Transfer characteristics as defined by - SMPTE ST 428-1 (2019)
- * Equivalent to H.273 TransferCharacteristics code point 17.
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST428 = 12,
/**
* hybrid log-gamma transfer function
*
* Transfer characteristics as defined by - ARIB STD-B67 (2015) -
- * Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system Equivalent to
- * H.273 TransferCharacteristics code point 18.
+ * Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system
*
* This TF implies these default luminances - primary color volume
* minimum: 0.005 cd/m² - primary color volume maximum: 1000
@@ -803,7 +870,19 @@ enum wp_color_manager_v1_transfer_function {
* part of ARIB STD-B67 or BT.2100.
*/
WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_HLG = 13,
+ /**
+ * IEC 61966-2-1 encoding function
+ *
+ * Encoding characteristics as defined by IEC 61966-2-1, for
+ * displays that invert the encoding function.
+ * @since 2
+ */
+ WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_COMPOUND_POWER_2_4 = 14,
};
+/**
+ * @ingroup iface_wp_color_manager_v1
+ */
+#define WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_COMPOUND_POWER_2_4_SINCE_VERSION 2
#endif /* WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ENUM */
/**
@@ -816,6 +895,9 @@ struct wp_color_manager_v1_listener {
*
* When this object is created, it shall immediately send this
* event once for each rendering intent the compositor supports.
+ *
+ * A compositor must not advertise intents that are deprecated in
+ * the bound version of the interface.
* @param render_intent rendering intent
*/
void (*supported_intent)(void *data,
@@ -827,6 +909,9 @@ struct wp_color_manager_v1_listener {
* When this object is created, it shall immediately send this
* event once for each compositor supported feature listed in the
* enumeration.
+ *
+ * A compositor must not advertise features that are deprecated in
+ * the bound version of the interface.
* @param feature supported feature
*/
void (*supported_feature)(void *data,
@@ -838,6 +923,9 @@ struct wp_color_manager_v1_listener {
* When this object is created, it shall immediately send this
* event once for each named transfer function the compositor
* supports with the parametric image description creator.
+ *
+ * A compositor must not advertise transfer functions that are
+ * deprecated in the bound version of the interface.
* @param tf Named transfer function
*/
void (*supported_tf_named)(void *data,
@@ -849,6 +937,9 @@ struct wp_color_manager_v1_listener {
* When this object is created, it shall immediately send this
* event once for each named set of primaries the compositor
* supports with the parametric image description creator.
+ *
+ * A compositor must not advertise names that are deprecated in the
+ * bound version of the interface.
* @param primaries Named color primaries
*/
void (*supported_primaries_named)(void *data,
@@ -882,6 +973,7 @@ wp_color_manager_v1_add_listener(struct wp_color_manager_v1 *wp_color_manager_v1
#define WP_COLOR_MANAGER_V1_CREATE_ICC_CREATOR 4
#define WP_COLOR_MANAGER_V1_CREATE_PARAMETRIC_CREATOR 5
#define WP_COLOR_MANAGER_V1_CREATE_WINDOWS_SCRGB 6
+#define WP_COLOR_MANAGER_V1_GET_IMAGE_DESCRIPTION 7
/**
* @ingroup iface_wp_color_manager_v1
@@ -932,6 +1024,10 @@ wp_color_manager_v1_add_listener(struct wp_color_manager_v1 *wp_color_manager_v1
* @ingroup iface_wp_color_manager_v1
*/
#define WP_COLOR_MANAGER_V1_CREATE_WINDOWS_SCRGB_SINCE_VERSION 1
+/**
+ * @ingroup iface_wp_color_manager_v1
+ */
+#define WP_COLOR_MANAGER_V1_GET_IMAGE_DESCRIPTION_SINCE_VERSION 2
/** @ingroup iface_wp_color_manager_v1 */
static inline void
@@ -1132,6 +1228,25 @@ wp_color_manager_v1_create_windows_scrgb(struct wp_color_manager_v1 *wp_color_ma
return (struct wp_image_description_v1 *) image_description;
}
+/**
+ * @ingroup iface_wp_color_manager_v1
+ *
+ * This request retrieves the image description backing a reference.
+ *
+ * The get_information request can be used if and only if the request that
+ * creates the reference allows it.
+ */
+static inline struct wp_image_description_v1 *
+wp_color_manager_v1_get_image_description(struct wp_color_manager_v1 *wp_color_manager_v1, struct wp_image_description_reference_v1 *reference)
+{
+ struct wl_proxy *image_description;
+
+ image_description = wl_proxy_marshal_flags((struct wl_proxy *) wp_color_manager_v1,
+ WP_COLOR_MANAGER_V1_GET_IMAGE_DESCRIPTION, &wp_image_description_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_color_manager_v1), 0, NULL, reference);
+
+ return (struct wp_image_description_v1 *) image_description;
+}
+
/**
* @ingroup iface_wp_color_management_output_v1
* @struct wp_color_management_output_v1_listener
@@ -1353,18 +1468,18 @@ wp_color_management_surface_v1_destroy(struct wp_color_management_surface_v1 *wp
* All image descriptions which are ready (see wp_image_description_v1)
* are allowed and must always be accepted by the compositor.
*
- * A rendering intent provides the client's preference on how content
- * colors should be mapped to each output. The render_intent value must
- * be one advertised by the compositor with
+ * When an image description is set on a surface, it establishes an
+ * explicit link between surface pixel values and surface colorimetry.
+ * This link may be undefined for some pixel values, see the image
+ * description creator interfaces for the conditions. Non-finite
+ * floating-point values (NaN, Inf) always have an undefined colorimetry.
+ *
+ * A rendering intent provides the client's preference on how surface
+ * colorimetry should be mapped to each output. The render_intent value
+ * must be one advertised by the compositor with
* wp_color_manager_v1.render_intent event, otherwise the protocol error
* render_intent is raised.
*
- * When an image description is set on a surface, the Transfer
- * Characteristics of the image description defines the valid range of
- * the nominal (real-valued) color channel values. The processing of
- * out-of-range color channel values is undefined, but compositors are
- * recommended to clamp the values to the valid range when possible.
- *
* By default, a surface does not have an associated image description
* nor a rendering intent. The handling of color on such surfaces is
* compositor implementation defined. Compositors should handle such
@@ -1422,6 +1537,18 @@ enum wp_color_management_surface_feedback_v1_error {
* @struct wp_color_management_surface_feedback_v1_listener
*/
struct wp_color_management_surface_feedback_v1_listener {
+ /**
+ * the preferred image description changed (32-bit)
+ *
+ * Starting from interface version 2, 'preferred_changed2' is
+ * sent instead of this event. See the 'preferred_changed2' event
+ * for the definition.
+ * @param identity the 32-bit image description id number
+ * @deprecated Deprecated since version 2
+ */
+ void (*preferred_changed)(void *data,
+ struct wp_color_management_surface_feedback_v1 *wp_color_management_surface_feedback_v1,
+ uint32_t identity);
/**
* the preferred image description changed
*
@@ -1444,11 +1571,14 @@ struct wp_color_management_surface_feedback_v1_listener {
* wl_surface contents in the preferred image description.
* Therefore clients that can, should render according to the
* preferred image description
- * @param identity image description id number
- */
- void (*preferred_changed)(void *data,
- struct wp_color_management_surface_feedback_v1 *wp_color_management_surface_feedback_v1,
- uint32_t identity);
+ * @param identity_hi high 32 bits of the 64-bit image description id number
+ * @param identity_lo low 32 bits of the 64-bit image description id number
+ * @since 2
+ */
+ void (*preferred_changed2)(void *data,
+ struct wp_color_management_surface_feedback_v1 *wp_color_management_surface_feedback_v1,
+ uint32_t identity_hi,
+ uint32_t identity_lo);
};
/**
@@ -1470,6 +1600,10 @@ wp_color_management_surface_feedback_v1_add_listener(struct wp_color_management_
* @ingroup iface_wp_color_management_surface_feedback_v1
*/
#define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_PREFERRED_CHANGED_SINCE_VERSION 1
+/**
+ * @ingroup iface_wp_color_management_surface_feedback_v1
+ */
+#define WP_COLOR_MANAGEMENT_SURFACE_FEEDBACK_V1_PREFERRED_CHANGED2_SINCE_VERSION 2
/**
* @ingroup iface_wp_color_management_surface_feedback_v1
@@ -1863,14 +1997,16 @@ wp_image_description_creator_params_v1_destroy(struct wp_image_description_creat
* complete, the protocol error incomplete_set is raised. For the
* definition of a complete set, see the description of this interface.
*
- * The protocol error invalid_luminance is raised if any of the following
- * requirements is not met:
+ * When both max_cll and max_fall are set, max_fall must be less or equal
+ * to max_cll otherwise the invalid_luminance protocol error is raised.
+ *
+ * In version 1, these following conditions also result in the
+ * invalid_luminance protocol error. Version 2 and later do not have this
+ * requirement.
* - When max_cll is set, it must be greater than min L and less or equal
* to max L of the mastering luminance range.
* - When max_fall is set, it must be greater than min L and less or equal
* to max L of the mastering luminance range.
- * - When both max_cll and max_fall are set, max_fall must be less or equal
- * to max_cll.
*
* If the particular combination of the parameter set is not supported
* by the compositor, the resulting image description object shall
@@ -1903,7 +2039,7 @@ wp_image_description_creator_params_v1_create(struct wp_image_description_creato
* functions.
*
* When the resulting image description is attached to an image, the
- * content should be encoded and decoded according to the industry standard
+ * content should be decoded according to the industry standard
* practices for the transfer characteristic.
*
* Only names advertised with wp_color_manager_v1 event supported_tf_named
@@ -1928,9 +2064,6 @@ wp_image_description_creator_params_v1_set_tf_named(struct wp_image_description_
* range of the curve are all finite real numbers. This curve represents
* the conversion from electrical to optical color channel values.
*
- * When the resulting image description is attached to an image, the
- * content should be encoded with the inverse of the power curve.
- *
* The curve exponent shall be multiplied by 10000 to get the argument eexp
* value to carry the precision of 4 decimals.
*
@@ -2000,8 +2133,8 @@ wp_image_description_creator_params_v1_set_primaries(struct wp_image_description
* @ingroup iface_wp_image_description_creator_params_v1
*
* Sets the primary color volume luminance range and the reference white
- * luminance level. These values include the minimum display emission
- * and ambient flare luminances, assumed to be optically additive and have
+ * luminance level. These values include the minimum display emission, but
+ * not external flare. The minimum display emission is assumed to have
* the chromaticity of the primary color volume white point.
*
* The default luminances from
@@ -2257,7 +2390,26 @@ struct wp_image_description_v1_listener {
uint32_t cause,
const char *msg);
/**
- * indication that the object is ready to be used
+ * the object is ready to be used (32-bit)
+ *
+ * Starting from interface version 2, the 'ready2' event is sent
+ * instead of this event.
+ *
+ * For the definition of this event, see the 'ready2' event. The
+ * difference to this event is as follows.
+ *
+ * The id number is valid only as long as the protocol object is
+ * alive. If all protocol objects referring to the same image
+ * description record are destroyed, the id number may be recycled
+ * for a different image description record.
+ * @param identity the 32-bit image description id number
+ * @deprecated Deprecated since version 2
+ */
+ void (*ready)(void *data,
+ struct wp_image_description_v1 *wp_image_description_v1,
+ uint32_t identity);
+ /**
+ * the object is ready to be used
*
* Once this event has been sent, the wp_image_description_v1
* object is deemed "ready". Ready objects can be used to send
@@ -2273,25 +2425,25 @@ struct wp_image_description_v1_listener {
* number simultaneously. The id number does not change during the
* lifetime of the image description record.
*
- * The id number is valid only as long as the protocol object is
- * alive. If all protocol objects referring to the same image
- * description record are destroyed, the id number may be recycled
- * for a different image description record.
- *
* Image description id number is not a protocol object id. Zero is
* reserved as an invalid id number. It shall not be possible for a
* client to refer to an image description by its id number in
* protocol. The id numbers might not be portable between Wayland
* connections. A compositor shall not send an invalid id number.
*
+ * Compositors must not recycle image description id numbers.
+ *
* This identity allows clients to de-duplicate image description
* records and avoid get_information request if they already have
* the image description information.
- * @param identity image description id number
+ * @param identity_hi high 32 bits of the 64-bit image description id number
+ * @param identity_lo low 32 bits of the 64-bit image description id number
+ * @since 2
*/
- void (*ready)(void *data,
- struct wp_image_description_v1 *wp_image_description_v1,
- uint32_t identity);
+ void (*ready2)(void *data,
+ struct wp_image_description_v1 *wp_image_description_v1,
+ uint32_t identity_hi,
+ uint32_t identity_lo);
};
/**
@@ -2316,6 +2468,10 @@ wp_image_description_v1_add_listener(struct wp_image_description_v1 *wp_image_de
* @ingroup iface_wp_image_description_v1
*/
#define WP_IMAGE_DESCRIPTION_V1_READY_SINCE_VERSION 1
+/**
+ * @ingroup iface_wp_image_description_v1
+ */
+#define WP_IMAGE_DESCRIPTION_V1_READY2_SINCE_VERSION 2
/**
* @ingroup iface_wp_image_description_v1
@@ -2667,6 +2823,47 @@ wp_image_description_info_v1_destroy(struct wp_image_description_info_v1 *wp_ima
wl_proxy_destroy((struct wl_proxy *) wp_image_description_info_v1);
}
+#define WP_IMAGE_DESCRIPTION_REFERENCE_V1_DESTROY 0
+
+
+/**
+ * @ingroup iface_wp_image_description_reference_v1
+ */
+#define WP_IMAGE_DESCRIPTION_REFERENCE_V1_DESTROY_SINCE_VERSION 1
+
+/** @ingroup iface_wp_image_description_reference_v1 */
+static inline void
+wp_image_description_reference_v1_set_user_data(struct wp_image_description_reference_v1 *wp_image_description_reference_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wp_image_description_reference_v1, user_data);
+}
+
+/** @ingroup iface_wp_image_description_reference_v1 */
+static inline void *
+wp_image_description_reference_v1_get_user_data(struct wp_image_description_reference_v1 *wp_image_description_reference_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wp_image_description_reference_v1);
+}
+
+static inline uint32_t
+wp_image_description_reference_v1_get_version(struct wp_image_description_reference_v1 *wp_image_description_reference_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) wp_image_description_reference_v1);
+}
+
+/**
+ * @ingroup iface_wp_image_description_reference_v1
+ *
+ * Destroy this object. This has no effect on the referenced image
+ * description.
+ */
+static inline void
+wp_image_description_reference_v1_destroy(struct wp_image_description_reference_v1 *wp_image_description_reference_v1)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) wp_image_description_reference_v1,
+ WP_IMAGE_DESCRIPTION_REFERENCE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_image_description_reference_v1), WL_MARSHAL_FLAG_DESTROY);
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/deps/wayland/protocols/color-management-v1-client.c b/deps/wayland/protocols/color-management-v1-client.c
index bbd663d36..263d84973 100644
--- a/deps/wayland/protocols/color-management-v1-client.c
+++ b/deps/wayland/protocols/color-management-v1-client.c
@@ -51,6 +51,7 @@ extern const struct wl_interface wp_color_management_surface_v1_interface;
extern const struct wl_interface wp_image_description_creator_icc_v1_interface;
extern const struct wl_interface wp_image_description_creator_params_v1_interface;
extern const struct wl_interface wp_image_description_info_v1_interface;
+extern const struct wl_interface wp_image_description_reference_v1_interface;
extern const struct wl_interface wp_image_description_v1_interface;
static const struct wl_interface *color_management_v1_types[] = {
@@ -72,6 +73,8 @@ static const struct wl_interface *color_management_v1_types[] = {
&wp_image_description_creator_params_v1_interface,
&wp_image_description_v1_interface,
&wp_image_description_v1_interface,
+ &wp_image_description_reference_v1_interface,
+ &wp_image_description_v1_interface,
&wp_image_description_v1_interface,
NULL,
&wp_image_description_v1_interface,
@@ -89,6 +92,7 @@ static const struct wl_message wp_color_manager_v1_requests[] = {
{ "create_icc_creator", "n", color_management_v1_types + 14 },
{ "create_parametric_creator", "n", color_management_v1_types + 15 },
{ "create_windows_scrgb", "n", color_management_v1_types + 16 },
+ { "get_image_description", "2no", color_management_v1_types + 17 },
};
static const struct wl_message wp_color_manager_v1_events[] = {
@@ -100,14 +104,14 @@ static const struct wl_message wp_color_manager_v1_events[] = {
};
WL_PRIVATE const struct wl_interface wp_color_manager_v1_interface = {
- "wp_color_manager_v1", 1,
- 7, wp_color_manager_v1_requests,
+ "wp_color_manager_v1", 2,
+ 8, wp_color_manager_v1_requests,
5, wp_color_manager_v1_events,
};
static const struct wl_message wp_color_management_output_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
- { "get_image_description", "n", color_management_v1_types + 17 },
+ { "get_image_description", "n", color_management_v1_types + 19 },
};
static const struct wl_message wp_color_management_output_v1_events[] = {
@@ -115,52 +119,53 @@ static const struct wl_message wp_color_management_output_v1_events[] = {
};
WL_PRIVATE const struct wl_interface wp_color_management_output_v1_interface = {
- "wp_color_management_output_v1", 1,
+ "wp_color_management_output_v1", 2,
2, wp_color_management_output_v1_requests,
1, wp_color_management_output_v1_events,
};
static const struct wl_message wp_color_management_surface_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
- { "set_image_description", "ou", color_management_v1_types + 18 },
+ { "set_image_description", "ou", color_management_v1_types + 20 },
{ "unset_image_description", "", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_color_management_surface_v1_interface = {
- "wp_color_management_surface_v1", 1,
+ "wp_color_management_surface_v1", 2,
3, wp_color_management_surface_v1_requests,
0, NULL,
};
static const struct wl_message wp_color_management_surface_feedback_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
- { "get_preferred", "n", color_management_v1_types + 20 },
- { "get_preferred_parametric", "n", color_management_v1_types + 21 },
+ { "get_preferred", "n", color_management_v1_types + 22 },
+ { "get_preferred_parametric", "n", color_management_v1_types + 23 },
};
static const struct wl_message wp_color_management_surface_feedback_v1_events[] = {
{ "preferred_changed", "u", color_management_v1_types + 0 },
+ { "preferred_changed2", "2uu", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_color_management_surface_feedback_v1_interface = {
- "wp_color_management_surface_feedback_v1", 1,
+ "wp_color_management_surface_feedback_v1", 2,
3, wp_color_management_surface_feedback_v1_requests,
- 1, wp_color_management_surface_feedback_v1_events,
+ 2, wp_color_management_surface_feedback_v1_events,
};
static const struct wl_message wp_image_description_creator_icc_v1_requests[] = {
- { "create", "n", color_management_v1_types + 22 },
+ { "create", "n", color_management_v1_types + 24 },
{ "set_icc_file", "huu", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_image_description_creator_icc_v1_interface = {
- "wp_image_description_creator_icc_v1", 1,
+ "wp_image_description_creator_icc_v1", 2,
2, wp_image_description_creator_icc_v1_requests,
0, NULL,
};
static const struct wl_message wp_image_description_creator_params_v1_requests[] = {
- { "create", "n", color_management_v1_types + 23 },
+ { "create", "n", color_management_v1_types + 25 },
{ "set_tf_named", "u", color_management_v1_types + 0 },
{ "set_tf_power", "u", color_management_v1_types + 0 },
{ "set_primaries_named", "u", color_management_v1_types + 0 },
@@ -173,25 +178,26 @@ static const struct wl_message wp_image_description_creator_params_v1_requests[]
};
WL_PRIVATE const struct wl_interface wp_image_description_creator_params_v1_interface = {
- "wp_image_description_creator_params_v1", 1,
+ "wp_image_description_creator_params_v1", 2,
10, wp_image_description_creator_params_v1_requests,
0, NULL,
};
static const struct wl_message wp_image_description_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
- { "get_information", "n", color_management_v1_types + 24 },
+ { "get_information", "n", color_management_v1_types + 26 },
};
static const struct wl_message wp_image_description_v1_events[] = {
{ "failed", "us", color_management_v1_types + 0 },
{ "ready", "u", color_management_v1_types + 0 },
+ { "ready2", "2uu", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_image_description_v1_interface = {
- "wp_image_description_v1", 1,
+ "wp_image_description_v1", 2,
2, wp_image_description_v1_requests,
- 2, wp_image_description_v1_events,
+ 3, wp_image_description_v1_events,
};
static const struct wl_message wp_image_description_info_v1_events[] = {
@@ -209,8 +215,18 @@ static const struct wl_message wp_image_description_info_v1_events[] = {
};
WL_PRIVATE const struct wl_interface wp_image_description_info_v1_interface = {
- "wp_image_description_info_v1", 1,
+ "wp_image_description_info_v1", 2,
0, NULL,
11, wp_image_description_info_v1_events,
};
+static const struct wl_message wp_image_description_reference_v1_requests[] = {
+ { "destroy", "", color_management_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface wp_image_description_reference_v1_interface = {
+ "wp_image_description_reference_v1", 1,
+ 1, wp_image_description_reference_v1_requests,
+ 0, NULL,
+};
+
diff --git a/deps/wayland/protocols/pointer-gestures-unstable-v1-client-protocol.h b/deps/wayland/protocols/pointer-gestures-unstable-v1-client-protocol.h
new file mode 100644
index 000000000..ee0ec1d3c
--- /dev/null
+++ b/deps/wayland/protocols/pointer-gestures-unstable-v1-client-protocol.h
@@ -0,0 +1,682 @@
+/* Generated by wayland-scanner 1.23.1 */
+
+#ifndef POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H
+#define POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H
+
+#include
+#include
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 protocol
+ * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces
+ * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures
+ * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object
+ * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object
+ * - @subpage page_iface_zwp_pointer_gesture_hold_v1 - a hold gesture object
+ */
+struct wl_pointer;
+struct wl_surface;
+struct zwp_pointer_gesture_hold_v1;
+struct zwp_pointer_gesture_pinch_v1;
+struct zwp_pointer_gesture_swipe_v1;
+struct zwp_pointer_gestures_v1;
+
+#ifndef ZWP_POINTER_GESTURES_V1_INTERFACE
+#define ZWP_POINTER_GESTURES_V1_INTERFACE
+/**
+ * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1
+ * @section page_iface_zwp_pointer_gestures_v1_desc Description
+ *
+ * A global interface to provide semantic touchpad gestures for a given
+ * pointer.
+ *
+ * Three gestures are currently supported: swipe, pinch, and hold.
+ * Pinch and swipe gestures follow a three-stage cycle: begin, update,
+ * end, hold gestures follow a two-stage cycle: begin and end. All
+ * gestures are identified by a unique id.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding interface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and interface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ * @section page_iface_zwp_pointer_gestures_v1_api API
+ * See @ref iface_zwp_pointer_gestures_v1.
+ */
+/**
+ * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface
+ *
+ * A global interface to provide semantic touchpad gestures for a given
+ * pointer.
+ *
+ * Three gestures are currently supported: swipe, pinch, and hold.
+ * Pinch and swipe gestures follow a three-stage cycle: begin, update,
+ * end, hold gestures follow a two-stage cycle: begin and end. All
+ * gestures are identified by a unique id.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding interface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and interface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ */
+extern const struct wl_interface zwp_pointer_gestures_v1_interface;
+#endif
+#ifndef ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE
+#define ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE
+/**
+ * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1
+ * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description
+ *
+ * A swipe gesture object notifies a client about a multi-finger swipe
+ * gesture detected on an indirect input device such as a touchpad.
+ * The gesture is usually initiated by multiple fingers moving in the
+ * same direction but once initiated the direction may change.
+ * The precise conditions of when such a gesture is detected are
+ * implementation-dependent.
+ *
+ * A gesture consists of three stages: begin, update (optional) and end.
+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a
+ * same pointer/seat, how compositors prevent these situations is
+ * implementation-dependent.
+ *
+ * A gesture may be cancelled by the compositor or the hardware.
+ * Clients should not consider performing permanent or irreversible
+ * actions until the end of a gesture has been received.
+ * @section page_iface_zwp_pointer_gesture_swipe_v1_api API
+ * See @ref iface_zwp_pointer_gesture_swipe_v1.
+ */
+/**
+ * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 interface
+ *
+ * A swipe gesture object notifies a client about a multi-finger swipe
+ * gesture detected on an indirect input device such as a touchpad.
+ * The gesture is usually initiated by multiple fingers moving in the
+ * same direction but once initiated the direction may change.
+ * The precise conditions of when such a gesture is detected are
+ * implementation-dependent.
+ *
+ * A gesture consists of three stages: begin, update (optional) and end.
+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a
+ * same pointer/seat, how compositors prevent these situations is
+ * implementation-dependent.
+ *
+ * A gesture may be cancelled by the compositor or the hardware.
+ * Clients should not consider performing permanent or irreversible
+ * actions until the end of a gesture has been received.
+ */
+extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface;
+#endif
+#ifndef ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE
+#define ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE
+/**
+ * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1
+ * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description
+ *
+ * A pinch gesture object notifies a client about a multi-finger pinch
+ * gesture detected on an indirect input device such as a touchpad.
+ * The gesture is usually initiated by multiple fingers moving towards
+ * each other or away from each other, or by two or more fingers rotating
+ * around a logical center of gravity. The precise conditions of when
+ * such a gesture is detected are implementation-dependent.
+ *
+ * A gesture consists of three stages: begin, update (optional) and end.
+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a
+ * same pointer/seat, how compositors prevent these situations is
+ * implementation-dependent.
+ *
+ * A gesture may be cancelled by the compositor or the hardware.
+ * Clients should not consider performing permanent or irreversible
+ * actions until the end of a gesture has been received.
+ * @section page_iface_zwp_pointer_gesture_pinch_v1_api API
+ * See @ref iface_zwp_pointer_gesture_pinch_v1.
+ */
+/**
+ * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 interface
+ *
+ * A pinch gesture object notifies a client about a multi-finger pinch
+ * gesture detected on an indirect input device such as a touchpad.
+ * The gesture is usually initiated by multiple fingers moving towards
+ * each other or away from each other, or by two or more fingers rotating
+ * around a logical center of gravity. The precise conditions of when
+ * such a gesture is detected are implementation-dependent.
+ *
+ * A gesture consists of three stages: begin, update (optional) and end.
+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a
+ * same pointer/seat, how compositors prevent these situations is
+ * implementation-dependent.
+ *
+ * A gesture may be cancelled by the compositor or the hardware.
+ * Clients should not consider performing permanent or irreversible
+ * actions until the end of a gesture has been received.
+ */
+extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface;
+#endif
+#ifndef ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE
+#define ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE
+/**
+ * @page page_iface_zwp_pointer_gesture_hold_v1 zwp_pointer_gesture_hold_v1
+ * @section page_iface_zwp_pointer_gesture_hold_v1_desc Description
+ *
+ * A hold gesture object notifies a client about a single- or
+ * multi-finger hold gesture detected on an indirect input device such as
+ * a touchpad. The gesture is usually initiated by one or more fingers
+ * being held down without significant movement. The precise conditions
+ * of when such a gesture is detected are implementation-dependent.
+ *
+ * In particular, this gesture may be used to cancel kinetic scrolling.
+ *
+ * A hold gesture consists of two stages: begin and end. Unlike pinch and
+ * swipe there is no update stage.
+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a
+ * same pointer/seat, how compositors prevent these situations is
+ * implementation-dependent.
+ *
+ * A gesture may be cancelled by the compositor or the hardware.
+ * Clients should not consider performing permanent or irreversible
+ * actions until the end of a gesture has been received.
+ * @section page_iface_zwp_pointer_gesture_hold_v1_api API
+ * See @ref iface_zwp_pointer_gesture_hold_v1.
+ */
+/**
+ * @defgroup iface_zwp_pointer_gesture_hold_v1 The zwp_pointer_gesture_hold_v1 interface
+ *
+ * A hold gesture object notifies a client about a single- or
+ * multi-finger hold gesture detected on an indirect input device such as
+ * a touchpad. The gesture is usually initiated by one or more fingers
+ * being held down without significant movement. The precise conditions
+ * of when such a gesture is detected are implementation-dependent.
+ *
+ * In particular, this gesture may be used to cancel kinetic scrolling.
+ *
+ * A hold gesture consists of two stages: begin and end. Unlike pinch and
+ * swipe there is no update stage.
+ * There cannot be multiple simultaneous hold, pinch or swipe gestures on a
+ * same pointer/seat, how compositors prevent these situations is
+ * implementation-dependent.
+ *
+ * A gesture may be cancelled by the compositor or the hardware.
+ * Clients should not consider performing permanent or irreversible
+ * actions until the end of a gesture has been received.
+ */
+extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface;
+#endif
+
+#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0
+#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1
+#define ZWP_POINTER_GESTURES_V1_RELEASE 2
+#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE 3
+
+
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ */
+#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ */
+#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ */
+#define ZWP_POINTER_GESTURES_V1_RELEASE_SINCE_VERSION 2
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ */
+#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION 3
+
+/** @ingroup iface_zwp_pointer_gestures_v1 */
+static inline void
+zwp_pointer_gestures_v1_set_user_data(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gestures_v1, user_data);
+}
+
+/** @ingroup iface_zwp_pointer_gestures_v1 */
+static inline void *
+zwp_pointer_gestures_v1_get_user_data(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gestures_v1);
+}
+
+static inline uint32_t
+zwp_pointer_gestures_v1_get_version(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1);
+}
+
+/** @ingroup iface_zwp_pointer_gestures_v1 */
+static inline void
+zwp_pointer_gestures_v1_destroy(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1)
+{
+ wl_proxy_destroy((struct wl_proxy *) zwp_pointer_gestures_v1);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ *
+ * Create a swipe gesture object. See the
+ * wl_pointer_gesture_swipe interface for details.
+ */
+static inline struct zwp_pointer_gesture_swipe_v1 *
+zwp_pointer_gestures_v1_get_swipe_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
+ ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, &zwp_pointer_gesture_swipe_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), 0, NULL, pointer);
+
+ return (struct zwp_pointer_gesture_swipe_v1 *) id;
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ *
+ * Create a pinch gesture object. See the
+ * wl_pointer_gesture_pinch interface for details.
+ */
+static inline struct zwp_pointer_gesture_pinch_v1 *
+zwp_pointer_gestures_v1_get_pinch_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
+ ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, &zwp_pointer_gesture_pinch_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), 0, NULL, pointer);
+
+ return (struct zwp_pointer_gesture_pinch_v1 *) id;
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ *
+ * Destroy the pointer gesture object. Swipe, pinch and hold objects
+ * created via this gesture object remain valid.
+ */
+static inline void
+zwp_pointer_gestures_v1_release(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
+ ZWP_POINTER_GESTURES_V1_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), WL_MARSHAL_FLAG_DESTROY);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gestures_v1
+ *
+ * Create a hold gesture object. See the
+ * wl_pointer_gesture_hold interface for details.
+ */
+static inline struct zwp_pointer_gesture_hold_v1 *
+zwp_pointer_gestures_v1_get_hold_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
+ ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE, &zwp_pointer_gesture_hold_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), 0, NULL, pointer);
+
+ return (struct zwp_pointer_gesture_hold_v1 *) id;
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_swipe_v1
+ * @struct zwp_pointer_gesture_swipe_v1_listener
+ */
+struct zwp_pointer_gesture_swipe_v1_listener {
+ /**
+ * multi-finger swipe begin
+ *
+ * This event is sent when a multi-finger swipe gesture is
+ * detected on the device.
+ * @param time timestamp with millisecond granularity
+ * @param fingers number of fingers
+ */
+ void (*begin)(void *data,
+ struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1,
+ uint32_t serial,
+ uint32_t time,
+ struct wl_surface *surface,
+ uint32_t fingers);
+ /**
+ * multi-finger swipe motion
+ *
+ * This event is sent when a multi-finger swipe gesture changes
+ * the position of the logical center.
+ *
+ * The dx and dy coordinates are relative coordinates of the
+ * logical center of the gesture compared to the previous event.
+ * @param time timestamp with millisecond granularity
+ * @param dx delta x coordinate in surface coordinate space
+ * @param dy delta y coordinate in surface coordinate space
+ */
+ void (*update)(void *data,
+ struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1,
+ uint32_t time,
+ wl_fixed_t dx,
+ wl_fixed_t dy);
+ /**
+ * multi-finger swipe end
+ *
+ * This event is sent when a multi-finger swipe gesture ceases to
+ * be valid. This may happen when one or more fingers are lifted or
+ * the gesture is cancelled.
+ *
+ * When a gesture is cancelled, the client should undo state
+ * changes caused by this gesture. What causes a gesture to be
+ * cancelled is implementation-dependent.
+ * @param time timestamp with millisecond granularity
+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise
+ */
+ void (*end)(void *data,
+ struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1,
+ uint32_t serial,
+ uint32_t time,
+ int32_t cancelled);
+};
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_swipe_v1
+ */
+static inline int
+zwp_pointer_gesture_swipe_v1_add_listener(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1,
+ const struct zwp_pointer_gesture_swipe_v1_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_swipe_v1,
+ (void (**)(void)) listener, data);
+}
+
+#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY 0
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_swipe_v1
+ */
+#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_gesture_swipe_v1
+ */
+#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_gesture_swipe_v1
+ */
+#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_swipe_v1
+ */
+#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */
+static inline void
+zwp_pointer_gesture_swipe_v1_set_user_data(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_swipe_v1, user_data);
+}
+
+/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */
+static inline void *
+zwp_pointer_gesture_swipe_v1_get_user_data(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_swipe_v1);
+}
+
+static inline uint32_t
+zwp_pointer_gesture_swipe_v1_get_version(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_swipe_v1);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_swipe_v1
+ */
+static inline void
+zwp_pointer_gesture_swipe_v1_destroy(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gesture_swipe_v1,
+ ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_swipe_v1), WL_MARSHAL_FLAG_DESTROY);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_pinch_v1
+ * @struct zwp_pointer_gesture_pinch_v1_listener
+ */
+struct zwp_pointer_gesture_pinch_v1_listener {
+ /**
+ * multi-finger pinch begin
+ *
+ * This event is sent when a multi-finger pinch gesture is
+ * detected on the device.
+ * @param time timestamp with millisecond granularity
+ * @param fingers number of fingers
+ */
+ void (*begin)(void *data,
+ struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1,
+ uint32_t serial,
+ uint32_t time,
+ struct wl_surface *surface,
+ uint32_t fingers);
+ /**
+ * multi-finger pinch motion
+ *
+ * This event is sent when a multi-finger pinch gesture changes
+ * the position of the logical center, the rotation or the relative
+ * scale.
+ *
+ * The dx and dy coordinates are relative coordinates in the
+ * surface coordinate space of the logical center of the gesture.
+ *
+ * The scale factor is an absolute scale compared to the
+ * pointer_gesture_pinch.begin event, e.g. a scale of 2 means the
+ * fingers are now twice as far apart as on
+ * pointer_gesture_pinch.begin.
+ *
+ * The rotation is the relative angle in degrees clockwise compared
+ * to the previous pointer_gesture_pinch.begin or
+ * pointer_gesture_pinch.update event.
+ * @param time timestamp with millisecond granularity
+ * @param dx delta x coordinate in surface coordinate space
+ * @param dy delta y coordinate in surface coordinate space
+ * @param scale scale relative to the initial finger position
+ * @param rotation angle in degrees cw relative to the previous event
+ */
+ void (*update)(void *data,
+ struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1,
+ uint32_t time,
+ wl_fixed_t dx,
+ wl_fixed_t dy,
+ wl_fixed_t scale,
+ wl_fixed_t rotation);
+ /**
+ * multi-finger pinch end
+ *
+ * This event is sent when a multi-finger pinch gesture ceases to
+ * be valid. This may happen when one or more fingers are lifted or
+ * the gesture is cancelled.
+ *
+ * When a gesture is cancelled, the client should undo state
+ * changes caused by this gesture. What causes a gesture to be
+ * cancelled is implementation-dependent.
+ * @param time timestamp with millisecond granularity
+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise
+ */
+ void (*end)(void *data,
+ struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1,
+ uint32_t serial,
+ uint32_t time,
+ int32_t cancelled);
+};
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_pinch_v1
+ */
+static inline int
+zwp_pointer_gesture_pinch_v1_add_listener(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1,
+ const struct zwp_pointer_gesture_pinch_v1_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_pinch_v1,
+ (void (**)(void)) listener, data);
+}
+
+#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY 0
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_pinch_v1
+ */
+#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_gesture_pinch_v1
+ */
+#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1
+/**
+ * @ingroup iface_zwp_pointer_gesture_pinch_v1
+ */
+#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_pinch_v1
+ */
+#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */
+static inline void
+zwp_pointer_gesture_pinch_v1_set_user_data(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_pinch_v1, user_data);
+}
+
+/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */
+static inline void *
+zwp_pointer_gesture_pinch_v1_get_user_data(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_pinch_v1);
+}
+
+static inline uint32_t
+zwp_pointer_gesture_pinch_v1_get_version(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_pinch_v1);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_pinch_v1
+ */
+static inline void
+zwp_pointer_gesture_pinch_v1_destroy(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gesture_pinch_v1,
+ ZWP_POINTER_GESTURE_PINCH_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_pinch_v1), WL_MARSHAL_FLAG_DESTROY);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_hold_v1
+ * @struct zwp_pointer_gesture_hold_v1_listener
+ */
+struct zwp_pointer_gesture_hold_v1_listener {
+ /**
+ * multi-finger hold begin
+ *
+ * This event is sent when a hold gesture is detected on the
+ * device.
+ * @param time timestamp with millisecond granularity
+ * @param fingers number of fingers
+ * @since 3
+ */
+ void (*begin)(void *data,
+ struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1,
+ uint32_t serial,
+ uint32_t time,
+ struct wl_surface *surface,
+ uint32_t fingers);
+ /**
+ * multi-finger hold end
+ *
+ * This event is sent when a hold gesture ceases to be valid.
+ * This may happen when the holding fingers are lifted or the
+ * gesture is cancelled, for example if the fingers move past an
+ * implementation-defined threshold, the finger count changes or
+ * the hold gesture changes into a different type of gesture.
+ *
+ * When a gesture is cancelled, the client may need to undo state
+ * changes caused by this gesture. What causes a gesture to be
+ * cancelled is implementation-dependent.
+ * @param time timestamp with millisecond granularity
+ * @param cancelled 1 if the gesture was cancelled, 0 otherwise
+ * @since 3
+ */
+ void (*end)(void *data,
+ struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1,
+ uint32_t serial,
+ uint32_t time,
+ int32_t cancelled);
+};
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_hold_v1
+ */
+static inline int
+zwp_pointer_gesture_hold_v1_add_listener(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1,
+ const struct zwp_pointer_gesture_hold_v1_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_hold_v1,
+ (void (**)(void)) listener, data);
+}
+
+#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY 0
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_hold_v1
+ */
+#define ZWP_POINTER_GESTURE_HOLD_V1_BEGIN_SINCE_VERSION 3
+/**
+ * @ingroup iface_zwp_pointer_gesture_hold_v1
+ */
+#define ZWP_POINTER_GESTURE_HOLD_V1_END_SINCE_VERSION 3
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_hold_v1
+ */
+#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY_SINCE_VERSION 3
+
+/** @ingroup iface_zwp_pointer_gesture_hold_v1 */
+static inline void
+zwp_pointer_gesture_hold_v1_set_user_data(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_hold_v1, user_data);
+}
+
+/** @ingroup iface_zwp_pointer_gesture_hold_v1 */
+static inline void *
+zwp_pointer_gesture_hold_v1_get_user_data(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_hold_v1);
+}
+
+static inline uint32_t
+zwp_pointer_gesture_hold_v1_get_version(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_hold_v1);
+}
+
+/**
+ * @ingroup iface_zwp_pointer_gesture_hold_v1
+ */
+static inline void
+zwp_pointer_gesture_hold_v1_destroy(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gesture_hold_v1,
+ ZWP_POINTER_GESTURE_HOLD_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_hold_v1), WL_MARSHAL_FLAG_DESTROY);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/deps/wayland/protocols/pointer-gestures-unstable-v1-client.c b/deps/wayland/protocols/pointer-gestures-unstable-v1-client.c
new file mode 100644
index 000000000..5024e4fac
--- /dev/null
+++ b/deps/wayland/protocols/pointer-gestures-unstable-v1-client.c
@@ -0,0 +1,109 @@
+/* Generated by wayland-scanner 1.23.1 */
+
+#include
+#include
+#include
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface wl_pointer_interface;
+extern const struct wl_interface wl_surface_interface;
+extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface;
+extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface;
+extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface;
+
+static const struct wl_interface *pointer_gestures_unstable_v1_types[] = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &zwp_pointer_gesture_swipe_v1_interface,
+ &wl_pointer_interface,
+ &zwp_pointer_gesture_pinch_v1_interface,
+ &wl_pointer_interface,
+ &zwp_pointer_gesture_hold_v1_interface,
+ &wl_pointer_interface,
+ NULL,
+ NULL,
+ &wl_surface_interface,
+ NULL,
+ NULL,
+ NULL,
+ &wl_surface_interface,
+ NULL,
+ NULL,
+ NULL,
+ &wl_surface_interface,
+ NULL,
+};
+
+static const struct wl_message zwp_pointer_gestures_v1_requests[] = {
+ { "get_swipe_gesture", "no", pointer_gestures_unstable_v1_types + 5 },
+ { "get_pinch_gesture", "no", pointer_gestures_unstable_v1_types + 7 },
+ { "release", "2", pointer_gestures_unstable_v1_types + 0 },
+ { "get_hold_gesture", "3no", pointer_gestures_unstable_v1_types + 9 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_pointer_gestures_v1_interface = {
+ "zwp_pointer_gestures_v1", 3,
+ 4, zwp_pointer_gestures_v1_requests,
+ 0, NULL,
+};
+
+static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = {
+ { "destroy", "", pointer_gestures_unstable_v1_types + 0 },
+};
+
+static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = {
+ { "begin", "uuou", pointer_gestures_unstable_v1_types + 11 },
+ { "update", "uff", pointer_gestures_unstable_v1_types + 0 },
+ { "end", "uui", pointer_gestures_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = {
+ "zwp_pointer_gesture_swipe_v1", 2,
+ 1, zwp_pointer_gesture_swipe_v1_requests,
+ 3, zwp_pointer_gesture_swipe_v1_events,
+};
+
+static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = {
+ { "destroy", "", pointer_gestures_unstable_v1_types + 0 },
+};
+
+static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = {
+ { "begin", "uuou", pointer_gestures_unstable_v1_types + 15 },
+ { "update", "uffff", pointer_gestures_unstable_v1_types + 0 },
+ { "end", "uui", pointer_gestures_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = {
+ "zwp_pointer_gesture_pinch_v1", 2,
+ 1, zwp_pointer_gesture_pinch_v1_requests,
+ 3, zwp_pointer_gesture_pinch_v1_events,
+};
+
+static const struct wl_message zwp_pointer_gesture_hold_v1_requests[] = {
+ { "destroy", "3", pointer_gestures_unstable_v1_types + 0 },
+};
+
+static const struct wl_message zwp_pointer_gesture_hold_v1_events[] = {
+ { "begin", "3uuou", pointer_gestures_unstable_v1_types + 19 },
+ { "end", "3uui", pointer_gestures_unstable_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface zwp_pointer_gesture_hold_v1_interface = {
+ "zwp_pointer_gesture_hold_v1", 3,
+ 1, zwp_pointer_gesture_hold_v1_requests,
+ 2, zwp_pointer_gesture_hold_v1_events,
+};
+
diff --git a/deps/wayland/protocols/pointer-warp-v1-client-protocol.h b/deps/wayland/protocols/pointer-warp-v1-client-protocol.h
new file mode 100644
index 000000000..538f526dd
--- /dev/null
+++ b/deps/wayland/protocols/pointer-warp-v1-client-protocol.h
@@ -0,0 +1,159 @@
+/* Generated by wayland-scanner 1.23.1 */
+
+#ifndef POINTER_WARP_V1_CLIENT_PROTOCOL_H
+#define POINTER_WARP_V1_CLIENT_PROTOCOL_H
+
+#include
+#include
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_pointer_warp_v1 The pointer_warp_v1 protocol
+ * @section page_ifaces_pointer_warp_v1 Interfaces
+ * - @subpage page_iface_wp_pointer_warp_v1 - reposition the pointer to a location on a surface
+ * @section page_copyright_pointer_warp_v1 Copyright
+ *
+ *
+ * Copyright © 2024 Neal Gompa
+ * Copyright © 2024 Xaver Hugl
+ * Copyright © 2024 Matthias Klumpp
+ * Copyright © 2024 Vlad Zahorodnii
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+struct wl_pointer;
+struct wl_surface;
+struct wp_pointer_warp_v1;
+
+#ifndef WP_POINTER_WARP_V1_INTERFACE
+#define WP_POINTER_WARP_V1_INTERFACE
+/**
+ * @page page_iface_wp_pointer_warp_v1 wp_pointer_warp_v1
+ * @section page_iface_wp_pointer_warp_v1_desc Description
+ *
+ * This global interface allows applications to request the pointer to be
+ * moved to a position relative to a wl_surface.
+ *
+ * Note that if the desired behavior is to constrain the pointer to an area
+ * or lock it to a position, this protocol does not provide a reliable way
+ * to do that. The pointer constraint and pointer lock protocols should be
+ * used for those use cases instead.
+ *
+ * Warning! The protocol described in this file is currently in the testing
+ * phase. Backward compatible changes may be added together with the
+ * corresponding interface version bump. Backward incompatible changes can
+ * only be done by creating a new major version of the extension.
+ * @section page_iface_wp_pointer_warp_v1_api API
+ * See @ref iface_wp_pointer_warp_v1.
+ */
+/**
+ * @defgroup iface_wp_pointer_warp_v1 The wp_pointer_warp_v1 interface
+ *
+ * This global interface allows applications to request the pointer to be
+ * moved to a position relative to a wl_surface.
+ *
+ * Note that if the desired behavior is to constrain the pointer to an area
+ * or lock it to a position, this protocol does not provide a reliable way
+ * to do that. The pointer constraint and pointer lock protocols should be
+ * used for those use cases instead.
+ *
+ * Warning! The protocol described in this file is currently in the testing
+ * phase. Backward compatible changes may be added together with the
+ * corresponding interface version bump. Backward incompatible changes can
+ * only be done by creating a new major version of the extension.
+ */
+extern const struct wl_interface wp_pointer_warp_v1_interface;
+#endif
+
+#define WP_POINTER_WARP_V1_DESTROY 0
+#define WP_POINTER_WARP_V1_WARP_POINTER 1
+
+
+/**
+ * @ingroup iface_wp_pointer_warp_v1
+ */
+#define WP_POINTER_WARP_V1_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_wp_pointer_warp_v1
+ */
+#define WP_POINTER_WARP_V1_WARP_POINTER_SINCE_VERSION 1
+
+/** @ingroup iface_wp_pointer_warp_v1 */
+static inline void
+wp_pointer_warp_v1_set_user_data(struct wp_pointer_warp_v1 *wp_pointer_warp_v1, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wp_pointer_warp_v1, user_data);
+}
+
+/** @ingroup iface_wp_pointer_warp_v1 */
+static inline void *
+wp_pointer_warp_v1_get_user_data(struct wp_pointer_warp_v1 *wp_pointer_warp_v1)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wp_pointer_warp_v1);
+}
+
+static inline uint32_t
+wp_pointer_warp_v1_get_version(struct wp_pointer_warp_v1 *wp_pointer_warp_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) wp_pointer_warp_v1);
+}
+
+/**
+ * @ingroup iface_wp_pointer_warp_v1
+ *
+ * Destroy the pointer warp manager.
+ */
+static inline void
+wp_pointer_warp_v1_destroy(struct wp_pointer_warp_v1 *wp_pointer_warp_v1)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) wp_pointer_warp_v1,
+ WP_POINTER_WARP_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_pointer_warp_v1), WL_MARSHAL_FLAG_DESTROY);
+}
+
+/**
+ * @ingroup iface_wp_pointer_warp_v1
+ *
+ * Request the compositor to move the pointer to a surface-local position.
+ * Whether or not the compositor honors the request is implementation defined,
+ * but it should
+ * - honor it if the surface has pointer focus, including
+ * when it has an implicit pointer grab
+ * - reject it if the enter serial is incorrect
+ * - reject it if the requested position is outside of the surface
+ *
+ * Note that the enter serial is valid for any surface of the client,
+ * and does not have to be from the surface the pointer is warped to.
+ *
+ */
+static inline void
+wp_pointer_warp_v1_warp_pointer(struct wp_pointer_warp_v1 *wp_pointer_warp_v1, struct wl_surface *surface, struct wl_pointer *pointer, wl_fixed_t x, wl_fixed_t y, uint32_t serial)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) wp_pointer_warp_v1,
+ WP_POINTER_WARP_V1_WARP_POINTER, NULL, wl_proxy_get_version((struct wl_proxy *) wp_pointer_warp_v1), 0, surface, pointer, x, y, serial);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/deps/wayland/protocols/pointer-warp-v1-client.c b/deps/wayland/protocols/pointer-warp-v1-client.c
new file mode 100644
index 000000000..3e682aed6
--- /dev/null
+++ b/deps/wayland/protocols/pointer-warp-v1-client.c
@@ -0,0 +1,63 @@
+/* Generated by wayland-scanner 1.23.1 */
+
+/*
+ * Copyright © 2024 Neal Gompa
+ * Copyright © 2024 Xaver Hugl
+ * Copyright © 2024 Matthias Klumpp
+ * Copyright © 2024 Vlad Zahorodnii
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include
+#include
+#include
+#include "wayland-util.h"
+
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
+#define WL_PRIVATE __attribute__ ((visibility("hidden")))
+#else
+#define WL_PRIVATE
+#endif
+
+extern const struct wl_interface wl_pointer_interface;
+extern const struct wl_interface wl_surface_interface;
+
+static const struct wl_interface *pointer_warp_v1_types[] = {
+ &wl_surface_interface,
+ &wl_pointer_interface,
+ NULL,
+ NULL,
+ NULL,
+};
+
+static const struct wl_message wp_pointer_warp_v1_requests[] = {
+ { "destroy", "", pointer_warp_v1_types + 0 },
+ { "warp_pointer", "ooffu", pointer_warp_v1_types + 0 },
+};
+
+WL_PRIVATE const struct wl_interface wp_pointer_warp_v1_interface = {
+ "wp_pointer_warp_v1", 1,
+ 2, wp_pointer_warp_v1_requests,
+ 0, NULL,
+};
+
diff --git a/deps/wayland/protocols/wayland-client-protocol.h b/deps/wayland/protocols/wayland-client-protocol.h
index 764c5958c..f5d80b538 100644
--- a/deps/wayland/protocols/wayland-client-protocol.h
+++ b/deps/wayland/protocols/wayland-client-protocol.h
@@ -36,6 +36,7 @@ extern "C" {
* - @subpage page_iface_wl_region - region interface
* - @subpage page_iface_wl_subcompositor - sub-surface compositing
* - @subpage page_iface_wl_subsurface - sub-surface interface to a wl_surface
+ * - @subpage page_iface_wl_fixes - wayland protocol fixes
* @section page_copyright_wayland Copyright
*
*
@@ -73,6 +74,7 @@ struct wl_data_device_manager;
struct wl_data_offer;
struct wl_data_source;
struct wl_display;
+struct wl_fixes;
struct wl_keyboard;
struct wl_output;
struct wl_pointer;
@@ -283,9 +285,11 @@ extern const struct wl_interface wl_shm_interface;
* client provides and updates the contents is defined by the buffer factory
* interface.
*
- * If the buffer uses a format that has an alpha channel, the alpha channel
- * is assumed to be premultiplied in the color channels unless otherwise
- * specified.
+ * Color channels are assumed to be electrical rather than optical (in other
+ * words, encoded with a transfer function) unless otherwise specified. If
+ * the buffer uses a format that has an alpha channel, the alpha channel is
+ * assumed to be premultiplied into the electrical color channel values
+ * (after transfer function encoding) unless otherwise specified.
*
* Note, because wl_buffer objects are created from multiple independent
* factory interfaces, the wl_buffer interface is frozen at version 1.
@@ -302,9 +306,11 @@ extern const struct wl_interface wl_shm_interface;
* client provides and updates the contents is defined by the buffer factory
* interface.
*
- * If the buffer uses a format that has an alpha channel, the alpha channel
- * is assumed to be premultiplied in the color channels unless otherwise
- * specified.
+ * Color channels are assumed to be electrical rather than optical (in other
+ * words, encoded with a transfer function) unless otherwise specified. If
+ * the buffer uses a format that has an alpha channel, the alpha channel is
+ * assumed to be premultiplied into the electrical color channel values
+ * (after transfer function encoding) unless otherwise specified.
*
* Note, because wl_buffer objects are created from multiple independent
* factory interfaces, the wl_buffer interface is frozen at version 1.
@@ -652,6 +658,16 @@ extern const struct wl_interface wl_pointer_interface;
*
* The wl_keyboard interface represents one or more keyboards
* associated with a seat.
+ *
+ * Each wl_keyboard has the following logical state:
+ *
+ * - an active surface (possibly null),
+ * - the keys currently logically down,
+ * - the active modifiers,
+ * - the active group.
+ *
+ * By default, the active surface is null, the keys currently logically down
+ * are empty, the active modifiers and the active group are 0.
* @section page_iface_wl_keyboard_api API
* See @ref iface_wl_keyboard.
*/
@@ -660,6 +676,16 @@ extern const struct wl_interface wl_pointer_interface;
*
* The wl_keyboard interface represents one or more keyboards
* associated with a seat.
+ *
+ * Each wl_keyboard has the following logical state:
+ *
+ * - an active surface (possibly null),
+ * - the keys currently logically down,
+ * - the active modifiers,
+ * - the active group.
+ *
+ * By default, the active surface is null, the keys currently logically down
+ * are empty, the active modifiers and the active group are 0.
*/
extern const struct wl_interface wl_keyboard_interface;
#endif
@@ -850,6 +876,11 @@ extern const struct wl_interface wl_subcompositor_interface;
*
* If the parent wl_surface object is destroyed, the sub-surface is
* unmapped.
+ *
+ * A sub-surface never has the keyboard focus of any seat.
+ *
+ * The wl_surface.offset request is ignored: clients must use set_position
+ * instead to move the sub-surface.
* @section page_iface_wl_subsurface_api API
* See @ref iface_wl_subsurface.
*/
@@ -903,9 +934,33 @@ extern const struct wl_interface wl_subcompositor_interface;
*
* If the parent wl_surface object is destroyed, the sub-surface is
* unmapped.
+ *
+ * A sub-surface never has the keyboard focus of any seat.
+ *
+ * The wl_surface.offset request is ignored: clients must use set_position
+ * instead to move the sub-surface.
*/
extern const struct wl_interface wl_subsurface_interface;
#endif
+#ifndef WL_FIXES_INTERFACE
+#define WL_FIXES_INTERFACE
+/**
+ * @page page_iface_wl_fixes wl_fixes
+ * @section page_iface_wl_fixes_desc Description
+ *
+ * This global fixes problems with other core-protocol interfaces that
+ * cannot be fixed in these interfaces themselves.
+ * @section page_iface_wl_fixes_api API
+ * See @ref iface_wl_fixes.
+ */
+/**
+ * @defgroup iface_wl_fixes The wl_fixes interface
+ *
+ * This global fixes problems with other core-protocol interfaces that
+ * cannot be fixed in these interfaces themselves.
+ */
+extern const struct wl_interface wl_fixes_interface;
+#endif
#ifndef WL_DISPLAY_ERROR_ENUM
#define WL_DISPLAY_ERROR_ENUM
@@ -1040,7 +1095,7 @@ wl_display_get_version(struct wl_display *wl_display)
* compositor after the callback is fired and as such the client must not
* attempt to use it after that point.
*
- * The callback_data passed in the callback is the event serial.
+ * The callback_data passed in the callback is undefined and should be ignored.
*/
static inline struct wl_callback *
wl_display_sync(struct wl_display *wl_display)
@@ -1863,6 +1918,66 @@ enum wl_shm_format {
* [63:0] A:B:G:R 16:16:16:16 little endian
*/
WL_SHM_FORMAT_ABGR16161616 = 0x38344241,
+ /**
+ * [7:0] C0:C1:C2:C3:C4:C5:C6:C7 1:1:1:1:1:1:1:1 eight pixels/byte
+ */
+ WL_SHM_FORMAT_C1 = 0x20203143,
+ /**
+ * [7:0] C0:C1:C2:C3 2:2:2:2 four pixels/byte
+ */
+ WL_SHM_FORMAT_C2 = 0x20203243,
+ /**
+ * [7:0] C0:C1 4:4 two pixels/byte
+ */
+ WL_SHM_FORMAT_C4 = 0x20203443,
+ /**
+ * [7:0] D0:D1:D2:D3:D4:D5:D6:D7 1:1:1:1:1:1:1:1 eight pixels/byte
+ */
+ WL_SHM_FORMAT_D1 = 0x20203144,
+ /**
+ * [7:0] D0:D1:D2:D3 2:2:2:2 four pixels/byte
+ */
+ WL_SHM_FORMAT_D2 = 0x20203244,
+ /**
+ * [7:0] D0:D1 4:4 two pixels/byte
+ */
+ WL_SHM_FORMAT_D4 = 0x20203444,
+ /**
+ * [7:0] D
+ */
+ WL_SHM_FORMAT_D8 = 0x20203844,
+ /**
+ * [7:0] R0:R1:R2:R3:R4:R5:R6:R7 1:1:1:1:1:1:1:1 eight pixels/byte
+ */
+ WL_SHM_FORMAT_R1 = 0x20203152,
+ /**
+ * [7:0] R0:R1:R2:R3 2:2:2:2 four pixels/byte
+ */
+ WL_SHM_FORMAT_R2 = 0x20203252,
+ /**
+ * [7:0] R0:R1 4:4 two pixels/byte
+ */
+ WL_SHM_FORMAT_R4 = 0x20203452,
+ /**
+ * [15:0] x:R 6:10 little endian
+ */
+ WL_SHM_FORMAT_R10 = 0x20303152,
+ /**
+ * [15:0] x:R 4:12 little endian
+ */
+ WL_SHM_FORMAT_R12 = 0x20323152,
+ /**
+ * [31:0] A:Cr:Cb:Y 8:8:8:8 little endian
+ */
+ WL_SHM_FORMAT_AVUY8888 = 0x59555641,
+ /**
+ * [31:0] X:Cr:Cb:Y 8:8:8:8 little endian
+ */
+ WL_SHM_FORMAT_XVUY8888 = 0x59555658,
+ /**
+ * 2x2 subsampled Cr:Cb plane 10 bits per channel packed
+ */
+ WL_SHM_FORMAT_P030 = 0x30333050,
};
#endif /* WL_SHM_FORMAT_ENUM */
@@ -1895,6 +2010,7 @@ wl_shm_add_listener(struct wl_shm *wl_shm,
}
#define WL_SHM_CREATE_POOL 0
+#define WL_SHM_RELEASE 1
/**
* @ingroup iface_wl_shm
@@ -1905,6 +2021,10 @@ wl_shm_add_listener(struct wl_shm *wl_shm,
* @ingroup iface_wl_shm
*/
#define WL_SHM_CREATE_POOL_SINCE_VERSION 1
+/**
+ * @ingroup iface_wl_shm
+ */
+#define WL_SHM_RELEASE_SINCE_VERSION 2
/** @ingroup iface_wl_shm */
static inline void
@@ -1953,6 +2073,21 @@ wl_shm_create_pool(struct wl_shm *wl_shm, int32_t fd, int32_t size)
return (struct wl_shm_pool *) id;
}
+/**
+ * @ingroup iface_wl_shm
+ *
+ * Using this request a client can tell the server that it is not going to
+ * use the shm object anymore.
+ *
+ * Objects created via this interface remain unaffected.
+ */
+static inline void
+wl_shm_release(struct wl_shm *wl_shm)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) wl_shm,
+ WL_SHM_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_shm), WL_MARSHAL_FLAG_DESTROY);
+}
+
/**
* @ingroup iface_wl_buffer
* @struct wl_buffer_listener
@@ -1962,8 +2097,10 @@ struct wl_buffer_listener {
* compositor releases buffer
*
* Sent when this wl_buffer is no longer used by the compositor.
- * The client is now free to reuse or destroy this buffer and its
- * backing storage.
+ *
+ * For more information on when release events may or may not be
+ * sent, and what consequences it has, please see the description
+ * of wl_surface.attach.
*
* If a client receives a release event before the frame callback
* requested in the same wl_surface.commit that attaches this
@@ -2603,6 +2740,10 @@ enum wl_data_device_error {
* given wl_surface has another role
*/
WL_DATA_DEVICE_ERROR_ROLE = 0,
+ /**
+ * source has already been used
+ */
+ WL_DATA_DEVICE_ERROR_USED_SOURCE = 1,
};
#endif /* WL_DATA_DEVICE_ERROR_ENUM */
@@ -2812,7 +2953,7 @@ wl_data_device_destroy(struct wl_data_device *wl_data_device)
* The icon surface is an optional (can be NULL) surface that
* provides an icon to be moved around with the cursor. Initially,
* the top-left corner of the icon surface is placed at the cursor
- * hotspot, but subsequent wl_surface.attach request can move the
+ * hotspot, but subsequent wl_surface.offset requests can move the
* relative position. Attach requests must be confirmed with
* wl_surface.commit as usual. The icon surface is given the role of
* a drag-and-drop icon. If the icon surface already has another role,
@@ -2820,6 +2961,10 @@ wl_data_device_destroy(struct wl_data_device *wl_data_device)
*
* The input region is ignored for wl_surfaces with the role of a
* drag-and-drop icon.
+ *
+ * The given source may not be used in any further set_selection or
+ * start_drag requests. Attempting to reuse a previously-used source
+ * may send a used_source error.
*/
static inline void
wl_data_device_start_drag(struct wl_data_device *wl_data_device, struct wl_data_source *source, struct wl_surface *origin, struct wl_surface *icon, uint32_t serial)
@@ -2835,6 +2980,10 @@ wl_data_device_start_drag(struct wl_data_device *wl_data_device, struct wl_data_
* to the data from the source on behalf of the client.
*
* To unset the selection, set the source to NULL.
+ *
+ * The given source may not be used in any further set_selection or
+ * start_drag requests. Attempting to reuse a previously-used source
+ * may send a used_source error.
*/
static inline void
wl_data_device_set_selection(struct wl_data_device *wl_data_device, struct wl_data_source *source, uint32_t serial)
@@ -3588,10 +3737,15 @@ struct wl_surface_listener {
* surface. It is sent whenever the compositor's preference
* changes.
*
+ * Before receiving this event the preferred buffer scale for this
+ * surface is 1.
+ *
* It is intended that scaling aware clients use this event to
* scale their content and use wl_surface.set_buffer_scale to
* indicate the scale they have rendered with. This allows clients
* to supply a higher detail buffer.
+ *
+ * The compositor shall emit a scale value greater than 0.
* @param factor preferred scaling factor
* @since 6
*/
@@ -3605,10 +3759,12 @@ struct wl_surface_listener {
* surface. It is sent whenever the compositor's preference
* changes.
*
- * It is intended that transform aware clients use this event to
- * apply the transform to their content and use
- * wl_surface.set_buffer_transform to indicate the transform they
- * have rendered with.
+ * Before receiving this event the preferred buffer transform for
+ * this surface is normal.
+ *
+ * Applying this transformation to the surface buffer contents and
+ * using wl_surface.set_buffer_transform might allow the compositor
+ * to use the surface buffer more efficiently.
* @param transform preferred transform
* @since 6
*/
@@ -3782,7 +3938,8 @@ wl_surface_destroy(struct wl_surface *wl_surface)
* the delivery of wl_buffer.release events becomes undefined. A well
* behaved client should not rely on wl_buffer.release events in this
* case. Alternatively, a client could create multiple wl_buffer objects
- * from the same backing storage or use wp_linux_buffer_release.
+ * from the same backing storage or use a protocol extension providing
+ * per-commit release notifications.
*
* Destroying the wl_buffer after wl_buffer.release does not change
* the surface contents. Destroying the wl_buffer before wl_buffer.release
@@ -3794,6 +3951,13 @@ wl_surface_destroy(struct wl_surface *wl_surface)
*
* If wl_surface.attach is sent with a NULL wl_buffer, the
* following wl_surface.commit will remove the surface content.
+ *
+ * If a pending wl_buffer has been destroyed, the result is not specified.
+ * Many compositors are known to remove the surface content on the following
+ * wl_surface.commit, but this behaviour is not universal. Clients seeking to
+ * maximise compatibility should not destroy pending buffers and should
+ * ensure that they explicitly remove content from surfaces, even after
+ * destroying buffers.
*/
static inline void
wl_surface_attach(struct wl_surface *wl_surface, struct wl_buffer *buffer, int32_t x, int32_t y)
@@ -3954,16 +4118,18 @@ wl_surface_set_input_region(struct wl_surface *wl_surface, struct wl_region *reg
*
* Surface state (input, opaque, and damage regions, attached buffers,
* etc.) is double-buffered. Protocol requests modify the pending state,
- * as opposed to the current state in use by the compositor. A commit
- * request atomically applies all pending state, replacing the current
- * state. After commit, the new pending state is as documented for each
- * related request.
+ * as opposed to the active state in use by the compositor.
*
- * On commit, a pending wl_buffer is applied first, and all other state
- * second. This means that all coordinates in double-buffered state are
- * relative to the new wl_buffer coming into use, except for
- * wl_surface.attach itself. If there is no pending wl_buffer, the
- * coordinates are relative to the current surface contents.
+ * A commit request atomically creates a content update from the pending
+ * state, even if the pending state has not been touched. The content
+ * update is placed in a queue until it becomes active. After commit, the
+ * new pending state is as documented for each related request.
+ *
+ * When the content update is applied, the wl_buffer is applied before all
+ * other state. This means that all coordinates in double-buffered state
+ * are relative to the newly attached wl_buffers, except for
+ * wl_surface.attach itself. If there is no newly attached wl_buffer, the
+ * coordinates are relative to the previous content update.
*
* All requests that need a commit to become effective are documented
* to affect double-buffered state.
@@ -3980,10 +4146,12 @@ wl_surface_commit(struct wl_surface *wl_surface)
/**
* @ingroup iface_wl_surface
*
- * This request sets an optional transformation on how the compositor
- * interprets the contents of the buffer attached to the surface. The
- * accepted values for the transform parameter are the values for
- * wl_output.transform.
+ * This request sets the transformation that the client has already applied
+ * to the content of the buffer. The accepted values for the transform
+ * parameter are the values for wl_output.transform.
+ *
+ * The compositor applies the inverse of this transformation whenever it
+ * uses the buffer contents.
*
* Buffer transform is double-buffered state, see wl_surface.commit.
*
@@ -4041,7 +4209,7 @@ wl_surface_set_buffer_transform(struct wl_surface *wl_surface, int32_t transform
* a buffer that is larger (by a factor of scale in each dimension)
* than the desired surface size.
*
- * If scale is not positive the invalid_scale protocol error is
+ * If scale is not greater than 0 the invalid_scale protocol error is
* raised.
*/
static inline void
@@ -4103,6 +4271,9 @@ wl_surface_damage_buffer(struct wl_surface *wl_surface, int32_t x, int32_t y, in
* x and y, combined with the new surface size define in which
* directions the surface's size changes.
*
+ * The exact semantics of wl_surface.offset are role-specific. Refer to
+ * the documentation of specific roles for more information.
+ *
* Surface location offset is double-buffered state, see
* wl_surface.commit.
*
@@ -4166,9 +4337,10 @@ struct wl_seat_listener {
/**
* seat capabilities changed
*
- * This is emitted whenever a seat gains or loses the pointer,
- * keyboard or touch capabilities. The argument is a capability
- * enum containing the complete set of capabilities this seat has.
+ * This is sent on binding to the seat global or whenever a seat
+ * gains or loses the pointer, keyboard or touch capabilities. The
+ * argument is a capability enum containing the complete set of
+ * capabilities this seat has.
*
* When the pointer capability is added, a client may create a
* wl_pointer object using the wl_seat.get_pointer request. This
@@ -4212,9 +4384,10 @@ struct wl_seat_listener {
* be shared across processes to refer to a specific wl_seat
* global.
*
- * The name event is sent after binding to the seat global. This
- * event is only sent once per seat object, and the name does not
- * change over the lifetime of the wl_seat global.
+ * The name event is sent after binding to the seat global, and
+ * should be sent before announcing capabilities. This event only
+ * sent once per seat object, and the name does not change over the
+ * lifetime of the wl_seat global.
*
* Compositors may re-use the same seat name if the wl_seat global
* is destroyed and re-created later.
@@ -4744,6 +4917,7 @@ struct wl_pointer_listener {
* @param axis axis type
* @param discrete number of steps
* @since 5
+ * @deprecated Deprecated since version 8
*/
void (*axis_discrete)(void *data,
struct wl_pointer *wl_pointer,
@@ -4944,9 +5118,9 @@ wl_pointer_destroy(struct wl_pointer *wl_pointer)
* where (x, y) are the coordinates of the pointer location, in
* surface-local coordinates.
*
- * On surface.attach requests to the pointer surface, hotspot_x
+ * On wl_surface.offset requests to the pointer surface, hotspot_x
* and hotspot_y are decremented by the x and y parameters
- * passed to the request. Attach must be confirmed by
+ * passed to the request. The offset must be applied by
* wl_surface.commit as usual.
*
* The hotspot can also be updated by passing the currently set
@@ -5012,6 +5186,14 @@ enum wl_keyboard_keymap_format {
* physical key state
*
* Describes the physical state of a key that produced the key event.
+ *
+ * Since version 10, the key can be in a "repeated" pseudo-state which
+ * means the same as "pressed", but is used to signal repetition in the
+ * key event.
+ *
+ * The key may only enter the repeated state after entering the pressed
+ * state and before entering the released state. This event may be
+ * generated multiple times while the key is down.
*/
enum wl_keyboard_key_state {
/**
@@ -5022,7 +5204,16 @@ enum wl_keyboard_key_state {
* key is pressed
*/
WL_KEYBOARD_KEY_STATE_PRESSED = 1,
+ /**
+ * key was repeated
+ * @since 10
+ */
+ WL_KEYBOARD_KEY_STATE_REPEATED = 2,
};
+/**
+ * @ingroup iface_wl_keyboard
+ */
+#define WL_KEYBOARD_KEY_STATE_REPEATED_SINCE_VERSION 10
#endif /* WL_KEYBOARD_KEY_STATE_ENUM */
/**
@@ -5056,9 +5247,18 @@ struct wl_keyboard_listener {
*
* The compositor must send the wl_keyboard.modifiers event after
* this event.
+ *
+ * In the wl_keyboard logical state, this event sets the active
+ * surface to the surface argument and the keys currently logically
+ * down to the keys in the keys argument. The compositor must not
+ * send this event if the wl_keyboard already had an active surface
+ * immediately before this event.
+ *
+ * Clients should not use the list of pressed keys to emulate
+ * key-press events. The order of keys in the list is unspecified.
* @param serial serial number of the enter event
* @param surface surface gaining keyboard focus
- * @param keys the currently pressed keys
+ * @param keys the keys currently logically down
*/
void (*enter)(void *data,
struct wl_keyboard *wl_keyboard,
@@ -5074,9 +5274,10 @@ struct wl_keyboard_listener {
* The leave notification is sent before the enter notification for
* the new focus.
*
- * After this event client must assume that all keys, including
- * modifiers, are lifted and also it must stop key repeating if
- * there's some going on.
+ * In the wl_keyboard logical state, this event resets all values
+ * to their defaults. The compositor must not send this event if
+ * the active surface of the wl_keyboard was not equal to the
+ * surface argument immediately before this event.
* @param serial serial number of the leave event
* @param surface surface that lost keyboard focus
*/
@@ -5095,6 +5296,21 @@ struct wl_keyboard_listener {
*
* If this event produces a change in modifiers, then the resulting
* wl_keyboard.modifiers event must be sent after this event.
+ *
+ * In the wl_keyboard logical state, this event adds the key to the
+ * keys currently logically down (if the state argument is pressed)
+ * or removes the key from the keys currently logically down (if
+ * the state argument is released). The compositor must not send
+ * this event if the wl_keyboard did not have an active surface
+ * immediately before this event. The compositor must not send this
+ * event if state is pressed (resp. released) and the key was
+ * already logically down (resp. was not logically down)
+ * immediately before this event.
+ *
+ * Since version 10, compositors may send key events with the
+ * "repeated" key state when a wl_keyboard.repeat_info event with a
+ * rate argument of 0 has been received. This allows the compositor
+ * to take over the responsibility of key repetition.
* @param serial serial number of the key event
* @param time timestamp with millisecond granularity
* @param key key that produced the event
@@ -5111,6 +5327,18 @@ struct wl_keyboard_listener {
*
* Notifies clients that the modifier and/or group state has
* changed, and it should update its local state.
+ *
+ * The compositor may send this event without a surface of the
+ * client having keyboard focus, for example to tie modifier
+ * information to pointer focus instead. If a modifier event with
+ * pressed modifiers is sent without a prior enter event, the
+ * client can assume the modifier state is valid until it receives
+ * the next wl_keyboard.modifiers event. In order to reset the
+ * modifier state again, the compositor can send a
+ * wl_keyboard.modifiers event with no pressed modifiers.
+ *
+ * In the wl_keyboard logical state, this event updates the
+ * modifiers and group.
* @param serial serial number of the modifiers event
* @param mods_depressed depressed modifiers
* @param mods_latched latched modifiers
@@ -5310,6 +5538,8 @@ struct wl_touch_listener {
* points currently active on this client's surface. The client is
* responsible for finalizing the touch points, future touch points
* on this surface may reuse the touch point ID.
+ *
+ * No frame event is required after the cancel event.
*/
void (*cancel)(void *data,
struct wl_touch *wl_touch);
@@ -5513,11 +5743,10 @@ enum wl_output_subpixel {
#define WL_OUTPUT_TRANSFORM_ENUM
/**
* @ingroup iface_wl_output
- * transform from framebuffer to output
+ * transformation applied to buffer contents
*
- * This describes the transform that a compositor will apply to a
- * surface to compensate for the rotation or mirroring of an
- * output device.
+ * This describes transformations that clients and compositors apply to
+ * buffer contents.
*
* The flipped values correspond to an initial flip around a
* vertical axis followed by rotation.
@@ -5602,6 +5831,10 @@ struct wl_output_listener {
* The geometry event will be followed by a done event (starting
* from version 2).
*
+ * Clients should use wl_surface.preferred_buffer_transform instead
+ * of the transform advertised by this event to find the preferred
+ * buffer transform to use for a surface.
+ *
* Note: wl_output only advertises partial information about the
* output position and identification. Some compositors, for
* instance those not implementing a desktop-style output layout or
@@ -5616,7 +5849,7 @@ struct wl_output_listener {
* @param subpixel subpixel orientation of the output
* @param make textual description of the manufacturer
* @param model textual description of the model
- * @param transform transform that maps framebuffer to output
+ * @param transform additional transformation applied to buffer contents during presentation
*/
void (*geometry)(void *data,
struct wl_output *wl_output,
@@ -5692,7 +5925,8 @@ struct wl_output_listener {
*
* This event contains scaling geometry information that is not
* in the geometry event. It may be sent after binding the output
- * object or if the output scale changes later. If it is not sent,
+ * object or if the output scale changes later. The compositor will
+ * emit a non-zero, positive value for scale. If it is not sent,
* the client should assume a scale of 1.
*
* A scale larger than 1 means that the compositor will
@@ -5701,11 +5935,9 @@ struct wl_output_listener {
* applications rendering at the native resolution would be too
* small to be legible.
*
- * It is intended that scaling aware clients track the current
- * output of a surface, and if it is on a scaled output it should
- * use wl_surface.set_buffer_scale with the scale of the output.
- * That way the compositor can avoid scaling the surface, and the
- * client can supply a higher detail image.
+ * Clients should use wl_surface.preferred_buffer_scale instead of
+ * this event to find the preferred buffer scale to use for a
+ * surface.
*
* The scale event will be followed by a done event.
* @param factor scaling factor of output
@@ -6119,9 +6351,7 @@ wl_subsurface_destroy(struct wl_subsurface *wl_subsurface)
* surface area. Negative values are allowed.
*
* The scheduled coordinates will take effect whenever the state of the
- * parent surface is applied. When this happens depends on whether the
- * parent surface is in synchronized mode or not. See
- * wl_subsurface.set_sync and wl_subsurface.set_desync for details.
+ * parent surface is applied.
*
* If more than one set_position request is invoked by the client before
* the commit of the parent surface, the position of a new request always
@@ -6148,9 +6378,7 @@ wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32
* The z-order is double-buffered. Requests are handled in order and
* applied immediately to a pending state. The final pending state is
* copied to the active state the next time the state of the parent
- * surface is applied. When this happens depends on whether the parent
- * surface is in synchronized mode or not. See wl_subsurface.set_sync and
- * wl_subsurface.set_desync for details.
+ * surface is applied.
*
* A new sub-surface is initially added as the top-most in the stack
* of its siblings and parent.
@@ -6229,6 +6457,69 @@ wl_subsurface_set_desync(struct wl_subsurface *wl_subsurface)
WL_SUBSURFACE_SET_DESYNC, NULL, wl_proxy_get_version((struct wl_proxy *) wl_subsurface), 0);
}
+#define WL_FIXES_DESTROY 0
+#define WL_FIXES_DESTROY_REGISTRY 1
+
+
+/**
+ * @ingroup iface_wl_fixes
+ */
+#define WL_FIXES_DESTROY_SINCE_VERSION 1
+/**
+ * @ingroup iface_wl_fixes
+ */
+#define WL_FIXES_DESTROY_REGISTRY_SINCE_VERSION 1
+
+/** @ingroup iface_wl_fixes */
+static inline void
+wl_fixes_set_user_data(struct wl_fixes *wl_fixes, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wl_fixes, user_data);
+}
+
+/** @ingroup iface_wl_fixes */
+static inline void *
+wl_fixes_get_user_data(struct wl_fixes *wl_fixes)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wl_fixes);
+}
+
+static inline uint32_t
+wl_fixes_get_version(struct wl_fixes *wl_fixes)
+{
+ return wl_proxy_get_version((struct wl_proxy *) wl_fixes);
+}
+
+/**
+ * @ingroup iface_wl_fixes
+ */
+static inline void
+wl_fixes_destroy(struct wl_fixes *wl_fixes)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) wl_fixes,
+ WL_FIXES_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_fixes), WL_MARSHAL_FLAG_DESTROY);
+}
+
+/**
+ * @ingroup iface_wl_fixes
+ *
+ * This request destroys a wl_registry object.
+ *
+ * The client should no longer use the wl_registry after making this
+ * request.
+ *
+ * The compositor will emit a wl_display.delete_id event with the object ID
+ * of the registry and will no longer emit any events on the registry. The
+ * client should re-use the object ID once it receives the
+ * wl_display.delete_id event.
+ */
+static inline void
+wl_fixes_destroy_registry(struct wl_fixes *wl_fixes, struct wl_registry *registry)
+{
+ wl_proxy_marshal_flags((struct wl_proxy *) wl_fixes,
+ WL_FIXES_DESTROY_REGISTRY, NULL, wl_proxy_get_version((struct wl_proxy *) wl_fixes), 0, registry);
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/deps/wayland/protocols/wayland-client.c b/deps/wayland/protocols/wayland-client.c
index 7ea8e7c66..d640bb40c 100644
--- a/deps/wayland/protocols/wayland-client.c
+++ b/deps/wayland/protocols/wayland-client.c
@@ -155,6 +155,7 @@ static const struct wl_interface *wayland_types[] = {
&wl_surface_interface,
&wl_surface_interface,
&wl_surface_interface,
+ &wl_registry_interface,
};
static const struct wl_message wl_display_requests[] = {
@@ -216,13 +217,14 @@ static const struct wl_message wl_shm_pool_requests[] = {
};
WL_PRIVATE const struct wl_interface wl_shm_pool_interface = {
- "wl_shm_pool", 1,
+ "wl_shm_pool", 2,
3, wl_shm_pool_requests,
0, NULL,
};
static const struct wl_message wl_shm_requests[] = {
{ "create_pool", "nhi", wayland_types + 18 },
+ { "release", "2", wayland_types + 0 },
};
static const struct wl_message wl_shm_events[] = {
@@ -230,8 +232,8 @@ static const struct wl_message wl_shm_events[] = {
};
WL_PRIVATE const struct wl_interface wl_shm_interface = {
- "wl_shm", 1,
- 1, wl_shm_requests,
+ "wl_shm", 2,
+ 2, wl_shm_requests,
1, wl_shm_events,
};
@@ -397,7 +399,7 @@ static const struct wl_message wl_seat_events[] = {
};
WL_PRIVATE const struct wl_interface wl_seat_interface = {
- "wl_seat", 9,
+ "wl_seat", 10,
4, wl_seat_requests,
2, wl_seat_events,
};
@@ -422,7 +424,7 @@ static const struct wl_message wl_pointer_events[] = {
};
WL_PRIVATE const struct wl_interface wl_pointer_interface = {
- "wl_pointer", 9,
+ "wl_pointer", 10,
2, wl_pointer_requests,
11, wl_pointer_events,
};
@@ -441,7 +443,7 @@ static const struct wl_message wl_keyboard_events[] = {
};
WL_PRIVATE const struct wl_interface wl_keyboard_interface = {
- "wl_keyboard", 9,
+ "wl_keyboard", 10,
1, wl_keyboard_requests,
6, wl_keyboard_events,
};
@@ -461,7 +463,7 @@ static const struct wl_message wl_touch_events[] = {
};
WL_PRIVATE const struct wl_interface wl_touch_interface = {
- "wl_touch", 9,
+ "wl_touch", 10,
1, wl_touch_requests,
7, wl_touch_events,
};
@@ -523,3 +525,14 @@ WL_PRIVATE const struct wl_interface wl_subsurface_interface = {
0, NULL,
};
+static const struct wl_message wl_fixes_requests[] = {
+ { "destroy", "", wayland_types + 0 },
+ { "destroy_registry", "o", wayland_types + 95 },
+};
+
+WL_PRIVATE const struct wl_interface wl_fixes_interface = {
+ "wl_fixes", 1,
+ 2, wl_fixes_requests,
+ 0, NULL,
+};
+
diff --git a/deps/wayland/protocols/xdg-shell-client-protocol.h b/deps/wayland/protocols/xdg-shell-client-protocol.h
index 1e5a9664b..db577563a 100644
--- a/deps/wayland/protocols/xdg-shell-client-protocol.h
+++ b/deps/wayland/protocols/xdg-shell-client-protocol.h
@@ -167,7 +167,8 @@ extern const struct wl_interface xdg_positioner_interface;
* manipulate a buffer prior to the first xdg_surface.configure call must
* also be treated as errors.
*
- * After creating a role-specific object and setting it up, the client must
+ * After creating a role-specific object and setting it up (e.g. by sending
+ * the title, app ID, size constraints, parent, etc), the client must
* perform an initial commit without any buffer attached. The compositor
* will reply with initial wl_surface state such as
* wl_surface.preferred_buffer_scale followed by an xdg_surface.configure
@@ -220,7 +221,8 @@ extern const struct wl_interface xdg_positioner_interface;
* manipulate a buffer prior to the first xdg_surface.configure call must
* also be treated as errors.
*
- * After creating a role-specific object and setting it up, the client must
+ * After creating a role-specific object and setting it up (e.g. by sending
+ * the title, app ID, size constraints, parent, etc), the client must
* perform an initial commit without any buffer attached. The compositor
* will reply with initial wl_surface state such as
* wl_surface.preferred_buffer_scale followed by an xdg_surface.configure
@@ -257,13 +259,17 @@ extern const struct wl_interface xdg_surface_interface;
* id, and well as trigger user interactive operations such as interactive
* resize and move.
*
+ * A xdg_toplevel by default is responsible for providing the full intended
+ * visual representation of the toplevel, which depending on the window
+ * state, may mean things like a title bar, window controls and drop shadow.
+ *
* Unmapping an xdg_toplevel means that the surface cannot be shown
* by the compositor until it is explicitly mapped again.
* All active operations (e.g., move, resize) are canceled and all
* attributes (e.g. title, state, stacking, ...) are discarded for
* an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
* the state it had right after xdg_surface.get_toplevel. The client
- * can re-map the toplevel by perfoming a commit without any buffer
+ * can re-map the toplevel by performing a commit without any buffer
* attached, waiting for a configure event and handling it as usual (see
* xdg_surface description).
*
@@ -280,13 +286,17 @@ extern const struct wl_interface xdg_surface_interface;
* id, and well as trigger user interactive operations such as interactive
* resize and move.
*
+ * A xdg_toplevel by default is responsible for providing the full intended
+ * visual representation of the toplevel, which depending on the window
+ * state, may mean things like a title bar, window controls and drop shadow.
+ *
* Unmapping an xdg_toplevel means that the surface cannot be shown
* by the compositor until it is explicitly mapped again.
* All active operations (e.g., move, resize) are canceled and all
* attributes (e.g. title, state, stacking, ...) are discarded for
* an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
* the state it had right after xdg_surface.get_toplevel. The client
- * can re-map the toplevel by perfoming a commit without any buffer
+ * can re-map the toplevel by performing a commit without any buffer
* attached, waiting for a configure event and handling it as usual (see
* xdg_surface description).
*
@@ -1148,8 +1158,7 @@ xdg_surface_get_popup(struct xdg_surface *xdg_surface, struct xdg_surface *paren
* portions like drop-shadows which should be ignored for the
* purposes of aligning, placing and constraining windows.
*
- * The window geometry is double buffered, and will be applied at the
- * time wl_surface.commit of the corresponding wl_surface is called.
+ * The window geometry is double-buffered state, see wl_surface.commit.
*
* When maintaining a position, the compositor should treat the (x, y)
* coordinate of the window geometry as the top left corner of the window.
@@ -1283,8 +1292,7 @@ enum xdg_toplevel_resize_edge {
* configure event to ensure that both the client and the compositor
* setting the state can be synchronized.
*
- * States set in this way are double-buffered. They will get applied on
- * the next commit.
+ * States set in this way are double-buffered, see wl_surface.commit.
*/
enum xdg_toplevel_state {
/**
@@ -1334,6 +1342,9 @@ enum xdg_toplevel_state {
*
* The window is currently in a tiled layout and the left edge is
* considered to be adjacent to another part of the tiling grid.
+ *
+ * The client should draw without shadow or other decoration
+ * outside of the window geometry on the left edge.
* @since 2
*/
XDG_TOPLEVEL_STATE_TILED_LEFT = 5,
@@ -1342,6 +1353,9 @@ enum xdg_toplevel_state {
*
* The window is currently in a tiled layout and the right edge
* is considered to be adjacent to another part of the tiling grid.
+ *
+ * The client should draw without shadow or other decoration
+ * outside of the window geometry on the right edge.
* @since 2
*/
XDG_TOPLEVEL_STATE_TILED_RIGHT = 6,
@@ -1350,6 +1364,9 @@ enum xdg_toplevel_state {
*
* The window is currently in a tiled layout and the top edge is
* considered to be adjacent to another part of the tiling grid.
+ *
+ * The client should draw without shadow or other decoration
+ * outside of the window geometry on the top edge.
* @since 2
*/
XDG_TOPLEVEL_STATE_TILED_TOP = 7,
@@ -1358,6 +1375,9 @@ enum xdg_toplevel_state {
*
* The window is currently in a tiled layout and the bottom edge
* is considered to be adjacent to another part of the tiling grid.
+ *
+ * The client should draw without shadow or other decoration
+ * outside of the window geometry on the bottom edge.
* @since 2
*/
XDG_TOPLEVEL_STATE_TILED_BOTTOM = 8,
@@ -1370,6 +1390,46 @@ enum xdg_toplevel_state {
* @since 6
*/
XDG_TOPLEVEL_STATE_SUSPENDED = 9,
+ /**
+ * the surface’s left edge is constrained
+ *
+ * The left edge of the window is currently constrained, meaning
+ * it shouldn't attempt to resize from that edge. It can for
+ * example mean it's tiled next to a monitor edge on the
+ * constrained side of the window.
+ * @since 7
+ */
+ XDG_TOPLEVEL_STATE_CONSTRAINED_LEFT = 10,
+ /**
+ * the surface’s right edge is constrained
+ *
+ * The right edge of the window is currently constrained, meaning
+ * it shouldn't attempt to resize from that edge. It can for
+ * example mean it's tiled next to a monitor edge on the
+ * constrained side of the window.
+ * @since 7
+ */
+ XDG_TOPLEVEL_STATE_CONSTRAINED_RIGHT = 11,
+ /**
+ * the surface’s top edge is constrained
+ *
+ * The top edge of the window is currently constrained, meaning
+ * it shouldn't attempt to resize from that edge. It can for
+ * example mean it's tiled next to a monitor edge on the
+ * constrained side of the window.
+ * @since 7
+ */
+ XDG_TOPLEVEL_STATE_CONSTRAINED_TOP = 12,
+ /**
+ * the surface’s bottom edge is tiled
+ *
+ * The bottom edge of the window is currently constrained,
+ * meaning it shouldn't attempt to resize from that edge. It can
+ * for example mean it's tiled next to a monitor edge on the
+ * constrained side of the window.
+ * @since 7
+ */
+ XDG_TOPLEVEL_STATE_CONSTRAINED_BOTTOM = 13,
};
/**
* @ingroup iface_xdg_toplevel
@@ -1391,6 +1451,22 @@ enum xdg_toplevel_state {
* @ingroup iface_xdg_toplevel
*/
#define XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION 6
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_CONSTRAINED_LEFT_SINCE_VERSION 7
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_CONSTRAINED_RIGHT_SINCE_VERSION 7
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_CONSTRAINED_TOP_SINCE_VERSION 7
+/**
+ * @ingroup iface_xdg_toplevel
+ */
+#define XDG_TOPLEVEL_STATE_CONSTRAINED_BOTTOM_SINCE_VERSION 7
#endif /* XDG_TOPLEVEL_STATE_ENUM */
#ifndef XDG_TOPLEVEL_WM_CAPABILITIES_ENUM
@@ -1840,8 +1916,7 @@ xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uin
* The width and height arguments are in window geometry coordinates.
* See xdg_surface.set_window_geometry.
*
- * Values set in this way are double-buffered. They will get applied
- * on the next commit.
+ * Values set in this way are double-buffered, see wl_surface.commit.
*
* The compositor can use this information to allow or disallow
* different states like maximize or fullscreen and draw accurate
@@ -1885,8 +1960,7 @@ xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int3
* The width and height arguments are in window geometry coordinates.
* See xdg_surface.set_window_geometry.
*
- * Values set in this way are double-buffered. They will get applied
- * on the next commit.
+ * Values set in this way are double-buffered, see wl_surface.commit.
*
* The compositor can use this information to allow or disallow
* different states like maximize or fullscreen and draw accurate
diff --git a/deps/wayland/protocols/xdg-shell-client.c b/deps/wayland/protocols/xdg-shell-client.c
index d698c2ca5..4faed8df2 100644
--- a/deps/wayland/protocols/xdg-shell-client.c
+++ b/deps/wayland/protocols/xdg-shell-client.c
@@ -92,7 +92,7 @@ static const struct wl_message xdg_wm_base_events[] = {
};
WL_PRIVATE const struct wl_interface xdg_wm_base_interface = {
- "xdg_wm_base", 6,
+ "xdg_wm_base", 7,
4, xdg_wm_base_requests,
1, xdg_wm_base_events,
};
@@ -111,7 +111,7 @@ static const struct wl_message xdg_positioner_requests[] = {
};
WL_PRIVATE const struct wl_interface xdg_positioner_interface = {
- "xdg_positioner", 6,
+ "xdg_positioner", 7,
10, xdg_positioner_requests,
0, NULL,
};
@@ -129,7 +129,7 @@ static const struct wl_message xdg_surface_events[] = {
};
WL_PRIVATE const struct wl_interface xdg_surface_interface = {
- "xdg_surface", 6,
+ "xdg_surface", 7,
5, xdg_surface_requests,
1, xdg_surface_events,
};
@@ -159,7 +159,7 @@ static const struct wl_message xdg_toplevel_events[] = {
};
WL_PRIVATE const struct wl_interface xdg_toplevel_interface = {
- "xdg_toplevel", 6,
+ "xdg_toplevel", 7,
14, xdg_toplevel_requests,
4, xdg_toplevel_events,
};
@@ -177,7 +177,7 @@ static const struct wl_message xdg_popup_events[] = {
};
WL_PRIVATE const struct wl_interface xdg_popup_interface = {
- "xdg_popup", 6,
+ "xdg_popup", 7,
3, xdg_popup_requests,
3, xdg_popup_events,
};
diff --git a/src/linux.zig b/src/linux.zig
index c9ea63ceb..5142c1ca1 100644
--- a/src/linux.zig
+++ b/src/linux.zig
@@ -436,6 +436,53 @@ pub fn build(
lib.addIncludePath(b.path("deps/alsa/include"));
}
+ // Provide the Fribidi headers
+ {
+ const fribidi = b.dependency("fribidi", .{});
+ const interface_version = build_zon.dependencies.fribidi.interface_version;
+ const version_string = build_zon.dependencies.fribidi.version;
+ const version = comptime std.SemanticVersion.parse(version_string) catch unreachable;
+
+ const unicode_version_string = build_zon.dependencies.fribidi.unicode_version;
+ const unicode_version = comptime std.SemanticVersion.parse(unicode_version_string) catch unreachable;
+
+ const fribidi_config_path = "fribidi-config.h";
+ const version_h = b.addConfigHeader(.{
+ .style = .{ .cmake = fribidi.path("lib/fribidi-config.h.in") },
+ .include_path = fribidi_config_path,
+ }, .{
+ .configure_input = fribidi_config_path,
+
+ .PACKAGE = "fribidi",
+ .PACKAGE_NAME = "GNU FriBidi",
+ .PACKAGE_BUGREPORT = "https://github.com/fribidi/fribidi/issues/new",
+
+ .FRIBIDI_VERSION = version_string,
+ .FRIBIDI_MAJOR_VERSION = @as(i64, version.major),
+ .FRIBIDI_MINOR_VERSION = @as(i64, version.minor),
+ .FRIBIDI_MICRO_VERSION = @as(i64, version.patch),
+ .FRIBIDI_INTERFACE_VERSION = interface_version,
+
+ .SIZEOF_INT = target.cTypeByteSize(.int),
+
+ .FRIBIDI_MSVC_BUILD_PLACEHOLDER = "",
+ });
+ _ = generated.addCopyFile(version_h.getOutput(), version_h.include_path);
+
+ const unicode_version_h = b.addConfigHeader(.{
+ .style = .blank,
+ .include_path = "fribidi-unicode-version.h",
+ }, .{
+ .FRIBIDI_UNICODE_VERSION = unicode_version_string,
+ .FRIBIDI_UNICODE_MAJOR_VERSION = @as(i64, unicode_version.major),
+ .FRIBIDI_UNICODE_MINOR_VERSION = @as(i64, unicode_version.minor),
+ .FRIBIDI_UNICODE_MICRO_VERSION = @as(i64, unicode_version.patch),
+ });
+ _ = generated.addCopyFile(unicode_version_h.getOutput(), unicode_version_h.include_path);
+
+ lib.addIncludePath(fribidi.path("lib"));
+ }
+
// Provide upstream headers that don't require any special handling
lib.addIncludePath(b.dependency("egl", .{}).path("api"));
lib.addIncludePath(b.dependency("opengl", .{}).path("api"));
@@ -453,6 +500,7 @@ pub fn build(
lib.addIncludePath(b.path("deps/wayland/protocols"));
lib.addIncludePath(b.dependency("decor", .{}).path("src"));
lib.addIncludePath(b.path("deps/mesa/include"));
+ lib.addIncludePath(b.dependency("thai", .{}).path("include"));
// Provide vendored headers that don't require any special handling
lib.addIncludePath(b.path("deps/xcb/include"));
@@ -482,6 +530,8 @@ pub fn build(
// Set the platform specific build config
const libdecor_version_string = build_zon.dependencies.decor.version;
const libdecor_version = comptime std.SemanticVersion.parse(libdecor_version_string) catch unreachable;
+ const xkbcommon_version_string = build_zon.dependencies.xkbcommon.version;
+ const xkbcommon_version = comptime std.SemanticVersion.parse(xkbcommon_version_string) catch unreachable;
const have_sigtimedwait: i64 = if (target.os.tag == .openbsd) 0 else 1;
build_config_h.addValues(.{
.HAVE_GCC_ATOMICS = 1,
@@ -623,6 +673,8 @@ pub fn build(
.HAVE_ELF_AUX_INFO = 1,
.HAVE_POLL = 1,
.HAVE__EXIT = 1,
+ .HAVE_GETRESUID = 1,
+ .HAVE_GETRESGID = 1,
.HAVE_DBUS_DBUS_H = 1,
.HAVE_FCITX = 1,
@@ -636,6 +688,10 @@ pub fn build(
.HAVE_LIBUDEV_H = 1,
.HAVE_LIBDECOR_H = 1,
.HAVE_LIBURING_H = 1,
+ .HAVE_FRIBIDI_H = 1,
+ .SDL_FRIBIDI_DYNAMIC = formatDynamic("libfribidi.so"),
+ .HAVE_LIBTHAI_H = 1,
+ .SDL_LIBTHAI_DYNAMIC = formatDynamic("libthai.so"),
.USE_POSIX_SPAWN = 1,
@@ -710,12 +766,15 @@ pub fn build(
.SDL_VIDEO_DRIVER_X11_XRANDR = 1,
.SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR = formatDynamic("libXrandr.so"),
.SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS = formatDynamic("libX11.so"),
+ .SDL_VIDEO_DRIVER_X11_DYNAMIC_XTEST = formatDynamic("libXtst.so"),
.SDL_VIDEO_DRIVER_X11_XCURSOR = 1,
.SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR = formatDynamic("libXcursor.so"),
.SDL_VIDEO_DRIVER_X11_HAS_XKBLOOKUPKEYSYM = 1,
.SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS = 1,
.SDL_VIDEO_DRIVER_X11_XDBE = 1,
.SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH = 1,
+ .SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO = 1,
+ .SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE = 1,
.SDL_VIDEO_DRIVER_X11_XSCRNSAVER = 1,
.SDL_VIDEO_DRIVER_X11_XSHAPE = 1,
.SDL_VIDEO_DRIVER_X11_XSYNC = 1,
@@ -763,6 +822,11 @@ pub fn build(
// Enable ime support
.SDL_USE_IME = 1,
+ // Set the xkbcommon version
+ .SDL_XKBCOMMON_VERSION_MAJOR = @as(i64, xkbcommon_version.major),
+ .SDL_XKBCOMMON_VERSION_MINOR = @as(i64, xkbcommon_version.minor),
+ .SDL_XKBCOMMON_VERSION_PATCH = @as(i64, xkbcommon_version.patch),
+
// Set the libdecor version
.SDL_LIBDECOR_VERSION_MAJOR = @as(i64, libdecor_version.major),
.SDL_LIBDECOR_VERSION_MINOR = @as(i64, libdecor_version.minor),
diff --git a/src/macos.zig b/src/macos.zig
index cdc47867d..bfd4e8b3b 100644
--- a/src/macos.zig
+++ b/src/macos.zig
@@ -276,5 +276,12 @@ pub fn build(
.SDL_LIBDECOR_VERSION_MAJOR = "",
.SDL_LIBDECOR_VERSION_MINOR = "",
.SDL_LIBDECOR_VERSION_PATCH = "",
+ .SDL_FRIBIDI_DYNAMIC = "",
+ .SDL_LIBTHAI_DYNAMIC = "",
+ .SDL_VIDEO_DRIVER_X11_DYNAMIC_XTEST = "",
+ .SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE = "",
+ .SDL_XKBCOMMON_VERSION_MAJOR = "",
+ .SDL_XKBCOMMON_VERSION_MINOR = "",
+ .SDL_XKBCOMMON_VERSION_PATCH = "",
});
}
diff --git a/src/sdl.zon b/src/sdl.zon
index e22b88952..2bcb9a1f0 100644
--- a/src/sdl.zon
+++ b/src/sdl.zon
@@ -22,6 +22,7 @@
"audio/directsound/SDL_directsound.c",
"audio/disk/SDL_diskaudio.c",
"audio/dsp/SDL_dspaudio.c",
+ "audio/dummy/SDL_dummyaudio.c",
"audio/emscripten/SDL_emscriptenaudio.c",
"audio/jack/SDL_jackaudio.c",
"audio/n3ds/SDL_n3dsaudio.c",
@@ -43,6 +44,7 @@
"audio/vita/SDL_vitaaudio.c",
"audio/wasapi/SDL_wasapi.c",
"camera/android/SDL_camera_android.c",
+ "camera/dummy/SDL_camera_dummy.c",
"camera/emscripten/SDL_camera_emscripten.c",
"camera/mediafoundation/SDL_camera_mediafoundation.c",
"camera/pipewire/SDL_camera_pipewire.c",
@@ -62,6 +64,7 @@
"core/windows/SDL_immdevice.c",
"core/windows/SDL_windows.c",
"cpuinfo/SDL_cpuinfo.c",
+ "dialog/dummy/SDL_dummydialog.c",
"dialog/SDL_dialog.c",
"dialog/SDL_dialog_utils.c",
"dynapi/SDL_dynapi.c",
@@ -82,6 +85,8 @@
"events/SDL_scancode_tables.c",
"events/SDL_touch.c",
"events/SDL_windowevents.c",
+ "filesystem/dummy/SDL_sysfilesystem.c",
+ "filesystem/dummy/SDL_sysfsops.c",
"filesystem/n3ds/SDL_sysfilesystem.c",
"filesystem/posix/SDL_sysfsops.c",
"filesystem/psp/SDL_sysfilesystem.c",
@@ -94,32 +99,46 @@
"gpu/d3d12/SDL_gpu_d3d12.c",
"gpu/SDL_gpu.c",
"gpu/vulkan/SDL_gpu_vulkan.c",
+ "haptic/dummy/SDL_syshaptic.c",
+ "haptic/hidapi/SDL_hidapihaptic.c",
+ "haptic/hidapi/SDL_hidapihaptic_lg4ff.c",
"haptic/SDL_haptic.c",
"hidapi/SDL_hidapi.c",
"io/generic/SDL_asyncio_generic.c",
+ "io/io_uring/SDL_asyncio_liburing.c",
"io/SDL_asyncio.c",
"io/SDL_iostream.c",
"joystick/controller_type.c",
"joystick/darwin/SDL_iokitjoystick.c",
- "joystick/gdk/SDL_gameinputjoystick.c",
+ "joystick/dummy/SDL_sysjoystick.c",
+ "joystick/gdk/SDL_gameinputjoystick.cpp",
+ "joystick/hidapi/SDL_hidapi_8bitdo.c",
"joystick/hidapi/SDL_hidapi_combined.c",
+ "joystick/hidapi/SDL_hidapi_flydigi.c",
"joystick/hidapi/SDL_hidapi_gamecube.c",
+ "joystick/hidapi/SDL_hidapi_gip.c",
+ "joystick/hidapi/SDL_hidapi_lg4ff.c",
"joystick/hidapi/SDL_hidapi_luna.c",
"joystick/hidapi/SDL_hidapi_ps3.c",
"joystick/hidapi/SDL_hidapi_ps4.c",
"joystick/hidapi/SDL_hidapi_ps5.c",
"joystick/hidapi/SDL_hidapi_rumble.c",
"joystick/hidapi/SDL_hidapi_shield.c",
+ "joystick/hidapi/SDL_hidapi_sinput.c",
"joystick/hidapi/SDL_hidapi_stadia.c",
"joystick/hidapi/SDL_hidapi_steam.c",
"joystick/hidapi/SDL_hidapi_steam_hori.c",
+ "joystick/hidapi/SDL_hidapi_steam_triton.c",
"joystick/hidapi/SDL_hidapi_steamdeck.c",
"joystick/hidapi/SDL_hidapi_switch.c",
+ "joystick/hidapi/SDL_hidapi_switch2.c",
"joystick/hidapi/SDL_hidapi_wii.c",
"joystick/hidapi/SDL_hidapi_xbox360.c",
"joystick/hidapi/SDL_hidapi_xbox360w.c",
"joystick/hidapi/SDL_hidapi_xboxone.c",
+ "joystick/hidapi/SDL_hidapi_zuiki.c",
"joystick/hidapi/SDL_hidapijoystick.c",
+ "joystick/hidapi/SDL_report_descriptor.c",
"joystick/psp/SDL_sysjoystick.c",
"joystick/SDL_gamepad.c",
"joystick/SDL_joystick.c",
@@ -157,6 +176,7 @@
"libm/s_sin.c",
"libm/s_tan.c",
"loadso/dlopen/SDL_sysloadso.c",
+ "loadso/dummy/SDL_sysloadso.c",
"loadso/windows/SDL_sysloadso.c",
"locale/SDL_locale.c",
"main/emscripten/SDL_sysmain_runapp.c",
@@ -167,6 +187,7 @@
"main/SDL_main_callbacks.c",
"main/SDL_runapp.c",
"main/windows/SDL_sysmain_runapp.c",
+ "misc/SDL_libusb.c",
"misc/SDL_url.c",
"power/haiku/SDL_syspower.c",
"power/linux/SDL_syspower.c",
@@ -176,6 +197,7 @@
"power/SDL_power.c",
"power/vita/SDL_syspower.c",
"power/windows/SDL_syspower.c",
+ "process/dummy/SDL_dummyprocess.c",
"process/posix/SDL_posixprocess.c",
"process/SDL_process.c",
"process/windows/SDL_windowsprocess.c",
@@ -194,7 +216,6 @@
"render/opengles2/SDL_shaders_gles2.c",
"render/ps2/SDL_render_ps2.c",
"render/psp/SDL_render_psp.c",
- "render/SDL_d3dmath.c",
"render/SDL_render.c",
"render/SDL_render_unsupported.c",
"render/SDL_yuv_sw.c",
@@ -204,7 +225,6 @@
"render/software/SDL_drawline.c",
"render/software/SDL_drawpoint.c",
"render/software/SDL_render_sw.c",
- "render/software/SDL_rotate.c",
"render/software/SDL_triangle.c",
"render/vitagxm/SDL_render_vita_gxm.c",
"render/vitagxm/SDL_render_vita_gxm_memory.c",
@@ -212,6 +232,7 @@
"render/vulkan/SDL_render_vulkan.c",
"render/vulkan/SDL_shaders_vulkan.c",
"sensor/android/SDL_androidsensor.c",
+ "sensor/dummy/SDL_dummysensor.c",
"sensor/n3ds/SDL_n3dssensor.c",
"sensor/SDL_sensor.c",
"sensor/vita/SDL_vitasensor.c",
@@ -242,6 +263,7 @@
"thread/psp/SDL_sysmutex.c",
"thread/psp/SDL_syssem.c",
"thread/psp/SDL_systhread.c",
+ "thread/SDL_thread.c",
"thread/vita/SDL_sysmutex.c",
"thread/vita/SDL_syssem.c",
"thread/vita/SDL_systhread.c",
@@ -249,7 +271,6 @@
"thread/windows/SDL_syssem.c",
"thread/windows/SDL_systhread.c",
"thread/windows/SDL_systls.c",
- "thread/SDL_thread.c",
"time/n3ds/SDL_systime.c",
"time/ps2/SDL_systime.c",
"time/psp/SDL_systime.c",
@@ -277,6 +298,9 @@
"video/android/SDL_androidvideo.c",
"video/android/SDL_androidvulkan.c",
"video/android/SDL_androidwindow.c",
+ "video/dummy/SDL_nullevents.c",
+ "video/dummy/SDL_nullframebuffer.c",
+ "video/dummy/SDL_nullvideo.c",
"video/emscripten/SDL_emscriptenevents.c",
"video/emscripten/SDL_emscriptenframebuffer.c",
"video/emscripten/SDL_emscriptenmouse.c",
@@ -303,7 +327,6 @@
"video/ps2/SDL_ps2video.c",
"video/psp/SDL_pspevents.c",
"video/psp/SDL_pspgl.c",
- "video/psp/SDL_pspmouse.c",
"video/psp/SDL_pspvideo.c",
"video/raspberry/SDL_rpievents.c",
"video/raspberry/SDL_rpimouse.c",
@@ -331,6 +354,7 @@
"video/SDL_pixels.c",
"video/SDL_rect.c",
"video/SDL_RLEaccel.c",
+ "video/SDL_rotate.c",
"video/SDL_stb.c",
"video/SDL_stretch.c",
"video/SDL_surface.c",
@@ -390,30 +414,19 @@
"video/x11/SDL_x11opengles.c",
"video/x11/SDL_x11settings.c",
"video/x11/SDL_x11shape.c",
+ "video/x11/SDL_x11toolkit.c",
"video/x11/SDL_x11touch.c",
"video/x11/SDL_x11vulkan.c",
"video/x11/SDL_x11window.c",
"video/x11/SDL_x11xfixes.c",
"video/x11/SDL_x11xinput2.c",
"video/x11/SDL_x11xsync.c",
+ "video/x11/SDL_x11xtest.c",
"video/x11/xsettings-client.c",
"video/yuv2rgb/yuv_rgb_lsx.c",
"video/yuv2rgb/yuv_rgb_sse.c",
"video/yuv2rgb/yuv_rgb_std.c",
- "audio/dummy/SDL_dummyaudio.c",
- "camera/dummy/SDL_camera_dummy.c",
- "dialog/dummy/SDL_dummydialog.c",
- "filesystem/dummy/SDL_sysfilesystem.c",
- "filesystem/dummy/SDL_sysfsops.c",
- "haptic/dummy/SDL_syshaptic.c",
- "joystick/dummy/SDL_sysjoystick.c",
- "loadso/dummy/SDL_sysloadso.c",
- "process/dummy/SDL_dummyprocess.c",
- "sensor/dummy/SDL_dummysensor.c",
- "video/dummy/SDL_nullevents.c",
- "video/dummy/SDL_nullframebuffer.c",
- "video/dummy/SDL_nullvideo.c",
- "io/io_uring/SDL_asyncio_liburing.c",
+ "core/linux/SDL_progressbar.c",
},
// Dummy drivers. Useful when porting to a new platform.
.dummy = .{
@@ -528,7 +541,7 @@
},
.windows = .{
"core/windows/pch.c",
- "core/windows/SDL_gameinput.c",
+ "core/windows/SDL_gameinput.cpp",
"core/windows/SDL_hid.c",
"core/windows/SDL_xinput.c",
"dialog/windows/SDL_windowsdialog.c",
@@ -541,8 +554,7 @@
"thread/windows/SDL_syscond_cv.c",
"thread/windows/SDL_sysrwlock_srw.c",
"tray/windows/SDL_tray.c",
- "video/windows/SDL_surface_utils.c",
- "video/windows/SDL_windowsgameinput.c",
+ "video/windows/SDL_windowsgameinput.cpp",
"thread/generic/SDL_syscond.c",
"thread/generic/SDL_sysrwlock.c",
},
@@ -553,10 +565,14 @@
},
.unix = .{
"core/unix/SDL_appid.c",
+ "core/unix/SDL_fribidi.c",
+ "core/unix/SDL_gtk.c",
+ "core/unix/SDL_libthai.c",
"core/unix/SDL_poll.c",
"dialog/unix/SDL_portaldialog.c",
"dialog/unix/SDL_unixdialog.c",
"dialog/unix/SDL_zenitydialog.c",
+ "dialog/unix/SDL_zenitymessagebox.c",
"locale/unix/SDL_syslocale.c",
"misc/unix/SDL_sysurl.c",
"tray/unix/SDL_tray.c",
@@ -584,6 +600,8 @@
"xdg-output-unstable-v1.xml",
"xdg-shell.xml",
"xdg-toplevel-icon-v1.xml",
+ "pointer-warp-v1.xml",
+ "pointer-gestures-unstable-v1.xml",
},
.x11 = .{
"video/x11/edid-parse.c",
diff --git a/src/windows.zig b/src/windows.zig
index 56eea8c51..5d403ceee 100644
--- a/src/windows.zig
+++ b/src/windows.zig
@@ -53,6 +53,7 @@ pub fn build(
.HAVE_DSOUND_H = 1,
.HAVE_DXGI_H = 1,
.HAVE_XINPUT_H = 1,
+ .HAVE_DXGI1_5_H = 1,
.HAVE_DXGI1_6_H = 1,
.HAVE_D3D11_H = 1,
.HAVE_ROAPI_H = 1,
@@ -253,5 +254,12 @@ pub fn build(
.SDL_LIBDECOR_VERSION_MAJOR = "",
.SDL_LIBDECOR_VERSION_MINOR = "",
.SDL_LIBDECOR_VERSION_PATCH = "",
+ .SDL_FRIBIDI_DYNAMIC = "",
+ .SDL_LIBTHAI_DYNAMIC = "",
+ .SDL_VIDEO_DRIVER_X11_DYNAMIC_XTEST = "",
+ .SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE = "",
+ .SDL_XKBCOMMON_VERSION_MAJOR = "",
+ .SDL_XKBCOMMON_VERSION_MINOR = "",
+ .SDL_XKBCOMMON_VERSION_PATCH = "",
});
}