@img/sharp-libvips-dev-wasm32 1.2.1 → 1.2.2-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/include/aom/aom_decoder.h +1 -1
  2. package/include/aom/aom_encoder.h +2 -0
  3. package/include/aom/aomcx.h +106 -25
  4. package/include/ffi.h +3 -3
  5. package/include/ffitarget.h +17 -0
  6. package/include/glib-2.0/gio/gdbuserror.h +9 -8
  7. package/include/glib-2.0/gio/ginetaddress.h +12 -0
  8. package/include/glib-2.0/gio/gioenums.h +9 -2
  9. package/include/glib-2.0/glib/gstring.h +2 -2
  10. package/include/glib-2.0/glib/gunicode.h +1 -1
  11. package/include/glib-2.0/gobject/glib-types.h +1 -1
  12. package/include/glib-2.0/gobject/gparam.h +1 -1
  13. package/include/glib-2.0/gobject/gvalue.h +78 -35
  14. package/include/hwy/abort.h +2 -19
  15. package/include/hwy/aligned_allocator.h +11 -7
  16. package/include/hwy/auto_tune.h +504 -0
  17. package/include/hwy/base.h +425 -104
  18. package/include/hwy/cache_control.h +16 -0
  19. package/include/hwy/detect_compiler_arch.h +32 -1
  20. package/include/hwy/detect_targets.h +251 -67
  21. package/include/hwy/foreach_target.h +35 -0
  22. package/include/hwy/highway.h +185 -76
  23. package/include/hwy/nanobenchmark.h +1 -19
  24. package/include/hwy/ops/arm_neon-inl.h +969 -458
  25. package/include/hwy/ops/arm_sve-inl.h +1137 -359
  26. package/include/hwy/ops/emu128-inl.h +97 -11
  27. package/include/hwy/ops/generic_ops-inl.h +1222 -34
  28. package/include/hwy/ops/loongarch_lasx-inl.h +4664 -0
  29. package/include/hwy/ops/loongarch_lsx-inl.h +5933 -0
  30. package/include/hwy/ops/ppc_vsx-inl.h +306 -126
  31. package/include/hwy/ops/rvv-inl.h +546 -51
  32. package/include/hwy/ops/scalar-inl.h +77 -22
  33. package/include/hwy/ops/set_macros-inl.h +133 -17
  34. package/include/hwy/ops/shared-inl.h +50 -10
  35. package/include/hwy/ops/wasm_128-inl.h +137 -92
  36. package/include/hwy/ops/x86_128-inl.h +773 -214
  37. package/include/hwy/ops/x86_256-inl.h +712 -255
  38. package/include/hwy/ops/x86_512-inl.h +429 -753
  39. package/include/hwy/ops/x86_avx3-inl.h +501 -0
  40. package/include/hwy/per_target.h +2 -1
  41. package/include/hwy/profiler.h +622 -486
  42. package/include/hwy/targets.h +62 -20
  43. package/include/hwy/timer-inl.h +8 -160
  44. package/include/hwy/timer.h +170 -3
  45. package/include/hwy/x86_cpuid.h +81 -0
  46. package/include/libheif/heif_cxx.h +25 -5
  47. package/include/libheif/heif_regions.h +5 -5
  48. package/include/libheif/heif_version.h +2 -2
  49. package/include/vips/connection.h +4 -4
  50. package/include/vips/version.h +4 -4
  51. package/include/zlib.h +3 -3
  52. package/lib/glib-2.0/include/glibconfig.h +2 -2
  53. package/lib/libaom.a +0 -0
  54. package/lib/libcgif.a +0 -0
  55. package/lib/libexif.a +0 -0
  56. package/lib/libexpat.a +0 -0
  57. package/lib/libffi.a +0 -0
  58. package/lib/libgio-2.0.a +0 -0
  59. package/lib/libglib-2.0.a +0 -0
  60. package/lib/libgmodule-2.0.a +0 -0
  61. package/lib/libgobject-2.0.a +0 -0
  62. package/lib/libgthread-2.0.a +0 -0
  63. package/lib/libheif.a +0 -0
  64. package/lib/libhwy.a +0 -0
  65. package/lib/libimagequant.a +0 -0
  66. package/lib/libjpeg.a +0 -0
  67. package/lib/liblcms2.a +0 -0
  68. package/lib/libresvg.a +0 -0
  69. package/lib/libsharpyuv.a +0 -0
  70. package/lib/libspng.a +0 -0
  71. package/lib/libtiff.a +0 -0
  72. package/lib/libvips-cpp.a +0 -0
  73. package/lib/libvips.a +0 -0
  74. package/lib/libwebp.a +0 -0
  75. package/lib/libwebpdemux.a +0 -0
  76. package/lib/libwebpmux.a +0 -0
  77. package/lib/libz.a +0 -0
  78. package/lib/pkgconfig/aom.pc +2 -2
  79. package/lib/pkgconfig/gio-2.0.pc +1 -1
  80. package/lib/pkgconfig/glib-2.0.pc +1 -1
  81. package/lib/pkgconfig/gmodule-2.0.pc +1 -1
  82. package/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
  83. package/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
  84. package/lib/pkgconfig/gobject-2.0.pc +1 -1
  85. package/lib/pkgconfig/gthread-2.0.pc +1 -1
  86. package/lib/pkgconfig/libffi.pc +1 -1
  87. package/lib/pkgconfig/libheif.pc +1 -1
  88. package/lib/pkgconfig/libhwy.pc +1 -1
  89. package/lib/pkgconfig/vips-cpp.pc +1 -1
  90. package/lib/pkgconfig/vips.pc +1 -1
  91. package/lib/pkgconfig/zlib.pc +1 -0
  92. package/package.json +1 -1
  93. package/versions.json +8 -8
@@ -52,7 +52,7 @@ extern "C" {
52
52
  *
53
53
  * The available flags are specified by AOM_CODEC_CAP_* defines.
54
54
  */
55
- /*!brief Can support external frame buffers */
55
+ /*!\brief Can support external frame buffers */
56
56
  #define AOM_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x200000
57
57
 
58
58
  /*! \brief Initialization-time Feature Enabling
@@ -377,6 +377,8 @@ typedef struct cfg_options {
377
377
  typedef long aom_enc_frame_flags_t;
378
378
  /*!\brief Force this frame to be a keyframe */
379
379
  #define AOM_EFLAG_FORCE_KF (1 << 0)
380
+ /*!\brief Calculate PSNR for this frame, requires g_lag_in_frames to be 0 */
381
+ #define AOM_EFLAG_CALCULATE_PSNR (1 << 1)
380
382
 
381
383
  /*!\brief Encoder configuration structure
382
384
  *
@@ -208,11 +208,11 @@ enum aome_enc_control_id {
208
208
  * encoding process, values greater than 0 will increase encoder speed at
209
209
  * the expense of quality.
210
210
  *
211
- * Valid range: 0..11. 0 runs the slowest, and 11 runs the fastest;
211
+ * Valid range: 0..12. 0 runs the slowest, and 12 runs the fastest;
212
212
  * quality improves as speed decreases (since more compression
213
213
  * possibilities are explored).
214
214
  *
215
- * NOTE: 10 and 11 are only allowed in AOM_USAGE_REALTIME. In
215
+ * NOTE: 10 - 12 are only allowed in AOM_USAGE_REALTIME. In
216
216
  * AOM_USAGE_GOOD_QUALITY and AOM_USAGE_ALL_INTRA, 9 is the highest allowed
217
217
  * value. However, AOM_USAGE_GOOD_QUALITY treats 7..9 the same as 6. Also,
218
218
  * AOM_USAGE_REALTIME treats 0..4 the same as 5.
@@ -313,6 +313,10 @@ enum aome_enc_control_id {
313
313
 
314
314
  /*!\brief Codec control function to set number of spatial layers, int
315
315
  * parameter
316
+ *
317
+ * Valid range:
318
+ * \li When using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, #AOM_MAX_SS_LAYERS]
319
+ * \li When \em not using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, 3]
316
320
  */
317
321
  AOME_SET_NUMBER_SPATIAL_LAYERS = 27,
318
322
 
@@ -1136,6 +1140,10 @@ enum aome_enc_control_id {
1136
1140
  * - 4 = use modulation for user rating based perceptual quality optimization
1137
1141
  * - 5 = use modulation for HDR video
1138
1142
  * - 6 = use modulation for all intra using Variance Boost
1143
+ *
1144
+ * \attention Delta q modes 1-5 are unsupported and are silently ignored in
1145
+ * non-RD mode. Non-RD mode is enabled by setting cpu-used >= 8 (all intra
1146
+ * usage) and cpu-used >= 7 (realtime usage).
1139
1147
  */
1140
1148
  AV1E_SET_DELTAQ_MODE = 107,
1141
1149
 
@@ -1399,7 +1407,8 @@ enum aome_enc_control_id {
1399
1407
  */
1400
1408
  AV1E_SET_SVC_REF_FRAME_COMP_PRED = 147,
1401
1409
 
1402
- /*!\brief Set --deltaq-mode strength.
1410
+ /*!\brief Set --deltaq-mode strength, where the value is a percentage,
1411
+ * unsigned int parameter.
1403
1412
  *
1404
1413
  * Valid range: [0, 1000]
1405
1414
  */
@@ -1578,6 +1587,36 @@ enum aome_enc_control_id {
1578
1587
  */
1579
1588
  AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR = 169,
1580
1589
 
1590
+ /*!\brief Codec control to enable the low complexity decode mode, unsigned
1591
+ * int parameter. Value of zero means this mode is disabled.
1592
+ */
1593
+ AV1E_SET_ENABLE_LOW_COMPLEXITY_DECODE = 170,
1594
+
1595
+ /*!\brief Codec control to set the screen content detection mode,
1596
+ * aom_screen_detection_mode parameter.
1597
+ *
1598
+ * - 1: AOM_SCREEN_DETECTION_STANDARD = standard (default)
1599
+ * - 2: AOM_SCREEN_DETECTION_ANTIALIASING_AWARE = anti-aliased text and
1600
+ * graphics aware
1601
+ */
1602
+ AV1E_SET_SCREEN_CONTENT_DETECTION_MODE = 171,
1603
+
1604
+ /*!\brief Codec control to enable adaptive sharpness, which modulates
1605
+ * sharpness based on frame QP, unsigned int parameter.
1606
+ *
1607
+ * Adaptive sharpness helps mitigate blocking artifacts in the low to medium
1608
+ * quality range.
1609
+ *
1610
+ * - 0 = disable (default)
1611
+ * - 1 = enable
1612
+ *
1613
+ * \note When adaptive sharpness is enabled, AOME_SET_SHARPNESS acts as a
1614
+ * "maximum sharpness" value. Adaptive sharpness can still modulate effective
1615
+ * sharpness between 0 and the maximum sharpness. As a consequence, adaptive
1616
+ * sharpness only has effects when sharpness is greater than 0.
1617
+ */
1618
+ AV1E_SET_ENABLE_ADAPTIVE_SHARPNESS = 172,
1619
+
1581
1620
  // Any new encoder control IDs should be added above.
1582
1621
  // Maximum allowed encoder control ID is 229.
1583
1622
  // No encoder control ID should be added below.
@@ -1611,19 +1650,21 @@ typedef enum aom_scaling_mode_1d {
1611
1650
  /*!\brief aom region of interest map
1612
1651
  *
1613
1652
  * These defines the data structures for the region of interest map
1614
- *
1615
- * TODO(yaowu): create a unit test for ROI map related APIs
1616
- *
1617
1653
  */
1618
1654
  typedef struct aom_roi_map {
1619
- /*! An id between 0 and 7 for each 8x8 region within a frame. */
1655
+ /*! If ROI is enabled. */
1656
+ uint8_t enabled;
1657
+ /*! An id between 0 and 7 for each 4x4 region within a frame. */
1620
1658
  unsigned char *roi_map;
1621
- unsigned int rows; /**< Number of rows. */
1622
- unsigned int cols; /**< Number of columns. */
1623
- int delta_q[AOM_MAX_SEGMENTS]; /**< Quantizer deltas. */
1624
- int delta_lf[AOM_MAX_SEGMENTS]; /**< Loop filter deltas. */
1625
- /*! Static breakout threshold for each segment. */
1626
- unsigned int static_threshold[AOM_MAX_SEGMENTS];
1659
+ unsigned int rows; /**< Number of rows. */
1660
+ unsigned int cols; /**< Number of columns. */
1661
+ int delta_q[AOM_MAX_SEGMENTS]; /**< Quantizer deltas. */
1662
+ int delta_lf[AOM_MAX_SEGMENTS]; /**< Loop filter deltas. */
1663
+ int skip[AOM_MAX_SEGMENTS]; /**< Skip this block. */
1664
+ int ref_frame[AOM_MAX_SEGMENTS]; /**< Reference frame for this block. */
1665
+ int delta_qp_enabled; /**< Delta qp feature enabled. */
1666
+ int reference_enabled; /**< Reference frame feature enabled. */
1667
+ int rdmult_delta_qp; /**< RD mult for delta qp feature. */
1627
1668
  } aom_roi_map_t;
1628
1669
 
1629
1670
  /*!\brief aom active region map
@@ -1649,7 +1690,7 @@ typedef struct aom_scaling_mode {
1649
1690
  AOM_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */
1650
1691
  } aom_scaling_mode_t;
1651
1692
 
1652
- /*!brief AV1 encoder content type */
1693
+ /*!\brief AV1 encoder content type */
1653
1694
  typedef enum {
1654
1695
  AOM_CONTENT_DEFAULT,
1655
1696
  AOM_CONTENT_SCREEN,
@@ -1657,7 +1698,15 @@ typedef enum {
1657
1698
  AOM_CONTENT_INVALID
1658
1699
  } aom_tune_content;
1659
1700
 
1660
- /*!brief AV1 encoder timing info type signaling */
1701
+ /*!\brief Screen content detection mode */
1702
+ typedef enum {
1703
+ /** Standard */
1704
+ AOM_SCREEN_DETECTION_STANDARD = 1,
1705
+ /** Anti-aliased text and graphics aware */
1706
+ AOM_SCREEN_DETECTION_ANTIALIASING_AWARE = 2
1707
+ } aom_screen_detection_mode;
1708
+
1709
+ /*!\brief AV1 encoder timing info type signaling */
1661
1710
  typedef enum {
1662
1711
  AOM_TIMING_UNSPECIFIED,
1663
1712
  AOM_TIMING_EQUAL,
@@ -1669,9 +1718,10 @@ typedef enum {
1669
1718
  * Changes the encoder to tune for certain types of input material.
1670
1719
  *
1671
1720
  * \note
1672
- * AOM_TUNE_IQ is restricted to all intra mode (AOM_USAGE_ALL_INTRA). Setting
1673
- * the tuning option to AOM_TUNE_IQ causes the following options to be set
1674
- * (expressed as command-line options):
1721
+ * AOM_TUNE_IQ and AOM_TUNE_SSIMULACRA2 are restricted to all intra mode
1722
+ * (AOM_USAGE_ALL_INTRA). Setting the tuning option to either AOM_TUNE_IQ or
1723
+ * AOM_TUNE_SSIMULACRA2 causes the following options to be set (expressed as
1724
+ * command-line options):
1675
1725
  * * --enable-qm=1
1676
1726
  * * --qm-min=2
1677
1727
  * * --qm-max=10
@@ -1680,6 +1730,9 @@ typedef enum {
1680
1730
  * * --enable-cdef=3
1681
1731
  * * --enable-chroma-deltaq=1
1682
1732
  * * --deltaq-mode=6
1733
+ * * --screen-detection-mode=2
1734
+ * AOM_TUNE_IQ additionally sets the following options:
1735
+ * * --enable-adaptive-sharpness=1
1683
1736
  */
1684
1737
  typedef enum {
1685
1738
  AOM_TUNE_PSNR = 0,
@@ -1698,6 +1751,12 @@ typedef enum {
1698
1751
  * the rdmult code with AOM_TUNE_SSIM.
1699
1752
  */
1700
1753
  AOM_TUNE_IQ = 10,
1754
+ /*!\brief Allows detection of the presence of AOM_TUNE_SSIMULACRA2 at compile
1755
+ * time. */
1756
+ #define AOM_HAVE_TUNE_SSIMULACRA2 1
1757
+ /* Tune that optimizes for maximum SSIMULACRA 2 scores. Shares the rdmult code
1758
+ with AOM_TUNE_SSIM. */
1759
+ AOM_TUNE_SSIMULACRA2 = 11,
1701
1760
  } aom_tune_metric;
1702
1761
 
1703
1762
  /*!\brief Distortion metric to use for RD optimization.
@@ -1721,21 +1780,33 @@ typedef enum {
1721
1780
  #define AOM_MAX_SS_LAYERS 4 /**< Max number of spatial layers */
1722
1781
  #define AOM_MAX_TS_LAYERS 8 /**< Max number of temporal layers */
1723
1782
 
1724
- /*!brief Struct for spatial and temporal layer ID */
1783
+ /*!\brief Struct for spatial and temporal layer ID */
1725
1784
  typedef struct aom_svc_layer_id {
1726
1785
  int spatial_layer_id; /**< Spatial layer ID */
1727
1786
  int temporal_layer_id; /**< Temporal layer ID */
1728
1787
  } aom_svc_layer_id_t;
1729
1788
 
1730
- /*!brief Parameter type for SVC
1789
+ /*!\brief Parameter type for SVC
1731
1790
  *
1732
1791
  * In the arrays of size AOM_MAX_LAYERS, the index for spatial layer `sl` and
1733
1792
  * temporal layer `tl` is sl * number_temporal_layers + tl.
1734
1793
  *
1735
1794
  */
1736
1795
  typedef struct aom_svc_params {
1737
- int number_spatial_layers; /**< Number of spatial layers */
1738
- int number_temporal_layers; /**< Number of temporal layers */
1796
+ /*!Number of spatial layers
1797
+ *
1798
+ * Valid range:
1799
+ * \li When using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, #AOM_MAX_SS_LAYERS]
1800
+ * \li When \em not using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, 3]
1801
+ */
1802
+ int number_spatial_layers;
1803
+ /*!Number of temporal layers
1804
+ *
1805
+ * Valid range:
1806
+ * \li When using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, #AOM_MAX_TS_LAYERS]
1807
+ * \li When \em not using #AV1E_SET_SVC_REF_FRAME_CONFIG: [1, 3]
1808
+ */
1809
+ int number_temporal_layers;
1739
1810
  int max_quantizers[AOM_MAX_LAYERS]; /**< Max Q for each layer */
1740
1811
  int min_quantizers[AOM_MAX_LAYERS]; /**< Min Q for each layer */
1741
1812
  int scaling_factor_num[AOM_MAX_SS_LAYERS]; /**< Scaling factor-numerator */
@@ -1746,7 +1817,7 @@ typedef struct aom_svc_params {
1746
1817
  int framerate_factor[AOM_MAX_TS_LAYERS];
1747
1818
  } aom_svc_params_t;
1748
1819
 
1749
- /*!brief Parameters for setting ref frame config */
1820
+ /*!\brief Parameters for setting ref frame config */
1750
1821
  typedef struct aom_svc_ref_frame_config {
1751
1822
  // Three arrays need to be set: reference[], ref_id[], refresh[].
1752
1823
  // reference[i]: is a boolean flag to indicate which of the 7 possible
@@ -1769,14 +1840,14 @@ typedef struct aom_svc_ref_frame_config {
1769
1840
  int refresh[8]; /**< Refresh flag for each of the 8 buffer slots. */
1770
1841
  } aom_svc_ref_frame_config_t;
1771
1842
 
1772
- /*!brief Parameters for setting ref frame compound prediction */
1843
+ /*!\brief Parameters for setting ref frame compound prediction */
1773
1844
  typedef struct aom_svc_ref_frame_comp_pred {
1774
1845
  // Use compound prediction for the ref_frame pairs GOLDEN_LAST (0),
1775
1846
  // LAST2_LAST (1), and ALTREF_LAST (2).
1776
1847
  int use_comp_pred[3]; /**<Compound reference flag. */
1777
1848
  } aom_svc_ref_frame_comp_pred_t;
1778
1849
 
1779
- /*!brief Frame drop modes for spatial/quality layer SVC */
1850
+ /*!\brief Frame drop modes for spatial/quality layer SVC */
1780
1851
  typedef enum {
1781
1852
  AOM_LAYER_DROP, /**< Any spatial layer can drop. */
1782
1853
  AOM_FULL_SUPERFRAME_DROP, /**< Only full superframe can drop. */
@@ -2279,6 +2350,16 @@ AOM_CTRL_USE_TYPE(AV1E_SET_POSTENCODE_DROP_RTC, int)
2279
2350
  AOM_CTRL_USE_TYPE(AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR, int)
2280
2351
  #define AOM_CTRL_AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR
2281
2352
 
2353
+ AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_LOW_COMPLEXITY_DECODE, unsigned int)
2354
+ #define AOM_CTRL_AV1E_SET_ENABLE_LOW_COMPLEXITY_DECODE
2355
+
2356
+ AOM_CTRL_USE_TYPE(AV1E_SET_SCREEN_CONTENT_DETECTION_MODE,
2357
+ int) /* aom_screen_detection_mode */
2358
+ #define AOM_CTRL_SET_SCREEN_CONTENT_DETECTION_MODE
2359
+
2360
+ AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_ADAPTIVE_SHARPNESS, unsigned int)
2361
+ #define AOM_CTRL_AV1E_SET_ENABLE_ADAPTIVE_SHARPNESS
2362
+
2282
2363
  /*!\endcond */
2283
2364
  /*! @} - end defgroup aom_encoder */
2284
2365
  #ifdef __cplusplus
package/include/ffi.h CHANGED
@@ -1,5 +1,5 @@
1
1
  /* -----------------------------------------------------------------*-C-*-
2
- libffi 3.5.1
2
+ libffi 3.5.2
3
3
  - Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024, 2025 Anthony Green
4
4
  - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
5
5
 
@@ -316,8 +316,8 @@ size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated));
316
316
 
317
317
  /* ---- Version API ------------------------------------------------------ */
318
318
 
319
- #define FFI_VERSION_STRING "3.5.1"
320
- #define FFI_VERSION_NUMBER 30501
319
+ #define FFI_VERSION_STRING "3.5.2"
320
+ #define FFI_VERSION_NUMBER 30502
321
321
 
322
322
  #ifndef LIBFFI_ASM
323
323
  /* Return a version string. */
@@ -42,14 +42,31 @@ typedef void (*ffi_fp)(void);
42
42
 
43
43
  typedef enum ffi_abi {
44
44
  FFI_FIRST_ABI = 0,
45
+ #if __SIZEOF_POINTER__ == 4
45
46
  FFI_WASM32, // "raw", no structures, varargs, or closures (not implemented!)
46
47
  FFI_WASM32_EMSCRIPTEN, // structures, varargs, and split 64-bit params
48
+ #elif __SIZEOF_POINTER__ == 8
49
+ FFI_WASM64,
50
+ FFI_WASM64_EMSCRIPTEN,
51
+ #else
52
+ #error "Unknown pointer size"
53
+ #endif
47
54
  FFI_LAST_ABI,
55
+ #if __SIZEOF_POINTER__ == 4
48
56
  #ifdef __EMSCRIPTEN__
49
57
  FFI_DEFAULT_ABI = FFI_WASM32_EMSCRIPTEN
50
58
  #else
51
59
  FFI_DEFAULT_ABI = FFI_WASM32
52
60
  #endif
61
+ #elif __SIZEOF_POINTER__ == 8
62
+ #ifdef __EMSCRIPTEN__
63
+ FFI_DEFAULT_ABI = FFI_WASM64_EMSCRIPTEN
64
+ #else
65
+ FFI_DEFAULT_ABI = FFI_WASM64
66
+ #endif
67
+ #else
68
+ #error "Unknown pointer size"
69
+ #endif
53
70
  } ffi_abi;
54
71
 
55
72
  #define FFI_CLOSURES 1
@@ -34,14 +34,15 @@ G_BEGIN_DECLS
34
34
  /**
35
35
  * G_DBUS_ERROR:
36
36
  *
37
- * Error domain for errors generated by a remote message bus. Errors
38
- * in this domain will be from the #GDBusError enumeration. See
39
- * #GError for more information on error domains.
37
+ * Error domain for errors generated by a remote message bus.
38
+ *
39
+ * Errors in this domain will be from the [error@Gio.DBusError] enumeration.
40
+ * See [type@GLib.Error] for more information on error domains.
40
41
  *
41
42
  * Note that this error domain is intended only for
42
43
  * returning errors from a remote message bus process. Errors
43
- * generated locally in-process by e.g. #GDBusConnection should use the
44
- * %G_IO_ERROR domain.
44
+ * generated locally in-process (for example, by [class@Gio.DBusConnection])
45
+ * should use the [error@Gio.IOErrorEnum] domain.
45
46
  *
46
47
  * Since: 2.26
47
48
  */
@@ -60,10 +61,10 @@ gboolean g_dbus_error_strip_remote_error (GError *error);
60
61
 
61
62
  /**
62
63
  * GDBusErrorEntry:
63
- * @error_code: An error code.
64
- * @dbus_error_name: The D-Bus error name to associate with @error_code.
64
+ * @error_code: an error code
65
+ * @dbus_error_name: the D-Bus error name to associate with @error_code
65
66
  *
66
- * Struct used in g_dbus_error_register_error_domain().
67
+ * Struct used in [func@Gio.DBusError.register_error_domain].
67
68
  *
68
69
  * Since: 2.26
69
70
  */
@@ -71,6 +71,12 @@ GInetAddress * g_inet_address_new_from_bytes (const guint8
71
71
  GIO_AVAILABLE_IN_ALL
72
72
  GInetAddress * g_inet_address_new_loopback (GSocketFamily family);
73
73
 
74
+ GIO_AVAILABLE_IN_2_86
75
+ GInetAddress * g_inet_address_new_from_bytes_with_ipv6_info (const guint8 *bytes,
76
+ GSocketFamily family,
77
+ guint32 flowinfo,
78
+ guint32 scope_id);
79
+
74
80
  GIO_AVAILABLE_IN_ALL
75
81
  GInetAddress * g_inet_address_new_any (GSocketFamily family);
76
82
 
@@ -120,6 +126,12 @@ gboolean g_inet_address_get_is_mc_org_local (GInetAddress
120
126
  GIO_AVAILABLE_IN_ALL
121
127
  gboolean g_inet_address_get_is_mc_site_local (GInetAddress *address);
122
128
 
129
+ GIO_AVAILABLE_IN_2_86
130
+ guint32 g_inet_address_get_scope_id (GInetAddress *address);
131
+
132
+ GIO_AVAILABLE_IN_2_86
133
+ guint32 g_inet_address_get_flowinfo (GInetAddress *address);
134
+
123
135
  G_END_DECLS
124
136
 
125
137
  #endif /* __G_INET_ADDRESS_H__ */
@@ -987,13 +987,20 @@ typedef enum
987
987
  * @G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT: Allow another message bus connection to claim the name.
988
988
  * @G_BUS_NAME_OWNER_FLAGS_REPLACE: If another message bus connection owns the name and have
989
989
  * specified %G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
990
- * @G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE: If another message bus connection owns the name, immediately
991
- * return an error from g_bus_own_name() rather than entering the waiting queue for that name. (Since 2.54)
992
990
  *
993
991
  * Flags used in g_bus_own_name().
994
992
  *
995
993
  * Since: 2.26
996
994
  */
995
+ /**
996
+ * G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE:
997
+ *
998
+ * If another message bus connection owns the name, immediately return an error
999
+ * from [func@Gio.bus_own_name] rather than entering the waiting queue for that
1000
+ * name.
1001
+ *
1002
+ * Since: 2.54
1003
+ **/
997
1004
  typedef enum
998
1005
  {
999
1006
  G_BUS_NAME_OWNER_FLAGS_NONE = 0, /*< nick=none >*/
@@ -234,10 +234,10 @@ g_string_append_len_inline (GString *gstring,
234
234
  else
235
235
  len_unsigned = (gsize) len;
236
236
 
237
- if (G_LIKELY (gstring->len + len_unsigned < gstring->allocated_len))
237
+ if (G_LIKELY (len_unsigned < gstring->allocated_len - gstring->len))
238
238
  {
239
239
  char *end = gstring->str + gstring->len;
240
- if (G_LIKELY (val + len_unsigned <= end || val > end + len_unsigned))
240
+ if (G_LIKELY (val + len_unsigned <= end || val >= end + len_unsigned))
241
241
  memcpy (end, val, len_unsigned);
242
242
  else
243
243
  memmove (end, val, len_unsigned);
@@ -864,7 +864,7 @@ gchar *g_utf8_truncate_middle (const gchar *string,
864
864
  gsize truncate_length);
865
865
 
866
866
  /* Find the UTF-8 character corresponding to ch, in string p. These
867
- functions are equivalants to strchr and strrchr */
867
+ functions are equivalents to strchr and strrchr */
868
868
  GLIB_AVAILABLE_IN_ALL
869
869
  gchar* g_utf8_strchr (const gchar *p,
870
870
  gssize len,
@@ -28,7 +28,7 @@
28
28
 
29
29
  G_BEGIN_DECLS
30
30
 
31
- /* A hack necesssary to preprocess this file with g-ir-scanner */
31
+ /* A hack necessary to preprocess this file with g-ir-scanner */
32
32
  #ifdef __GI_SCANNER__
33
33
  typedef gsize GType;
34
34
  #endif
@@ -412,7 +412,7 @@ GType g_param_type_register_static (const gchar *name,
412
412
  GOBJECT_AVAILABLE_IN_2_66
413
413
  gboolean g_param_spec_is_valid_name (const gchar *name);
414
414
 
415
- /* For registering builting types */
415
+ /* For registering builtin types */
416
416
  GType _g_param_type_register_static_constant (const gchar *name,
417
417
  const GParamSpecTypeInfo *pspec_info,
418
418
  GType opt_type);
@@ -32,53 +32,61 @@ G_BEGIN_DECLS
32
32
  /* --- type macros --- */
33
33
  /**
34
34
  * G_TYPE_IS_VALUE:
35
- * @type: A #GType value.
35
+ * @type: a type
36
36
  *
37
- * Checks whether the passed in type ID can be used for g_value_init().
37
+ * Checks whether the passed in type ID can be used for
38
+ * [method@GObject.Value.init].
38
39
  *
39
40
  * That is, this macro checks whether this type provides an implementation
40
- * of the #GTypeValueTable functions required for a type to create a #GValue of.
41
+ * of the [struct@GObject.TypeValueTable] functions required to be able to
42
+ * create a [struct@GObject.Value] instance.
41
43
  *
42
- * Returns: Whether @type is suitable as a #GValue type.
44
+ * Returns: Whether @type is suitable as a [struct@GObject.Value] type.
43
45
  */
44
46
  #define G_TYPE_IS_VALUE(type) (g_type_check_is_value_type (type))
47
+
45
48
  /**
46
49
  * G_IS_VALUE:
47
- * @value: A #GValue structure.
50
+ * @value: a [struct@GObject.Value] structure
48
51
  *
49
- * Checks if @value is a valid and initialized #GValue structure.
52
+ * Checks if @value is a valid and initialized [struct@GObject.Value] structure.
50
53
  *
51
- * Returns: %TRUE on success.
54
+ * Returns: true on success; false otherwise
52
55
  */
53
56
  #define G_IS_VALUE(value) (G_TYPE_CHECK_VALUE (value))
57
+
54
58
  /**
55
59
  * G_VALUE_TYPE:
56
- * @value: A #GValue structure.
60
+ * @value: a [struct@GObject.Value] structure
57
61
  *
58
62
  * Get the type identifier of @value.
59
63
  *
60
- * Returns: the #GType.
64
+ * Returns: the type ID
61
65
  */
62
66
  #define G_VALUE_TYPE(value) (((GValue*) (value))->g_type)
67
+
63
68
  /**
64
69
  * G_VALUE_TYPE_NAME:
65
- * @value: A #GValue structure.
70
+ * @value: a [struct@GObject.Value] structure
66
71
  *
67
- * Gets the type name of @value.
72
+ * Gets the name of the type of @value.
68
73
  *
69
- * Returns: the type name.
74
+ * Returns: the type name
70
75
  */
71
76
  #define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value)))
77
+
72
78
  /**
73
79
  * G_VALUE_HOLDS:
74
- * @value: A #GValue structure.
75
- * @type: A #GType value.
80
+ * @value: (not nullable): a [struct@GObject.Value] structure
81
+ * @type: a [type@GObject.Type]
76
82
  *
77
- * Checks if @value holds (or contains) a value of @type.
78
- * This macro will also check for @value != %NULL and issue a
83
+ * Checks if @value holds a value of @type.
84
+ *
85
+ * This macro will also check for `value != NULL` and issue a
79
86
  * warning if the check fails.
80
87
  *
81
- * Returns: %TRUE if @value holds the @type.
88
+ * Returns: true if @value is non-`NULL` and holds a value of the given @type;
89
+ * false otherwise
82
90
  */
83
91
  #define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))
84
92
 
@@ -86,29 +94,39 @@ G_BEGIN_DECLS
86
94
  /* --- typedefs & structures --- */
87
95
  /**
88
96
  * GValueTransform:
89
- * @src_value: Source value.
90
- * @dest_value: Target value.
97
+ * @src_value: source value
98
+ * @dest_value: target value
91
99
  *
92
100
  * The type of value transformation functions which can be registered with
93
- * g_value_register_transform_func().
101
+ * [func@GObject.Value.register_transform_func].
94
102
  *
95
103
  * @dest_value will be initialized to the correct destination type.
96
104
  */
97
105
  typedef void (*GValueTransform) (const GValue *src_value,
98
106
  GValue *dest_value);
107
+
99
108
  /**
100
109
  * GValue:
101
110
  *
102
111
  * An opaque structure used to hold different types of values.
103
112
  *
113
+ * Before it can be used, a `GValue` has to be initialized to a specific type by
114
+ * calling [method@GObject.Value.init] on it.
115
+ *
116
+ * Many types which are stored within a `GValue` need to allocate data on the
117
+ * heap, so [method@GObject.Value.unset] must always be called on a `GValue` to
118
+ * free any such data once you’re finished with the `GValue`, even if the
119
+ * `GValue` itself is stored on the stack.
120
+ *
104
121
  * The data within the structure has protected scope: it is accessible only
105
- * to functions within a #GTypeValueTable structure, or implementations of
106
- * the g_value_*() API. That is, code portions which implement new fundamental
107
- * types.
122
+ * to functions within a [struct@GObject.TypeValueTable] structure, or
123
+ * implementations of the `g_value_*()` API. That is, code which implements new
124
+ * fundamental types.
108
125
  *
109
- * #GValue users cannot make any assumptions about how data is stored
126
+ * `GValue` users cannot make any assumptions about how data is stored
110
127
  * within the 2 element @data union, and the @g_type member should
111
- * only be accessed through the G_VALUE_TYPE() macro.
128
+ * only be accessed through the [func@GObject.VALUE_TYPE] macro and related
129
+ * macros.
112
130
  */
113
131
  struct _GValue
114
132
  {
@@ -174,18 +192,32 @@ void g_value_register_transform_func (GType src_type,
174
192
  /**
175
193
  * G_VALUE_NOCOPY_CONTENTS:
176
194
  *
177
- * If passed to G_VALUE_COLLECT(), allocated data won't be copied
178
- * but used verbatim. This does not affect ref-counted types like
179
- * objects. This does not affect usage of g_value_copy(), the data will
195
+ * Flag to indicate that allocated data in a [struct@GObject.Value] shouldn’t be
196
+ * copied.
197
+ *
198
+ * If passed to [func@GObject.VALUE_COLLECT], allocated data won’t be copied
199
+ * but used verbatim. This does not affect ref-counted types like objects.
200
+ *
201
+ * This does not affect usage of [method@GObject.Value.copy]: the data will
180
202
  * be copied if it is not ref-counted.
203
+ *
204
+ * This flag should be checked by implementations of
205
+ * [callback@GObject.TypeValueFreeFunc], [callback@GObject.TypeValueCollectFunc]
206
+ * and [callback@GObject.TypeValueLCopyFunc].
181
207
  */
182
208
  #define G_VALUE_NOCOPY_CONTENTS (1 << 27)
183
209
 
184
210
  /**
185
211
  * G_VALUE_INTERNED_STRING:
186
212
  *
187
- * For string values, indicates that the string contained is canonical and will
188
- * exist for the duration of the process. See g_value_set_interned_string().
213
+ * Flag to indicate that a string in a [struct@GObject.Value] is canonical and
214
+ * will exist for the duration of the process.
215
+ *
216
+ * See [method@GObject.Value.set_interned_string].
217
+ *
218
+ * This flag should be checked by implementations of
219
+ * [callback@GObject.TypeValueFreeFunc], [callback@GObject.TypeValueCollectFunc]
220
+ * and [callback@GObject.TypeValueLCopyFunc].
189
221
  *
190
222
  * Since: 2.66
191
223
  */
@@ -194,13 +226,24 @@ void g_value_register_transform_func (GType src_type,
194
226
  /**
195
227
  * G_VALUE_INIT:
196
228
  *
197
- * A #GValue must be initialized before it can be used. This macro can
198
- * be used as initializer instead of an explicit `{ 0 }` when declaring
199
- * a variable, but it cannot be assigned to a variable.
229
+ * Clears a [struct@GObject.Value] to zero at declaration time.
230
+ *
231
+ * A [struct@GObject.Value] must be cleared and then initialized before it can
232
+ * be used. This macro can be assigned to a variable instead of an explicit
233
+ * `{ 0 }` when declaring it, but it cannot be assigned to a variable after
234
+ * declaration time.
200
235
  *
201
- * |[<!-- language="C" -->
236
+ * After the [struct@GObject.Value] is cleared, it must be initialized by
237
+ * calling [method@GObject.Value.init] on it before any other methods can be
238
+ * called on it.
239
+ *
240
+ * ```c
202
241
  * GValue value = G_VALUE_INIT;
203
- * ]|
242
+ *
243
+ * g_value_init (&value, SOME_G_TYPE);
244
+ * …
245
+ * g_value_unset (&value);
246
+ * ```
204
247
  *
205
248
  * Since: 2.30
206
249
  */