@revizly/sharp-libvips-dev 1.0.8 → 1.0.10
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.
- package/cplusplus/VImage.cpp +18 -2
- package/cplusplus/vips-operators.cpp +79 -3
- package/include/aom/aom.h +1 -1
- package/include/aom/aom_codec.h +22 -5
- package/include/aom/aom_decoder.h +1 -1
- package/include/aom/aom_encoder.h +5 -1
- package/include/aom/aom_external_partition.h +1 -1
- package/include/aom/aom_frame_buffer.h +1 -1
- package/include/aom/aom_image.h +4 -2
- package/include/aom/aom_integer.h +1 -9
- package/include/aom/aomcx.h +99 -16
- package/include/aom/aomdx.h +1 -1
- package/include/archive.h +2 -2
- package/include/archive_entry.h +7 -1
- package/include/cairo/cairo-version.h +1 -1
- package/include/expat.h +4 -2
- package/include/expat_config.h +3 -6
- package/include/ffi.h +1 -1
- package/include/fontconfig/fontconfig.h +22 -2
- package/include/fribidi/fribidi-config.h +2 -2
- package/include/fribidi/fribidi-unicode-version.h +3 -3
- package/include/gio-unix-2.0/gio/gdesktopappinfo.h +1 -1
- package/include/gio-unix-2.0/gio/gunixmounts.h +105 -24
- package/include/glib-2.0/gio/gdbusconnection.h +65 -5
- package/include/glib-2.0/gio/gdebugcontroller.h +1 -1
- package/include/glib-2.0/gio/gfile.h +4 -0
- package/include/glib-2.0/gio/gio-visibility.h +34 -0
- package/include/glib-2.0/gio/gioenums.h +16 -5
- package/include/glib-2.0/gio/gioenumtypes.h +3 -3
- package/include/glib-2.0/gio/giotypes.h +4 -4
- package/include/glib-2.0/gio/gmemorymonitor.h +1 -1
- package/include/glib-2.0/gio/gnetworkmonitor.h +1 -1
- package/include/glib-2.0/gio/gpowerprofilemonitor.h +1 -1
- package/include/glib-2.0/gio/gproxy.h +1 -1
- package/include/glib-2.0/gio/gproxyresolver.h +1 -1
- package/include/glib-2.0/gio/gresource.h +6 -0
- package/include/glib-2.0/gio/gtlsbackend.h +1 -1
- package/include/glib-2.0/gio/gvfs.h +3 -3
- package/include/glib-2.0/gio/gvolumemonitor.h +1 -1
- package/include/glib-2.0/girepository/gi-visibility.h +34 -0
- package/include/glib-2.0/girepository/gicallableinfo.h +12 -0
- package/include/glib-2.0/girepository/gitypes.h +1 -0
- package/include/glib-2.0/glib/garray.h +1 -1
- package/include/glib-2.0/glib/gerror.h +1 -1
- package/include/glib-2.0/glib/glib-visibility.h +34 -0
- package/include/glib-2.0/glib/gmacros.h +3 -3
- package/include/glib-2.0/glib/gmain.h +131 -48
- package/include/glib-2.0/glib/gmem.h +3 -0
- package/include/glib-2.0/glib/goption.h +58 -36
- package/include/glib-2.0/glib/gqueue.h +1 -1
- package/include/glib-2.0/glib/grefstring.h +4 -0
- package/include/glib-2.0/glib/gstdio.h +65 -0
- package/include/glib-2.0/glib/gstrfuncs.h +4 -0
- package/include/glib-2.0/glib/gstring.h +4 -0
- package/include/glib-2.0/glib/gtestutils.h +65 -33
- package/include/glib-2.0/glib/gthread.h +2 -0
- package/include/glib-2.0/glib/gtypes.h +1 -1
- package/include/glib-2.0/glib/gunicode.h +21 -5
- package/include/glib-2.0/glib/gvariant.h +50 -13
- package/include/glib-2.0/glib/gvarianttype.h +62 -46
- package/include/glib-2.0/glib/gversionmacros.h +9 -0
- package/include/glib-2.0/glib-unix.h +21 -0
- package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gobject/glib-enumtypes.h +1 -1
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- package/include/glib-2.0/gobject/gobjectnotifyqueue.c +3 -3
- package/include/glib-2.0/gobject/gparam.h +4 -2
- package/include/glib-2.0/gobject/gsignal.h +22 -7
- package/include/glib-2.0/gobject/gtype.h +10 -4
- package/include/harfbuzz/hb-buffer.h +7 -0
- package/include/harfbuzz/hb-common.h +18 -0
- package/include/harfbuzz/hb-draw.h +1 -1
- package/include/harfbuzz/hb-face.h +43 -2
- package/include/harfbuzz/hb-ft.h +3 -0
- package/include/harfbuzz/hb-ot-shape.h +6 -0
- package/include/harfbuzz/hb-paint.h +1 -1
- package/include/harfbuzz/hb-shape.h +2 -0
- package/include/harfbuzz/hb-subset-serialize.h +83 -0
- package/include/harfbuzz/hb-subset.h +12 -0
- package/include/harfbuzz/hb-version.h +3 -3
- package/include/lcms2.h +7 -5
- package/include/lcms2_plugin.h +1 -1
- package/include/libexif/exif-byte-order.h +2 -0
- package/include/libexif/exif-content.h +2 -0
- package/include/libexif/exif-data-type.h +2 -0
- package/include/libexif/exif-data.h +3 -2
- package/include/libexif/exif-entry.h +2 -0
- package/include/libexif/exif-format.h +2 -0
- package/include/libexif/exif-ifd.h +2 -0
- package/include/libexif/exif-loader.h +2 -0
- package/include/libexif/exif-log.h +2 -0
- package/include/libexif/exif-mem.h +2 -0
- package/include/libexif/exif-mnote-data.h +2 -0
- package/include/libexif/exif-tag.h +2 -0
- package/include/libexif/exif-utils.h +2 -0
- package/include/libheif/heif.h +322 -26
- package/include/libheif/heif_properties.h +24 -4
- package/include/libheif/heif_version.h +2 -2
- package/include/libpng16/png.h +126 -18
- package/include/libpng16/pngconf.h +5 -6
- package/include/libpng16/pnglibconf.h +11 -2
- package/include/librsvg-2.0/librsvg/rsvg-features.h +1 -1
- package/include/librsvg-2.0/librsvg/rsvg-pixbuf.h +1 -1
- package/include/librsvg-2.0/librsvg/rsvg-version.h +3 -3
- package/include/librsvg-2.0/librsvg/rsvg.h +3 -1
- package/include/libxml2/libxml/xmlexports.h +2 -2
- package/include/libxml2/libxml/xmlversion.h +4 -4
- package/include/pango-1.0/pango/pango-features.h +3 -3
- package/include/pango-1.0/pango/pango-font.h +31 -2
- package/include/pango-1.0/pango/pango-fontmap.h +4 -0
- package/include/pango-1.0/pango/pango-layout.h +10 -1
- package/include/pango-1.0/pango/pango-version-macros.h +52 -0
- package/include/pango-1.0/pango/pangofc-fontmap.h +6 -0
- package/include/pixman-1/pixman-version.h +3 -3
- package/include/png.h +126 -18
- package/include/pngconf.h +5 -6
- package/include/pnglibconf.h +11 -2
- package/include/tiffio.h +11 -11
- package/include/tiffvers.h +4 -4
- package/include/vips/VImage8.h +170 -60
- package/include/vips/arithmetic.h +9 -0
- package/include/vips/basic.h +8 -4
- package/include/vips/buf.h +0 -2
- package/include/vips/connection.h +0 -2
- package/include/vips/conversion.h +0 -3
- package/include/vips/create.h +11 -0
- package/include/vips/enumtypes.h +3 -3
- package/include/vips/foreign.h +4 -18
- package/include/vips/header.h +7 -0
- package/include/vips/image.h +7 -2
- package/include/vips/interpolate.h +2 -3
- package/include/vips/memory.h +19 -1
- package/include/vips/operation.h +2 -7
- package/include/vips/private.h +7 -0
- package/include/vips/util.h +6 -15
- package/include/vips/version.h +8 -8
- package/include/vips/vips.h +11 -5
- package/include/vips/vips8 +19 -12
- package/include/webp/encode.h +5 -4
- package/include/webp/sharpyuv/sharpyuv.h +14 -5
- package/include/webp/sharpyuv/sharpyuv_csp.h +5 -0
- package/include/webp/types.h +2 -2
- package/include/zlib.h +4 -4
- package/package.json +1 -1
- package/versions.json +22 -22
|
@@ -43,7 +43,7 @@ G_BEGIN_DECLS
|
|
|
43
43
|
* @vfs: a #GVfs
|
|
44
44
|
* @identifier: the identifier to look up a #GFile for. This can either
|
|
45
45
|
* be a URI or a parse name as returned by g_file_get_parse_name()
|
|
46
|
-
* @user_data: user data passed to the function
|
|
46
|
+
* @user_data: (nullable): user data passed to the function, or %NULL
|
|
47
47
|
*
|
|
48
48
|
* This function type is used by g_vfs_register_uri_scheme() to make it
|
|
49
49
|
* possible for a client to associate a URI scheme to a different #GFile
|
|
@@ -52,7 +52,7 @@ G_BEGIN_DECLS
|
|
|
52
52
|
* The client should return a reference to the new file that has been
|
|
53
53
|
* created for @uri, or %NULL to continue with the default implementation.
|
|
54
54
|
*
|
|
55
|
-
* Returns: (transfer full): a #GFile for @identifier.
|
|
55
|
+
* Returns: (nullable) (transfer full): a #GFile for @identifier.
|
|
56
56
|
*
|
|
57
57
|
* Since: 2.50
|
|
58
58
|
*/
|
|
@@ -64,7 +64,7 @@ typedef GFile * (* GVfsFileLookupFunc) (GVfs *vfs,
|
|
|
64
64
|
* G_VFS_EXTENSION_POINT_NAME:
|
|
65
65
|
*
|
|
66
66
|
* Extension point for #GVfs functionality.
|
|
67
|
-
* See [Extending GIO]
|
|
67
|
+
* See [Extending GIO](overview.html#extending-gio).
|
|
68
68
|
*/
|
|
69
69
|
#define G_VFS_EXTENSION_POINT_NAME "gio-vfs"
|
|
70
70
|
|
|
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
|
|
|
45
45
|
* G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
|
|
46
46
|
*
|
|
47
47
|
* Extension point for volume monitor functionality.
|
|
48
|
-
* See [Extending GIO]
|
|
48
|
+
* See [Extending GIO](overview.html#extending-gio).
|
|
49
49
|
*/
|
|
50
50
|
#define G_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-volume-monitor"
|
|
51
51
|
|
|
@@ -1018,3 +1018,37 @@
|
|
|
1018
1018
|
#define GI_AVAILABLE_ENUMERATOR_IN_2_82
|
|
1019
1019
|
#define GI_AVAILABLE_TYPE_IN_2_82
|
|
1020
1020
|
#endif
|
|
1021
|
+
|
|
1022
|
+
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_84
|
|
1023
|
+
#define GI_DEPRECATED_IN_2_84 GI_DEPRECATED
|
|
1024
|
+
#define GI_DEPRECATED_IN_2_84_FOR(f) GI_DEPRECATED_FOR (f)
|
|
1025
|
+
#define GI_DEPRECATED_MACRO_IN_2_84 GLIB_DEPRECATED_MACRO
|
|
1026
|
+
#define GI_DEPRECATED_MACRO_IN_2_84_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
|
|
1027
|
+
#define GI_DEPRECATED_ENUMERATOR_IN_2_84 GLIB_DEPRECATED_ENUMERATOR
|
|
1028
|
+
#define GI_DEPRECATED_ENUMERATOR_IN_2_84_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f)
|
|
1029
|
+
#define GI_DEPRECATED_TYPE_IN_2_84 GLIB_DEPRECATED_TYPE
|
|
1030
|
+
#define GI_DEPRECATED_TYPE_IN_2_84_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f)
|
|
1031
|
+
#else
|
|
1032
|
+
#define GI_DEPRECATED_IN_2_84 _GI_EXTERN
|
|
1033
|
+
#define GI_DEPRECATED_IN_2_84_FOR(f) _GI_EXTERN
|
|
1034
|
+
#define GI_DEPRECATED_MACRO_IN_2_84
|
|
1035
|
+
#define GI_DEPRECATED_MACRO_IN_2_84_FOR(f)
|
|
1036
|
+
#define GI_DEPRECATED_ENUMERATOR_IN_2_84
|
|
1037
|
+
#define GI_DEPRECATED_ENUMERATOR_IN_2_84_FOR(f)
|
|
1038
|
+
#define GI_DEPRECATED_TYPE_IN_2_84
|
|
1039
|
+
#define GI_DEPRECATED_TYPE_IN_2_84_FOR(f)
|
|
1040
|
+
#endif
|
|
1041
|
+
|
|
1042
|
+
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_84
|
|
1043
|
+
#define GI_AVAILABLE_IN_2_84 GI_UNAVAILABLE (2, 84)
|
|
1044
|
+
#define GI_AVAILABLE_STATIC_INLINE_IN_2_84 GLIB_UNAVAILABLE_STATIC_INLINE (2, 84)
|
|
1045
|
+
#define GI_AVAILABLE_MACRO_IN_2_84 GLIB_UNAVAILABLE_MACRO (2, 84)
|
|
1046
|
+
#define GI_AVAILABLE_ENUMERATOR_IN_2_84 GLIB_UNAVAILABLE_ENUMERATOR (2, 84)
|
|
1047
|
+
#define GI_AVAILABLE_TYPE_IN_2_84 GLIB_UNAVAILABLE_TYPE (2, 84)
|
|
1048
|
+
#else
|
|
1049
|
+
#define GI_AVAILABLE_IN_2_84 _GI_EXTERN
|
|
1050
|
+
#define GI_AVAILABLE_STATIC_INLINE_IN_2_84
|
|
1051
|
+
#define GI_AVAILABLE_MACRO_IN_2_84
|
|
1052
|
+
#define GI_AVAILABLE_ENUMERATOR_IN_2_84
|
|
1053
|
+
#define GI_AVAILABLE_TYPE_IN_2_84
|
|
1054
|
+
#endif
|
|
@@ -116,4 +116,16 @@ gboolean gi_callable_info_invoke (GICallableInfo *info
|
|
|
116
116
|
GI_AVAILABLE_IN_ALL
|
|
117
117
|
GITransfer gi_callable_info_get_instance_ownership_transfer (GICallableInfo *info);
|
|
118
118
|
|
|
119
|
+
GI_AVAILABLE_IN_2_84
|
|
120
|
+
GICallableInfo *gi_callable_info_get_async_function (GICallableInfo *info);
|
|
121
|
+
|
|
122
|
+
GI_AVAILABLE_IN_2_84
|
|
123
|
+
GICallableInfo *gi_callable_info_get_sync_function (GICallableInfo *info);
|
|
124
|
+
|
|
125
|
+
GI_AVAILABLE_IN_2_84
|
|
126
|
+
GICallableInfo *gi_callable_info_get_finish_function (GICallableInfo *info);
|
|
127
|
+
|
|
128
|
+
GI_AVAILABLE_IN_2_84
|
|
129
|
+
gboolean gi_callable_info_is_async (GICallableInfo *info);
|
|
130
|
+
|
|
119
131
|
G_END_DECLS
|
|
@@ -187,7 +187,7 @@ GPtrArray* g_ptr_array_new_from_null_terminated_array (gpointer *data,
|
|
|
187
187
|
GDestroyNotify element_free_func);
|
|
188
188
|
GLIB_AVAILABLE_IN_ALL
|
|
189
189
|
gpointer* g_ptr_array_free (GPtrArray *array,
|
|
190
|
-
gboolean
|
|
190
|
+
gboolean free_segment);
|
|
191
191
|
GLIB_AVAILABLE_IN_ALL
|
|
192
192
|
GPtrArray* g_ptr_array_ref (GPtrArray *array);
|
|
193
193
|
GLIB_AVAILABLE_IN_ALL
|
|
@@ -67,7 +67,7 @@ struct _GError
|
|
|
67
67
|
* respectively, but they should receive the private data type instead
|
|
68
68
|
* of #GError.
|
|
69
69
|
*
|
|
70
|
-
* See [Extended #GError Domains]
|
|
70
|
+
* See [Extended #GError Domains](error-reporting.html#extended-gerror-domains) for an example.
|
|
71
71
|
*
|
|
72
72
|
* Since: 2.68
|
|
73
73
|
*/
|
|
@@ -1018,3 +1018,37 @@
|
|
|
1018
1018
|
#define GLIB_AVAILABLE_ENUMERATOR_IN_2_82
|
|
1019
1019
|
#define GLIB_AVAILABLE_TYPE_IN_2_82
|
|
1020
1020
|
#endif
|
|
1021
|
+
|
|
1022
|
+
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_84
|
|
1023
|
+
#define GLIB_DEPRECATED_IN_2_84 GLIB_DEPRECATED
|
|
1024
|
+
#define GLIB_DEPRECATED_IN_2_84_FOR(f) GLIB_DEPRECATED_FOR (f)
|
|
1025
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_84 GLIB_DEPRECATED_MACRO
|
|
1026
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_84_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
|
|
1027
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_84 GLIB_DEPRECATED_ENUMERATOR
|
|
1028
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_84_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f)
|
|
1029
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_84 GLIB_DEPRECATED_TYPE
|
|
1030
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_84_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f)
|
|
1031
|
+
#else
|
|
1032
|
+
#define GLIB_DEPRECATED_IN_2_84 _GLIB_EXTERN
|
|
1033
|
+
#define GLIB_DEPRECATED_IN_2_84_FOR(f) _GLIB_EXTERN
|
|
1034
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_84
|
|
1035
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_84_FOR(f)
|
|
1036
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_84
|
|
1037
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_84_FOR(f)
|
|
1038
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_84
|
|
1039
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_84_FOR(f)
|
|
1040
|
+
#endif
|
|
1041
|
+
|
|
1042
|
+
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_84
|
|
1043
|
+
#define GLIB_AVAILABLE_IN_2_84 GLIB_UNAVAILABLE (2, 84)
|
|
1044
|
+
#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_84 GLIB_UNAVAILABLE_STATIC_INLINE (2, 84)
|
|
1045
|
+
#define GLIB_AVAILABLE_MACRO_IN_2_84 GLIB_UNAVAILABLE_MACRO (2, 84)
|
|
1046
|
+
#define GLIB_AVAILABLE_ENUMERATOR_IN_2_84 GLIB_UNAVAILABLE_ENUMERATOR (2, 84)
|
|
1047
|
+
#define GLIB_AVAILABLE_TYPE_IN_2_84 GLIB_UNAVAILABLE_TYPE (2, 84)
|
|
1048
|
+
#else
|
|
1049
|
+
#define GLIB_AVAILABLE_IN_2_84 _GLIB_EXTERN
|
|
1050
|
+
#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_84
|
|
1051
|
+
#define GLIB_AVAILABLE_MACRO_IN_2_84
|
|
1052
|
+
#define GLIB_AVAILABLE_ENUMERATOR_IN_2_84
|
|
1053
|
+
#define GLIB_AVAILABLE_TYPE_IN_2_84
|
|
1054
|
+
#endif
|
|
@@ -190,6 +190,8 @@
|
|
|
190
190
|
#define g_macro__has_attribute_fallthrough G_GNUC_CHECK_VERSION (6, 0)
|
|
191
191
|
#define g_macro__has_attribute_may_alias G_GNUC_CHECK_VERSION (3, 3)
|
|
192
192
|
#define g_macro__has_attribute_warn_unused_result G_GNUC_CHECK_VERSION (3, 4)
|
|
193
|
+
#define g_macro__has_attribute_no_sanitize_address 0
|
|
194
|
+
#define g_macro__has_attribute_ifunc 0
|
|
193
195
|
|
|
194
196
|
#endif
|
|
195
197
|
|
|
@@ -1237,11 +1239,9 @@
|
|
|
1237
1239
|
#if G_GNUC_CHECK_VERSION(2, 0) && defined(__OPTIMIZE__)
|
|
1238
1240
|
#define _G_BOOLEAN_EXPR_IMPL(uniq, expr) \
|
|
1239
1241
|
G_GNUC_EXTENSION ({ \
|
|
1240
|
-
int G_PASTE (_g_boolean_var_, uniq);
|
|
1242
|
+
int G_PASTE (_g_boolean_var_, uniq) = 0; \
|
|
1241
1243
|
if (expr) \
|
|
1242
1244
|
G_PASTE (_g_boolean_var_, uniq) = 1; \
|
|
1243
|
-
else \
|
|
1244
|
-
G_PASTE (_g_boolean_var_, uniq) = 0; \
|
|
1245
1245
|
G_PASTE (_g_boolean_var_, uniq); \
|
|
1246
1246
|
})
|
|
1247
1247
|
#define _G_BOOLEAN_EXPR(expr) _G_BOOLEAN_EXPR_IMPL (__COUNTER__, expr)
|
|
@@ -48,8 +48,8 @@ typedef enum /*< flags >*/
|
|
|
48
48
|
* `g_main_context_{prepare,query,check,dispatch}` to integrate GMainContext in
|
|
49
49
|
* other event loops.
|
|
50
50
|
*
|
|
51
|
-
* Flags to pass to
|
|
52
|
-
* of a
|
|
51
|
+
* Flags to pass to [ctor@GLib.MainContext.new_with_flags] which affect the
|
|
52
|
+
* behaviour of a [struct@GLib.MainContext].
|
|
53
53
|
*
|
|
54
54
|
* Since: 2.72
|
|
55
55
|
*/
|
|
@@ -121,15 +121,17 @@ typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs;
|
|
|
121
121
|
* %TRUE in either its @prepare or its @check function, or if a ready time
|
|
122
122
|
* has been reached. The @dispatch function receives a callback function and
|
|
123
123
|
* user data. The callback function may be %NULL if the source was never
|
|
124
|
-
* connected to a callback using
|
|
125
|
-
* function should call the callback function with @user_data and
|
|
126
|
-
* additional parameters are needed for this type of event source.
|
|
127
|
-
* return value of the @dispatch function should be
|
|
128
|
-
* source should be removed or
|
|
124
|
+
* connected to a callback using [method@GLib.Source.set_callback]. The
|
|
125
|
+
* @dispatch function should call the callback function with @user_data and
|
|
126
|
+
* whatever additional parameters are needed for this type of event source.
|
|
127
|
+
* The return value of the @dispatch function should be
|
|
128
|
+
* [const@GLib.SOURCE_REMOVE] if the source should be removed or
|
|
129
|
+
* [const@GLib.SOURCE_CONTINUE] to keep it.
|
|
129
130
|
* @finalize: Called when the source is finalized. At this point, the source
|
|
130
131
|
* will have been destroyed, had its callback cleared, and have been removed
|
|
131
|
-
* from its
|
|
132
|
-
* so methods can be called on it from within this
|
|
132
|
+
* from its [struct@GLib.MainContext], but it will still have its final
|
|
133
|
+
* reference count, so methods can be called on it from within this
|
|
134
|
+
* function.
|
|
133
135
|
*
|
|
134
136
|
* The `GSourceFuncs` struct contains a table of
|
|
135
137
|
* functions used to handle event sources in a generic manner.
|
|
@@ -182,15 +184,17 @@ typedef struct _GSourceFuncs GSourceFuncs;
|
|
|
182
184
|
* @user_data: data passed to the function, set when the source was
|
|
183
185
|
* created with one of the above functions
|
|
184
186
|
*
|
|
185
|
-
* Specifies the type of function passed to
|
|
186
|
-
*
|
|
187
|
+
* Specifies the type of function passed to [func@GLib.timeout_add],
|
|
188
|
+
* [func@GLib.timeout_add_full], [func@GLib.idle_add], and
|
|
189
|
+
* [func@GLib.idle_add_full].
|
|
187
190
|
*
|
|
188
|
-
* When calling
|
|
189
|
-
* different type to this type. Use
|
|
190
|
-
* incompatible function types.
|
|
191
|
+
* When calling [method@GLib.Source.set_callback], you may need to cast a
|
|
192
|
+
* function of a different type to this type. Use [func@GLib.SOURCE_FUNC] to
|
|
193
|
+
* avoid warnings about incompatible function types.
|
|
191
194
|
*
|
|
192
|
-
* Returns: %FALSE if the source should be removed.
|
|
193
|
-
*
|
|
195
|
+
* Returns: %FALSE if the source should be removed.
|
|
196
|
+
* [const@GLib.SOURCE_CONTINUE] and [const@GLib.SOURCE_REMOVE] are more
|
|
197
|
+
* memorable names for the return value.
|
|
194
198
|
*/
|
|
195
199
|
typedef gboolean (*GSourceFunc) (gpointer user_data);
|
|
196
200
|
|
|
@@ -202,7 +206,7 @@ typedef gboolean (*GSourceFunc) (gpointer user_data);
|
|
|
202
206
|
* A source function that is only called once before being removed from the main
|
|
203
207
|
* context automatically.
|
|
204
208
|
*
|
|
205
|
-
* See:
|
|
209
|
+
* See: [func@GLib.idle_add_once], [func@GLib.timeout_add_once]
|
|
206
210
|
*
|
|
207
211
|
* Since: 2.74
|
|
208
212
|
*/
|
|
@@ -212,15 +216,16 @@ typedef void (* GSourceOnceFunc) (gpointer user_data);
|
|
|
212
216
|
* G_SOURCE_FUNC:
|
|
213
217
|
* @f: a function pointer.
|
|
214
218
|
*
|
|
215
|
-
* Cast a function pointer to a
|
|
216
|
-
* onwards with `-Wextra` or `-Wcast-function-type` enabled
|
|
217
|
-
* types being incompatible.
|
|
219
|
+
* Cast a function pointer to a [callback@GLib.SourceFunc], suppressing
|
|
220
|
+
* warnings from GCC 8 onwards with `-Wextra` or `-Wcast-function-type` enabled
|
|
221
|
+
* about the function types being incompatible.
|
|
218
222
|
*
|
|
219
223
|
* For example, the correct type of callback for a source created by
|
|
220
|
-
*
|
|
221
|
-
* than
|
|
222
|
-
*
|
|
223
|
-
* back to the correct type before it is
|
|
224
|
+
* [func@GLib.child_watch_source_new] is #GChildWatchFunc, which accepts more
|
|
225
|
+
* arguments than [callback@GLib.SourceFunc]. Casting the function with
|
|
226
|
+
* `(GSourceFunc)` to call [method@GLib.Source.set_callback] will trigger a
|
|
227
|
+
* warning, even though it will be cast back to the correct type before it is
|
|
228
|
+
* called by the source.
|
|
224
229
|
*
|
|
225
230
|
* Since: 2.58
|
|
226
231
|
*/
|
|
@@ -231,13 +236,13 @@ typedef void (* GSourceOnceFunc) (gpointer user_data);
|
|
|
231
236
|
* @pid: the process id of the child process
|
|
232
237
|
* @wait_status: Status information about the child process, encoded
|
|
233
238
|
* in a platform-specific manner
|
|
234
|
-
* @user_data: user data passed to
|
|
239
|
+
* @user_data: user data passed to [func@GLib.child_watch_add]
|
|
235
240
|
*
|
|
236
241
|
* Prototype of a #GChildWatchSource callback, called when a child
|
|
237
242
|
* process has exited.
|
|
238
243
|
*
|
|
239
|
-
* To interpret @wait_status, see the documentation
|
|
240
|
-
*
|
|
244
|
+
* To interpret @wait_status, see the documentation for
|
|
245
|
+
* [func@GLib.spawn_check_wait_status]. In particular,
|
|
241
246
|
* on Unix platforms, note that it is usually not equal
|
|
242
247
|
* to the integer passed to `exit()` or returned from `main()`.
|
|
243
248
|
*/
|
|
@@ -250,8 +255,8 @@ typedef void (*GChildWatchFunc) (GPid pid,
|
|
|
250
255
|
* GSourceDisposeFunc:
|
|
251
256
|
* @source: #GSource that is currently being disposed
|
|
252
257
|
*
|
|
253
|
-
* Dispose function for @source. See
|
|
254
|
-
* details.
|
|
258
|
+
* Dispose function for @source. See [method@GLib.Source.set_dispose_function]
|
|
259
|
+
* for details.
|
|
255
260
|
*
|
|
256
261
|
* Since: 2.64
|
|
257
262
|
*/
|
|
@@ -270,7 +275,7 @@ struct _GSource
|
|
|
270
275
|
GMainContext *context;
|
|
271
276
|
|
|
272
277
|
gint priority;
|
|
273
|
-
guint flags;
|
|
278
|
+
guint flags; /* (atomic) */
|
|
274
279
|
guint source_id;
|
|
275
280
|
|
|
276
281
|
GSList *poll_fds;
|
|
@@ -420,7 +425,7 @@ struct _GSourceFuncs
|
|
|
420
425
|
* Use this for default priority event sources.
|
|
421
426
|
*
|
|
422
427
|
* In GLib this priority is used when adding timeout functions
|
|
423
|
-
* with
|
|
428
|
+
* with [func@GLib.timeout_add]. In GDK this priority is used for events
|
|
424
429
|
* from the X server.
|
|
425
430
|
*/
|
|
426
431
|
#define G_PRIORITY_DEFAULT 0
|
|
@@ -443,7 +448,7 @@ struct _GSourceFuncs
|
|
|
443
448
|
* Use this for default priority idle functions.
|
|
444
449
|
*
|
|
445
450
|
* In GLib this priority is used when adding idle functions with
|
|
446
|
-
*
|
|
451
|
+
* [func@GLib.idle_add].
|
|
447
452
|
*/
|
|
448
453
|
#define G_PRIORITY_DEFAULT_IDLE 200
|
|
449
454
|
|
|
@@ -459,8 +464,8 @@ struct _GSourceFuncs
|
|
|
459
464
|
/**
|
|
460
465
|
* G_SOURCE_REMOVE:
|
|
461
466
|
*
|
|
462
|
-
* Use this macro as the return value of a
|
|
463
|
-
* the
|
|
467
|
+
* Use this macro as the return value of a [callback@GLib.SourceFunc] to remove
|
|
468
|
+
* the [struct@GLib.Source] from the main loop.
|
|
464
469
|
*
|
|
465
470
|
* Since: 2.32
|
|
466
471
|
*/
|
|
@@ -469,8 +474,8 @@ struct _GSourceFuncs
|
|
|
469
474
|
/**
|
|
470
475
|
* G_SOURCE_CONTINUE:
|
|
471
476
|
*
|
|
472
|
-
* Use this macro as the return value of a
|
|
473
|
-
* the
|
|
477
|
+
* Use this macro as the return value of a [callback@GLib.SourceFunc] to leave
|
|
478
|
+
* the [struct@GLib.Source] in the main loop.
|
|
474
479
|
*
|
|
475
480
|
* Since: 2.32
|
|
476
481
|
*/
|
|
@@ -588,13 +593,13 @@ typedef void GMainContextPusher GLIB_AVAILABLE_TYPE_IN_2_64;
|
|
|
588
593
|
* @main_context: (transfer none): a main context to push
|
|
589
594
|
*
|
|
590
595
|
* Push @main_context as the new thread-default main context for the current
|
|
591
|
-
* thread, using
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
596
|
+
* thread, using [method@GLib.MainContext.push_thread_default], and return a
|
|
597
|
+
* new [alias@GLib.MainContextPusher]. Pop with g_main_context_pusher_free().
|
|
598
|
+
* Using [method@GLib.MainContext.pop_thread_default] on @main_context while a
|
|
599
|
+
* [alias@GLib.MainContextPusher] exists for it can lead to undefined behaviour.
|
|
595
600
|
*
|
|
596
|
-
* Using two
|
|
597
|
-
* to an undefined pop order.
|
|
601
|
+
* Using two [alias@GLib.MainContextPusher]s in the same scope is not allowed,
|
|
602
|
+
* as it leads to an undefined pop order.
|
|
598
603
|
*
|
|
599
604
|
* This is intended to be used with g_autoptr(). Note that g_autoptr()
|
|
600
605
|
* is only available when using GCC or clang, so the following example
|
|
@@ -629,6 +634,9 @@ typedef void GMainContextPusher GLIB_AVAILABLE_TYPE_IN_2_64;
|
|
|
629
634
|
* Since: 2.64
|
|
630
635
|
*/
|
|
631
636
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
637
|
+
GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
|
638
|
+
static inline GMainContextPusher *g_main_context_pusher_new (GMainContext *main_context);
|
|
639
|
+
|
|
632
640
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
|
633
641
|
static inline GMainContextPusher *
|
|
634
642
|
g_main_context_pusher_new (GMainContext *main_context)
|
|
@@ -645,12 +653,15 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|
|
645
653
|
* Pop @pusher’s main context as the thread default main context.
|
|
646
654
|
* See g_main_context_pusher_new() for details.
|
|
647
655
|
*
|
|
648
|
-
* This will pop the
|
|
649
|
-
* but will not call
|
|
656
|
+
* This will pop the [struct@GLib.MainContext] as the current thread-default
|
|
657
|
+
* main context, but will not call [method@GLib.MainContext.unref] on it.
|
|
650
658
|
*
|
|
651
659
|
* Since: 2.64
|
|
652
660
|
*/
|
|
653
661
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
662
|
+
GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
|
663
|
+
static inline void g_main_context_pusher_free (GMainContextPusher *pusher);
|
|
664
|
+
|
|
654
665
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
|
|
655
666
|
static inline void
|
|
656
667
|
g_main_context_pusher_free (GMainContextPusher *pusher)
|
|
@@ -833,10 +844,10 @@ gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs,
|
|
|
833
844
|
* GClearHandleFunc:
|
|
834
845
|
* @handle_id: the handle ID to clear
|
|
835
846
|
*
|
|
836
|
-
* Specifies the type of function passed to
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
847
|
+
* Specifies the type of function passed to [func@GLib.clear_handle_id] The
|
|
848
|
+
* implementation is expected to free the resource identified by @handle_id;
|
|
849
|
+
* for instance, if @handle_id is a [struct@GLib.Source] ID,
|
|
850
|
+
* [func@GLib.Source.remove] can be used.
|
|
840
851
|
*
|
|
841
852
|
* Since: 2.56
|
|
842
853
|
*/
|
|
@@ -861,6 +872,54 @@ void g_clear_handle_id (guint *tag_ptr,
|
|
|
861
872
|
} G_STMT_END \
|
|
862
873
|
GLIB_AVAILABLE_MACRO_IN_2_56
|
|
863
874
|
|
|
875
|
+
/**
|
|
876
|
+
* g_steal_handle_id:
|
|
877
|
+
* @handle_pointer: (inout) (not optional): a pointer to a handle ID
|
|
878
|
+
*
|
|
879
|
+
* Sets @handle_pointer to `0`, returning the value that was there before.
|
|
880
|
+
*
|
|
881
|
+
* Conceptually, this transfers the ownership of the handle ID from the
|
|
882
|
+
* referenced variable to the ‘caller’ of the macro (ie: ‘steals’ the
|
|
883
|
+
* handle ID).
|
|
884
|
+
*
|
|
885
|
+
* This can be very useful to make ownership transfer explicit, or to prevent
|
|
886
|
+
* a handle from being released multiple times. For example:
|
|
887
|
+
*
|
|
888
|
+
* ```c
|
|
889
|
+
* void
|
|
890
|
+
* maybe_unsubscribe_signal (ContextStruct *data)
|
|
891
|
+
* {
|
|
892
|
+
* if (some_complex_logic (data))
|
|
893
|
+
* {
|
|
894
|
+
* g_dbus_connection_signal_unsubscribe (data->connection,
|
|
895
|
+
* g_steal_handle_id (&data->subscription_id));
|
|
896
|
+
* // now data->subscription_id isn’t a dangling handle
|
|
897
|
+
* }
|
|
898
|
+
* }
|
|
899
|
+
* ```
|
|
900
|
+
*
|
|
901
|
+
* While [func@GLib.clear_handle_id] can be used in many of the same situations
|
|
902
|
+
* as `g_steal_handle_id()`, this is one situation where it cannot be used, as
|
|
903
|
+
* there is no way to pass the `GDBusConnection` to a
|
|
904
|
+
* [type@GLib.ClearHandleFunc].
|
|
905
|
+
*
|
|
906
|
+
* Since: 2.84
|
|
907
|
+
*/
|
|
908
|
+
GLIB_AVAILABLE_STATIC_INLINE_IN_2_84
|
|
909
|
+
static inline unsigned int g_steal_handle_id (unsigned int *handle_pointer);
|
|
910
|
+
|
|
911
|
+
GLIB_AVAILABLE_STATIC_INLINE_IN_2_84
|
|
912
|
+
static inline unsigned int
|
|
913
|
+
g_steal_handle_id (unsigned int *handle_pointer)
|
|
914
|
+
{
|
|
915
|
+
unsigned int handle;
|
|
916
|
+
|
|
917
|
+
handle = *handle_pointer;
|
|
918
|
+
*handle_pointer = 0;
|
|
919
|
+
|
|
920
|
+
return handle;
|
|
921
|
+
}
|
|
922
|
+
|
|
864
923
|
/* Idles, child watchers and timeouts */
|
|
865
924
|
GLIB_AVAILABLE_IN_ALL
|
|
866
925
|
guint g_timeout_add_full (gint priority,
|
|
@@ -925,6 +984,30 @@ void g_main_context_invoke (GMainContext *context,
|
|
|
925
984
|
GSourceFunc function,
|
|
926
985
|
gpointer data);
|
|
927
986
|
|
|
987
|
+
/**
|
|
988
|
+
* g_steal_fd:
|
|
989
|
+
* @fd_ptr: (not optional) (inout): A pointer to a file descriptor
|
|
990
|
+
*
|
|
991
|
+
* Sets @fd_ptr to `-1`, returning the value that was there before.
|
|
992
|
+
*
|
|
993
|
+
* Conceptually, this transfers the ownership of the file descriptor
|
|
994
|
+
* from the referenced variable to the caller of the function (i.e.
|
|
995
|
+
* ‘steals’ the reference). This is very similar to [func@GLib.steal_pointer],
|
|
996
|
+
* but for file descriptors.
|
|
997
|
+
*
|
|
998
|
+
* On POSIX platforms, this function is async-signal safe
|
|
999
|
+
* (see [`signal(7)`](man:signal(7)) and
|
|
1000
|
+
* [`signal-safety(7)`](man:signal-safety(7))), making it safe to call from a
|
|
1001
|
+
* signal handler or a #GSpawnChildSetupFunc.
|
|
1002
|
+
*
|
|
1003
|
+
* This function preserves the value of `errno`.
|
|
1004
|
+
*
|
|
1005
|
+
* Returns: the value that @fd_ptr previously had
|
|
1006
|
+
* Since: 2.70
|
|
1007
|
+
*/
|
|
1008
|
+
GLIB_AVAILABLE_STATIC_INLINE_IN_2_70
|
|
1009
|
+
static inline int g_steal_fd (int *fd_ptr);
|
|
1010
|
+
|
|
928
1011
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_70
|
|
929
1012
|
static inline int
|
|
930
1013
|
g_steal_fd (int *fd_ptr)
|
|
@@ -229,6 +229,9 @@ void g_aligned_free_sized (gpointer mem,
|
|
|
229
229
|
*
|
|
230
230
|
* Since: 2.44
|
|
231
231
|
*/
|
|
232
|
+
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
|
|
233
|
+
static inline gpointer g_steal_pointer (gpointer pp);
|
|
234
|
+
|
|
232
235
|
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
|
|
233
236
|
static inline gpointer
|
|
234
237
|
g_steal_pointer (gpointer pp)
|
|
@@ -55,32 +55,51 @@ typedef struct _GOptionEntry GOptionEntry;
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* GOptionFlags:
|
|
58
|
-
* @G_OPTION_FLAG_NONE: No flags. Since: 2.42.
|
|
59
58
|
* @G_OPTION_FLAG_HIDDEN: The option doesn't appear in `--help` output.
|
|
60
59
|
* @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the
|
|
61
|
-
*
|
|
60
|
+
* `--help` output, even if it is defined in a group.
|
|
62
61
|
* @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this
|
|
63
|
-
*
|
|
64
|
-
*
|
|
62
|
+
* flag indicates that the sense of the option is reversed. i.e. %FALSE will
|
|
63
|
+
* be stored into the argument rather than %TRUE.
|
|
65
64
|
* @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind,
|
|
66
|
-
*
|
|
67
|
-
*
|
|
65
|
+
* this flag indicates that the callback does not take any argument
|
|
66
|
+
* (like a %G_OPTION_ARG_NONE option). Since 2.8
|
|
68
67
|
* @G_OPTION_FLAG_FILENAME: For options of the %G_OPTION_ARG_CALLBACK
|
|
69
|
-
*
|
|
70
|
-
*
|
|
68
|
+
* kind, this flag indicates that the argument should be passed to the
|
|
69
|
+
* callback in the GLib filename encoding rather than UTF-8. Since 2.8
|
|
71
70
|
* @G_OPTION_FLAG_OPTIONAL_ARG: For options of the %G_OPTION_ARG_CALLBACK
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
71
|
+
* kind, this flag indicates that the argument supply is optional.
|
|
72
|
+
* If no argument is given then data of %GOptionParseFunc will be
|
|
73
|
+
* set to NULL. Since 2.8
|
|
75
74
|
* @G_OPTION_FLAG_NOALIAS: This flag turns off the automatic conflict
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
75
|
+
* resolution which prefixes long option names with `groupname-` if
|
|
76
|
+
* there is a conflict. This option should only be used in situations
|
|
77
|
+
* where aliasing is necessary to model some legacy commandline interface.
|
|
78
|
+
* It is not safe to use this option, unless all option groups are under
|
|
79
|
+
* your direct control. Since 2.8.
|
|
81
80
|
*
|
|
82
81
|
* Flags which modify individual options.
|
|
83
82
|
*/
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* G_OPTION_FLAG_NONE:
|
|
86
|
+
*
|
|
87
|
+
* No flags.
|
|
88
|
+
*
|
|
89
|
+
* Since: 2.42
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* G_OPTION_FLAG_DEPRECATED:
|
|
94
|
+
*
|
|
95
|
+
* This flag marks the option as deprecated in the `--help`.
|
|
96
|
+
*
|
|
97
|
+
* You should update the description of the option to describe what
|
|
98
|
+
* the user should do in response to the deprecation, for instance:
|
|
99
|
+
* remove the option, or replace it with another one.
|
|
100
|
+
*
|
|
101
|
+
* Since: 2.84
|
|
102
|
+
*/
|
|
84
103
|
typedef enum
|
|
85
104
|
{
|
|
86
105
|
G_OPTION_FLAG_NONE = 0,
|
|
@@ -90,7 +109,8 @@ typedef enum
|
|
|
90
109
|
G_OPTION_FLAG_NO_ARG = 1 << 3,
|
|
91
110
|
G_OPTION_FLAG_FILENAME = 1 << 4,
|
|
92
111
|
G_OPTION_FLAG_OPTIONAL_ARG = 1 << 5,
|
|
93
|
-
G_OPTION_FLAG_NOALIAS = 1 << 6
|
|
112
|
+
G_OPTION_FLAG_NOALIAS = 1 << 6,
|
|
113
|
+
G_OPTION_FLAG_DEPRECATED GLIB_AVAILABLE_ENUMERATOR_IN_2_84 = 1 << 7
|
|
94
114
|
} GOptionFlags;
|
|
95
115
|
|
|
96
116
|
/**
|
|
@@ -98,21 +118,21 @@ typedef enum
|
|
|
98
118
|
* @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags or booleans.
|
|
99
119
|
* @G_OPTION_ARG_STRING: The option takes a UTF-8 string argument.
|
|
100
120
|
* @G_OPTION_ARG_INT: The option takes an integer argument.
|
|
101
|
-
* @G_OPTION_ARG_CALLBACK: The option provides a callback (of type
|
|
102
|
-
*
|
|
121
|
+
* @G_OPTION_ARG_CALLBACK: The option provides a callback (of type #GOptionArgFunc)
|
|
122
|
+
* to parse the extra argument.
|
|
103
123
|
* @G_OPTION_ARG_FILENAME: The option takes a filename as argument, which will
|
|
104
|
-
|
|
124
|
+
be in the GLib filename encoding rather than UTF-8.
|
|
105
125
|
* @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple
|
|
106
|
-
*
|
|
126
|
+
* uses of the option are collected into an array of strings.
|
|
107
127
|
* @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument,
|
|
108
|
-
*
|
|
128
|
+
* multiple uses of the option are collected into an array of strings.
|
|
109
129
|
* @G_OPTION_ARG_DOUBLE: The option takes a double argument. The argument
|
|
110
|
-
*
|
|
111
|
-
*
|
|
130
|
+
* can be formatted either for the user's locale or for the "C" locale.
|
|
131
|
+
* Since 2.12
|
|
112
132
|
* @G_OPTION_ARG_INT64: The option takes a 64-bit integer. Like
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
133
|
+
* %G_OPTION_ARG_INT but for larger numbers. The number can be in
|
|
134
|
+
* decimal base, or in hexadecimal (when prefixed with `0x`, for
|
|
135
|
+
* example, `0xffffffff`). Since 2.12
|
|
116
136
|
*
|
|
117
137
|
* The #GOptionArg enum values determine which type of extra argument the
|
|
118
138
|
* options expect to find. If an option expects an extra argument, it can
|
|
@@ -221,7 +241,7 @@ GQuark g_option_error_quark (void);
|
|
|
221
241
|
* @long_name: The long name of an option can be used to specify it
|
|
222
242
|
* in a commandline as `--long_name`. Every option must have a
|
|
223
243
|
* long name. To resolve conflicts if multiple option groups contain
|
|
224
|
-
* the same long name, it is also possible to specify the option as
|
|
244
|
+
* the same long name, it is also possible to specify the option as
|
|
225
245
|
* `--groupname-long_name`.
|
|
226
246
|
* @short_name: If an option has a short name, it can be specified
|
|
227
247
|
* `-short_name` in a commandline. @short_name must be a printable
|
|
@@ -234,13 +254,15 @@ GQuark g_option_error_quark (void);
|
|
|
234
254
|
* called to handle the extra argument. Otherwise, @arg_data is a
|
|
235
255
|
* pointer to a location to store the value, the required type of
|
|
236
256
|
* the location depends on the @arg type:
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
257
|
+
*
|
|
258
|
+
* - %G_OPTION_ARG_NONE: %gboolean
|
|
259
|
+
* - %G_OPTION_ARG_STRING: %gchar*
|
|
260
|
+
* - %G_OPTION_ARG_INT: %gint
|
|
261
|
+
* - %G_OPTION_ARG_FILENAME: %gchar*
|
|
262
|
+
* - %G_OPTION_ARG_STRING_ARRAY: %gchar**
|
|
263
|
+
* - %G_OPTION_ARG_FILENAME_ARRAY: %gchar**
|
|
264
|
+
* - %G_OPTION_ARG_DOUBLE: %gdouble
|
|
265
|
+
*
|
|
244
266
|
* If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME,
|
|
245
267
|
* the location will contain a newly allocated string if the option
|
|
246
268
|
* was given. That string needs to be freed by the callee using g_free().
|
|
@@ -253,7 +275,7 @@ GQuark g_option_error_quark (void);
|
|
|
253
275
|
* by the option in `--help` output. The @arg_description is translated
|
|
254
276
|
* using the @translate_func of the group, see
|
|
255
277
|
* g_option_group_set_translation_domain().
|
|
256
|
-
*
|
|
278
|
+
*
|
|
257
279
|
* A GOptionEntry struct defines a single option. To have an effect, they
|
|
258
280
|
* must be added to a #GOptionGroup with g_option_context_add_main_entries()
|
|
259
281
|
* or g_option_group_add_entries().
|