diff --git a/gir-files/GLib-2.0.gir b/gir-files/GLib-2.0.gir index 21c4e66eb..a5a98f4cc 100644 --- a/gir-files/GLib-2.0.gir +++ b/gir-files/GLib-2.0.gir @@ -5,20 +5,28 @@ and/or use gtk-doc annotations. --> - + Integer representing a day of the month; between 1 and 31. #G_DATE_BAD_DAY represents an invalid day of the month. + Integer representing a year; #G_DATE_BAD_YEAR is the invalid value. The year must be 1 or higher; negative (BC) years are not allowed. The year is represented with four digits. + + + Opaque type. See g_main_context_pusher_new() for details. + + + Opaque type. See g_mutex_locker_new() for details. + @@ -29,25 +37,54 @@ while Windows uses process handles (which are pointers). GPid is used in GLib only for descendant processes spawned with the g_spawn functions. + A GQuark is a non-zero integer which uniquely identifies a particular string. A GQuark value of zero is associated to %NULL. + + + Opaque type. See g_rw_lock_reader_locker_new() for details. + + + + + Opaque type. See g_rw_lock_writer_locker_new() for details. + + + + + Opaque type. See g_rec_mutex_locker_new() for details. + + + + + A typedef for a reference-counted string. A pointer to a #GRefString can be +treated like a standard `char*` array by all code, but can additionally have +`g_ref_string_*()` methods called on it. `g_ref_string_*()` methods cannot be +called on `char*` arrays not allocated using g_ref_string_new(). + +If using #GRefString with autocleanups, g_autoptr() must be used rather than +g_autofree(), so that the reference counting metadata is also freed. + + + A typedef alias for gchar**. This is mostly useful when used together with g_auto(). + - - Simply a replacement for time_t. It has been deprecated -since it is not equivalent to time_t on 64-bit platforms -with a 64-bit time_t. Unrelated to #GTimer. + + Simply a replacement for `time_t`. It has been deprecated +since it is not equivalent to `time_t` on 64-bit platforms +with a 64-bit `time_t`. Unrelated to #GTimer. Note that #GTime is defined to always be a 32-bit integer, -unlike time_t which may be 64-bit on some systems. Therefore, +unlike `time_t` which may be 64-bit on some systems. Therefore, #GTime will overflow in the year 2038, and you cannot use the address of a #GTime variable as argument to the UNIX time() function. @@ -60,18 +97,63 @@ GTime gtime; time (&ttime); gtime = (GTime)ttime; ]| + This is not [Y2038-safe](https://en.wikipedia.org/wiki/Year_2038_problem). + Use #GDateTime or #time_t instead. + A value representing an interval of time, in microseconds. + + + + Return the minimal alignment required by the platform ABI for values of the given +type. The address of a variable or struct member of the given type must always be +a multiple of this alignment. For example, most platforms require int variables +to be aligned at a 4-byte boundary, so `G_ALIGNOF (int)` is 4 on most platforms. + +Note this is not necessarily the same as the value returned by GCC’s +`__alignof__` operator, which returns the preferred alignment for a type. +The preferred alignment may be a stricter alignment than the minimal +alignment. + + + + a type-name + + + + + + Evaluates to a truth value if the absolute difference between @a and @b is +smaller than @epsilon, and to a false value otherwise. + +For example, +- `G_APPROX_VALUE (5, 6, 2)` evaluates to true +- `G_APPROX_VALUE (3.14, 3.15, 0.001)` evaluates to false +- `G_APPROX_VALUE (n, 0.f, FLT_EPSILON)` evaluates to true if `n` is within + the single precision floating point epsilon from zero + + + + a numeric value + + + a numeric value + + + a numeric value that expresses the tolerance between @a and @b + + + A good size for a buffer to be passed into g_ascii_dtostr(). It is guaranteed to be enough for all output of that function @@ -83,10 +165,19 @@ The typical usage would be something like: fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value)); ]| + + + + + + + + Contains the public fields of a GArray. + a pointer to the element data. The data may be moved as elements are added to the #GArray. @@ -99,6 +190,7 @@ The typical usage would be something like: Adds @len elements onto the end of the array. + the #GArray @@ -122,21 +214,95 @@ The typical usage would be something like: + + Checks whether @target exists in @array by performing a binary +search based on the given comparison function @compare_func which +get pointers to items as arguments. If the element is found, %TRUE +is returned and the element’s index is returned in @out_match_index +(if non-%NULL). Otherwise, %FALSE is returned and @out_match_index +is undefined. If @target exists multiple times in @array, the index +of the first instance is returned. This search is using a binary +search, so the @array must absolutely be sorted to return a correct +result (if not, the function may produce false-negative). + +This example defines a comparison function and search an element in a #GArray: +|[<!-- language="C" --> +static gint* +cmpint (gconstpointer a, gconstpointer b) +{ + const gint *_a = a; + const gint *_b = b; + + return *_a - *_b; +} +... +gint i = 424242; +guint matched_index; +gboolean result = g_array_binary_search (garray, &i, cmpint, &matched_index); +... +]| + + + %TRUE if @target is one of the elements of @array, %FALSE otherwise. + + + + + a #GArray. + + + + + + a pointer to the item to look up. + + + + A #GCompareFunc used to locate @target. + + + + return location + for the index of the element, if found. + + + + + + Create a shallow copy of a #GArray. If the array elements consist of +pointers to data, the pointers are copied but the actual data is not. + + + A copy of @array. + + + + + + + A #GArray. + + + + + + Frees the memory allocated for the #GArray. If @free_segment is -%TRUE it frees the memory block holding the elements as well and -also each element if @array has a @element_free_func set. Pass +%TRUE it frees the memory block holding the elements as well. Pass %FALSE if you want to free the #GArray wrapper but preserve the -underlying array for use elsewhere. If the reference count of @array -is greater than one, the #GArray wrapper is preserved but the size -of @array will be set to zero. +underlying array for use elsewhere. If the reference count of +@array is greater than one, the #GArray wrapper is preserved but +the size of @array will be set to zero. -If array elements contain dynamically-allocated memory, they should -be freed separately. +If array contents point to dynamically-allocated memory, they should +be freed separately if @free_seg is %TRUE and no @clear_func +function has been set for @array. This function is not thread-safe. If using a #GArray from multiple threads, use only the atomic g_array_ref() and g_array_unref() functions. + the element data if @free_segment is %FALSE, otherwise %NULL. The element data should be freed using g_free(). @@ -157,6 +323,7 @@ functions. Gets the size of the elements in @array. + Size of each element, in bytes @@ -171,7 +338,16 @@ functions. - Inserts @len elements into a #GArray at the given index. + Inserts @len elements into a #GArray at the given index. + +If @index_ is greater than the array’s current length, the array is expanded. +The elements between the old end of the array and the newly inserted elements +will be initialised to zero if the array was configured to clear elements; +otherwise their values will be undefined. + +@data may be %NULL if (and only if) @len is zero. If @len is zero, this +function is a no-op. + the #GArray @@ -189,7 +365,7 @@ functions. the index to place the elements at - + a pointer to the elements to insert @@ -201,6 +377,7 @@ functions. Creates a new #GArray with a reference count of 1. + the new #GArray @@ -227,9 +404,13 @@ functions. Adds @len elements onto the start of the array. +@data may be %NULL if (and only if) @len is zero. If @len is zero, this +function is a no-op. + This operation is slower than g_array_append_vals() since the existing elements in the array have to be moved to make space for the new elements. + the #GArray @@ -243,12 +424,12 @@ the new elements. - + a pointer to the elements to prepend to the start of the array - the number of elements to prepend + the number of elements to prepend, which may be zero @@ -256,6 +437,7 @@ the new elements. Atomically increments the reference count of @array by one. This function is thread-safe and may be called from any thread. + The passed in #GArray @@ -274,6 +456,7 @@ This function is thread-safe and may be called from any thread. Removes the element at the given index from a #GArray. The following elements are moved down one place. + the #GArray @@ -298,6 +481,7 @@ elements are moved down one place. element in the array is used to fill in the space, so this function does not preserve the order of the #GArray. But it is faster than g_array_remove_index(). + the #GArray @@ -320,6 +504,7 @@ g_array_remove_index(). Removes the given number of elements starting at the given index from a #GArray. The following elements are moved to close the gap. + the #GArray @@ -348,11 +533,13 @@ from a #GArray. The following elements are moved to close the gap. The @clear_func will be called when an element in the array data segment is removed and when the array is freed and data -segment is deallocated as well. +segment is deallocated as well. @clear_func will be passed a +pointer to the element to clear, rather than the element itself. Note that in contrast with other uses of #GDestroyNotify functions, @clear_func is expected to clear the contents of the array element it is given, but not free the element itself. + @@ -372,6 +559,7 @@ the array element it is given, but not free the element itself. Sets the size of the array, expanding it if necessary. If the array was created with @clear_ set to %TRUE, the new elements are set to 0. + the #GArray @@ -396,6 +584,7 @@ was created with @clear_ set to %TRUE, the new elements are set to 0. a reference count of 1. This avoids frequent reallocation, if you are going to add many elements to the array. Note however that the size of the array is still 0. + the new #GArray @@ -430,6 +619,7 @@ than second arg, zero for equal, greater zero if first arg is greater than second arg). This is guaranteed to be a stable sort since version 2.32. + @@ -455,6 +645,7 @@ This is guaranteed to be a stable sort since version 2.32. There used to be a comment here about making the sort stable by using the addresses of the elements in the comparison function. This did not actually work, so any such code should be removed. + @@ -475,11 +666,51 @@ This did not actually work, so any such code should be removed. + + Frees the data in the array and resets the size to zero, while +the underlying array is preserved for use elsewhere and returned +to the caller. + +If the array was created with the @zero_terminate property +set to %TRUE, the returned data is zero terminated too. + +If array elements contain dynamically-allocated memory, +the array elements should also be freed by the caller. + +A short example of use: +|[<!-- language="C" --> +... +gpointer data; +gsize data_len; +data = g_array_steal (some_array, &data_len); +... +]| + + + the element data, which should be + freed using g_free(). + + + + + a #GArray. + + + + + + pointer to retrieve the number of + elements of the original array + + + + Atomically decrements the reference count of @array by one. If the reference count drops to 0, all memory allocated by the array is released. This function is thread-safe and may be called from any thread. + @@ -494,6 +725,7 @@ thread. + @@ -521,6 +753,7 @@ thread. The GAsyncQueue struct is an opaque data structure which represents an asynchronous queue. It should only be accessed through the g_async_queue_* functions. + Returns the length of the queue. @@ -530,6 +763,7 @@ value means waiting threads, and a positive value means available entries in the @queue. A return value of 0 could mean n entries in the queue and n threads waiting. This can happen due to locking of the queue or due to scheduling. + the length of the @queue @@ -552,6 +786,7 @@ in the queue and n threads waiting. This can happen due to locking of the queue or due to scheduling. This function must be called while holding the @queue's lock. + the length of the @queue. @@ -573,6 +808,7 @@ Call g_async_queue_unlock() to drop the lock again. While holding the lock, you can only call the g_async_queue_*_unlocked() functions on @queue. Otherwise, deadlock may occur. + @@ -586,6 +822,7 @@ deadlock may occur. Pops data from the @queue. If @queue is empty, this function blocks until data becomes available. + data from the queue @@ -602,6 +839,7 @@ blocks until data becomes available. blocks until data becomes available. This function must be called while holding the @queue's lock. + data from the queue. @@ -615,6 +853,7 @@ This function must be called while holding the @queue's lock. Pushes the @data into the @queue. @data must not be %NULL. + @@ -634,6 +873,7 @@ This function must be called while holding the @queue's lock. In contrast to g_async_queue_push(), this function pushes the new item ahead of the items already in the queue, so that it will be the next one to be popped off the queue. + @@ -655,6 +895,7 @@ pushes the new item ahead of the items already in the queue, so that it will be the next one to be popped off the queue. This function must be called while holding the @queue's lock. + @@ -680,6 +921,7 @@ This function will lock @queue before it sorts the queue and unlock it when it is finished. For an example of @func see g_async_queue_sort(). + @@ -718,6 +960,7 @@ new elements, see g_async_queue_sort(). This function must be called while holding the @queue's lock. For an example of @func see g_async_queue_sort(). + @@ -744,6 +987,7 @@ For an example of @func see g_async_queue_sort(). Pushes the @data into the @queue. @data must not be %NULL. This function must be called while holding the @queue's lock. + @@ -761,6 +1005,7 @@ This function must be called while holding the @queue's lock. Increases the reference count of the asynchronous @queue by 1. You do not need to hold the lock to call this function. + the @queue that was passed in (since 2.6) @@ -777,6 +1022,7 @@ You do not need to hold the lock to call this function. Reference counting is done atomically. so g_async_queue_ref() can be used regardless of the @queue's lock. + @@ -789,6 +1035,7 @@ lock. Remove an item from the queue. + %TRUE if the item was removed @@ -808,6 +1055,7 @@ lock. Remove an item from the queue. This function must be called while holding the @queue's lock. + %TRUE if the item was removed @@ -846,6 +1094,7 @@ lowest priority would be at the top of the queue, you could use: return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1); ]| + @@ -874,6 +1123,7 @@ if the first element should be lower in the @queue than the second element. This function must be called while holding the @queue's lock. + @@ -898,9 +1148,10 @@ This function must be called while holding the @queue's lock. If no data is received before @end_time, %NULL is returned. -To easily calculate @end_time, a combination of g_get_current_time() +To easily calculate @end_time, a combination of g_get_real_time() and g_time_val_add() can be used. use g_async_queue_timeout_pop(). + data from the queue or %NULL, when no data is received before @end_time. @@ -923,11 +1174,12 @@ and g_time_val_add() can be used. If no data is received before @end_time, %NULL is returned. -To easily calculate @end_time, a combination of g_get_current_time() +To easily calculate @end_time, a combination of g_get_real_time() and g_time_val_add() can be used. This function must be called while holding the @queue's lock. use g_async_queue_timeout_pop_unlocked(). + data from the queue or %NULL, when no data is received before @end_time. @@ -949,6 +1201,7 @@ This function must be called while holding the @queue's lock. @timeout microseconds, or until data becomes available. If no data is received before the timeout, %NULL is returned. + data from the queue or %NULL, when no data is received before the timeout. @@ -972,6 +1225,7 @@ If no data is received before the timeout, %NULL is returned. If no data is received before the timeout, %NULL is returned. This function must be called while holding the @queue's lock. + data from the queue or %NULL, when no data is received before the timeout. @@ -991,6 +1245,7 @@ This function must be called while holding the @queue's lock. Tries to pop data from the @queue. If no data is available, %NULL is returned. + data from the queue or %NULL, when no data is available immediately. @@ -1008,6 +1263,7 @@ This function must be called while holding the @queue's lock. %NULL is returned. This function must be called while holding the @queue's lock. + data from the queue or %NULL, when no data is available immediately. @@ -1026,6 +1282,7 @@ This function must be called while holding the @queue's lock. Calling this function when you have not acquired the with g_async_queue_lock() leads to undefined behaviour. + @@ -1043,6 +1300,7 @@ If the reference count went to 0, the @queue will be destroyed and the memory allocated will be freed. So you are not allowed to use the @queue afterwards, as it might have disappeared. You do not need to hold the lock to call this function. + @@ -1061,6 +1319,7 @@ will be destroyed and the memory allocated will be freed. Reference counting is done atomically. so g_async_queue_unref() can be used regardless of the @queue's lock. + @@ -1073,6 +1332,7 @@ lock. Creates a new asynchronous queue. + a new #GAsyncQueue. Free with g_async_queue_unref() @@ -1082,6 +1342,7 @@ lock. Creates a new asynchronous queue and sets up a destroy notify function that is used to free any remaining queue items when the queue is destroyed after the final unref. + a new #GAsyncQueue. Free with g_async_queue_unref() @@ -1097,11 +1358,13 @@ the queue is destroyed after the final unref. Specifies one of the possible types of byte order. See #G_BYTE_ORDER. + The `GBookmarkFile` structure contains only private data and should not be directly accessed. + Adds the application with @name and @exec to the list of applications that have registered a bookmark for @uri into @@ -1125,6 +1388,7 @@ with the same @name had already registered a bookmark for @uri inside @bookmark. If no bookmark for @uri is found, one is created. + @@ -1153,6 +1417,7 @@ If no bookmark for @uri is found, one is created. belongs to. If no bookmark for @uri is found then it is created. + @@ -1173,6 +1438,7 @@ If no bookmark for @uri is found then it is created. Frees a #GBookmarkFile. + @@ -1188,6 +1454,7 @@ If no bookmark for @uri is found then it is created. In the event the URI cannot be found, -1 is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + a timestamp @@ -1204,8 +1471,8 @@ In the event the URI cannot be found, -1 is returned and - Gets the registration informations of @app_name for the bookmark for -@uri. See g_bookmark_file_set_app_info() for more informations about + Gets the registration information of @app_name for the bookmark for +@uri. See g_bookmark_file_set_app_info() for more information about the returned data. The string returned in @app_exec must be freed. @@ -1217,6 +1484,7 @@ for @uri, %FALSE is returned and error is set to #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting the command line fails, an error of the #G_SHELL_ERROR domain is set and %FALSE is returned. + %TRUE on success. @@ -1254,6 +1522,7 @@ bookmark for @uri. In the event the URI cannot be found, %NULL is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + a newly allocated %NULL-terminated array of strings. Use g_strfreev() to free it. @@ -1281,6 +1550,7 @@ In the event the URI cannot be found, %NULL is returned and In the event the URI cannot be found, %NULL is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + a newly allocated string or %NULL if the specified URI cannot be found. @@ -1305,6 +1575,7 @@ In the event the URI cannot be found, %NULL is returned and The returned array is %NULL terminated, so @length may optionally be %NULL. + a newly allocated %NULL-terminated array of group names. Use g_strfreev() to free it. @@ -1332,6 +1603,7 @@ be %NULL. In the event the URI cannot be found, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + %TRUE if the icon for the bookmark for the URI was found. You should free the returned strings. @@ -1363,6 +1635,7 @@ In the event the URI cannot be found, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event that the private flag cannot be found, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + %TRUE if the private flag is set, %FALSE otherwise. @@ -1385,6 +1658,7 @@ In the event the URI cannot be found, %NULL is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event that the MIME type cannot be found, %NULL is returned and @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + a newly allocated string or %NULL if the specified URI cannot be found. @@ -1406,6 +1680,7 @@ event that the MIME type cannot be found, %NULL is returned and In the event the URI cannot be found, -1 is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + a timestamp @@ -1423,6 +1698,7 @@ In the event the URI cannot be found, -1 is returned and Gets the number of bookmarks inside @bookmark. + the number of bookmarks @@ -1441,6 +1717,7 @@ If @uri is %NULL, the title of @bookmark is returned. In the event the URI cannot be found, %NULL is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + a newly allocated string or %NULL if the specified URI cannot be found. @@ -1461,6 +1738,7 @@ In the event the URI cannot be found, %NULL is returned and Returns all URIs of the bookmarks in the bookmark file @bookmark. The array of returned URIs will be %NULL-terminated, so @length may optionally be %NULL. + a newly allocated %NULL-terminated array of strings. Use g_strfreev() to free it. @@ -1484,6 +1762,7 @@ optionally be %NULL. In the event the URI cannot be found, -1 is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + a timestamp. @@ -1505,6 +1784,7 @@ registered by application @name. In the event the URI cannot be found, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + %TRUE if the application @name was found @@ -1530,6 +1810,7 @@ the bookmark for @uri belongs to. In the event the URI cannot be found, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + %TRUE if @group was found. @@ -1551,6 +1832,7 @@ In the event the URI cannot be found, %FALSE is returned and Looks whether the desktop bookmark has an item with its URI set to @uri. + %TRUE if @uri is inside @bookmark, %FALSE otherwise @@ -1570,6 +1852,7 @@ In the event the URI cannot be found, %FALSE is returned and Loads a bookmark file from memory into an empty #GBookmarkFile structure. If the object cannot be created then @error is set to a #GBookmarkFileError. + %TRUE if a desktop bookmark could be loaded. @@ -1580,8 +1863,11 @@ structure. If the object cannot be created then @error is set to a - desktop bookmarks loaded in memory - + desktop bookmarks + loaded in memory + + + the length of @data in bytes @@ -1593,8 +1879,9 @@ structure. If the object cannot be created then @error is set to a This function looks for a desktop bookmark file named @file in the paths returned from g_get_user_data_dir() and g_get_system_data_dirs(), loads the file into @bookmark and returns the file's full path in -@full_path. If the file could not be loaded then an %error is +@full_path. If the file could not be loaded then @error is set to either a #GFileError or #GBookmarkFileError. + %TRUE if a key file could be loaded, %FALSE otherwise @@ -1606,9 +1893,9 @@ set to either a #GFileError or #GBookmarkFileError. a relative path to a filename to open and parse - + - + return location for a string containing the full path of the file, or %NULL @@ -1619,6 +1906,7 @@ set to either a #GFileError or #GBookmarkFileError. Loads a desktop bookmark file into an empty #GBookmarkFile structure. If the file could not be loaded then @error is set to either a #GFileError or #GBookmarkFileError. + %TRUE if a desktop bookmark file could be loaded @@ -1631,7 +1919,7 @@ or #GBookmarkFileError. the path of a filename to load, in the GLib file name encoding - + @@ -1642,6 +1930,7 @@ existing bookmark for @new_uri will be overwritten. If @new_uri is In the event the URI cannot be found, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. + %TRUE if the URI was successfully changed @@ -1670,6 +1959,7 @@ In the event the URI cannot be found, %FALSE is returned and In the event that no application with name @app_name has registered a bookmark for @uri, %FALSE is returned and error is set to #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. + %TRUE if the application was successfully removed. @@ -1697,6 +1987,7 @@ In the event the URI cannot be found, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the event no group was defined, %FALSE is returned and @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. + %TRUE if @group was successfully removed. @@ -1718,6 +2009,7 @@ In the event no group was defined, %FALSE is returned and Removes the bookmark for @uri from the bookmark file @bookmark. + %TRUE if the bookmark was removed successfully. @@ -1737,6 +2029,7 @@ In the event no group was defined, %FALSE is returned and Sets the time the bookmark for @uri was added into @bookmark. If no bookmark for @uri is found then it is created. + @@ -1784,6 +2077,7 @@ in the event that no application @name has registered a bookmark for @uri, %FALSE is returned and error is set to #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark for @uri is found, one is created. + %TRUE if the application's meta-data was successfully changed. @@ -1822,6 +2116,7 @@ for @uri is found, one is created. If @uri is %NULL, the description of @bookmark is set. If a bookmark for @uri cannot be found then it is created. + @@ -1845,6 +2140,7 @@ If a bookmark for @uri cannot be found then it is created. set group name list is removed. If @uri cannot be found then an item for it is created. + @@ -1858,8 +2154,11 @@ If @uri cannot be found then an item for it is created. - an array of group names, or %NULL to remove all groups - + an array of + group names, or %NULL to remove all groups + + + number of group name values in @groups @@ -1873,6 +2172,7 @@ the currently set icon. @href can either be a full URL for the icon file or the icon name following the Icon Naming specification. If no bookmark for @uri is found one is created. + @@ -1899,6 +2199,7 @@ If no bookmark for @uri is found one is created. Sets the private flag of the bookmark for @uri. If a bookmark for @uri cannot be found then it is created. + @@ -1921,6 +2222,7 @@ If a bookmark for @uri cannot be found then it is created. Sets @mime_type as the MIME type of the bookmark for @uri. If a bookmark for @uri cannot be found then it is created. + @@ -1948,6 +2250,7 @@ The "modified" time should only be set when the bookmark's meta-data was actually changed. Every function of #GBookmarkFile that modifies a bookmark also changes the modification time, except for g_bookmark_file_set_visited(). + @@ -1973,6 +2276,7 @@ bookmark file @bookmark. If @uri is %NULL, the title of @bookmark is set. If a bookmark for @uri cannot be found then it is created. + @@ -2001,6 +2305,7 @@ either using the command line retrieved by g_bookmark_file_get_app_info() or by the default application for the bookmark's MIME type, retrieved using g_bookmark_file_get_mime_type(). Changing the "visited" time does not affect the "modified" time. + @@ -2021,10 +2326,13 @@ does not affect the "modified" time. This function outputs @bookmark as a string. + - a newly allocated string holding - the contents of the #GBookmarkFile - + + a newly allocated string holding the contents of the #GBookmarkFile + + + @@ -2040,6 +2348,7 @@ does not affect the "modified" time. This function outputs @bookmark into a file. The write process is guaranteed to be atomic by using g_file_set_contents() internally. + %TRUE if the file was successfully written. @@ -2051,7 +2360,7 @@ guaranteed to be atomic by using g_file_set_contents() internally. path of the output file - + @@ -2066,6 +2375,7 @@ guaranteed to be atomic by using g_file_set_contents() internally. Use g_bookmark_file_load_from_file(), g_bookmark_file_load_from_data() or g_bookmark_file_load_from_data_dirs() to read an existing bookmark file. + an empty #GBookmarkFile @@ -2074,6 +2384,7 @@ file. Error codes returned by bookmark file parsing. + URI was ill-formed @@ -2103,6 +2414,7 @@ file. Contains the public fields of a GByteArray. + a pointer to the element data. The data may be moved as elements are added to the #GByteArray @@ -2115,6 +2427,7 @@ file. Adds the given bytes to the end of the #GByteArray. The array will grow in size automatically if necessary. + the #GByteArray @@ -2143,6 +2456,7 @@ The array will grow in size automatically if necessary. %TRUE it frees the actual byte data. If the reference count of @array is greater than one, the #GByteArray wrapper is preserved but the size of @array will be set to zero. + the element data if @free_segment is %FALSE, otherwise %NULL. The element data should be freed using g_free(). @@ -2170,6 +2484,7 @@ will be set to zero. This is identical to using g_bytes_new_take() and g_byte_array_free() together. + a new immutable #GBytes representing same byte data that was in the array @@ -2186,6 +2501,7 @@ together. Creates a new #GByteArray with a reference count of 1. + the new #GByteArray @@ -2196,6 +2512,7 @@ together. Create byte array containing the data. The data will be owned by the array and will be freed with g_free(), i.e. it could be allocated using g_strdup(). + a new #GByteArray @@ -2218,6 +2535,7 @@ and will be freed with g_free(), i.e. it could be allocated using g_strdup(). Adds the given data to the start of the #GByteArray. The array will grow in size automatically if necessary. + the #GByteArray @@ -2244,6 +2562,7 @@ The array will grow in size automatically if necessary. Atomically increments the reference count of @array by one. This function is thread-safe and may be called from any thread. + The passed in #GByteArray @@ -2262,6 +2581,7 @@ This function is thread-safe and may be called from any thread. Removes the byte at the given index from a #GByteArray. The following bytes are moved down one place. + the #GByteArray @@ -2286,6 +2606,7 @@ The following bytes are moved down one place. element in the array is used to fill in the space, so this function does not preserve the order of the #GByteArray. But it is faster than g_byte_array_remove_index(). + the #GByteArray @@ -2308,6 +2629,7 @@ than g_byte_array_remove_index(). Removes the given number of bytes starting at the given index from a #GByteArray. The following elements are moved to close the gap. + the #GByteArray @@ -2333,6 +2655,7 @@ than g_byte_array_remove_index(). Sets the size of the #GByteArray, expanding it if necessary. + the #GByteArray @@ -2357,6 +2680,7 @@ than g_byte_array_remove_index(). This avoids frequent reallocation, if you are going to add many bytes to the array. Note however that the size of the array is still 0. + the new #GByteArray @@ -2381,6 +2705,7 @@ is undefined. If you want equal elements to keep their order (i.e. you want a stable sort) you can write a comparison function that, if two elements would otherwise compare equal, compares them by their addresses. + @@ -2400,6 +2725,7 @@ their addresses. Like g_byte_array_sort(), but the comparison function takes an extra user data argument. + @@ -2420,11 +2746,36 @@ user data argument. + + Frees the data in the array and resets the size to zero, while +the underlying array is preserved for use elsewhere and returned +to the caller. + + + the element data, which should be + freed using g_free(). + + + + + a #GByteArray. + + + + + + pointer to retrieve the number of + elements of the original array + + + + Atomically decrements the reference count of @array by one. If the reference count drops to 0, all memory allocated by the array is released. This function is thread-safe and may be called from any thread. + @@ -2463,10 +2814,12 @@ The data pointed to by this bytes must not be modified. For a mutable array of bytes see #GByteArray. Use g_bytes_unref_to_array() to create a mutable array for a #GBytes sequence. To create an immutable #GBytes from a mutable #GByteArray, use the g_byte_array_free_to_bytes() function. + Creates a new #GBytes from @data. @data is copied. If @size is 0, @data may be %NULL. + a new #GBytes @@ -2490,6 +2843,7 @@ a mutable #GByteArray, use the g_byte_array_free_to_bytes() function. @data must be static (ie: never modified or freed). It may be %NULL if @size is 0. + a new #GBytes @@ -2497,7 +2851,7 @@ is 0. - the data to be used for the bytes + the data to be used for the bytes @@ -2521,6 +2875,7 @@ For creating #GBytes with memory from other allocators, see g_bytes_new_with_free_func(). @data may be %NULL if @size is 0. + a new #GBytes @@ -2528,7 +2883,7 @@ g_bytes_new_with_free_func(). - the data to be used for the bytes + the data to be used for the bytes @@ -2549,6 +2904,7 @@ When the last reference is dropped, @free_func will be called with the been called to indicate that the bytes is no longer in use. @data may be %NULL if @size is 0. + a new #GBytes @@ -2556,7 +2912,7 @@ been called to indicate that the bytes is no longer in use. - the data to be used for the bytes + the data to be used for the bytes @@ -2578,10 +2934,18 @@ been called to indicate that the bytes is no longer in use. Compares the two #GBytes values. -This function can be used to sort GBytes instances in lexographical order. +This function can be used to sort GBytes instances in lexicographical order. + +If @bytes1 and @bytes2 have different length but the shorter one is a +prefix of the longer one then the shorter one is considered to be less than +the longer one. Otherwise the first byte where both differ is used for +comparison. If @bytes1 has a smaller value at that position it is +considered less, otherwise greater than @bytes2. + - a negative value if bytes2 is lesser, a positive value if bytes2 is - greater, and zero if bytes2 is equal to bytes1 + a negative value if @bytes1 is less than @bytes2, a positive value + if @bytes1 is greater than @bytes2, and zero if @bytes1 is equal to + @bytes2 @@ -2601,6 +2965,7 @@ This function can be used to sort GBytes instances in lexographical order. This function can be passed to g_hash_table_new() as the @key_equal_func parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. + %TRUE if the two keys match. @@ -2624,6 +2989,7 @@ This function will always return the same pointer for a given #GBytes. %NULL may be returned if @size is 0. This is not guaranteed, as the #GBytes may represent an empty string with @data non-%NULL and @size as 0. %NULL will not be returned if @size is non-zero. + a pointer to the byte data, or %NULL @@ -2646,6 +3012,7 @@ not be returned if @size is non-zero. Get the size of the byte data in the #GBytes. This function will always return the same value for a given #GBytes. + the size @@ -2662,6 +3029,7 @@ This function will always return the same value for a given #GBytes. This function can be passed to g_hash_table_new() as the @key_hash_func parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. + a hash value corresponding to the key. @@ -2678,7 +3046,14 @@ parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. @length may not be longer than the size of @bytes. A reference to @bytes will be held by the newly created #GBytes until -the byte data is no longer needed. +the byte data is no longer needed. + +Since 2.56, if @offset is 0 and @length matches the size of @bytes, then +@bytes will be returned with the reference count incremented by 1. If @bytes +is a slice of another #GBytes, then the resulting #GBytes will reference +the same #GBytes instead of @bytes. This allows consumers to simplify the +usage of #GBytes when asynchronously writing to streams. + a new #GBytes @@ -2700,6 +3075,7 @@ the byte data is no longer needed. Increase the reference count on @bytes. + the #GBytes @@ -2713,7 +3089,8 @@ the byte data is no longer needed. Releases a reference on @bytes. This may result in the bytes being -freed. +freed. If @bytes is %NULL, it will return immediately. + @@ -2732,6 +3109,7 @@ As an optimization, the byte data is transferred to the array without copying if this was the last reference to bytes and bytes was created with g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes(). In all other cases the data is copied. + a new mutable #GByteArray containing the same byte data @@ -2753,6 +3131,7 @@ As an optimization, the byte data is returned without copying if this was the last reference to bytes and bytes was created with g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes(). In all other cases the data is copied. + a pointer to the same byte data, which should be freed with g_free() @@ -2772,28 +3151,48 @@ data is copied. + + Checks the version of the GLib library that is being compiled +against. See glib_check_version() for a runtime check. + + + + the major version to check for + + + the minor version to check for + + + the micro version to check for + + + The set of uppercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig. + The set of ASCII digits. Used for specifying valid identifier characters in #GScannerConfig. + The set of lowercase ASCII alphabet characters. Used for specifying valid identifier characters in #GScannerConfig. + An opaque structure representing a checksumming operation. To create a new GChecksum, use g_checksum_new(). To free a GChecksum, use g_checksum_free(). + Creates a new #GChecksum, using the checksum algorithm @checksum_type. If the @checksum_type is not known, %NULL is returned. @@ -2808,6 +3207,7 @@ vector of raw bytes. Once either g_checksum_get_string() or g_checksum_get_digest() have been called on a #GChecksum, the checksum will be closed and it won't be possible to call g_checksum_update() on it anymore. + the newly created #GChecksum, or %NULL. Use g_checksum_free() to free the memory allocated by it. @@ -2824,6 +3224,7 @@ on it anymore. Copies a #GChecksum. If @checksum has been closed, by calling g_checksum_get_string() or g_checksum_get_digest(), the copied checksum will be closed as well. + the copy of the passed #GChecksum. Use g_checksum_free() when finished using it. @@ -2838,6 +3239,7 @@ checksum will be closed as well. Frees the memory allocated for @checksum. + @@ -2854,6 +3256,7 @@ into @buffer. The size of the digest depends on the type of checksum. Once this function has been called, the #GChecksum is closed and can no longer be updated with g_checksum_update(). + @@ -2864,9 +3267,11 @@ no longer be updated with g_checksum_update(). output buffer - + + + - + an inout parameter. The caller initializes it to the size of @buffer. After the call it contains the length of the digest. @@ -2874,12 +3279,13 @@ no longer be updated with g_checksum_update(). - Gets the digest as an hexadecimal string. + Gets the digest as a hexadecimal string. Once this function has been called the #GChecksum can no longer be updated with g_checksum_update(). The hexadecimal characters will be lower case. + the hexadecimal representation of the checksum. The returned string is owned by the checksum and should not be modified @@ -2895,6 +3301,7 @@ The hexadecimal characters will be lower case. Resets the state of the @checksum back to its initial state. + @@ -2909,6 +3316,7 @@ The hexadecimal characters will be lower case. Feeds @data into an existing #GChecksum. The checksum must still be open, that is g_checksum_get_string() or g_checksum_get_digest() must not have been called on @checksum. + @@ -2919,7 +3327,7 @@ not have been called on @checksum. buffer used to compute the checksum - + @@ -2931,6 +3339,7 @@ not have been called on @checksum. Gets the length in bytes of digests of type @checksum_type + the checksum length, or -1 if @checksum_type is not supported. @@ -2950,6 +3359,7 @@ digest of some data. Note that the #GChecksumType enumeration may be extended at a later date to include new hashing algorithm types. + Use the MD5 hashing algorithm @@ -2970,6 +3380,7 @@ date to include new hashing algorithm types. Prototype of a #GChildWatchSource callback, called when a child process has exited. To interpret @status, see the documentation for g_spawn_check_exit_status(). + @@ -2989,11 +3400,28 @@ for g_spawn_check_exit_status(). + + Specifies the type of function passed to g_clear_handle_id(). +The implementation is expected to free the resource identified +by @handle_id; for instance, if @handle_id is a #GSource ID, +g_source_remove() can be used. + + + + + + + the handle ID to clear + + + + Specifies the type of a comparison function used to compare two values. The function should return a negative integer if the first value comes before the second, 0 if they are equal, or a positive integer if the first value comes after the second. + negative value if @a < @b; zero if @a = @b; positive value if @a > @b @@ -3019,6 +3447,7 @@ integer if the first value comes after the second. values. The function should return a negative integer if the first value comes before the second, 0 if they are equal, or a positive integer if the first value comes after the second. + negative value if @a < @b; zero if @a = @b; positive value if @a > @b @@ -3101,11 +3530,12 @@ without initialisation. Otherwise, you should call g_cond_init() on it and g_cond_clear() when done. A #GCond should only be accessed via the g_cond_ functions. + - + @@ -3114,6 +3544,7 @@ A #GCond should only be accessed via the g_cond_ functions. If no threads are waiting for @cond, this function has no effect. It is good practice to lock the same mutex as the waiting threads while calling this function, though not required. + @@ -3132,6 +3563,7 @@ statically allocated. Calling g_cond_clear() for a #GCond on which threads are blocking leads to undefined behaviour. + @@ -3154,6 +3586,7 @@ needed, use g_cond_clear(). Calling g_cond_init() on an already-initialised #GCond leads to undefined behaviour. + @@ -3169,6 +3602,7 @@ to undefined behaviour. If no threads are waiting for @cond, this function has no effect. It is good practice to hold the same lock as the waiting thread while calling this function, though not required. + @@ -3194,6 +3628,7 @@ condition is no longer met. For this reason, g_cond_wait() must always be used in a loop. See the documentation for #GCond for a complete example. + @@ -3257,6 +3692,7 @@ time on this API -- if a relative time of 5 seconds were passed directly to the call and a spurious wakeup occurred, the program would have to start over waiting again (which would lead to a total wait time of more than 5 seconds). + %TRUE on a signal, %FALSE on a timeout @@ -3279,12 +3715,15 @@ time of more than 5 seconds). Error codes returned by character set conversion routines. + Conversion between the requested character sets is not supported. - Invalid byte sequence in conversion input. + Invalid byte sequence in conversion input; + or the character sequence could not be represented in the target + character set. Conversion failed for some reason. @@ -3301,10 +3740,16 @@ time of more than 5 seconds). No memory available. Since: 2.40 + + An embedded NUL character is present in + conversion output where a NUL-terminated string is expected. + Since: 2.56 + A function of this signature is used to copy the node data when doing a deep-copy of a tree. + A pointer to the copy @@ -3324,39 +3769,748 @@ when doing a deep-copy of a tree. A bitmask that restricts the possible flags passed to g_datalist_set_flags(). Passing a flags value where flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. + Represents an invalid #GDateDay. + Represents an invalid Julian day number. + Represents an invalid year. + - + + Defines the appropriate cleanup function for a pointer type. + +The function will not be called if the variable to be cleaned up +contains %NULL. + +This will typically be the `_free()` or `_unref()` function for the given +type. + +With this definition, it will be possible to use g_autoptr() with +@TypeName. + +|[ +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref) +]| + +This macro should be used unconditionally; it is a no-op on compilers +where cleanup is not supported. + + + + a type name to define a g_autoptr() cleanup function for + + + the cleanup function + + + + + Defines the appropriate cleanup function for a type. + +This will typically be the `_clear()` function for the given type. + +With this definition, it will be possible to use g_auto() with +@TypeName. + +|[ +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GQueue, g_queue_clear) +]| + +This macro should be used unconditionally; it is a no-op on compilers +where cleanup is not supported. + + + + a type name to define a g_auto() cleanup function for + + + the clear function + + + + + Defines the appropriate cleanup function for a type. + +With this definition, it will be possible to use g_auto() with +@TypeName. + +This function will be rarely used. It is used with pointer-based +typedefs and non-pointer types where the value of the variable +represents a resource that must be freed. Two examples are #GStrv +and file descriptors. + +@none specifies the "none" value for the type in question. It is +probably something like %NULL or `-1`. If the variable is found to +contain this value then the free function will not be called. + +|[ +G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL) +]| + +This macro should be used unconditionally; it is a no-op on compilers +where cleanup is not supported. + + + + a type name to define a g_auto() cleanup function for + + + the free function + + + the "none" value for the type + + + + + A convenience macro which defines a function returning the +#GQuark for the name @QN. The function will be named +@q_n_quark(). + +Note that the quark name will be stringified automatically +in the macro, so you shouldn't use double quotes. + + + + the name to return a #GQuark for + + + prefix for the function name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This macro is similar to %G_GNUC_DEPRECATED_FOR, and can be used to mark +functions declarations as deprecated. Unlike %G_GNUC_DEPRECATED_FOR, it +is meant to be portable across different compilers and must be placed +before the function declaration. + +|[<!-- language="C" -- +G_DEPRECATED_FOR(my_replacement) +int my_mistake (void); +]| + + + + the name of the function that this function was deprecated for + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The directory separator character. This is '/' on UNIX machines and '\' under Windows. + - + The directory separator as a string. This is "/" on UNIX machines and "\" under Windows. + The #GData struct is an opaque data structure to represent a [Keyed Data List][glib-Keyed-Data-Lists]. It should only be accessed via the following functions. + Specifies the type of function passed to g_dataset_foreach(). It is called with each #GQuark id and associated data element, together with the @user_data parameter supplied to g_dataset_foreach(). + @@ -3387,6 +4541,7 @@ initialized with g_date_clear(). g_date_clear() makes the date invalid but sane. An invalid date doesn't represent a day, it's "empty." A date becomes valid after you set it to a Julian day or you set a day, month, and year. + the Julian representation of the date @@ -3418,6 +4573,7 @@ and year. it to a sane state. The new date will be cleared (as if you'd called g_date_clear()) but invalid (it won't represent an existing day). Free the return value with g_date_free(). + a newly-allocated #GDate @@ -3427,6 +4583,7 @@ represent an existing day). Free the return value with g_date_free(). Like g_date_new(), but also sets the value of the date. Assuming the day-month-year triplet you pass in represents an existing day, the returned date will be valid. + a newly-allocated #GDate initialized with @day, @month, and @year @@ -3450,6 +4607,7 @@ returned date will be valid. Like g_date_new(), but also sets the value of the date. Assuming the Julian day number you pass in is valid (greater than 0, less than an unreasonably large number), the returned date will be valid. + a newly-allocated #GDate initialized with @julian_day @@ -3465,6 +4623,7 @@ unreasonably large number), the returned date will be valid. Increments a date some number of days. To move forward by weeks, add weeks*7 days. The date must be valid. + @@ -3485,6 +4644,7 @@ If the day of the month is greater than 28, this routine may change the day of the month (because the destination month may not have the current day in it). The date must be valid. + @@ -3504,6 +4664,7 @@ the current day in it). The date must be valid. If the date is February 29, and the destination year is not a leap year, the date will be changed to February 28. The date must be valid. + @@ -3524,6 +4685,7 @@ If @date falls after @max_date, sets @date equal to @max_date. Otherwise, @date is unchanged. Either of @min_date and @max_date may be %NULL. All non-%NULL dates must be valid. + @@ -3547,6 +4709,7 @@ All non-%NULL dates must be valid. state. The cleared dates will not represent an existing date, but will not contain garbage. Useful to init a date declared on the stack. Validity can be tested with g_date_valid(). + @@ -3564,6 +4727,7 @@ Validity can be tested with g_date_valid(). qsort()-style comparison function for dates. Both dates must be valid. + 0 for equal, less than zero if @lhs is less than @rhs, greater than zero if @lhs is greater than @rhs @@ -3580,10 +4744,27 @@ Both dates must be valid. + + Copies a GDate to a newly-allocated GDate. If the input was invalid +(as determined by g_date_valid()), the invalid state will be copied +as is into the new object. + + + a newly-allocated #GDate initialized from @date + + + + + a #GDate to copy + + + + Computes the number of days between two dates. If @date2 is prior to @date1, the returned value is negative. Both dates must be valid. + the number of days between @date1 and @date2 @@ -3601,6 +4782,7 @@ Both dates must be valid. Frees a #GDate returned from g_date_new(). + @@ -3613,6 +4795,7 @@ Both dates must be valid. Returns the day of the month. The date must be valid. + day of the month @@ -3627,6 +4810,7 @@ Both dates must be valid. Returns the day of the year, where Jan 1 is the first day of the year. The date must be valid. + day of the year @@ -3641,6 +4825,7 @@ year. The date must be valid. Returns the week of the year, where weeks are interpreted according to ISO 8601. + ISO 8601 week number of the year. @@ -3657,6 +4842,7 @@ to ISO 8601. Julian day is simply the number of days since January 1, Year 1; i.e., January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2, etc. The date must be valid. + Julian day @@ -3672,6 +4858,7 @@ etc. The date must be valid. Returns the week of the year, where weeks are understood to start on Monday. If the date is before the first Monday of the year, return 0. The date must be valid. + week of the year @@ -3685,6 +4872,7 @@ The date must be valid. Returns the month of the year. The date must be valid. + month of the year as a #GDateMonth @@ -3700,6 +4888,7 @@ The date must be valid. Returns the week of the year during which this date falls, if weeks are understood to begin on Sunday. The date must be valid. Can return 0 if the day is before the first Sunday of the year. + week number @@ -3713,6 +4902,7 @@ Can return 0 if the day is before the first Sunday of the year. Returns the day of the week for a #GDate. The date must be valid. + day of the week as a #GDateWeekday. @@ -3726,6 +4916,7 @@ Can return 0 if the day is before the first Sunday of the year. Returns the year of a #GDate. The date must be valid. + year in which the date falls @@ -3740,6 +4931,7 @@ Can return 0 if the day is before the first Sunday of the year. Returns %TRUE if the date is on the first of a month. The date must be valid. + %TRUE if the date is the first of the month @@ -3754,6 +4946,7 @@ The date must be valid. Returns %TRUE if the date is the last day of the month. The date must be valid. + %TRUE if the date is the last day of the month @@ -3768,6 +4961,7 @@ The date must be valid. Checks if @date1 is less than or equal to @date2, and swap the values if this is not the case. + @@ -3785,6 +4979,7 @@ and swap the values if this is not the case. Sets the day of the month for a #GDate. If the resulting day-month-year triplet is invalid, the date will be invalid. + @@ -3804,6 +4999,7 @@ day-month-year triplet is invalid, the date will be invalid. The day-month-year triplet must be valid; if you aren't sure it is, call g_date_valid_dmy() to check before you set it. + @@ -3828,6 +5024,7 @@ set it. Sets the value of a #GDate from a Julian day number. + @@ -3845,6 +5042,7 @@ set it. Sets the month of the year for a #GDate. If the resulting day-month-year triplet is invalid, the date will be invalid. + @@ -3871,6 +5069,7 @@ isn't very precise, and its exact behavior varies with the locale. It's intended to be a heuristic routine that guesses what the user means by a given string (and it does work pretty well in that capacity). + @@ -3889,6 +5088,7 @@ capacity). Sets the value of a date from a #GTime value. The time to date conversion is done using the user's current timezone. Use g_date_set_time_t() instead. + @@ -3910,8 +5110,12 @@ the user's current timezone. To set the value of a date to the current day, you could write: |[<!-- language="C" --> - g_date_set_time_t (date, time (NULL)); + time_t now = time (NULL); + if (now == (time_t) -1) + // handle the error + g_date_set_time_t (date, now); ]| + @@ -3926,12 +5130,15 @@ To set the value of a date to the current day, you could write: - + Sets the value of a date from a #GTimeVal value. Note that the @tv_usec member is ignored, because #GDate can't make use of the additional precision. The time to date conversion is done using the user's current timezone. + #GTimeVal is not year-2038-safe. Use g_date_set_time_t() + instead. + @@ -3949,6 +5156,7 @@ The time to date conversion is done using the user's current timezone. Sets the year for a #GDate. If the resulting day-month-year triplet is invalid, the date will be invalid. + @@ -3967,6 +5175,7 @@ triplet is invalid, the date will be invalid. Moves a date some number of days into the past. To move by weeks, just move by weeks*7 days. The date must be valid. + @@ -3986,6 +5195,7 @@ The date must be valid. If the current day of the month doesn't exist in the destination month, the day of the month may change. The date must be valid. + @@ -4006,6 +5216,7 @@ If the current day doesn't exist in the destination year (i.e. it's February 29 and you move to a non-leap-year) then the day is changed to February 29. The date must be valid. + @@ -4023,6 +5234,7 @@ must be valid. Fills in the date-related bits of a struct tm using the @date value. Initializes the non-date parts with something sane but meaningless. + @@ -4041,6 +5253,7 @@ Initializes the non-date parts with something sane but meaningless. Returns %TRUE if the #GDate represents an existing day. The date must not contain garbage; it should have been initialized with g_date_clear() if it wasn't allocated by one of the g_date_new() variants. + Whether the date is valid @@ -4055,6 +5268,7 @@ if it wasn't allocated by one of the g_date_new() variants. Returns the number of days in a month, taking leap years into account. + number of days in @month during the @year @@ -4078,6 +5292,7 @@ plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Mondays are in the year, i.e. there are 53 Mondays if one of the extra days happens to be a Monday.) + number of Mondays in the year @@ -4097,6 +5312,7 @@ plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Sundays are in the year, i.e. there are 53 Sundays if one of the extra days happens to be a Sunday.) + the number of weeks in @year @@ -4115,6 +5331,7 @@ For the purposes of this function, leap year is every year divisible by 4 unless that year is divisible by 100. If it is divisible by 100 it would be a leap year only if that year is also divisible by 400. + %TRUE if the year is a leap year @@ -4140,6 +5357,7 @@ addition to those implemented by the platform's C library. For example, don't expect that using g_date_strftime() would make the \%F provided by the C99 strftime() work on Windows where the C library only complies to C89. + number of characters written to the buffer, or 0 the buffer was too small @@ -4166,6 +5384,7 @@ where the C library only complies to C89. Returns %TRUE if the day of the month is valid (a day is valid if it's between 1 and 31 inclusive). + %TRUE if the day is valid @@ -4181,6 +5400,7 @@ between 1 and 31 inclusive). Returns %TRUE if the day-month-year triplet forms a valid, existing day in the range of days #GDate understands (Year 1 or later, no more than a few thousand years in the future). + %TRUE if the date is a valid one @@ -4203,6 +5423,7 @@ a few thousand years in the future). Returns %TRUE if the Julian day is valid. Anything greater than zero is basically a valid Julian, though there is a 32-bit limit. + %TRUE if the Julian day is valid @@ -4217,6 +5438,7 @@ is basically a valid Julian, though there is a 32-bit limit. Returns %TRUE if the month value is valid. The 12 #GDateMonth enumeration values are the only valid months. + %TRUE if the month is valid @@ -4231,6 +5453,7 @@ enumeration values are the only valid months. Returns %TRUE if the weekday is valid. The seven #GDateWeekday enumeration values are the only valid weekdays. + %TRUE if the weekday is valid @@ -4245,6 +5468,7 @@ values are the only valid weekdays. Returns %TRUE if the year is valid. Any year greater than 0 is valid, though there is a 16-bit limit to what #GDate will understand. + %TRUE if the year is valid @@ -4260,6 +5484,7 @@ though there is a 16-bit limit to what #GDate will understand. This enumeration isn't used in the API, but may be useful if you need to mark a number as a day, month, or year. + a day @@ -4273,6 +5498,7 @@ to mark a number as a day, month, or year. Enumeration representing a month; values are #G_DATE_JANUARY, #G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the invalid value. + invalid value @@ -4316,6 +5542,7 @@ to mark a number as a day, month, or year. `GDateTime` is an opaque structure whose members cannot be accessed directly. + Creates a new #GDateTime corresponding to the given date and time in the time zone @tz. @@ -4345,6 +5572,7 @@ return %NULL. You should release the return value by calling g_date_time_unref() when you are done with it. + a new #GDateTime, or %NULL @@ -4380,7 +5608,68 @@ when you are done with it. - + + Creates a #GDateTime corresponding to the given +[ISO 8601 formatted string](https://en.wikipedia.org/wiki/ISO_8601) +@text. ISO 8601 strings of the form <date><sep><time><tz> are supported, with +some extensions from [RFC 3339](https://tools.ietf.org/html/rfc3339) as +mentioned below. + +Note that as #GDateTime "is oblivious to leap seconds", leap seconds information +in an ISO-8601 string will be ignored, so a `23:59:60` time would be parsed as +`23:59:59`. + +<sep> is the separator and can be either 'T', 't' or ' '. The latter two +separators are an extension from +[RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6). + +<date> is in the form: + +- `YYYY-MM-DD` - Year/month/day, e.g. 2016-08-24. +- `YYYYMMDD` - Same as above without dividers. +- `YYYY-DDD` - Ordinal day where DDD is from 001 to 366, e.g. 2016-237. +- `YYYYDDD` - Same as above without dividers. +- `YYYY-Www-D` - Week day where ww is from 01 to 52 and D from 1-7, + e.g. 2016-W34-3. +- `YYYYWwwD` - Same as above without dividers. + +<time> is in the form: + +- `hh:mm:ss(.sss)` - Hours, minutes, seconds (subseconds), e.g. 22:10:42.123. +- `hhmmss(.sss)` - Same as above without dividers. + +<tz> is an optional timezone suffix of the form: + +- `Z` - UTC. +- `+hh:mm` or `-hh:mm` - Offset from UTC in hours and minutes, e.g. +12:00. +- `+hh` or `-hh` - Offset from UTC in hours, e.g. +12. + +If the timezone is not provided in @text it must be provided in @default_tz +(this field is otherwise ignored). + +This call can fail (returning %NULL) if @text is not a valid ISO 8601 +formatted string. + +You should release the return value by calling g_date_time_unref() +when you are done with it. + + + a new #GDateTime, or %NULL + + + + + an ISO 8601 formatted time string. + + + + a #GTimeZone to use if the text doesn't contain a + timezone, or %NULL. + + + + + Creates a #GDateTime corresponding to the given #GTimeVal @tv in the local time zone. @@ -4393,6 +5682,9 @@ of the supported range of #GDateTime. You should release the return value by calling g_date_time_unref() when you are done with it. + #GTimeVal is not year-2038-safe. Use + g_date_time_new_from_unix_local() instead. + a new #GDateTime, or %NULL @@ -4404,7 +5696,7 @@ when you are done with it. - + Creates a #GDateTime corresponding to the given #GTimeVal @tv in UTC. The time contained in a #GTimeVal is always stored in the form of @@ -4415,6 +5707,9 @@ of the supported range of #GDateTime. You should release the return value by calling g_date_time_unref() when you are done with it. + #GTimeVal is not year-2038-safe. Use + g_date_time_new_from_unix_utc() instead. + a new #GDateTime, or %NULL @@ -4438,6 +5733,7 @@ of the supported range of #GDateTime. You should release the return value by calling g_date_time_unref() when you are done with it. + a new #GDateTime, or %NULL @@ -4460,6 +5756,7 @@ of the supported range of #GDateTime. You should release the return value by calling g_date_time_unref() when you are done with it. + a new #GDateTime, or %NULL @@ -4477,6 +5774,7 @@ the local time zone. This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_local(). + a #GDateTime, or %NULL @@ -4519,6 +5817,7 @@ year 9999). You should release the return value by calling g_date_time_unref() when you are done with it. + a new #GDateTime, or %NULL @@ -4536,6 +5835,7 @@ time zone. This is equivalent to calling g_date_time_new_now() with the time zone returned by g_time_zone_new_local(). + a new #GDateTime, or %NULL @@ -4546,6 +5846,7 @@ zone returned by g_time_zone_new_local(). This is equivalent to calling g_date_time_new_now() with the time zone returned by g_time_zone_new_utc(). + a new #GDateTime, or %NULL @@ -4557,6 +5858,7 @@ UTC. This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_utc(). + a #GDateTime, or %NULL @@ -4590,6 +5892,7 @@ zone returned by g_time_zone_new_utc(). Creates a copy of @datetime and adds the specified timespan to the copy. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4609,6 +5912,7 @@ zone returned by g_time_zone_new_utc(). Creates a copy of @datetime and adds the specified number of days to the copy. Add negative values to subtract days. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4628,6 +5932,7 @@ copy. Add negative values to subtract days. Creates a new #GDateTime adding the specified values to the current date and time in @datetime. Add negative values to subtract. + the newly created #GDateTime that should be freed with g_date_time_unref(). @@ -4667,6 +5972,7 @@ time in @datetime. Add negative values to subtract. Creates a copy of @datetime and adds the specified number of hours. Add negative values to subtract hours. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4686,6 +5992,7 @@ Add negative values to subtract hours. Creates a copy of @datetime adding the specified number of minutes. Add negative values to subtract minutes. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4704,7 +6011,13 @@ Add negative values to subtract minutes. Creates a copy of @datetime and adds the specified number of months to the -copy. Add negative values to subtract months. +copy. Add negative values to subtract months. + +The day of the month of the resulting #GDateTime is clamped to the number +of days in the updated calendar month. For example, if adding 1 month to +31st January 2018, the result would be 28th February 2018. In 2020 (a leap +year), the result would be 29th February. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4724,6 +6037,7 @@ copy. Add negative values to subtract months. Creates a copy of @datetime and adds the specified number of seconds. Add negative values to subtract seconds. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4743,6 +6057,7 @@ Add negative values to subtract seconds. Creates a copy of @datetime and adds the specified number of weeks to the copy. Add negative values to subtract weeks. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4761,7 +6076,11 @@ copy. Add negative values to subtract weeks. Creates a copy of @datetime and adds the specified number of years to the -copy. Add negative values to subtract years. +copy. Add negative values to subtract years. + +As with g_date_time_add_months(), if the resulting date would be 29th +February on a non-leap year, the day will be clamped to 28th February. + the newly created #GDateTime which should be freed with g_date_time_unref(). @@ -4782,6 +6101,7 @@ copy. Add negative values to subtract years. Calculates the difference in time between @end and @begin. The #GTimeSpan that is returned is effectively @end - @begin (ie: positive if the first parameter is larger). + the difference between the two #GDateTime, as a time span expressed in microseconds. @@ -4884,10 +6204,20 @@ conversions: - -: Do not pad a numeric result. This overrides the default padding for the specifier. - 0: Pad a numeric result with zeros. This overrides the default padding - for the specifier. + for the specifier. + +Additionally, when O is used with B, b, or h, it produces the alternative +form of a month name. The alternative form should be used when the month +name is used without a day number (e.g., standalone). It is required in +some languages (Baltic, Slavic, Greek, and more) due to their grammatical +rules. For other languages there is no difference. \%OB is a GNU and BSD +strftime() extension expected to be added to the future POSIX specification, +\%Ob and \%Oh are GNU strftime() extensions. Since: 2.56 + a newly allocated string formatted to the requested format - or %NULL in the case that there was an error. The string + or %NULL in the case that there was an error (such as a format specifier + not being supported in the current locale). The string should be freed with g_free(). @@ -4903,9 +6233,28 @@ conversions: + + Format @datetime in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601), +including the date, time and time zone, and return that as a UTF-8 encoded +string. + + + a newly allocated string formatted in ISO 8601 format + or %NULL in the case that there was an error. The string + should be freed with g_free(). + + + + + A #GDateTime + + + + Retrieves the day of the month represented by @datetime in the gregorian calendar. + the day of the month @@ -4920,6 +6269,7 @@ calendar. Retrieves the ISO 8601 day of the week on which @datetime falls (1 is Monday, 2 is Tuesday... 7 is Sunday). + the day of the week @@ -4934,6 +6284,7 @@ Monday, 2 is Tuesday... 7 is Sunday). Retrieves the day of the year represented by @datetime in the Gregorian calendar. + the day of the year @@ -4947,6 +6298,7 @@ calendar. Retrieves the hour of the day represented by @datetime + the hour of the day @@ -4960,6 +6312,7 @@ calendar. Retrieves the microsecond of the date represented by @datetime + the microsecond of the second @@ -4973,6 +6326,7 @@ calendar. Retrieves the minute of the hour represented by @datetime + the minute of the hour @@ -4987,6 +6341,7 @@ calendar. Retrieves the month of the year represented by @datetime in the Gregorian calendar. + the month represented by @datetime @@ -5000,6 +6355,7 @@ calendar. Retrieves the second of the minute represented by @datetime + the second represented by @datetime @@ -5014,6 +6370,7 @@ calendar. Retrieves the number of seconds since the start of the last minute, including the fractional part. + the number of seconds @@ -5025,6 +6382,20 @@ including the fractional part. + + Get the time zone for this @datetime. + + + the time zone + + + + + a #GDateTime + + + + Determines the time zone abbreviation to be used at the time and in the time zone of @datetime. @@ -5032,6 +6403,7 @@ the time zone of @datetime. For example, in Toronto this is currently "EST" during the winter months and "EDT" during the summer months when daylight savings time is in effect. + the time zone abbreviation. The returned string is owned by the #GDateTime and it should not be @@ -5054,6 +6426,7 @@ arrive at local time for the time zone (ie: negative numbers for time zones west of GMT, positive numbers for east). If @datetime represents UTC time, then the offset is always zero. + the number of microseconds that should be added to UTC to get the local time @@ -5098,6 +6471,7 @@ week (Monday to Sunday). Note that January 1 0001 in the proleptic Gregorian calendar is a Monday, so this function never returns 0. + the ISO 8601 week-numbering year for @datetime @@ -5125,6 +6499,7 @@ year are considered as being contained in the last week of the previous year. Similarly, the final days of a calendar year may be considered as being part of the first ISO 8601 week of the next year if 4 or more days of that week are contained within the new year. + the ISO 8601 week number for @datetime. @@ -5138,6 +6513,7 @@ if 4 or more days of that week are contained within the new year. Retrieves the year represented by @datetime in the Gregorian calendar. + the year represented by @datetime @@ -5151,6 +6527,7 @@ if 4 or more days of that week are contained within the new year. Retrieves the Gregorian day, month, and year of a given #GDateTime. + @@ -5176,6 +6553,7 @@ if 4 or more days of that week are contained within the new year. Determines if daylight savings time is in effect at the time and in the time zone of @datetime. + %TRUE if daylight savings time is in effect @@ -5189,6 +6567,7 @@ the time zone of @datetime. Atomically increments the reference count of @datetime by one. + the #GDateTime with the reference count increased @@ -5206,6 +6585,7 @@ the time zone of @datetime. This call is equivalent to calling g_date_time_to_timezone() with the time zone returned by g_time_zone_new_local(). + the newly created #GDateTime @@ -5217,7 +6597,7 @@ time zone returned by g_time_zone_new_local(). - + Stores the instant in time that @datetime represents into @tv. The time contained in a #GTimeVal is always stored in the form of @@ -5231,6 +6611,9 @@ systems, this function returns %FALSE to indicate that the time is out of range. On systems where 'long' is 64bit, this function never fails. + #GTimeVal is not year-2038-safe. Use + g_date_time_to_unix() instead. + %TRUE if successful, else %FALSE @@ -5256,6 +6639,7 @@ Greenwich will fail (due to the year 0 being out of range). You should release the return value by calling g_date_time_unref() when you are done with it. + a new #GDateTime, or %NULL @@ -5277,6 +6661,7 @@ nearest second. Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with @datetime. + the Unix time corresponding to @datetime @@ -5294,6 +6679,7 @@ Unix time is the number of seconds that have elapsed since 1970-01-01 This call is equivalent to calling g_date_time_to_timezone() with the time zone returned by g_time_zone_new_utc(). + the newly created #GDateTime @@ -5310,6 +6696,7 @@ time zone returned by g_time_zone_new_utc(). When the reference count reaches zero, the resources allocated by @datetime are freed + @@ -5323,6 +6710,7 @@ When the reference count reaches zero, the resources allocated by A comparison function for #GDateTimes that is suitable as a #GCompareFunc. Both #GDateTimes must be non-%NULL. + -1, 0 or 1 if @dt1 is less than, equal to or greater than @dt2. @@ -5344,6 +6732,7 @@ as a #GCompareFunc. Both #GDateTimes must be non-%NULL. Equal here means that they represent the same moment after converting them to the same time zone. + %TRUE if @dt1 and @dt2 are equal @@ -5361,6 +6750,7 @@ them to the same time zone. Hashes @datetime into a #guint, suitable for use within #GHashTable. + a #guint containing the hash @@ -5376,6 +6766,7 @@ them to the same time zone. Enumeration representing a day of the week; #G_DATE_MONDAY, #G_DATE_TUESDAY, etc. #G_DATE_BAD_WEEKDAY is an invalid weekday. + invalid value @@ -5404,6 +6795,7 @@ them to the same time zone. Associates a string with a bit flag. Used in g_parse_debug_string(). + the string @@ -5417,6 +6809,7 @@ Used in g_parse_debug_string(). Specifies the type of function which is called when a data element is destroyed. It is passed the pointer to the data element and should free any memory and resources allocated for it. + @@ -5429,8 +6822,10 @@ should free any memory and resources allocated for it. An opaque structure representing an opened directory. + Closes the directory and deallocates all related resources. + @@ -5455,11 +6850,12 @@ name is in the on-disk encoding. On Windows, as is true of all GLib functions which operate on filenames, the returned name is in UTF-8. + The entry's name or %NULL if there are no more entries. The return value is owned by GLib and must not be modified or freed. - + @@ -5471,6 +6867,7 @@ filenames, the returned name is in UTF-8. Resets the given directory. The next call to g_dir_read_name() will return the first entry again. + @@ -5493,6 +6890,7 @@ basename, no directory components are allowed. If template is Note that in contrast to g_mkdtemp() (and mkdtemp()) @tmpl is not modified, and might thus be a read-only literal string. + The actual name used. This string should be freed with g_free() when not needed any longer and is @@ -5504,7 +6902,7 @@ modified, and might thus be a read-only literal string. Template for directory name, as in g_mkdtemp(), basename only, or %NULL for a default template - + @@ -5512,6 +6910,7 @@ modified, and might thus be a read-only literal string. Opens a directory for reading. The names of the files in the directory can then be retrieved using g_dir_read_name(). Note that the ordering is not defined. + a newly allocated #GDir on success, %NULL on failure. If non-%NULL, you must free the result with g_dir_close() @@ -5536,11 +6935,13 @@ that the ordering is not defined. mantissa and exponent of IEEE floats and doubles. These unions are defined as appropriate for a given platform. IEEE floats and doubles are supported (used for storage) by at least Intel, PPC and Sparc. + the double value + @@ -5560,6 +6961,7 @@ as appropriate for a given platform. IEEE floats and doubles are supported What this means depends on the context, it could just be incrementing the reference count, if @data is a ref-counted object. + a duplicate of data @@ -5570,19 +6972,31 @@ object. - user data that was specified in g_datalist_id_dup_data() + user data that was specified in + g_datalist_id_dup_data() The base of natural logarithms. + + + + + + + + + + Specifies the type of a function used to test two values for equality. The function should return %TRUE if both values are equal and %FALSE otherwise. + %TRUE if @a = @b; %FALSE otherwise @@ -5601,6 +7015,7 @@ and %FALSE otherwise. The `GError` structure contains information about an error that has occurred. + error domain, e.g. #G_FILE_ERROR @@ -5616,6 +7031,7 @@ an error that has occurred. Creates a new #GError with the given @domain and @code, and a message formatted with @format. + a new #GError @@ -5644,6 +7060,7 @@ and a message formatted with @format. not a printf()-style format string. Use this function if @message contains text you don't have control over, that could include printf() escape sequences. + a new #GError @@ -5666,6 +7083,7 @@ that could include printf() escape sequences. Creates a new #GError with the given @domain and @code, and a message formatted with @format. + a new #GError @@ -5691,6 +7109,7 @@ and a message formatted with @format. Makes a copy of @error. + a new #GError @@ -5704,6 +7123,7 @@ and a message formatted with @format. Frees a #GError and associated resources. + @@ -5725,6 +7145,7 @@ instead treat any not-explicitly-recognized error code as being equivalent to the `FAILED` code. This way, if the domain is extended in the future to provide a more specific error code for a certain case, your code will still work. + whether @error has @domain and @code @@ -5748,6 +7169,7 @@ a certain case, your code will still work. The possible errors, used in the @v_error field of #GTokenValue, when the token is a %G_TOKEN_ERROR. + unknown error @@ -5786,6 +7208,7 @@ It's not very portable to make detailed assumptions about exactly which errors will be returned from a given operation. Some errors don't occur on some systems, etc., sometimes there are subtle differences in when a system will report a given error, etc. + Operation not permitted; only the owner of the file (or other resource) or processes with special privileges @@ -5906,6 +7329,7 @@ differences in when a system will report a given error, etc. A test to perform on a file using g_file_test(). + %TRUE if the file is a regular file (not a directory). Note that this test will also return %TRUE @@ -5930,11 +7354,13 @@ differences in when a system will report a given error, etc. mantissa and exponent of IEEE floats and doubles. These unions are defined as appropriate for a given platform. IEEE floats and doubles are supported (used for storage) by at least Intel, PPC and Sparc. + the double value + @@ -5948,6 +7374,7 @@ as appropriate for a given platform. IEEE floats and doubles are supported Flags to modify the format of the string returned by g_format_size_full(). + behave the same as g_format_size() @@ -5961,11 +7388,16 @@ as appropriate for a given platform. IEEE floats and doubles are supported a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. Network and storage sizes should be reported in the normal SI units. + + set the size as a quantity in bits, rather than + bytes, and return units in bits. For example, ‘Mb’ rather than ‘MB’. + Declares a type of function which takes an arbitrary data pointer argument and has no return value. It is not currently used in GLib or GTK+. + @@ -5979,6 +7411,7 @@ not currently used in GLib or GTK+. Specifies the type of functions passed to g_list_foreach() and g_slist_foreach(). + @@ -6006,6 +7439,7 @@ sscanf ("42", "%" G_GINT16_FORMAT, &in) out = in * 1000; g_print ("%" G_GINT32_FORMAT, out); ]| + @@ -6020,19 +7454,32 @@ The following example prints "0x7b"; gint16 value = 123; g_print ("%#" G_GINT16_MODIFIER "x", value); ]| + This is the platform dependent conversion specifier for scanning and printing values of type #gint32. See also #G_GINT16_FORMAT. + The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gint32 or #guint32. It is a string literal. See also #G_GINT16_MODIFIER. + + + This macro is used to insert 64-bit integer literals +into the source code. + + + + a literal integer value, e.g. 0x1d636b02300a7aa7 + + + This is the platform dependent conversion specifier for scanning and printing values of type #gint64. See also #G_GINT16_FORMAT. @@ -6043,6 +7490,7 @@ is not defined. Note that scanf() may not support 64-bit integers, even if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not recommended for parsing anyway; consider using g_ascii_strtoull() instead. + @@ -6053,63 +7501,293 @@ It is a string literal. Some platforms do not support printing 64-bit integers, even though the types are supported. On such platforms %G_GINT64_MODIFIER is not defined. + This is the platform dependent conversion specifier for scanning and printing values of type #gintptr. + The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gintptr or #guintptr. It is a string literal. + + + Expands to the GNU C `alloc_size` function attribute if the compiler +is a new enough gcc. This attribute tells the compiler that the +function returns a pointer to memory of a size that is specified +by the @xth function parameter. + +Place the attribute after the function declaration, just before the +semicolon. + +|[<!-- language="C" --> +gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1); +]| + +See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute) for more details. + + + + the index of the argument specifying the allocation size + + + + + Expands to the GNU C `alloc_size` function attribute if the compiler is a +new enough gcc. This attribute tells the compiler that the function returns +a pointer to memory of a size that is specified by the product of two +function parameters. + +Place the attribute after the function declaration, just before the +semicolon. + +|[<!-- language="C" --> +gpointer g_malloc_n (gsize n_blocks, + gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1, 2); +]| + +See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute) for more details. + + + + the index of the argument specifying one factor of the allocation size + + + the index of the argument specifying the second factor of the allocation size + + + + + Expands to a check for a compiler with __GNUC__ defined and a version +greater than or equal to the major and minor numbers provided. For example, +the following would only match on compilers such as GCC 4.8 or newer. + +|[<!-- language="C" --> +#if G_GNUC_CHECK_VERSION(4, 8) +#endif +]| + + + + major version to check against + + + minor version to check against + + + + + Like %G_GNUC_DEPRECATED, but names the intended replacement for the +deprecated symbol if the version of gcc in use is new enough to support +custom deprecation messages. + +Place the attribute after the declaration, just before the semicolon. + +|[<!-- language="C" --> +int my_mistake (void) G_GNUC_DEPRECATED_FOR(my_replacement); +]| + +See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-deprecated-function-attribute) for more details. + +Note that if @f is a macro, it will be expanded in the warning message. +You can enclose it in quotes to prevent this. (The quotes will show up +in the warning, but it's better than showing the macro expansion.) + + + + the intended replacement for the deprecated symbol, + such as the name of a function + + + + + Expands to the GNU C `format_arg` function attribute if the compiler +is gcc. This function attribute specifies that a function takes a +format string for a `printf()`, `scanf()`, `strftime()` or `strfmon()` style +function and modifies it, so that the result can be passed to a `printf()`, +`scanf()`, `strftime()` or `strfmon()` style function (with the remaining +arguments to the format function the same as they would have been +for the unmodified string). + +Place the attribute after the function declaration, just before the +semicolon. + +See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-nonliteral-1) for more details. + +|[<!-- language="C" --> +gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2); +]| + + + + the index of the argument + + + Expands to "" on all modern compilers, and to __FUNCTION__ on gcc version 2.x. Don't use it. Use G_STRFUNC() instead + Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ on gcc version 2.x. Don't use it. Use G_STRFUNC() instead + + + Expands to the GNU C `format` function attribute if the compiler is gcc. +This is used for declaring functions which take a variable number of +arguments, with the same syntax as `printf()`. It allows the compiler +to type-check the arguments passed to the function. + +Place the attribute after the function declaration, just before the +semicolon. + +See the +[GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) +for more details. + +|[<!-- language="C" --> +gint g_snprintf (gchar *string, + gulong n, + gchar const *format, + ...) G_GNUC_PRINTF (3, 4); +]| + + + + the index of the argument corresponding to the + format string (the arguments are numbered from 1) + + + the index of the first of the format arguments, or 0 if + there are no format arguments + + + + + Expands to the GNU C `format` function attribute if the compiler is gcc. +This is used for declaring functions which take a variable number of +arguments, with the same syntax as `scanf()`. It allows the compiler +to type-check the arguments passed to the function. + +|[<!-- language="C" --> +int my_scanf (MyStream *stream, + const char *format, + ...) G_GNUC_SCANF (2, 3); +int my_vscanf (MyStream *stream, + const char *format, + va_list ap) G_GNUC_SCANF (2, 0); +]| + +See the +[GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) +for details. + + + + the index of the argument corresponding to + the format string (the arguments are numbered from 1) + + + the index of the first of the format arguments, or 0 if + there are no format arguments + + + + + Expands to the GNU C `strftime` format function attribute if the compiler +is gcc. This is used for declaring functions which take a format argument +which is passed to `strftime()` or an API implementing its formats. It allows +the compiler check the format passed to the function. + +|[<!-- language="C" --> +gsize my_strftime (MyBuffer *buffer, + const char *format, + const struct tm *tm) G_GNUC_STRFTIME (2); +]| + +See the +[GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288) +for details. + + + + the index of the argument corresponding to + the format string (the arguments are numbered from 1) + + + + + This macro is used to insert #goffset 64-bit integer literals +into the source code. + +See also #G_GINT64_CONSTANT. + + + + a literal integer value, e.g. 0x1d636b02300a7aa7 + + + This is the platform dependent conversion specifier for scanning and printing values of type #gsize. See also #G_GINT16_FORMAT. + The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gsize. It is a string literal. + This is the platform dependent conversion specifier for scanning and printing values of type #gssize. See also #G_GINT16_FORMAT. + The platform dependent length modifier for conversion specifiers for scanning and printing values of type #gssize. It is a string literal. + This is the platform dependent conversion specifier for scanning and printing values of type #guint16. See also #G_GINT16_FORMAT + This is the platform dependent conversion specifier for scanning and printing values of type #guint32. See also #G_GINT16_FORMAT. + + + This macro is used to insert 64-bit unsigned integer +literals into the source code. + + + + a literal integer value, e.g. 0x1d636b02300a7aa7U + + + This is the platform dependent conversion specifier for scanning and printing values of type #guint64. See also #G_GINT16_FORMAT. @@ -6120,33 +7798,41 @@ is not defined. Note that scanf() may not support 64-bit integers, even if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() is not recommended for parsing anyway; consider using g_ascii_strtoull() instead. + This is the platform dependent conversion specifier for scanning and printing values of type #guintptr. + + + Defined to 1 if gcc-style visibility handling is supported. + + + Specifies the type of the function passed to g_hash_table_foreach(). It is called with each key/value pair, together with the @user_data parameter which is passed to g_hash_table_foreach(). + @@ -6165,19 +7851,77 @@ parameter which is passed to g_hash_table_foreach(). + + Casts a pointer to a `GHook*`. + + + + a pointer + + + + + Returns %TRUE if the #GHook is active, which is normally the case +until the #GHook is destroyed. + + + + a #GHook + + + + + Gets the flags of a hook. + + + + a #GHook + + + The position of the first bit which is not reserved for internal use be the #GHook implementation, i.e. `1 << G_HOOK_FLAG_USER_SHIFT` is the first bit which can be used for application-defined flags. + + + Returns %TRUE if the #GHook function is currently executing. + + + + a #GHook + + + + + Returns %TRUE if the #GHook is not in a #GHookList. + + + + a #GHook + + + + + Returns %TRUE if the #GHook is valid, i.e. it is in a #GHookList, +it is active and it has not been destroyed. + + + + a #GHook + + + Specifies the type of the function passed to g_hash_table_foreach_remove(). It is called with each key/value pair, together with the @user_data parameter passed to g_hash_table_foreach_remove(). It should return %TRUE if the key/value pair should be removed from the #GHashTable. + %TRUE if the key/value pair should be removed from the #GHashTable @@ -6210,7 +7954,7 @@ and #gchar* respectively. g_direct_hash() is also the appropriate hash function for keys of the form `GINT_TO_POINTER (n)` (or similar macros). -<!-- FIXME: Need more here. --> A good hash functions should produce +A good hash functions should produce hash values that are evenly distributed over a fairly large range. The modulus is taken with the hash table size (a prime number) to find the 'bucket' to place each key into. The function should also @@ -6229,6 +7973,7 @@ The key to choosing a good hash is unpredictability. Even cryptographic hashes are very easy to find collisions for when the remainder is taken modulo a somewhat predictable prime number. There must be an element of randomness that an attacker is unable to guess. + the hash value corresponding to the key @@ -6244,14 +7989,24 @@ must be an element of randomness that an attacker is unable to guess. The #GHashTable struct is an opaque data structure to represent a [Hash Table][glib-Hash-Tables]. It should only be accessed via the following functions. + This is a convenience function for using a #GHashTable as a set. It is equivalent to calling g_hash_table_replace() with @key as both the key and the value. +In particular, this means that if @key already exists in the hash table, then +the old copy of @key in the hash table is freed and @key replaces it in the +table. + When a hash table only ever contains keys that have themselves as the corresponding value it is able to be stored more efficiently. See -the discussion in the section description. +the discussion in the section description. + +Starting from GLib 2.40, this function returns a boolean value to +indicate whether the newly added value was already in the hash table +or not. + %TRUE if the key did not exist yet @@ -6264,7 +8019,7 @@ the discussion in the section description. - + a key to insert @@ -6272,6 +8027,7 @@ the discussion in the section description. Checks if @key is in @hash_table. + %TRUE if @key is in @hash_table, %FALSE otherwise. @@ -6297,6 +8053,7 @@ you should either free them first or create the #GHashTable with destroy notifiers using g_hash_table_new_full(). In the latter case the destroy functions you supplied will be called on all keys and values during the destruction phase. + @@ -6324,6 +8081,7 @@ once per every entry in a hash table) should probably be reworked to use additional or different data structures for reverse lookups (keep in mind that an O(n) find/foreach operation issued for all n values in a hash table ends up needing O(n*n) operations). + The value of the first key/value pair is returned, for which @predicate evaluates to %TRUE. If no pair with the @@ -6356,8 +8114,12 @@ be modified while iterating over it (you can't add/remove items). To remove all items matching a predicate, use g_hash_table_foreach_remove(). +The order in which g_hash_table_foreach() iterates over the keys/values in +the hash table is not defined. + See g_hash_table_find() for performance caveats for linear order searches in contrast to g_hash_table_lookup(). + @@ -6388,6 +8150,7 @@ used to free the memory allocated for the removed keys and values. See #GHashTableIter for an alternative way to loop over the key/value pairs in the hash table. + the number of key/value pairs removed @@ -6418,6 +8181,7 @@ destroy functions are called. See #GHashTableIter for an alternative way to loop over the key/value pairs in the hash table. + the number of key/value pairs removed. @@ -6447,6 +8211,7 @@ until changes to the hash release those keys. This iterates over every entry in the hash table to build its return value. To iterate over the entries in a #GHashTable more efficiently, use a #GHashTableIter. + a #GList containing all the keys inside the hash table. The content of the list is owned by the @@ -6484,6 +8249,7 @@ You should always free the return result with g_free(). In the above-mentioned case of a string-keyed hash table, it may be appropriate to use g_strfreev() if you call g_hash_table_steal_all() first to transfer ownership of the keys. + a %NULL-terminated array containing each key from the table. @@ -6512,6 +8278,7 @@ is valid until @hash_table is modified. This iterates over every entry in the hash table to build its return value. To iterate over the entries in a #GHashTable more efficiently, use a #GHashTableIter. + a #GList containing all the values inside the hash table. The content of the list is owned by the @@ -6539,7 +8306,12 @@ value is replaced with the new value. If you supplied a @value_destroy_func when creating the #GHashTable, the old value is freed using that function. If you supplied a @key_destroy_func when creating the #GHashTable, the passed -key is freed using that function. +key is freed using that function. + +Starting from GLib 2.40, this function returns a boolean value to +indicate whether the newly added value was already in the hash table +or not. + %TRUE if the key did not exist yet @@ -6567,6 +8339,7 @@ key is freed using that function. distinguish between a key that is not present and one which is present and has the value %NULL. If you need this distinction, use g_hash_table_lookup_extended(). + the associated value, or %NULL if the key is not found @@ -6594,6 +8367,7 @@ for example before calling g_hash_table_remove(). You can actually pass %NULL for @lookup_key to test whether the %NULL key exists, provided the hash and equal functions of @hash_table are %NULL-safe. + %TRUE if the key was found in the #GHashTable @@ -6638,6 +8412,7 @@ a similar fashion to g_direct_equal(), but without the overhead of a function call. @key_equal_func is called with the key from the hash table as its first parameter, and the user-provided key to check against as its second. + a new #GHashTable @@ -6668,6 +8443,7 @@ permissible if the application still holds a reference to the hash table. This means that you may need to ensure that the hash table is empty by calling g_hash_table_remove_all() before releasing the last reference using g_hash_table_unref(). + a new #GHashTable @@ -6701,6 +8477,7 @@ g_hash_table_unref(). Atomically increments the reference count of @hash_table by one. This function is MT-safe and may be called from any thread. + the passed in #GHashTable @@ -6725,6 +8502,7 @@ If the #GHashTable was created using g_hash_table_new_full(), the key and value are freed using the supplied destroy functions, otherwise you have to make sure that any dynamically allocated values are freed yourself. + %TRUE if the key was found and removed from the #GHashTable @@ -6750,6 +8528,7 @@ If the #GHashTable was created using g_hash_table_new_full(), the keys and values are freed using the supplied destroy functions, otherwise you have to make sure that any dynamically allocated values are freed yourself. + @@ -6770,7 +8549,12 @@ already exists in the #GHashTable, it gets replaced by the new key. If you supplied a @value_destroy_func when creating the #GHashTable, the old value is freed using that function. If you supplied a @key_destroy_func when creating the -#GHashTable, the old key is freed using that function. +#GHashTable, the old key is freed using that function. + +Starting from GLib 2.40, this function returns a boolean value to +indicate whether the newly added value was already in the hash table +or not. + %TRUE if the key did not exist yet @@ -6795,6 +8579,7 @@ If you supplied a @key_destroy_func when creating the Returns the number of elements contained in the #GHashTable. + the number of key/value pairs in the #GHashTable. @@ -6812,6 +8597,7 @@ If you supplied a @key_destroy_func when creating the Removes a key and its associated value from a #GHashTable without calling the key and value destroy functions. + %TRUE if the key was found and removed from the #GHashTable @@ -6833,6 +8619,7 @@ calling the key and value destroy functions. Removes all keys and their associated values from a #GHashTable without calling the key and value destroy functions. + @@ -6846,11 +8633,52 @@ without calling the key and value destroy functions. + + Looks up a key in the #GHashTable, stealing the original key and the +associated value and returning %TRUE if the key was found. If the key was +not found, %FALSE is returned. + +If found, the stolen key and value are removed from the hash table without +calling the key and value destroy functions, and ownership is transferred to +the caller of this method; as with g_hash_table_steal(). + +You can pass %NULL for @lookup_key, provided the hash and equal functions +of @hash_table are %NULL-safe. + + + %TRUE if the key was found in the #GHashTable + + + + + a #GHashTable + + + + + + + the key to look up + + + + return location for the + original key + + + + return location + for the value associated with the key + + + + Atomically decrements the reference count of @hash_table by one. If the reference count drops to 0, all keys and values will be destroyed, and all memory allocated by the hash table is released. This function is MT-safe and may be called from any thread. + @@ -6869,7 +8697,11 @@ This function is MT-safe and may be called from any thread. A GHashTableIter structure represents an iterator that can be used to iterate over the elements of a #GHashTable. GHashTableIter structures are typically allocated on the stack and then initialized -with g_hash_table_iter_init(). +with g_hash_table_iter_init(). + +The iteration order of a #GHashTableIter over the keys/values in a hash +table is not defined. + @@ -6890,6 +8722,7 @@ with g_hash_table_iter_init(). Returns the #GHashTable associated with @iter. + the #GHashTable associated with @iter. @@ -6908,6 +8741,10 @@ with g_hash_table_iter_init(). Initializes a key/value pair iterator and associates it with @hash_table. Modifying the hash table after calling this function invalidates the returned iterator. + +The iteration order of a #GHashTableIter over the keys/values in a hash +table is not defined. + |[<!-- language="C" --> GHashTableIter iter; gpointer key, value; @@ -6918,6 +8755,7 @@ while (g_hash_table_iter_next (&iter, &key, &value)) // do something with key and value } ]| + @@ -6939,6 +8777,7 @@ while (g_hash_table_iter_next (&iter, &key, &value)) Advances @iter and retrieves the key and/or value that are now pointed to as a result of this advancement. If %FALSE is returned, @key and @value are not set, and the iterator becomes invalid. + %FALSE if the end of the #GHashTable has been reached. @@ -6977,6 +8816,7 @@ while (g_hash_table_iter_next (&iter, &key, &value)) g_hash_table_iter_remove (&iter); } ]| + @@ -6994,6 +8834,7 @@ g_hash_table_iter_next() returned %TRUE. If you supplied a @value_destroy_func when creating the #GHashTable, the old value is freed using that function. + @@ -7014,6 +8855,7 @@ iterator from its associated #GHashTable, without calling the key and value destroy functions. Can only be called after g_hash_table_iter_next() returned %TRUE, and cannot be called more than once for the same key/value pair. + @@ -7029,10 +8871,12 @@ be called more than once for the same key/value pair. An opaque structure representing a HMAC operation. To create a new GHmac, use g_hmac_new(). To free a GHmac, use g_hmac_unref(). + Copies a #GHmac. If @hmac has been closed, by calling g_hmac_get_string() or g_hmac_get_digest(), the copied HMAC will be closed as well. + the copy of the passed #GHmac. Use g_hmac_unref() when finished using it. @@ -7051,6 +8895,7 @@ into @buffer. The size of the digest depends on the type of checksum. Once this function has been called, the #GHmac is closed and can no longer be updated with g_checksum_update(). + @@ -7061,9 +8906,11 @@ no longer be updated with g_checksum_update(). output buffer - + + + - + an inout parameter. The caller initializes it to the size of @buffer. After the call it contains the length of the digest @@ -7071,12 +8918,13 @@ no longer be updated with g_checksum_update(). - Gets the HMAC as an hexadecimal string. + Gets the HMAC as a hexadecimal string. Once this function has been called the #GHmac can no longer be updated with g_hmac_update(). The hexadecimal characters will be lower case. + the hexadecimal representation of the HMAC. The returned string is owned by the HMAC and should not be modified @@ -7094,6 +8942,7 @@ The hexadecimal characters will be lower case. Atomically increments the reference count of @hmac by one. This function is MT-safe and may be called from any thread. + the passed in #GHmac. @@ -7112,6 +8961,7 @@ If the reference count drops to 0, all keys and values will be destroyed, and all memory allocated by the hash table is released. This function is MT-safe and may be called from any thread. Frees the memory allocated for @hmac. + @@ -7127,6 +8977,7 @@ Frees the memory allocated for @hmac. The HMAC must still be open, that is g_hmac_get_string() or g_hmac_get_digest() must not have been called on @hmac. + @@ -7137,7 +8988,7 @@ g_hmac_get_digest() must not have been called on @hmac. buffer used to compute the checksum - + @@ -7164,6 +9015,7 @@ on it anymore. Support for digests of type %G_CHECKSUM_SHA512 has been added in GLib 2.42. Support for %G_CHECKSUM_SHA384 was added in GLib 2.52. + the newly created #GHmac, or %NULL. Use g_hmac_unref() to free the memory allocated by it. @@ -7176,7 +9028,7 @@ Support for %G_CHECKSUM_SHA384 was added in GLib 2.52. the key for the HMAC - + @@ -7189,6 +9041,7 @@ Support for %G_CHECKSUM_SHA384 was added in GLib 2.52. The #GHook struct represents a single hook function in a #GHookList. + data which is passed to func when this hook is invoked @@ -7227,6 +9080,7 @@ Support for %G_CHECKSUM_SHA384 was added in GLib 2.52. Compares the ids of two #GHook elements, returning a negative value if the second id is greater than the first. + a value <= 0 if the id of @sibling is >= the id of @new_hook @@ -7244,6 +9098,7 @@ if the second id is greater than the first. Allocates space for a #GHook and initializes it. + a new #GHook @@ -7257,6 +9112,7 @@ if the second id is greater than the first. Destroys a #GHook, given its ID. + %TRUE if the #GHook was found in the #GHookList and destroyed @@ -7275,6 +9131,7 @@ if the second id is greater than the first. Removes one #GHook from a #GHookList, marking it inactive and calling g_hook_unref() on it. + @@ -7292,6 +9149,7 @@ inactive and calling g_hook_unref() on it. Finds a #GHook in a #GHookList using the given function to test for a match. + the found #GHook or %NULL if no matching #GHook is found @@ -7319,6 +9177,7 @@ test for a match. Finds a #GHook in a #GHookList with the given data. + the #GHook with the given @data or %NULL if no matching #GHook is found @@ -7342,6 +9201,7 @@ test for a match. Finds a #GHook in a #GHookList with the given function. + the #GHook with the given @func or %NULL if no matching #GHook is found @@ -7365,6 +9225,7 @@ test for a match. Finds a #GHook in a #GHookList with the given function and data. + the #GHook with the given @func and @data or %NULL if no matching #GHook is found @@ -7395,6 +9256,7 @@ test for a match. The reference count for the #GHook is incremented, so you must call g_hook_unref() to restore it when no longer needed. (Or call g_hook_next_valid() if you are stepping through the #GHookList.) + the first valid #GHook, or %NULL if none are valid @@ -7415,6 +9277,7 @@ g_hook_next_valid() if you are stepping through the #GHookList.) Calls the #GHookList @finalize_hook function if it exists, and frees the memory allocated for the #GHook. + @@ -7431,6 +9294,7 @@ and frees the memory allocated for the #GHook. Returns the #GHook with the given id, or %NULL if it is not found. + the #GHook with the given id, or %NULL if it is not found @@ -7448,6 +9312,7 @@ and frees the memory allocated for the #GHook. Inserts a #GHook into a #GHookList, before a given #GHook. + @@ -7468,6 +9333,7 @@ and frees the memory allocated for the #GHook. Inserts a #GHook into a #GHookList, sorted by the given function. + @@ -7491,6 +9357,7 @@ and frees the memory allocated for the #GHook. The reference count for the #GHook is incremented, so you must call g_hook_unref() to restore it when no longer needed. (Or continue to call g_hook_next_valid() until %NULL is returned.) + the next valid #GHook, or %NULL if none are valid @@ -7514,6 +9381,7 @@ g_hook_next_valid() until %NULL is returned.) Prepends a #GHook on the start of a #GHookList. + @@ -7530,6 +9398,7 @@ g_hook_next_valid() until %NULL is returned.) Increments the reference count for a #GHook. + the @hook that was passed in (since 2.6) @@ -7549,6 +9418,7 @@ g_hook_next_valid() until %NULL is returned.) Decrements the reference count of a #GHook. If the reference count falls to 0, the #GHook is removed from the #GHookList and g_hook_free() is called to free it. + @@ -7567,6 +9437,7 @@ from the #GHookList and g_hook_free() is called to free it. Defines the type of a hook function that can be invoked by g_hook_list_invoke_check(). + %FALSE if the #GHook should be destroyed @@ -7580,6 +9451,7 @@ by g_hook_list_invoke_check(). Defines the type of function used by g_hook_list_marshal_check(). + %FALSE if @hook should be destroyed @@ -7598,6 +9470,7 @@ by g_hook_list_invoke_check(). Defines the type of function used to compare #GHook elements in g_hook_insert_sorted(). + a value <= 0 if @new_hook should be before @sibling @@ -7616,6 +9489,7 @@ g_hook_insert_sorted(). Defines the type of function to be called when a hook in a list of hooks gets finalized. + @@ -7632,6 +9506,7 @@ list of hooks gets finalized. Defines the type of the function passed to g_hook_find(). + %TRUE if the required #GHook has been found @@ -7649,6 +9524,7 @@ list of hooks gets finalized. Flags used internally in the #GHook implementation. + set if the hook has not been destroyed @@ -7663,6 +9539,7 @@ list of hooks gets finalized. Defines the type of a hook function that can be invoked by g_hook_list_invoke(). + @@ -7675,6 +9552,7 @@ by g_hook_list_invoke(). The #GHookList struct represents a list of hook functions. + the next free #GHook id @@ -7702,12 +9580,13 @@ by g_hook_list_invoke(). unused - + Removes all the #GHook elements from a #GHookList. + @@ -7721,6 +9600,7 @@ by g_hook_list_invoke(). Initializes a #GHookList. This must be called before the #GHookList is used. + @@ -7738,6 +9618,7 @@ This must be called before the #GHookList is used. Calls all of the #GHook functions in a #GHookList. + @@ -7757,6 +9638,7 @@ This must be called before the #GHookList is used. Calls all of the #GHook functions in a #GHookList. Any function which returns %FALSE is removed from the #GHookList. + @@ -7775,6 +9657,7 @@ Any function which returns %FALSE is removed from the #GHookList. Calls a function on each valid #GHook. + @@ -7802,6 +9685,7 @@ Any function which returns %FALSE is removed from the #GHookList. Calls a function on each valid #GHook and destroys it if the function returns %FALSE. + @@ -7829,6 +9713,7 @@ function returns %FALSE. Defines the type of function used by g_hook_list_marshal(). + @@ -7843,16 +9728,25 @@ function returns %FALSE. - + The GIConv struct wraps an iconv() conversion descriptor. It contains private data and should only be accessed using the following functions. - + + Same as the standard UNIX routine iconv(), but may be implemented via libiconv on UNIX flavors that lack a native implementation. GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers. +more convenient than the raw iconv wrappers. + +Note that the behaviour of iconv() for characters which are valid in the +input character set, but which have no representation in the output character +set, is implementation defined. This function may return success (with a +positive number of non-reversible conversions as replacement characters were +used), or it may return -1 and set an error such as %EILSEQ, in such a +situation. + count of non-reversible conversions, or -1 on error @@ -7880,7 +9774,7 @@ more convenient than the raw iconv wrappers. - + Same as the standard UNIX routine iconv_close(), but may be implemented via libiconv on UNIX flavors that lack a native implementation. Should be called to clean up @@ -7889,6 +9783,7 @@ you are done converting things. GLib provides g_convert() and g_locale_to_utf8() which are likely more convenient than the raw iconv wrappers. + -1 on error, 0 on success @@ -7907,6 +9802,7 @@ a native implementation. GLib provides g_convert() and g_locale_to_utf8() which are likely more convenient than the raw iconv wrappers. + a "conversion descriptor", or (GIConv)-1 if opening the converter failed. @@ -7926,16 +9822,19 @@ more convenient than the raw iconv wrappers. The bias by which exponents in double-precision floats are offset. + The bias by which exponents in single-precision floats are offset. + A data structure representing an IO Channel. The fields should be considered private and should only be accessed with the following functions. + @@ -7945,10 +9844,10 @@ functions. - + - + @@ -7970,7 +9869,7 @@ functions. - + @@ -8004,6 +9903,7 @@ channel will be closed when the last reference to it is dropped, so there is no need to call g_io_channel_close() (though doing so will not cause problems, as long as no attempt is made to access the channel after it is closed). + A #GIOChannel on success, %NULL on failure. @@ -8011,7 +9911,7 @@ access the channel after it is closed). A string containing the name of a file - + One of "r", "w", "a", "r+", "w+", "a+". These have @@ -8043,6 +9943,7 @@ sockets overlap. There is no way for GLib to know which one you mean in case the argument you pass to this function happens to be both a valid file descriptor and socket. If that happens a warning is issued, and GLib assumes that it is the file descriptor you mean. + a new #GIOChannel. @@ -8059,6 +9960,7 @@ issued, and GLib assumes that it is the file descriptor you mean. flushed, ignoring errors. The channel will not be freed until the last reference is dropped using g_io_channel_unref(). Use g_io_channel_shutdown() instead. + @@ -8071,6 +9973,7 @@ last reference is dropped using g_io_channel_unref(). Flushes the write buffer for the GIOChannel. + the status of the operation: One of #G_IO_STATUS_NORMAL, #G_IO_STATUS_AGAIN, or @@ -8088,6 +9991,7 @@ last reference is dropped using g_io_channel_unref(). This function returns a #GIOCondition depending on whether there is data to be read/space to write data in the internal buffers in the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set. + A #GIOCondition @@ -8101,6 +10005,7 @@ the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set. Gets the buffer size. + the size of the buffer. @@ -8114,6 +10019,7 @@ the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set. Returns whether @channel is buffered. + %TRUE if the @channel is buffered. @@ -8130,6 +10036,7 @@ the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set. will be closed when @channel receives its final unref and is destroyed. The default value of this is %TRUE for channels created by g_io_channel_new_file (), and %FALSE for all other channels. + %TRUE if the channel will be closed, %FALSE otherwise. @@ -8145,6 +10052,7 @@ by g_io_channel_new_file (), and %FALSE for all other channels. Gets the encoding for the input/output of the channel. The internal encoding is always UTF-8. The encoding %NULL makes the channel safe for binary data. + A string containing the encoding, this string is owned by GLib and must not be freed. @@ -8167,6 +10075,7 @@ If they should change at some later point (e.g. partial shutdown of a socket with the UNIX shutdown() function), the user should immediately call g_io_channel_get_flags() to update the internal values of these flags. + the flags which are set on the channel @@ -8182,6 +10091,7 @@ the internal values of these flags. This returns the string that #GIOChannel uses to determine where in the file a line break occurs. A value of %NULL indicates autodetection. + The line termination string. This value is owned by GLib and must not be freed. @@ -8204,6 +10114,7 @@ indicates autodetection. This is called by each of the above functions when creating a #GIOChannel, and so is not often needed by the application programmer (unless you are creating a new type of #GIOChannel). + @@ -8217,6 +10128,7 @@ programmer (unless you are creating a new type of #GIOChannel). Reads data from a #GIOChannel. Use g_io_channel_read_chars() instead. + %G_IO_ERROR_NONE if the operation was successful. @@ -8243,6 +10155,7 @@ programmer (unless you are creating a new type of #GIOChannel). Replacement for g_io_channel_read() with the new API. + the status of the operation. @@ -8279,6 +10192,7 @@ programmer (unless you are creating a new type of #GIOChannel). from a #GIOChannel into a newly-allocated string. @str_return will contain allocated memory if the return is %G_IO_STATUS_NORMAL. + the status of the operation. @@ -8307,6 +10221,7 @@ is %G_IO_STATUS_NORMAL. Reads a line from a #GIOChannel, using a #GString as a buffer. + the status of the operation. @@ -8330,6 +10245,7 @@ is %G_IO_STATUS_NORMAL. Reads all the remaining data from the file. + %G_IO_STATUS_NORMAL on success. This function never returns %G_IO_STATUS_EOF. @@ -8359,6 +10275,7 @@ is %G_IO_STATUS_NORMAL. Reads a Unicode character from @channel. This function cannot be called on a channel with %NULL encoding. + a #GIOStatus @@ -8376,6 +10293,7 @@ This function cannot be called on a channel with %NULL encoding. Increments the reference count of a #GIOChannel. + the @channel that was passed in (since 2.6) @@ -8391,6 +10309,7 @@ This function cannot be called on a channel with %NULL encoding. Sets the current position in the #GIOChannel, similar to the standard library function fseek(). Use g_io_channel_seek_position() instead. + %G_IO_ERROR_NONE if the operation was successful. @@ -8415,6 +10334,7 @@ library function fseek(). Replacement for g_io_channel_seek() with the new API. + the status of the operation. @@ -8439,6 +10359,7 @@ library function fseek(). Sets the buffer size. + @@ -8473,6 +10394,7 @@ calls from the new and old APIs, if this is necessary for maintaining old code. The default state of the channel is buffered. + @@ -8494,6 +10416,7 @@ created by g_io_channel_new_file (), and %FALSE for all other channels. Setting this flag to %TRUE for a channel you have already closed can cause problems when the final reference to the #GIOChannel is dropped. + @@ -8544,6 +10467,7 @@ Channels which do not meet one of the above conditions cannot call g_io_channel_seek_position() with an offset of %G_SEEK_CUR, and, if they are "seekable", cannot call g_io_channel_write_chars() after calling one of the API "read" functions. + %G_IO_STATUS_NORMAL if the encoding was successfully set @@ -8561,6 +10485,7 @@ calling one of the API "read" functions. Sets the (writeable) flags in @channel to (@flags & %G_IO_FLAG_SET_MASK). + the status of the operation. @@ -8579,6 +10504,7 @@ calling one of the API "read" functions. This sets the string that #GIOChannel uses to determine where in the file a line break occurs. + @@ -8606,6 +10532,7 @@ where in the file a line break occurs. Close an IO channel. Any pending data to be written will be flushed if @flush is %TRUE. The channel will not be freed until the last reference is dropped using g_io_channel_unref(). + the status of the operation. @@ -8626,6 +10553,7 @@ last reference is dropped using g_io_channel_unref(). On Windows this function returns the file descriptor or socket of the #GIOChannel. + the file descriptor of the #GIOChannel. @@ -8639,6 +10567,7 @@ the #GIOChannel. Decrements the reference count of a #GIOChannel. + @@ -8652,6 +10581,7 @@ the #GIOChannel. Writes data to a #GIOChannel. Use g_io_channel_write_chars() instead. + %G_IO_ERROR_NONE if the operation was successful. @@ -8682,6 +10612,7 @@ On seekable channels with encodings other than %NULL or UTF-8, generic mixing of reading and writing is not allowed. A call to g_io_channel_write_chars () may only be made on a channel from which data has been read in the cases described in the documentation for g_io_channel_set_encoding (). + the status of the operation. @@ -8693,7 +10624,7 @@ cases described in the documentation for g_io_channel_set_encoding (). a buffer to write data from - + @@ -8715,6 +10646,7 @@ cases described in the documentation for g_io_channel_set_encoding (). Writes a Unicode character to @channel. This function cannot be called on a channel with %NULL encoding. + a #GIOStatus @@ -8732,6 +10664,7 @@ This function cannot be called on a channel with %NULL encoding. Converts an `errno` error number to a #GIOChannelError. + a #GIOChannelError error number, e.g. %G_IO_CHANNEL_ERROR_INVAL. @@ -8752,6 +10685,7 @@ This function cannot be called on a channel with %NULL encoding. Error codes returned by #GIOChannel operations. + File too large. @@ -8806,6 +10740,7 @@ event source. #GIOError is only used by the deprecated functions g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek(). + no error @@ -8823,6 +10758,7 @@ g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek(). Specifies properties of a #GIOChannel. Some of the flags can only be read with g_io_channel_get_flags(), but not changed with g_io_channel_set_flags(). + turns on append mode, corresponds to %O_APPEND (see the documentation of the UNIX open() syscall) @@ -8866,6 +10802,7 @@ g_io_channel_set_flags(). Specifies the type of function passed to g_io_add_watch() or g_io_add_watch_full(), which is called when the requested condition on a #GIOChannel is satisfied. + the function should return %FALSE if the event source should be removed @@ -8889,8 +10826,10 @@ on a #GIOChannel is satisfied. A table of functions used to handle different types of #GIOChannel in a generic way. + + @@ -8912,6 +10851,7 @@ in a generic way. + @@ -8933,6 +10873,7 @@ in a generic way. + @@ -8951,6 +10892,7 @@ in a generic way. + @@ -8963,6 +10905,7 @@ in a generic way. + @@ -8978,6 +10921,7 @@ in a generic way. + @@ -8990,6 +10934,7 @@ in a generic way. + @@ -9005,6 +10950,7 @@ in a generic way. + @@ -9018,6 +10964,7 @@ in a generic way. Stati returned by most of the #GIOFuncs functions. + An error occurred. @@ -9031,105 +10978,120 @@ in a generic way. Resource temporarily unavailable. - - - + + Checks whether a character is a directory +separator. It returns %TRUE for '/' on UNIX +machines and for '\' or '/' under Windows. + + + + a character + + + The name of the main group of a desktop entry file, as defined in the [Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec). Consult the specification for more details about the meanings of the keys below. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string list giving the available application actions. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of strings giving the categories in which the desktop entry should be shown in a menu. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized string giving the tooltip for the desktop entry. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean set to true if the application is D-Bus activatable. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string giving the command line to execute. It is only valid for desktop entries with the `Application` type. - - - + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized string giving the generic name of the desktop entry. - - - + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean stating whether the desktop entry has been deleted by the user. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized string giving the name of the icon to be displayed for the desktop entry. - - - + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of strings giving the MIME types supported by this desktop entry. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized string giving the specific name of the desktop entry. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of strings identifying the environments that should not display the desktop entry. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean stating whether the desktop entry should be shown in menus. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of strings identifying the environments that should display the desktop entry. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string containing the working directory to run the program in. It is only valid for desktop entries with the `Application` type. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean stating whether the application supports the [Startup Notification Protocol Specification](http://www.freedesktop.org/Standards/startup-notification-spec). + @@ -9137,6 +11099,7 @@ stating whether the application supports the identifying the WM class or name hint of a window that the application will create, which can be used to emulate Startup Notification with older applications. + @@ -9144,6 +11107,7 @@ older applications. stating whether the program should be run in a terminal window. It is only valid for desktop entries with the `Application` type. + @@ -9151,6 +11115,7 @@ It is only valid for desktop entries with the giving the file name of a binary on disk used to determine if the program is actually installed. It is only valid for desktop entries with the `Application` type. + @@ -9159,43 +11124,51 @@ giving the type of the desktop entry. Usually #G_KEY_FILE_DESKTOP_TYPE_APPLICATION, #G_KEY_FILE_DESKTOP_TYPE_LINK, or #G_KEY_FILE_DESKTOP_TYPE_DIRECTORY. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string giving the URL to access. It is only valid for desktop entries with the `Link` type. + A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string giving the version of the Desktop Entry Specification used for the desktop entry file. + The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop entries representing applications. + The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop entries representing directories. + The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop entries representing links to documents. + The GKeyFile struct contains only private data and should not be accessed directly. + Creates a new empty #GKeyFile object. Use g_key_file_load_from_file(), g_key_file_load_from_data(), g_key_file_load_from_dirs() or g_key_file_load_from_data_dirs() to read an existing key file. + an empty #GKeyFile. @@ -9205,6 +11178,7 @@ read an existing key file. Clears all keys and groups from @key_file, and decreases the reference count by 1. If the reference count reaches zero, frees the key file and all its allocated memory. + @@ -9223,6 +11197,7 @@ If @key cannot be found then %FALSE is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated with @key cannot be interpreted as a boolean then %FALSE is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + the value associated with the key as a boolean, or %FALSE if the key was not found or could not be parsed. @@ -9251,6 +11226,7 @@ If @key cannot be found then %NULL is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated with @key cannot be interpreted as booleans then %NULL is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + the values associated with the key as a list of booleans, or %NULL if the @@ -9285,7 +11261,10 @@ If @key is %NULL then @comment will be read from above @group_name. If both @key and @group_name are %NULL, then @comment will be read from above the first group in the file. -Note that the returned string includes the '#' comment markers. +Note that the returned string does not include the '#' comment markers, +but does include any whitespace after them (on each line). It includes +the line breaks between lines, but does not include the final line break. + a comment that should be freed with g_free() @@ -9313,6 +11292,7 @@ If @key cannot be found then 0.0 is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated with @key cannot be interpreted as a double then 0.0 is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + the value associated with the key as a double, or 0.0 if the key was not found or could not be parsed. @@ -9341,6 +11321,7 @@ If @key cannot be found then %NULL is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated with @key cannot be interpreted as doubles then %NULL is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + the values associated with the key as a list of doubles, or %NULL if the @@ -9373,6 +11354,7 @@ and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. Returns all groups in the key file loaded with @key_file. The array of returned groups will be %NULL-terminated, so @length may optionally be %NULL. + a newly-allocated %NULL-terminated array of strings. Use g_strfreev() to free it. @@ -9395,6 +11377,7 @@ The array of returned groups will be %NULL-terminated, so Returns the value associated with @key under @group_name as a signed 64-bit integer. This is similar to g_key_file_get_integer() but can return 64-bit results without truncation. + the value associated with the key as a signed 64-bit integer, or 0 if the key was not found or could not be parsed. @@ -9424,6 +11407,7 @@ If @key cannot be found then 0 is returned and @error is set to with @key cannot be interpreted as an integer, or is out of range for a #gint, then 0 is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + the value associated with the key as an integer, or 0 if the key was not found or could not be parsed. @@ -9453,6 +11437,7 @@ If @key cannot be found then %NULL is returned and @error is set to with @key cannot be interpreted as integers, or are out of range for #gint, then %NULL is returned and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE. + the values associated with the key as a list of integers, or %NULL if @@ -9487,6 +11472,7 @@ returned keys will be %NULL-terminated, so @length may optionally be %NULL. In the event that the @group_name cannot be found, %NULL is returned and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + a newly-allocated %NULL-terminated array of strings. Use g_strfreev() to free it. @@ -9509,15 +11495,55 @@ be found, %NULL is returned and @error is set to + + Returns the actual locale which the result of +g_key_file_get_locale_string() or g_key_file_get_locale_string_list() +came from. + +If calling g_key_file_get_locale_string() or +g_key_file_get_locale_string_list() with exactly the same @key_file, +@group_name, @key and @locale, the result of those functions will +have originally been tagged with the locale that is the result of +this function. + + + the locale from the file, or %NULL if the key was not + found or the entry in the file was was untranslated + + + + + a #GKeyFile + + + + a group name + + + + a key + + + + a locale identifier or %NULL + + + + Returns the value associated with @key under @group_name translated in the given @locale if available. If @locale is %NULL then the current locale is assumed. +If @locale is to be non-%NULL, or if the current locale will change over +the lifetime of the #GKeyFile, it must be loaded with +%G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales. + If @key cannot be found then %NULL is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated with @key cannot be interpreted or no suitable translation can be found then the untranslated value is returned. + a newly allocated string or %NULL if the specified key cannot be found. @@ -9547,12 +11573,17 @@ be found then the untranslated value is returned. translated in the given @locale if available. If @locale is %NULL then the current locale is assumed. +If @locale is to be non-%NULL, or if the current locale will change over +the lifetime of the #GKeyFile, it must be loaded with +%G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales. + If @key cannot be found then %NULL is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated with @key cannot be interpreted or no suitable translations can be found then the untranslated values are returned. The returned array is %NULL-terminated, so @length may optionally be %NULL. + a newly allocated %NULL-terminated string array or %NULL if the key isn't found. The string array should be freed @@ -9586,6 +11617,7 @@ be %NULL. Returns the name of the start group of the file. + The start group of the key file. @@ -9606,6 +11638,7 @@ In the event the key cannot be found, %NULL is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the event that the @group_name cannot be found, %NULL is returned and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + a newly allocated string or %NULL if the specified key cannot be found. @@ -9633,6 +11666,7 @@ In the event the key cannot be found, %NULL is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the event that the @group_name cannot be found, %NULL is returned and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + a %NULL-terminated string array or %NULL if the specified @@ -9664,6 +11698,7 @@ and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. Returns the value associated with @key under @group_name as an unsigned 64-bit integer. This is similar to g_key_file_get_integer() but can return large positive results without truncation. + the value associated with the key as an unsigned 64-bit integer, or 0 if the key was not found or could not be parsed. @@ -9692,6 +11727,7 @@ In the event the key cannot be found, %NULL is returned and @error is set to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the event that the @group_name cannot be found, %NULL is returned and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. + a newly allocated string or %NULL if the specified key cannot be found. @@ -9714,6 +11750,7 @@ and @error is set to #G_KEY_FILE_ERROR_GROUP_NOT_FOUND. Looks whether the key file has the group @group_name. + %TRUE if @group_name is a part of @key_file, %FALSE otherwise. @@ -9741,6 +11778,7 @@ whether it is not %NULL to see if an error occurred. Language bindings should use g_key_file_get_value() to test whether or not a key exists. + %TRUE if @key is a part of @group_name, %FALSE otherwise @@ -9763,6 +11801,7 @@ or not a key exists. Loads a key file from the data in @bytes into an empty #GKeyFile structure. If the object cannot be created then %error is set to a #GKeyFileError. + %TRUE if a key file could be loaded, %FALSE otherwise @@ -9785,6 +11824,7 @@ If the object cannot be created then %error is set to a #GKeyFileError. Loads a key file from memory into an empty #GKeyFile structure. If the object cannot be created then %error is set to a #GKeyFileError. + %TRUE if a key file could be loaded, %FALSE otherwise @@ -9814,6 +11854,7 @@ returned from g_get_user_data_dir() and g_get_system_data_dirs(), loads the file into @key_file and returns the file's full path in @full_path. If the file could not be loaded then an %error is set to either a #GFileError or #GKeyFileError. + %TRUE if a key file could be loaded, %FALSE othewise @@ -9825,7 +11866,7 @@ set to either a #GFileError or #GKeyFileError. a relative path to a filename to open and parse - + return location for a string containing the full path @@ -9848,6 +11889,7 @@ If the file could not be found in any of the @search_dirs, the file is found but the OS returns an error when opening or reading the file, a %G_FILE_ERROR is returned. If there is a problem parsing the file, a %G_KEY_FILE_ERROR is returned. + %TRUE if a key file could be loaded, %FALSE otherwise @@ -9859,11 +11901,11 @@ file, a %G_FILE_ERROR is returned. If there is a problem parsing the file, a a relative path to a filename to open and parse - + %NULL-terminated array of directories to search - + @@ -9887,6 +11929,7 @@ If the OS returns an error when opening or reading the file, a This function will never return a %G_KEY_FILE_ERROR_NOT_FOUND error. If the @file is not found, %G_FILE_ERROR_NOENT is returned. + %TRUE if a key file could be loaded, %FALSE otherwise @@ -9898,7 +11941,7 @@ This function will never return a %G_KEY_FILE_ERROR_NOT_FOUND error. If the the path of a filename to load, in the GLib filename encoding - + flags from #GKeyFileFlags @@ -9908,6 +11951,7 @@ This function will never return a %G_KEY_FILE_ERROR_NOT_FOUND error. If the Increases the reference count of @key_file. + the same @key_file. @@ -9924,6 +11968,7 @@ This function will never return a %G_KEY_FILE_ERROR_NOT_FOUND error. If the If @key is %NULL then @comment will be removed above @group_name. If both @key and @group_name are %NULL, then @comment will be removed above the first group in the file. + %TRUE if the comment was removed, %FALSE otherwise @@ -9946,6 +11991,7 @@ be removed above the first group in the file. Removes the specified group, @group_name, from the key file. + %TRUE if the group was removed, %FALSE otherwise @@ -9963,6 +12009,7 @@ from the key file. Removes @key in @group_name from the key file. + %TRUE if the key was removed, %FALSE otherwise @@ -9988,6 +12035,7 @@ g_file_set_contents(). This function can fail for any of the reasons that g_file_set_contents() may fail. + %TRUE if successful, else %FALSE with @error set @@ -10006,6 +12054,7 @@ g_file_set_contents() may fail. Associates a new boolean value with @key under @group_name. If @key cannot be found then it is created. + @@ -10032,6 +12081,7 @@ If @key cannot be found then it is created. Associates a list of boolean values with @key under @group_name. If @key cannot be found then it is created. If @group_name is %NULL, the start_group is used. + @@ -10050,7 +12100,7 @@ If @group_name is %NULL, the start_group is used. an array of boolean values - + @@ -10069,6 +12119,7 @@ written above the first group in the file. Note that this function prepends a '#' comment marker to each line of @comment. + %TRUE if the comment was written, %FALSE otherwise @@ -10095,6 +12146,7 @@ each line of @comment. Associates a new double value with @key under @group_name. If @key cannot be found then it is created. + @@ -10112,7 +12164,7 @@ If @key cannot be found then it is created. - an double value + a double value @@ -10120,6 +12172,7 @@ If @key cannot be found then it is created. Associates a list of double values with @key under @group_name. If @key cannot be found then it is created. + @@ -10138,7 +12191,7 @@ If @key cannot be found then it is created. an array of double values - + @@ -10151,6 +12204,7 @@ If @key cannot be found then it is created. Associates a new integer value with @key under @group_name. If @key cannot be found then it is created. + @@ -10176,6 +12230,7 @@ If @key cannot be found then it is created. Associates a new integer value with @key under @group_name. If @key cannot be found then it is created. + @@ -10201,6 +12256,7 @@ If @key cannot be found then it is created. Associates a list of integer values with @key under @group_name. If @key cannot be found then it is created. + @@ -10219,7 +12275,7 @@ If @key cannot be found then it is created. an array of integer values - + @@ -10233,6 +12289,7 @@ If @key cannot be found then it is created. Sets the character which is used to separate values in lists. Typically ';' or ',' are used as separators. The default list separator is ';'. + @@ -10250,6 +12307,7 @@ as separators. The default list separator is ';'. Associates a string value for @key and @locale under @group_name. If the translation for @key cannot be found then it is created. + @@ -10280,6 +12338,7 @@ If the translation for @key cannot be found then it is created. Associates a list of string values for @key and @locale under @group_name. If the translation for @key cannot be found then it is created. + @@ -10302,8 +12361,8 @@ it is created. a %NULL-terminated array of locale string values - - + + @@ -10318,6 +12377,7 @@ If @key cannot be found then it is created. If @group_name cannot be found then it is created. Unlike g_key_file_set_value(), this function handles characters that need escaping, such as newlines. + @@ -10344,6 +12404,7 @@ that need escaping, such as newlines. Associates a list of string values for @key under @group_name. If @key cannot be found then it is created. If @group_name cannot be found then it is created. + @@ -10362,7 +12423,7 @@ If @group_name cannot be found then it is created. an array of string values - + @@ -10375,6 +12436,7 @@ If @group_name cannot be found then it is created. Associates a new integer value with @key under @group_name. If @key cannot be found then it is created. + @@ -10404,6 +12466,7 @@ If @key cannot be found then it is created. If @group_name cannot be found then it is created. To set an UTF-8 string which may contain characters that need escaping (such as newlines or spaces), use g_key_file_set_string(). + @@ -10431,6 +12494,7 @@ g_key_file_set_string(). Note that this function never reports an error, so it is safe to pass %NULL as @error. + a newly allocated string holding the contents of the #GKeyFile @@ -10451,6 +12515,7 @@ so it is safe to pass %NULL as @error. Decreases the reference count of @key_file by 1. If the reference count reaches zero, frees the key file and all its allocated memory. + @@ -10469,6 +12534,7 @@ reaches zero, frees the key file and all its allocated memory. Error codes returned by key file parsing. + the text being parsed was in an unknown encoding @@ -10491,6 +12557,7 @@ reaches zero, frees the key file and all its allocated memory. Flags which influence the parsing. + No flags, default behaviour @@ -10507,55 +12574,156 @@ reaches zero, frees the key file and all its allocated memory. written back. + + Hints the compiler that the expression is likely to evaluate to +a true value. The compiler may use this information for optimizations. + +|[<!-- language="C" --> +if (G_LIKELY (random () != 1)) + g_print ("not one"); +]| + + + + the expression + + + Specifies one of the possible types of byte order. See #G_BYTE_ORDER. + The natural logarithm of 10. + The natural logarithm of 2. + + + Works like g_mutex_lock(), but for a lock defined with +#G_LOCK_DEFINE. + + + + the name of the lock + + + + + The #G_LOCK_ macros provide a convenient interface to #GMutex. +#G_LOCK_DEFINE defines a lock. It can appear in any place where +variable definitions may appear in programs, i.e. in the first block +of a function or outside of functions. The @name parameter will be +mangled to get the name of the #GMutex. This means that you +can use names of existing variables as the parameter - e.g. the name +of the variable you intend to protect with the lock. Look at our +give_me_next_number() example using the #G_LOCK macros: + +Here is an example for using the #G_LOCK convenience macros: +|[<!-- language="C" --> + G_LOCK_DEFINE (current_number); + + int + give_me_next_number (void) + { + static int current_number = 0; + int ret_val; + + G_LOCK (current_number); + ret_val = current_number = calc_next_number (current_number); + G_UNLOCK (current_number); + + return ret_val; + } +]| + + + + the name of the lock + + + + + This works like #G_LOCK_DEFINE, but it creates a static object. + + + + the name of the lock + + + + + This declares a lock, that is defined with #G_LOCK_DEFINE in another +module. + + + + the name of the lock + + + + + + + + + + Multiplying the base 2 exponent by this number yields the base 10 exponent. + - Defines the log domain. + Defines the log domain. See [Log Domains](#log-domains). Libraries should define this so that any messages which they log can be differentiated from messages from other libraries and application code. But be careful not to define it in any public header files. -For example, GTK+ uses this in its Makefile.am: +Log domains must be unique, and it is recommended that they are the +application or library name, optionally followed by a hyphen and a sub-domain +name. For example, `bloatpad` or `bloatpad-io`. + +If undefined, it defaults to the default %NULL (or `""`) log domain; this is +not advisable, as it cannot be filtered against using the `G_MESSAGES_DEBUG` +environment variable. + +For example, GTK+ uses this in its `Makefile.am`: |[ AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\" ]| -Applications can choose to leave it as the default %NULL (or "") +Applications can choose to leave it as the default %NULL (or `""`) domain. However, defining the domain offers the same advantages as above. + - + GLib log levels that are considered fatal by default. This is not used if structured logging is enabled; see [Using Structured Logging][using-structured-logging]. + Log levels below 1<<G_LOG_LEVEL_USER_SHIFT are used by GLib. Higher bits can be used for user-defined log levels. + The #GList struct is used for each element in a doubly-linked list. + holds the element's data, which can be a pointer to any kind of data, or any integer value using the @@ -10578,6 +12746,7 @@ Higher bits can be used for user-defined log levels. Allocates space for one #GList element. It is called by g_list_append(), g_list_prepend(), g_list_insert() and g_list_insert_sorted() and so is rarely used on its own. + a pointer to the newly-allocated #GList element @@ -10608,6 +12777,7 @@ string_list = g_list_append (string_list, "second"); number_list = g_list_append (number_list, GINT_TO_POINTER (27)); number_list = g_list_append (number_list, GINT_TO_POINTER (14)); ]| + either @list or the new start of the #GList if @list was %NULL @@ -10638,6 +12808,7 @@ The following example moves an element to the top of the list: list = g_list_remove_link (list, llink); list = g_list_concat (llink, list); ]| + the start of the new #GList, which equals @list1 if not %NULL @@ -10667,6 +12838,7 @@ Note that this is a "shallow" copy. If the list elements consist of pointers to data, the pointers are copied but the actual data is not. See g_list_copy_deep() if you need to copy the data as well. + the start of the new list that holds the same data as @list @@ -10690,8 +12862,10 @@ a copy of each list element, in addition to copying the list container itself. @func, as a #GCopyFunc, takes two arguments, the data to be copied -and a @user_data pointer. It's safe to pass %NULL as user_data, -if the copy function takes only one argument. +and a @user_data pointer. On common processor architectures, it's safe to +pass %NULL as @user_data if the copy function takes only one argument. You +may get compiler warnings from this though if compiling with GCC’s +`-Wcast-function-type` warning. For instance, if @list holds a list of GObjects, you can do: |[<!-- language="C" --> @@ -10702,6 +12876,7 @@ And, to entirely free the new list, you could do: |[<!-- language="C" --> g_list_free_full (another_list, g_object_unref); ]| + the start of the new list that holds a full copy of @list, use g_list_free_full() to free it @@ -10730,6 +12905,7 @@ g_list_free_full (another_list, g_object_unref); Removes the node link_ from the list and frees it. Compare this to g_list_remove_link() which removes the node without freeing it. + the (possibly changed) start of the #GList @@ -10753,6 +12929,7 @@ without freeing it. Finds the element in a #GList which contains the given data. + the found #GList element, or %NULL if it is not found @@ -10779,6 +12956,7 @@ the given function which should return 0 when the desired element is found. The function takes two #gconstpointer arguments, the #GList element's data as the first argument and the given user data. + the found #GList element, or %NULL if it is not found @@ -10805,6 +12983,7 @@ given user data. Gets the first element in a #GList. + the first element in the #GList, or %NULL if the #GList has no elements @@ -10822,7 +13001,11 @@ given user data. - Calls a function for each element of a #GList. + Calls a function for each element of a #GList. + +It is safe for @func to remove the element from @list, but it must +not modify any part of the list after that element. + @@ -10848,7 +13031,15 @@ given user data. The freed elements are returned to the slice allocator. If list elements contain dynamically-allocated memory, you should -either use g_list_free_full() or free them manually first. +either use g_list_free_full() or free them manually first. + +It can be combined with g_steal_pointer() to ensure the list head pointer +is not left dangling: +|[<!-- language="C" --> +GList *list_of_borrowed_things = …; /<!-- -->* (transfer container) *<!-- -->/ +g_list_free (g_steal_pointer (&list_of_borrowed_things)); +]| + @@ -10867,6 +13058,7 @@ previous elements in the list, so you should not call this function on an element that is currently part of a list. It is usually used after g_list_remove_link(). + @@ -10881,7 +13073,20 @@ It is usually used after g_list_remove_link(). Convenience method, which frees all the memory used by a #GList, -and calls @free_func on every element's data. +and calls @free_func on every element's data. + +@free_func must not modify the list (eg, by removing the freed +element from it). + +It can be combined with g_steal_pointer() to ensure the list head pointer +is not left dangling ­— this also has the nice property that the head pointer +is cleared before any of the list elements are freed, to prevent double frees +from @free_func: +|[<!-- language="C" --> +GList *list_of_owned_things = …; /<!-- -->* (transfer full) (element-type GObject) *<!-- -->/ +g_list_free_full (g_steal_pointer (&list_of_owned_things), g_object_unref); +]| + @@ -10901,6 +13106,7 @@ and calls @free_func on every element's data. Gets the position of the element containing the given data (starting from 0). + the index of the element containing the data, or -1 if the data is not found @@ -10921,6 +13127,7 @@ the given data (starting from 0). Inserts a new element into the list at the given position. + the (possibly changed) start of the #GList @@ -10948,6 +13155,7 @@ the given data (starting from 0). Inserts a new element into the list before the given position. + the (possibly changed) start of the #GList @@ -10974,6 +13182,38 @@ the given data (starting from 0). + + Inserts @link_ into the list before the given position. + + + the (possibly changed) start of the #GList + + + + + + + a pointer to a #GList, this must point to the top of the list + + + + + + the list element before which the new element + is inserted or %NULL to insert at the end of the list + + + + + + the list element to be added, which must not be part of + any other list + + + + + + Inserts a new element into the list, using the given comparison function to determine its position. @@ -10982,6 +13222,7 @@ If you are adding many new elements to a list, and the number of new elements is much larger than the length of the list, use g_list_prepend() to add the new items and sort the list afterwards with g_list_sort(). + the (possibly changed) start of the #GList @@ -11016,6 +13257,7 @@ If you are adding many new elements to a list, and the number of new elements is much larger than the length of the list, use g_list_prepend() to add the new items and sort the list afterwards with g_list_sort(). + the (possibly changed) start of the #GList @@ -11048,6 +13290,7 @@ with g_list_sort(). Gets the last element in a #GList. + the last element in the #GList, or %NULL if the #GList has no elements @@ -11071,6 +13314,7 @@ This function iterates over the whole list to count its elements. Use a #GQueue instead of a GList if you regularly need the number of items. To check whether the list is non-empty, it is faster to check @list against %NULL. + the number of elements in the #GList @@ -11090,6 +13334,7 @@ of items. To check whether the list is non-empty, it is faster to check This iterates over the list until it reaches the @n-th position. If you intend to iterate over every element, it is better to use a for-loop as described in the #GList introduction. + the element, or %NULL if the position is off the end of the #GList @@ -11116,6 +13361,7 @@ described in the #GList introduction. This iterates over the list until it reaches the @n-th position. If you intend to iterate over every element, it is better to use a for-loop as described in the #GList introduction. + the element's data, or %NULL if the position is off the end of the #GList @@ -11136,6 +13382,7 @@ described in the #GList introduction. Gets the element @n places before @list. + the element, or %NULL if the position is off the end of the #GList @@ -11159,6 +13406,7 @@ described in the #GList introduction. Gets the position of the given element in the #GList (starting from 0). + the position of the element in the #GList, or -1 if the element is not found @@ -11195,6 +13443,7 @@ list = g_list_prepend (list, "first"); Do not use this function to prepend a new element to a different element than the start of the list. Use g_list_insert_before() instead. + a pointer to the newly prepended element, which is the new start of the #GList @@ -11219,6 +13468,7 @@ element than the start of the list. Use g_list_insert_before() instead. Removes an element from a #GList. If two elements contain the same data, only the first is removed. If none of the elements contain the data, the #GList is unchanged. + the (possibly changed) start of the #GList @@ -11243,6 +13493,7 @@ If none of the elements contain the data, the #GList is unchanged. Returns the new head of the list. Contrast with g_list_remove() which removes only the first node matching the given data. + the (possibly changed) start of the #GList @@ -11275,6 +13526,7 @@ list = g_list_remove_link (list, llink); free_some_data_that_may_access_the_list_again (llink->data); g_list_free (llink); ]| + the (possibly changed) start of the #GList @@ -11299,6 +13551,7 @@ g_list_free (llink); Reverses a #GList. It simply switches the next and prev pointers of each element. + the start of the reversed #GList @@ -11317,6 +13570,7 @@ It simply switches the next and prev pointers of each element. Sorts a #GList using the given comparison function. The algorithm used is a stable sort. + the (possibly changed) start of the #GList @@ -11343,6 +13597,7 @@ used is a stable sort. Like g_list_sort(), but the comparison function accepts a user data argument. + the (possibly changed) start of the #GList @@ -11375,6 +13630,7 @@ Log fields may contain arbitrary values, including binary with embedded nul bytes. If the field contains a string, the string must be UTF-8 encoded and have a trailing nul byte. Otherwise, @length must be set to a non-negative value. + field name (UTF-8 string) @@ -11399,6 +13655,7 @@ log handler is changed. This is not used if structured logging is enabled; see [Using Structured Logging][using-structured-logging]. + @@ -11427,6 +13684,7 @@ This is not used if structured logging is enabled; see It is possible to change how GLib treats messages of the various levels using g_log_set_handler() and g_log_set_fatal_mask(). + internal flag @@ -11478,6 +13736,7 @@ error handling the message (for example, if the writer function is meant to send messages to a remote logging server and there is a network error), it should return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be chained and fall back to simpler handlers in case of failure. + %G_LOG_WRITER_HANDLED if the log entry was handled successfully; %G_LOG_WRITER_UNHANDLED otherwise @@ -11490,7 +13749,7 @@ chained and fall back to simpler handlers in case of failure. fields forming the message - + @@ -11511,6 +13770,7 @@ handling it (and hence a fallback writer should be used). If a #GLogWriterFunc ignores a log entry, it should return %G_LOG_WRITER_HANDLED. + Log writer has handled the log entry. @@ -11524,80 +13784,98 @@ If a #GLogWriterFunc ignores a log entry, it should return Like #glib_major_version, but from the headers used at application compile time, rather than from the library linked against at application run time. + The maximum value which can be held in a #gint16. + The maximum value which can be held in a #gint32. + The maximum value which can be held in a #gint64. + The maximum value which can be held in a #gint8. + The maximum value which can be held in a #guint16. + The maximum value which can be held in a #guint32. + The maximum value which can be held in a #guint64. + The maximum value which can be held in a #guint8. + - + The micro version number of the GLib library. Like #gtk_micro_version, but from the headers used at application compile time, rather than from the library linked against at application run time. + The minimum value which can be held in a #gint16. + The minimum value which can be held in a #gint32. + The minimum value which can be held in a #gint64. + The minimum value which can be held in a #gint8. + - + The minor version number of the GLib library. Like #gtk_minor_version, but from the headers used at application compile time, rather than from the library linked against at application run time. + + The `GMainContext` struct is an opaque data type representing a set of sources to be handled in a main loop. + Creates a new #GMainContext structure. + the new #GMainContext @@ -11614,6 +13892,7 @@ is called as many times as g_main_context_acquire(). You must be the owner of a context before you can call g_main_context_prepare(), g_main_context_query(), g_main_context_check(), g_main_context_dispatch(). + %TRUE if the operation succeeded, and this thread is now the owner of @context. @@ -11630,6 +13909,7 @@ g_main_context_check(), g_main_context_dispatch(). Adds a file descriptor to the set of file descriptors polled for this context. This will very seldom be used directly. Instead a typical event source will use g_source_add_unix_fd() instead. + @@ -11656,6 +13936,7 @@ a typical event source will use g_source_add_unix_fd() instead. You must have successfully acquired the context with g_main_context_acquire() before you may call this function. + %TRUE if some sources are ready to be dispatched. @@ -11687,6 +13968,7 @@ g_main_context_acquire() before you may call this function. You must have successfully acquired the context with g_main_context_acquire() before you may call this function. + @@ -11701,6 +13983,7 @@ g_main_context_acquire() before you may call this function. Finds a source with the given source functions and user data. If multiple sources exist with the same source function and user data, the first one found will be returned. + the source, if one was found, otherwise %NULL @@ -11723,7 +14006,7 @@ the first one found will be returned. Finds a #GSource given a pair of context and ID. -It is a programmer error to attempt to lookup a non-existent source. +It is a programmer error to attempt to look up a non-existent source. More specifically: source IDs can be reissued after a source has been destroyed and therefore it is never valid to use this function with a @@ -11733,6 +14016,7 @@ idle may already have run and been removed by the time this function is called on its (now invalid) source ID. This source ID may have been reissued, leading to the operation being performed against the wrong source. + the #GSource @@ -11752,6 +14036,7 @@ wrong source. Finds a source with the given user data for the callback. If multiple sources exist with the same user data, the first one found will be returned. + the source, if one was found, otherwise %NULL @@ -11769,6 +14054,7 @@ one found will be returned. Gets the poll function set by g_main_context_set_poll_func(). + the poll function @@ -11802,6 +14088,7 @@ g_main_context_invoke_full(). Note that, as with normal idle functions, @function should probably return %FALSE. If it returns %TRUE, it will be continuously run in a loop (and may prevent this call from returning). + @@ -11825,11 +14112,12 @@ loop (and may prevent this call from returning). invocation of @function. This function is the same as g_main_context_invoke() except that it -lets you specify the priority incase @function ends up being +lets you specify the priority in case @function ends up being scheduled as an idle and also lets you give a #GDestroyNotify for @data. @notify should not assume that it is called from any particular thread or with any particular context acquired. + @@ -11861,6 +14149,7 @@ thread or with any particular context acquired. ownership of this #GMainContext. This is useful to know before waiting on another thread that may be blocking to get ownership of @context. + %TRUE if current thread is owner of @context. @@ -11885,6 +14174,7 @@ given moment without further waiting. Note that even when @may_block is %TRUE, it is still possible for g_main_context_iteration() to return %FALSE, since the wait may be interrupted for other reasons than an event source becoming ready. + %TRUE if events were dispatched. @@ -11902,6 +14192,7 @@ be interrupted for other reasons than an event source becoming ready. Checks if any sources have pending events for the given context. + %TRUE if events are pending. @@ -11916,6 +14207,7 @@ be interrupted for other reasons than an event source becoming ready. Pops @context off the thread-default context stack (verifying that it was on the top of the stack). + @@ -11932,6 +14224,7 @@ for polling is determined by calling g_main_context_query (). You must have successfully acquired the context with g_main_context_acquire() before you may call this function. + %TRUE if some source is ready to be dispatched prior to polling. @@ -11942,7 +14235,7 @@ g_main_context_acquire() before you may call this function. a #GMainContext - + location to store priority of highest priority source already ready. @@ -11988,6 +14281,7 @@ started while the non-default context is active. Beware that libraries that predate this function may not correctly handle being used from a thread with a thread-default context. Eg, see g_file_supports_thread_contexts(). + @@ -12003,6 +14297,7 @@ see g_file_supports_thread_contexts(). You must have successfully acquired the context with g_main_context_acquire() before you may call this function. + the number of records actually stored in @fds, or, if more than @n_fds records need to be stored, the number @@ -12037,6 +14332,7 @@ g_main_context_acquire() before you may call this function. Increases the reference count on a #GMainContext object by one. + the @context that was passed in (since 2.6) @@ -12053,6 +14349,7 @@ g_main_context_acquire() before you may call this function. with g_main_context_acquire(). If the context was acquired multiple times, the ownership will be released only when g_main_context_release() is called as many times as it was acquired. + @@ -12066,6 +14363,7 @@ is called as many times as it was acquired. Removes file descriptor from the set of file descriptors to be polled for a particular context. + @@ -12088,6 +14386,7 @@ poll() isn't available). This function could possibly be used to integrate the GLib event loop with an external event loop. + @@ -12105,6 +14404,7 @@ loop with an external event loop. Decreases the reference count on a #GMainContext object by one. If the result is zero, free the context and free all associated memory. + @@ -12115,12 +14415,14 @@ the result is zero, free the context and free all associated memory. - + Tries to become the owner of the specified context, as with g_main_context_acquire(). But if another thread is the owner, atomically drop @mutex and wait on @cond until that owner releases ownership or until @cond is signaled, then try again (once) to become the owner. + Use g_main_context_is_owner() and separate locking instead. + %TRUE if the operation succeeded, and this thread is now the owner of @context. @@ -12170,6 +14472,7 @@ Then in a thread: if (g_atomic_int_dec_and_test (&tasks_remaining)) g_main_context_wakeup (NULL); ]| + @@ -12185,6 +14488,7 @@ Then in a thread: used for main loop functions when a main loop is not explicitly specified, and corresponds to the "main" main loop. See also g_main_context_get_thread_default(). + the global default main context. @@ -12202,6 +14506,7 @@ always return %NULL if you are running in the default thread.) If you need to hold a reference on the context, use g_main_context_ref_thread_default() instead. + the thread-default #GMainContext, or %NULL if the thread-default context is the global default context. @@ -12215,6 +14520,7 @@ it with g_main_context_ref(). In addition, unlike g_main_context_get_thread_default(), if the thread-default context is the global default context, this will return that #GMainContext (with a ref added to it) rather than returning %NULL. + the thread-default #GMainContext. Unref with g_main_context_unref() when you are done with it. @@ -12225,8 +14531,10 @@ is the global default context, this will return that #GMainContext The `GMainLoop` struct is an opaque data type representing the main event loop of a GLib or GTK+ application. + Creates a new #GMainLoop structure. + a new #GMainLoop. @@ -12246,6 +14554,7 @@ is not very important since calling g_main_loop_run() will set this to Returns the #GMainContext of @loop. + the #GMainContext of @loop @@ -12259,6 +14568,7 @@ is not very important since calling g_main_loop_run() will set this to Checks to see if the main loop is currently being run via g_main_loop_run(). + %TRUE if the mainloop is currently being run. @@ -12276,6 +14586,7 @@ for the loop will return. Note that sources that have already been dispatched when g_main_loop_quit() is called will still be executed. + @@ -12288,6 +14599,7 @@ g_main_loop_quit() is called will still be executed. Increases the reference count on a #GMainLoop object by one. + @loop @@ -12304,6 +14616,7 @@ g_main_loop_quit() is called will still be executed. If this is called for the thread of the loop's #GMainContext, it will process events from the loop, otherwise it will simply wait. + @@ -12317,6 +14630,7 @@ simply wait. Decreases the reference count on a #GMainLoop object by one. If the result is zero, free the loop and free all associated memory. + @@ -12332,6 +14646,7 @@ the result is zero, free the loop and free all associated memory. The #GMappedFile represents a file mapping created with g_mapped_file_new(). It has only private members and should not be accessed directly. + Maps a file into memory. On UNIX, this is using the mmap() function. @@ -12349,6 +14664,7 @@ If @filename is the name of an empty, regular file, the function will successfully return an empty #GMappedFile. In other cases of size 0 (e.g. device files such as /dev/null), @error will be set to the #GFileError value #G_FILE_ERROR_INVAL. + a newly allocated #GMappedFile which must be unref'd with g_mapped_file_unref(), or %NULL if the mapping failed. @@ -12358,7 +14674,7 @@ to the #GFileError value #G_FILE_ERROR_INVAL. The path of the file to load, in the GLib filename encoding - + whether the mapping should be writable @@ -12378,6 +14694,7 @@ Note that modifications of the underlying file might affect the contents of the #GMappedFile. Therefore, mapping should only be used if the file will not be modified, or if all modifications of the file are done atomically (e.g. using g_file_set_contents()). + a newly allocated #GMappedFile which must be unref'd with g_mapped_file_unref(), or %NULL if the mapping failed. @@ -12398,6 +14715,7 @@ atomically (e.g. using g_file_set_contents()). This call existed before #GMappedFile had refcounting and is currently exactly the same as g_mapped_file_unref(). Use g_mapped_file_unref() instead. + @@ -12412,6 +14730,7 @@ exactly the same as g_mapped_file_unref(). Creates a new #GBytes which references the data mapped from @file. The mapped contents of the file must not be modified after creating this bytes object, because a #GBytes should be immutable. + A newly allocated #GBytes referencing data from @file @@ -12431,6 +14750,7 @@ Note that the contents may not be zero-terminated, even if the #GMappedFile is backed by a text file. If the file is empty then %NULL is returned. + the contents of @file, or %NULL. @@ -12444,6 +14764,7 @@ If the file is empty then %NULL is returned. Returns the length of the contents of a #GMappedFile. + the length of the contents of @file. @@ -12458,6 +14779,7 @@ If the file is empty then %NULL is returned. Increments the reference count of @file by one. It is safe to call this function from any thread. + the passed in #GMappedFile. @@ -12476,6 +14798,7 @@ drops to 0, unmaps the buffer of @file and frees it. It is safe to call this function from any thread. Since 2.22 + @@ -12494,6 +14817,7 @@ bitwise OR the type with the flag %G_MARKUP_COLLECT_OPTIONAL. It is likely that this enum will be extended in the future to support other types. + used to terminate the list of attributes to collect @@ -12530,6 +14854,7 @@ support other types. Error codes returned by markup parsing. + text being parsed was not valid UTF-8 @@ -12562,12 +14887,14 @@ you expect to contain marked-up text. See g_markup_parse_context_new(), #GMarkupParser, and so on for more details. + Creates a new parse context. A parse context is used to parse marked-up documents. You can feed any number of documents into a context, as long as no errors occur; once an error occurs, the parse context can't continue to parse text (you have to free it and create a new parse context). + a new #GMarkupParseContext @@ -12598,6 +14925,7 @@ fed into the parse context with g_markup_parse_context_parse(). This function reports an error if the document isn't complete, for example if elements are still open. + %TRUE on success, %FALSE if an error was set @@ -12614,6 +14942,7 @@ for example if elements are still open. This function can't be called from inside one of the #GMarkupParser functions or while a subparser is pushed. + @@ -12630,6 +14959,7 @@ This function can't be called from inside one of the If called from the start_element or end_element handlers this will give the element_name as passed to those functions. For the parent elements, see g_markup_parse_context_get_element_stack(). + the name of the currently open element, or %NULL @@ -12653,6 +14983,7 @@ This function is intended to be used in the start_element and end_element handlers where g_markup_parse_context_get_element() would merely return the name of the element that is being processed. + the element stack, which must not be modified @@ -12671,6 +15002,7 @@ processed. that line. Intended for use in error messages; there are no strict semantics for what constitutes the "current" line number other than "the best number we could come up with for error messages." + @@ -12679,11 +15011,11 @@ semantics for what constitutes the "current" line number other than a #GMarkupParseContext - + return location for a line number, or %NULL - + return location for a char-on-line number, or %NULL @@ -12695,6 +15027,7 @@ semantics for what constitutes the "current" line number other than This will either be the user_data that was provided to g_markup_parse_context_new() or to the most recent call of g_markup_parse_context_push(). + the provided user_data. The returned data belongs to the markup context and will be freed when @@ -12719,6 +15052,7 @@ connection or file, you feed each received chunk of data into this function, aborting the process if an error occurs. Once an error is reported, no further data may be fed to the #GMarkupParseContext; all errors are fatal. + %FALSE if an error occurred, %TRUE on success @@ -12752,6 +15086,7 @@ This function is not intended to be directly called by users interested in invoking subparsers. Instead, it is intended to be used by the subparsers themselves to implement a higher-level interface. + the user data passed to g_markup_parse_context_push() @@ -12878,6 +15213,7 @@ static void end_element (context, element_name, ...) // else, handle other tags... } ]| + @@ -12898,6 +15234,7 @@ static void end_element (context, element_name, ...) Increases the reference count of @context. + the same @context @@ -12912,6 +15249,7 @@ static void end_element (context, element_name, ...) Decreases the reference count of @context. When its reference count drops to 0, it is freed. + @@ -12925,6 +15263,7 @@ drops to 0, it is freed. Flags that affect the behaviour of the parser. + flag you should not use @@ -12957,8 +15296,10 @@ can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, errors are intended to be set from these callbacks. If you set an error from a callback, g_markup_parse_context_parse() will report that error back to its caller. + + @@ -12983,6 +15324,7 @@ back to its caller. + @@ -13001,6 +15343,7 @@ back to its caller. + @@ -13022,6 +15365,7 @@ back to its caller. + @@ -13043,6 +15387,7 @@ back to its caller. + @@ -13063,6 +15408,7 @@ back to its caller. A GMatchInfo is an opaque struct used to return information about matches. + Returns a new string containing the text in @string_to_expand with references and escape sequences expanded. References refer to the last @@ -13081,6 +15427,7 @@ pattern and '\n' merely will be replaced with \n character, while to expand "\0" (whole match) one needs the result of a match. Use g_regex_check_replacement() to find out whether @string_to_expand contains references. + the expanded string, or %NULL if an error occurred @@ -13113,6 +15460,7 @@ substring. Substrings are matched in reverse order of length, so The string is fetched from the string passed to the match function, so you cannot call this function after freeing the string. + The matched substring, or %NULL if an error occurred. You have to free the string yourself @@ -13146,6 +15494,7 @@ so the first one is the longest match. The strings are fetched from the string passed to the match function, so you cannot call this function after freeing the string. + a %NULL-terminated array of gchar * pointers. It must be freed using g_strfreev(). If the previous @@ -13170,6 +15519,7 @@ then an empty string is returned. The string is fetched from the string passed to the match function, so you cannot call this function after freeing the string. + The matched substring, or %NULL if an error occurred. You have to free the string yourself @@ -13192,6 +15542,7 @@ so you cannot call this function after freeing the string. If @name is a valid sub pattern name but it didn't match anything (e.g. sub pattern "X", matching "b" against "(?P<X>a)?b") then @start_pos and @end_pos are set to -1 and %TRUE is returned. + %TRUE if the position was fetched, %FALSE otherwise. If the position cannot be fetched, @start_pos and @end_pos @@ -13233,6 +15584,7 @@ g_regex_match_all() or g_regex_match_all_full(), the retrieved position is not that of a set of parentheses but that of a matched substring. Substrings are matched in reverse order of length, so 0 is the longest match. + %TRUE if the position was fetched, %FALSE otherwise. If the position cannot be fetched, @start_pos and @end_pos are left @@ -13263,6 +15615,7 @@ substring. Substrings are matched in reverse order of length, so If @match_info is not %NULL, calls g_match_info_unref(); otherwise does nothing. + @@ -13282,6 +15635,7 @@ If the last match was obtained using the DFA algorithm, that is using g_regex_match_all() or g_regex_match_all_full(), the retrieved count is not that of the number of capturing parentheses but that of the number of matched substrings. + Number of matched substrings, or -1 if an error occurred @@ -13297,6 +15651,7 @@ the number of matched substrings. Returns #GRegex object used in @match_info. It belongs to Glib and must not be freed. Use g_regex_ref() if you need to keep it after you free @match_info object. + #GRegex object used in @match_info @@ -13312,6 +15667,7 @@ after you free @match_info object. Returns the string searched with @match_info. This is the string passed to g_regex_match() or g_regex_replace() so you may not free it before calling this function. + the string searched with @match_info @@ -13357,6 +15713,7 @@ There were formerly some restrictions on the pattern for partial matching. The restrictions no longer apply. See pcrepartial(3) for more information on partial matching. + %TRUE if the match was partial, %FALSE otherwise @@ -13370,6 +15727,7 @@ See pcrepartial(3) for more information on partial matching. Returns whether the previous match operation succeeded. + %TRUE if the previous match operation succeeded, %FALSE otherwise @@ -13389,6 +15747,7 @@ call to g_regex_match_full() or g_regex_match() that returned The match is done on the string passed to the match function, so you cannot free it before calling this function. + %TRUE is the string matched, %FALSE otherwise @@ -13402,6 +15761,7 @@ cannot free it before calling this function. Increases reference count of @match_info by 1. + @match_info @@ -13416,6 +15776,7 @@ cannot free it before calling this function. Decreases reference count of @match_info by 1. When reference count drops to zero, it frees all the memory associated with the match_info structure. + @@ -13433,8 +15794,10 @@ be used for all allocations in the same program; a call to g_mem_set_vtable(), if it exists, should be prior to any use of GLib. This functions related to this has been deprecated in 2.46, and no longer work. + + @@ -13447,6 +15810,7 @@ This functions related to this has been deprecated in 2.46, and no longer work.< + @@ -13462,6 +15826,7 @@ This functions related to this has been deprecated in 2.46, and no longer work.< + @@ -13474,6 +15839,7 @@ This functions related to this has been deprecated in 2.46, and no longer work.< + @@ -13489,6 +15855,7 @@ This functions related to this has been deprecated in 2.46, and no longer work.< + @@ -13501,6 +15868,7 @@ This functions related to this has been deprecated in 2.46, and no longer work.< + @@ -13560,11 +15928,12 @@ If a #GMutex is placed in other contexts (eg: embedded in a struct) then it must be explicitly initialised using g_mutex_init(). A #GMutex should only be accessed via g_mutex_ functions. + - + @@ -13578,6 +15947,7 @@ Calling g_mutex_clear() on a locked mutex leads to undefined behaviour. Sine: 2.32 + @@ -13613,6 +15983,7 @@ needed, use g_mutex_clear(). Calling g_mutex_init() on an already initialized #GMutex leads to undefined behaviour. + @@ -13632,6 +16003,7 @@ thread. non-recursive. As such, calling g_mutex_lock() on a #GMutex that has already been locked by the same thread results in undefined behaviour (including but not limited to deadlocks). + @@ -13651,6 +16023,7 @@ it immediately returns %FALSE. Otherwise it locks @mutex and returns non-recursive. As such, calling g_mutex_lock() on a #GMutex that has already been locked by the same thread results in undefined behaviour (including but not limited to deadlocks or arbitrary return values). + %TRUE if @mutex could be locked @@ -13668,6 +16041,7 @@ call for @mutex, it will become unblocked and can lock @mutex itself. Calling g_mutex_unlock() on a mutex that is not locked by the current thread leads to undefined behaviour. + @@ -13679,8 +16053,39 @@ current thread leads to undefined behaviour. + + Returns %TRUE if a #GNode is a leaf node. + + + + a #GNode + + + + + Returns %TRUE if a #GNode is the root of a tree. + + + + a #GNode + + + + + Determines the number of elements in an array. The array must be +declared so the compiler knows its size at compile-time; this +macro will not work on an array allocated on the heap, only static +arrays or arrays on the stack. + + + + the array + + + The #GNode struct represents one node in a [n-ary tree][glib-N-ary-Trees]. + contains the actual data of the node. @@ -13708,6 +16113,7 @@ current thread leads to undefined behaviour. Gets the position of the first child of a #GNode which contains the given data. + the index of the child of @node which contains @data, or -1 if the data is not found @@ -13728,6 +16134,7 @@ which contains the given data. Gets the position of a #GNode with respect to its siblings. @child must be a child of @node. The first child is numbered 0, the second 1, and so on. + the position of @child with respect to its siblings @@ -13744,8 +16151,10 @@ the second 1, and so on. - Calls a function for each of the children of a #GNode. -Note that it doesn't descend beneath the child nodes. + Calls a function for each of the children of a #GNode. Note that it +doesn't descend beneath the child nodes. @func must not do anything +that would modify the structure of the tree. + @@ -13772,6 +16181,7 @@ Note that it doesn't descend beneath the child nodes. Recursively copies a #GNode (but does not deep-copy the data inside the nodes, see g_node_copy_deep() if you need that). + a new #GNode containing the same data pointers @@ -13785,6 +16195,7 @@ nodes, see g_node_copy_deep() if you need that). Recursively copies a #GNode and its data. + a new #GNode containing copies of the data in @node. @@ -13810,6 +16221,7 @@ nodes, see g_node_copy_deep() if you need that). If @node is %NULL the depth is 0. The root node has a depth of 1. For the children of the root node the depth is 2. And so on. + the depth of the #GNode @@ -13824,6 +16236,7 @@ For the children of the root node the depth is 2. And so on. Removes @root and its children from the tree, freeing any memory allocated. + @@ -13836,6 +16249,7 @@ allocated. Finds a #GNode in a tree. + the found #GNode, or %NULL if the data is not found @@ -13863,6 +16277,7 @@ allocated. Finds the first child of a #GNode with the given data. + the found child #GNode, or %NULL if the data is not found @@ -13886,6 +16301,7 @@ allocated. Gets the first sibling of a #GNode. This could possibly be the node itself. + the first sibling of @node @@ -13899,6 +16315,7 @@ This could possibly be the node itself. Gets the root of a tree. + the root of the tree @@ -13912,6 +16329,7 @@ This could possibly be the node itself. Inserts a #GNode beneath the parent at the given position. + the inserted #GNode @@ -13934,6 +16352,7 @@ This could possibly be the node itself. Inserts a #GNode beneath the parent after the given sibling. + the inserted #GNode @@ -13956,6 +16375,7 @@ This could possibly be the node itself. Inserts a #GNode beneath the parent before the given sibling. + the inserted #GNode @@ -13980,6 +16400,7 @@ This could possibly be the node itself. Returns %TRUE if @node is an ancestor of @descendant. This is true if node is the parent of @descendant, or if node is the grandparent of @descendant etc. + %TRUE if @node is an ancestor of @descendant @@ -13997,6 +16418,7 @@ or if node is the grandparent of @descendant etc. Gets the last child of a #GNode. + the last child of @node, or %NULL if @node has no children @@ -14011,6 +16433,7 @@ or if node is the grandparent of @descendant etc. Gets the last sibling of a #GNode. This could possibly be the node itself. + the last sibling of @node @@ -14028,6 +16451,7 @@ This is the maximum distance from the #GNode to all leaf nodes. If @root is %NULL, 0 is returned. If @root has no children, 1 is returned. If @root has children, 2 is returned. And so on. + the maximum height of the tree beneath @root @@ -14041,6 +16465,7 @@ If @root is %NULL, 0 is returned. If @root has no children, Gets the number of children of a #GNode. + the number of children of @node @@ -14054,6 +16479,7 @@ If @root is %NULL, 0 is returned. If @root has no children, Gets the number of nodes in a tree. + the number of nodes in the tree @@ -14074,6 +16500,7 @@ If @root is %NULL, 0 is returned. If @root has no children, Gets a child of a #GNode, using the given index. The first child is at index 0. If the index is too big, %NULL is returned. + the child of @node at index @n @@ -14091,6 +16518,7 @@ too big, %NULL is returned. Inserts a #GNode as the first child of the given parent. + the inserted #GNode @@ -14109,6 +16537,7 @@ too big, %NULL is returned. Reverses the order of the children of a #GNode. (It doesn't change the order of the grandchildren.) + @@ -14122,7 +16551,9 @@ too big, %NULL is returned. Traverses a tree starting at the given root #GNode. It calls the given function for each node visited. -The traversal can be halted at any point by returning %TRUE from @func. +The traversal can be halted at any point by returning %TRUE from @func. +@func must not do anything that would modify the structure of the tree. + @@ -14160,6 +16591,7 @@ The traversal can be halted at any point by returning %TRUE from @func. Unlinks a #GNode from a tree, resulting in two separate trees. + @@ -14173,6 +16605,7 @@ The traversal can be halted at any point by returning %TRUE from @func. Creates a new #GNode containing the given data. Used to create the first node in a tree. + a new #GNode @@ -14189,6 +16622,7 @@ Used to create the first node in a tree. Specifies the type of function passed to g_node_children_foreach(). The function is called with each child node, together with the user data passed to g_node_children_foreach(). + @@ -14208,6 +16642,7 @@ data passed to g_node_children_foreach(). function is called with each of the nodes visited, together with the user data passed to g_node_traverse(). If the function returns %TRUE, then the traversal is stopped. + %TRUE to stop the traversal. @@ -14229,6 +16664,7 @@ form, standardizing such issues as whether a character with an accent is represented as a base character and combining accent or as a single precomposed character. Unicode strings should generally be normalized before comparing them. + standardize differences that do not affect the text content, such as the above-mentioned accent representation @@ -14263,6 +16699,7 @@ should generally be normalized before comparing them. Error codes returned by functions converting a string to a number. + String was not a valid number. @@ -14281,12 +16718,14 @@ or %G_OPTION_ARG_FILENAME_ARRAY. Using #G_OPTION_REMAINING instead of simply scanning `argv` for leftover arguments has the advantage that GOption takes care of necessary encoding conversions for strings or filenames. + A #GOnce struct controls a one-time initialization function. Any one-time initialization function must have its own unique #GOnce struct. + the status of the #GOnce @@ -14297,6 +16736,7 @@ struct. + @@ -14335,6 +16775,7 @@ like this: // use initialization_value here ]| + %TRUE if the initialization section should be entered, %FALSE and blocks otherwise @@ -14354,6 +16795,7 @@ like this: other than 0. Sets the variable to the initialization value, and releases concurrent threads blocking in g_once_init_enter() on this initialization variable. + @@ -14373,6 +16815,7 @@ initialization variable. The possible statuses of a one-time initialization function controlled by a #GOnce struct. + the function has not been called yet. @@ -14388,11 +16831,12 @@ controlled by a #GOnce struct. options expect to find. If an option expects an extra argument, it can be specified in several ways; with a short option: `-x arg`, with a long option: `--name arg` or combined in a single argument: `--name=arg`. + No extra argument. This is useful for simple flags. - The option takes a string argument. + The option takes a UTF-8 string argument. The option takes an integer argument. @@ -14402,7 +16846,8 @@ option: `--name arg` or combined in a single argument: `--name=arg`. #GOptionArgFunc) to parse the extra argument. - The option takes a filename as argument. + The option takes a filename as argument, which will + be in the GLib filename encoding rather than UTF-8. The option takes a string argument, multiple @@ -14427,6 +16872,7 @@ option: `--name arg` or combined in a single argument: `--name=arg`. The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK options. + %TRUE if the option was successfully parsed, %FALSE if an error occurred, in which case @error should be set with g_set_error() @@ -14454,10 +16900,12 @@ options. A `GOptionContext` struct defines which options are accepted by the commandline option parser. The struct has only private fields and should not be directly accessed. + Adds a #GOptionGroup to the @context, so that parsing with @context will recognize the options in the group. Note that this will take ownership of the @group and thus the @group should not be freed. + @@ -14475,6 +16923,7 @@ ownership of the @group and thus the @group should not be freed. A convenience function which creates a main group if it doesn't exist, adds the @entries to it and sets the translation domain. + @@ -14485,7 +16934,9 @@ exist, adds the @entries to it and sets the translation domain. a %NULL-terminated array of #GOptionEntrys - + + + a translation domain to use for translating @@ -14501,6 +16952,7 @@ added to it. Please note that parsed arguments need to be freed separately (see #GOptionEntry). + @@ -14513,6 +16965,7 @@ Please note that parsed arguments need to be freed separately (see Returns the description. See g_option_context_set_description(). + the description @@ -14532,6 +16985,7 @@ To obtain the text produced by `--help-all`, call `g_option_context_get_help (context, FALSE, NULL)`. To obtain the help text for an option group, call `g_option_context_get_help (context, FALSE, group)`. + A newly allocated string containing the help text @@ -14554,6 +17008,7 @@ To obtain the help text for an option group, call Returns whether automatic `--help` generation is turned on for @context. See g_option_context_set_help_enabled(). + %TRUE if automatic help generation is turned on. @@ -14568,6 +17023,7 @@ is turned on for @context. See g_option_context_set_help_enabled(). Returns whether unknown options are ignored or not. See g_option_context_set_ignore_unknown_options(). + %TRUE if unknown options are ignored. @@ -14581,6 +17037,7 @@ g_option_context_set_ignore_unknown_options(). Returns a pointer to the main group of @context. + the main group of @context, or %NULL if @context doesn't have a main group. Note that group belongs to @@ -14598,19 +17055,21 @@ g_option_context_set_ignore_unknown_options(). Returns whether strict POSIX code is enabled. See g_option_context_set_strict_posix() for more information. + %TRUE if strict POSIX is enabled, %FALSE otherwise. - a #GoptionContext + a #GOptionContext Returns the summary. See g_option_context_set_summary(). + the summary @@ -14644,6 +17103,7 @@ call `exit (0)`. Note that function depends on the [current locale][setlocale] for automatic character set conversion of string and filename arguments. + %TRUE if the parsing was successful, %FALSE if an error occurred @@ -14654,11 +17114,11 @@ arguments. a #GOptionContext - + a pointer to the number of command line arguments - + a pointer to the array of command line arguments @@ -14683,6 +17143,7 @@ See g_win32_get_command_line() for a solution. This function is useful if you are trying to use #GOptionContext with #GApplication. + %TRUE if the parsing was successful, %FALSE if an error occurred @@ -14693,9 +17154,11 @@ This function is useful if you are trying to use #GOptionContext with a #GOptionContext - - a pointer to the - command line arguments (which must be in UTF-8 on Windows) + + a pointer + to the command line arguments (which must be in UTF-8 on Windows). + Starting with GLib 2.62, @arguments can be %NULL, which matches + g_option_context_parse(). @@ -14708,6 +17171,7 @@ of options. This text often includes a bug reporting address. Note that the summary is translated (see g_option_context_set_translate_func()). + @@ -14728,6 +17192,7 @@ g_option_context_set_translate_func()). By default, g_option_context_parse() recognizes `--help`, `-h`, `-?`, `--help-all` and `--help-groupname` and creates suitable output to stdout. + @@ -14750,6 +17215,7 @@ g_option_context_parse() treats unknown options as error. This setting does not affect non-option arguments (i.e. arguments which don't start with a dash). But note that GOption cannot reliably determine whether a non-option belongs to a preceding unknown option. + @@ -14770,6 +17236,7 @@ determine whether a non-option belongs to a preceding unknown option. This has the same effect as calling g_option_context_add_group(), the only difference is that the options in the main group are treated differently when generating `--help` output. + @@ -14809,12 +17276,13 @@ options up to the verb name while leaving the remaining options to be parsed by the relevant subcommand (which can be determined by examining the verb name, which should be present in argv[1] after parsing). + - a #GoptionContext + a #GOptionContext @@ -14830,6 +17298,7 @@ of options. This is typically a summary of the program functionality. Note that the summary is translated (see g_option_context_set_translate_func() and g_option_context_set_translation_domain()). + @@ -14857,6 +17326,7 @@ the summary (see g_option_context_set_summary()) and the description If you are using gettext(), you only need to set the translation domain, see g_option_context_set_translation_domain(). + @@ -14882,6 +17352,7 @@ domain, see g_option_context_set_translation_domain(). A convenience function to use gettext() for translating user-visible strings. + @@ -14916,6 +17387,7 @@ below the usage line, use g_option_context_set_summary(). Note that the @parameter_string is translated using the function set with g_option_context_set_translate_func(), so it should normally be passed untranslated. + a newly created #GOptionContext, which must be freed with g_option_context_free() after use. @@ -14935,6 +17407,7 @@ it should normally be passed untranslated. A GOptionEntry struct defines a single option. To have an effect, they must be added to a #GOptionGroup with g_option_context_add_main_entries() or g_option_group_add_entries(). + The long name of an option can be used to specify it in a commandline as `--long_name`. Every option must have a @@ -14994,6 +17467,7 @@ or g_option_group_add_entries(). Error codes returned by option parsing. + An option was not known to the parser. This error will only be reported, if the parser hasn't been instructed @@ -15008,6 +17482,7 @@ or g_option_group_add_entries(). The type of function to be used as callback when a parse error occurs. + @@ -15029,6 +17504,7 @@ or g_option_group_add_entries(). Flags which modify individual options. + No flags. Since: 2.42. @@ -15076,8 +17552,10 @@ All options in a group share the same translation function. Libraries which need to parse commandline options are expected to provide a function for getting a `GOptionGroup` holding their options, which the application can then add to its #GOptionContext. + Creates a new #GOptionGroup. + a newly created option group. It should be added to a #GOptionContext or freed with g_option_group_unref(). @@ -15114,6 +17592,7 @@ the application can then add to its #GOptionContext. Adds the options specified in @entries to @group. + @@ -15124,7 +17603,9 @@ the application can then add to its #GOptionContext. a %NULL-terminated array of #GOptionEntrys - + + + @@ -15132,6 +17613,7 @@ the application can then add to its #GOptionContext. Frees a #GOptionGroup. Note that you must not free groups which have been added to a #GOptionContext. Use g_option_group_unref() instead. + @@ -15144,8 +17626,9 @@ which have been added to a #GOptionContext. Increments the reference count of @group by one. + - a #GoptionGroup + a #GOptionGroup @@ -15161,6 +17644,7 @@ from g_option_context_parse() when an error occurs. Note that the user data to be passed to @error_func can be specified when constructing the group with g_option_group_new(). + @@ -15183,6 +17667,7 @@ and after the last option has been parsed, respectively. Note that the user data to be passed to @pre_parse_func and @post_parse_func can be specified when constructing the group with g_option_group_new(). + @@ -15208,6 +17693,7 @@ for `--help` output. Different groups can use different If you are using gettext(), you only need to set the translation domain, see g_option_group_set_translation_domain(). + @@ -15233,6 +17719,7 @@ domain, see g_option_group_set_translation_domain(). A convenience function to use gettext() for translating user-visible strings. + @@ -15251,6 +17738,7 @@ user-visible strings. Decrements the reference count of @group by one. If the reference count drops to 0, the @group will be freed. and all memory allocated by the @group is released. + @@ -15264,6 +17752,7 @@ and all memory allocated by the @group is released. The type of function that can be called before and after parsing. + %TRUE if the function completed successfully, %FALSE if an error occurred, in which case @error should be set with g_set_error() @@ -15288,28 +17777,34 @@ and all memory allocated by the @group is released. Specifies one of the possible types of byte order (currently unused). See #G_BYTE_ORDER. + The value of pi (ratio of circle's circumference to its diameter). + A format specifier that can be used in printf()-style format strings when printing a #GPid. + Pi divided by 2. + Pi divided by 4. + A format specifier that can be used in printf()-style format strings when printing the @fd member of a #GPollFD. + @@ -15318,6 +17813,7 @@ when printing the @fd member of a #GPollFD. In GLib this priority is used when adding timeout functions with g_timeout_add(). In GDK this priority is used for events from the X server. + @@ -15325,12 +17821,14 @@ from the X server. In GLib this priority is used when adding idle functions with g_idle_add(). + Use this for high priority event sources. It is not used within GLib or GTK+. + @@ -15340,20 +17838,78 @@ GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations, and #G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is done to ensure that any pending resizes are processed before any pending redraws, so that widgets are not redrawn twice unnecessarily.) + Use this for very low priority background tasks. It is not used within GLib or GTK+. + + + A macro to assist with the static initialisation of a #GPrivate. + +This macro is useful for the case that a #GDestroyNotify function +should be associated with the key. This is needed when the key will be +used to point at memory that should be deallocated when the thread +exits. + +Additionally, the #GDestroyNotify will also be called on the previous +value stored in the key when g_private_replace() is used. + +If no #GDestroyNotify is needed, then use of this macro is not +required -- if the #GPrivate is declared in static scope then it will +be properly initialised by default (ie: to all zeros). See the +examples below. + +|[<!-- language="C" --> +static GPrivate name_key = G_PRIVATE_INIT (g_free); + +// return value should not be freed +const gchar * +get_local_name (void) +{ + return g_private_get (&name_key); +} + +void +set_local_name (const gchar *name) +{ + g_private_replace (&name_key, g_strdup (name)); +} + + +static GPrivate count_key; // no free function + +gint +get_local_count (void) +{ + return GPOINTER_TO_INT (g_private_get (&count_key)); +} + +void +set_local_count (gint count) +{ + g_private_set (&count_key, GINT_TO_POINTER (count)); +} +]| + + + + a #GDestroyNotify + + + A GPatternSpec struct is the 'compiled' form of a pattern. This structure is opaque and its fields cannot be accessed directly. + Compares two compiled pattern specs and returns whether they will match the same set of strings. + Whether the compiled patterns are equal @@ -15371,6 +17927,7 @@ match the same set of strings. Frees the memory allocated for the #GPatternSpec. + @@ -15383,6 +17940,7 @@ match the same set of strings. Compiles a pattern to a #GPatternSpec. + a newly-allocated #GPatternSpec @@ -15398,6 +17956,7 @@ match the same set of strings. Represents a file descriptor, which events to poll for, and which events occurred. + the file descriptor to poll (or a HANDLE on Win32) @@ -15418,6 +17977,7 @@ occurred. Specifies the type of function passed to g_main_context_set_poll_func(). The semantics of the function should match those of the poll() system call. + the number of #GPollFD elements which have events or errors reported, or -1 if an error occurred. @@ -15442,6 +18002,7 @@ The semantics of the function should match those of the poll() system call. Specifies the type of the print handler functions. These are called with the complete formatted string to output. + @@ -15470,6 +18031,7 @@ See G_PRIVATE_INIT() for a couple of examples. The #GPrivate structure should be considered opaque. It should only be accessed via the g_private_ functions. + @@ -15477,7 +18039,7 @@ be accessed via the g_private_ functions. - + @@ -15487,6 +18049,7 @@ be accessed via the g_private_ functions. If the value has not yet been set in this thread, %NULL is returned. Values are never copied between threads (when a new thread is created, for example). + the thread-local value @@ -15505,6 +18068,7 @@ current thread. This function differs from g_private_set() in the following way: if the previous value was non-%NULL then the #GDestroyNotify handler for @key is run on it. + @@ -15525,6 +18089,7 @@ current thread. This function differs from g_private_replace() in the following way: the #GDestroyNotify for @key is not called on the old value. + @@ -15542,6 +18107,7 @@ the #GDestroyNotify for @key is not called on the old value. Contains the public fields of a pointer array. + points to the array of pointers, which may be moved when the array grows @@ -15554,6 +18120,7 @@ the #GDestroyNotify for @key is not called on the old value. Adds a pointer to the end of the pointer array. The array will grow in size automatically if necessary. + @@ -15570,6 +18137,112 @@ in size automatically if necessary. + + Makes a full (deep) copy of a #GPtrArray. + +@func, as a #GCopyFunc, takes two arguments, the data to be copied +and a @user_data pointer. On common processor architectures, it's safe to +pass %NULL as @user_data if the copy function takes only one argument. You +may get compiler warnings from this though if compiling with GCC’s +`-Wcast-function-type` warning. + +If @func is %NULL, then only the pointers (and not what they are +pointing to) are copied to the new #GPtrArray. + +The copy of @array will have the same #GDestroyNotify for its elements as +@array. + + + a deep copy of the initial #GPtrArray. + + + + + + + #GPtrArray to duplicate + + + + + + a copy function used to copy every element in the array + + + + user data passed to the copy function @func, or %NULL + + + + + + Adds all pointers of @array to the end of the array @array_to_extend. +The array will grow in size automatically if needed. @array_to_extend is +modified in-place. + +@func, as a #GCopyFunc, takes two arguments, the data to be copied +and a @user_data pointer. On common processor architectures, it's safe to +pass %NULL as @user_data if the copy function takes only one argument. You +may get compiler warnings from this though if compiling with GCC’s +`-Wcast-function-type` warning. + +If @func is %NULL, then only the pointers (and not what they are +pointing to) are copied to the new #GPtrArray. + + + + + + + a #GPtrArray. + + + + + + a #GPtrArray to add to the end of @array_to_extend. + + + + + + a copy function used to copy every element in the array + + + + user data passed to the copy function @func, or %NULL + + + + + + Adds all the pointers in @array to the end of @array_to_extend, transferring +ownership of each element from @array to @array_to_extend and modifying +@array_to_extend in-place. @array is then freed. + +As with g_ptr_array_free(), @array will be destroyed if its reference count +is 1. If its reference count is higher, it will be decremented and the +length of @array set to zero. + + + + + + + a #GPtrArray. + + + + + + a #GPtrArray to add to the end of + @array_to_extend. + + + + + + Checks whether @needle exists in @haystack. If the element is found, %TRUE is returned and the element’s index is returned in @index_ (if non-%NULL). @@ -15578,6 +18251,7 @@ multiple times in @haystack, the index of the first instance is returned. This does pointer comparisons only. If you want to use more complex equality checks, such as string comparisons, use g_ptr_array_find_with_equal_func(). + %TRUE if @needle is one of the elements of @haystack @@ -15610,6 +18284,7 @@ the first instance is returned. @equal_func is called with the element from the array as its first parameter, and @needle as its second parameter. If @equal_func is %NULL, pointer equality is used. + %TRUE if @needle is one of the elements of @haystack @@ -15639,7 +18314,9 @@ equality is used. - Calls a function for each element of a #GPtrArray. + Calls a function for each element of a #GPtrArray. @func must not +add elements to or remove elements from the array. + @@ -15675,6 +18352,7 @@ function has been set for @array. This function is not thread-safe. If using a #GPtrArray from multiple threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref() functions. + the pointer array if @free_seg is %FALSE, otherwise %NULL. The pointer array should be freed using g_free(). @@ -15696,6 +18374,7 @@ functions. Inserts an element into the pointer array at the given index. The array will grow in size automatically if necessary. + @@ -15718,6 +18397,7 @@ array will grow in size automatically if necessary. Creates a new #GPtrArray with a reference count of 1. + the new #GPtrArray @@ -15733,6 +18413,7 @@ the size of the array is still 0. It also set @element_free_func for freeing each element when the array is destroyed either via g_ptr_array_unref(), when g_ptr_array_free() is called with @free_segment set to %TRUE or when removing elements. + A new #GPtrArray @@ -15756,6 +18437,7 @@ g_ptr_array_unref(), when g_ptr_array_free() is called with @element_free_func for freeing each element when the array is destroyed either via g_ptr_array_unref(), when g_ptr_array_free() is called with @free_segment set to %TRUE or when removing elements. + A new #GPtrArray @@ -15773,6 +18455,7 @@ either via g_ptr_array_unref(), when g_ptr_array_free() is called with Atomically increments the reference count of @array by one. This function is thread-safe and may be called from any thread. + The passed in #GPtrArray @@ -15796,6 +18479,7 @@ removed element. It returns %TRUE if the pointer was removed, or %FALSE if the pointer was not found. + %TRUE if the pointer is removed, %FALSE if the pointer is not found in the array @@ -15823,6 +18507,7 @@ is faster than g_ptr_array_remove(). If @array has a non-%NULL It returns %TRUE if the pointer was removed, or %FALSE if the pointer was not found. + %TRUE if the pointer was found in the array @@ -15844,7 +18529,9 @@ pointer was not found. Removes the pointer at the given index from the pointer array. The following elements are moved down one place. If @array has a non-%NULL #GDestroyNotify function it is called for the removed -element. +element. If so, the return value from this function will potentially point +to freed memory (depending on the #GDestroyNotify implementation). + the pointer which was removed @@ -15867,7 +18554,10 @@ element. The last element in the array is used to fill in the space, so this function does not preserve the order of the array. But it is faster than g_ptr_array_remove_index(). If @array has a non-%NULL -#GDestroyNotify function it is called for the removed element. +#GDestroyNotify function it is called for the removed element. If so, the +return value from this function will potentially point to freed memory +(depending on the #GDestroyNotify implementation). + the pointer which was removed @@ -15890,6 +18580,7 @@ is faster than g_ptr_array_remove_index(). If @array has a non-%NULL from a #GPtrArray. The following elements are moved to close the gap. If @array has a non-%NULL #GDestroyNotify function it is called for the removed elements. + the @array @@ -15917,6 +18608,7 @@ called for the removed elements. Sets a function for freeing each element when @array is destroyed either via g_ptr_array_unref(), when g_ptr_array_free() is called with @free_segment set to %TRUE or when removing elements. + @@ -15939,6 +18631,7 @@ with @free_segment set to %TRUE or when removing elements. newly-added elements will be set to %NULL. When making it smaller, if @array has a non-%NULL #GDestroyNotify function then it will be called for the removed elements. + @@ -15960,6 +18653,7 @@ called for the removed elements. and a reference count of 1. This avoids frequent reallocation, if you are going to add many pointers to the array. Note however that the size of the array is still 0. + the new #GPtrArray @@ -15981,9 +18675,35 @@ greater than second arg). Note that the comparison function for g_ptr_array_sort() doesn't take the pointers from the array as arguments, it takes pointers to -the pointers in the array. +the pointers in the array. Here is a full example of usage: + +|[<!-- language="C" --> +typedef struct +{ + gchar *name; + gint size; +} FileListEntry; + +static gint +sort_filelist (gconstpointer a, gconstpointer b) +{ + const FileListEntry *entry1 = *((FileListEntry **) a); + const FileListEntry *entry2 = *((FileListEntry **) b); + + return g_ascii_strcasecmp (entry1->name, entry2->name); +} + +… +g_autoptr (GPtrArray) file_list = NULL; + +// initialize file_list array and load with many FileListEntry entries +... +// now sort it with +g_ptr_array_sort (file_list, sort_filelist); +]| This is guaranteed to be a stable sort since version 2.32. + @@ -16006,9 +18726,55 @@ user data argument. Note that the comparison function for g_ptr_array_sort_with_data() doesn't take the pointers from the array as arguments, it takes -pointers to the pointers in the array. +pointers to the pointers in the array. Here is a full example of use: + +|[<!-- language="C" --> +typedef enum { SORT_NAME, SORT_SIZE } SortMode; + +typedef struct +{ + gchar *name; + gint size; +} FileListEntry; + +static gint +sort_filelist (gconstpointer a, gconstpointer b, gpointer user_data) +{ + gint order; + const SortMode sort_mode = GPOINTER_TO_INT (user_data); + const FileListEntry *entry1 = *((FileListEntry **) a); + const FileListEntry *entry2 = *((FileListEntry **) b); + + switch (sort_mode) + { + case SORT_NAME: + order = g_ascii_strcasecmp (entry1->name, entry2->name); + break; + case SORT_SIZE: + order = entry1->size - entry2->size; + break; + default: + order = 0; + break; + } + return order; +} + +... +g_autoptr (GPtrArray) file_list = NULL; +SortMode sort_mode; + +// initialize file_list array and load with many FileListEntry entries +... +// now sort it with +sort_mode = SORT_NAME; +g_ptr_array_sort_with_data (file_list, + sort_filelist, + GINT_TO_POINTER (sort_mode)); +]| This is guaranteed to be a stable sort since version 2.32. + @@ -16029,11 +18795,121 @@ This is guaranteed to be a stable sort since version 2.32. + + Frees the data in the array and resets the size to zero, while +the underlying array is preserved for use elsewhere and returned +to the caller. + +Even if set, the #GDestroyNotify function will never be called +on the current contents of the array and the caller is +responsible for freeing the array elements. + +An example of use: +|[<!-- language="C" --> +g_autoptr(GPtrArray) chunk_buffer = g_ptr_array_new_with_free_func (g_bytes_unref); + +// Some part of your application appends a number of chunks to the pointer array. +g_ptr_array_add (chunk_buffer, g_bytes_new_static ("hello", 5)); +g_ptr_array_add (chunk_buffer, g_bytes_new_static ("world", 5)); + +… + +// Periodically, the chunks need to be sent as an array-and-length to some +// other part of the program. +GBytes **chunks; +gsize n_chunks; + +chunks = g_ptr_array_steal (chunk_buffer, &n_chunks); +for (gsize i = 0; i < n_chunks; i++) + { + // Do something with each chunk here, and then free them, since + // g_ptr_array_steal() transfers ownership of all the elements and the + // array to the caller. + … + + g_bytes_unref (chunks[i]); + } + +g_free (chunks); + +// After calling g_ptr_array_steal(), the pointer array can be reused for the +// next set of chunks. +g_assert (chunk_buffer->len == 0); +]| + + + the element data, which should be + freed using g_free(). + + + + + a #GPtrArray. + + + + + + pointer to retrieve the number of + elements of the original array + + + + + + Removes the pointer at the given index from the pointer array. +The following elements are moved down one place. The #GDestroyNotify for +@array is *not* called on the removed element; ownership is transferred to +the caller of this function. + + + the pointer which was removed + + + + + a #GPtrArray + + + + + + the index of the pointer to steal + + + + + + Removes the pointer at the given index from the pointer array. +The last element in the array is used to fill in the space, so +this function does not preserve the order of the array. But it +is faster than g_ptr_array_steal_index(). The #GDestroyNotify for @array is +*not* called on the removed element; ownership is transferred to the caller +of this function. + + + the pointer which was removed + + + + + a #GPtrArray + + + + + + the index of the pointer to steal + + + + Atomically decrements the reference count of @array by one. If the reference count drops to 0, the effect is the same as calling g_ptr_array_free() with @free_segment set to %TRUE. This function is thread-safe and may be called from any thread. + @@ -16050,6 +18926,7 @@ is thread-safe and may be called from any thread. Contains the public fields of a [Queue][glib-Double-ended-Queues]. + a pointer to the first element of the queue @@ -16069,6 +18946,7 @@ is thread-safe and may be called from any thread. Removes all the elements in @queue. If queue elements contain dynamically-allocated memory, they should be freed first. + @@ -16079,10 +18957,29 @@ dynamically-allocated memory, they should be freed first. + + Convenience method, which frees all the memory used by a #GQueue, +and calls the provided @free_func on each item in the #GQueue. + + + + + + + a pointer to a #GQueue + + + + the function to be called to free memory allocated + + + + Copies a @queue. Note that is a shallow copy. If the elements in the queue consist of pointers to data, the pointers are copied, but the actual data is not. + a copy of @queue @@ -16098,6 +18995,7 @@ actual data is not. Removes @link_ from @queue and frees it. @link_ must be part of @queue. + @@ -16116,6 +19014,7 @@ actual data is not. Finds the first link in @queue which contains @data. + the first link in @queue which contains @data @@ -16139,6 +19038,7 @@ desired element. It iterates over the queue, calling the given function which should return 0 when the desired element is found. The function takes two gconstpointer arguments, the #GQueue element's data as the first argument and the given user data as the second argument. + the found link, or %NULL if it wasn't found @@ -16163,7 +19063,11 @@ first argument and the given user data as the second argument. Calls @func for each element in the queue passing @user_data to the -function. +function. + +It is safe for @func to remove the element from @queue, but it must +not modify any part of the queue after that element. + @@ -16189,6 +19093,7 @@ dynamically-allocated memory, they should be freed first. If queue elements contain dynamically-allocated memory, you should either use g_queue_free_full() or free them manually first. + @@ -16201,7 +19106,11 @@ either use g_queue_free_full() or free them manually first. Convenience method, which frees all the memory used by a #GQueue, -and calls the specified destroy function on every element's data. +and calls the specified destroy function on every element's data. + +@free_func should not modify the queue (eg, by removing the freed +element from it). + @@ -16218,6 +19127,7 @@ and calls the specified destroy function on every element's data. Returns the number of items in @queue. + the number of items in @queue @@ -16231,6 +19141,7 @@ and calls the specified destroy function on every element's data. Returns the position of the first element in @queue which contains @data. + the position of the first element in @queue which contains @data, or -1 if no element in @queue contains @data @@ -16252,6 +19163,7 @@ and calls the specified destroy function on every element's data. before it can be used. Alternatively you can initialize it with #G_QUEUE_INIT. It is not necessary to initialize queues created with g_queue_new(). + @@ -16267,6 +19179,7 @@ g_queue_new(). @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the data at the head of the queue. + @@ -16288,11 +19201,40 @@ data at the head of the queue. + + Inserts @link_ into @queue after @sibling. + +@sibling must be part of @queue. + + + + + + + a #GQueue + + + + a #GList link that must be part of @queue, or %NULL to + push at the head of the queue. + + + + + + a #GList link to insert which must not be part of any other list. + + + + + + Inserts @data into @queue before @sibling. @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the data at the tail of the queue. + @@ -16314,8 +19256,37 @@ data at the tail of the queue. + + Inserts @link_ into @queue before @sibling. + +@sibling must be part of @queue. + + + + + + + a #GQueue + + + + a #GList link that must be part of @queue, or %NULL to + push at the tail of the queue. + + + + + + a #GList link to insert which must not be part of any other list. + + + + + + Inserts @data into @queue using @func to determine the new position. + @@ -16344,6 +19315,7 @@ data at the tail of the queue. Returns %TRUE if the queue is empty. + %TRUE if the queue is empty @@ -16357,6 +19329,7 @@ data at the tail of the queue. Returns the position of @link_ in @queue. + the position of @link_, or -1 if the link is not part of @queue @@ -16377,6 +19350,7 @@ data at the tail of the queue. Returns the first element of the queue. + the data of the first element in the queue, or %NULL if the queue is empty @@ -16391,6 +19365,7 @@ data at the tail of the queue. Returns the first link in @queue. + the first link in @queue, or %NULL if @queue is empty @@ -16406,6 +19381,7 @@ data at the tail of the queue. Returns the @n'th element of @queue. + the data for the @n'th element of @queue, or %NULL if @n is off the end of @queue @@ -16424,6 +19400,7 @@ data at the tail of the queue. Returns the link at the given position + the link at the @n'th position, or %NULL if @n is off the end of the list @@ -16444,6 +19421,7 @@ data at the tail of the queue. Returns the last element of the queue. + the data of the last element in the queue, or %NULL if the queue is empty @@ -16458,6 +19436,7 @@ data at the tail of the queue. Returns the last link in @queue. + the last link in @queue, or %NULL if @queue is empty @@ -16473,6 +19452,7 @@ data at the tail of the queue. Removes the first element of the queue and returns its data. + the data of the first element in the queue, or %NULL if the queue is empty @@ -16487,6 +19467,7 @@ data at the tail of the queue. Removes and returns the first element of the queue. + the #GList element at the head of the queue, or %NULL if the queue is empty @@ -16503,6 +19484,7 @@ data at the tail of the queue. Removes the @n'th element of @queue and returns its data. + the element's data, or %NULL if @n is off the end of @queue @@ -16520,6 +19502,7 @@ data at the tail of the queue. Removes and returns the link at the given position. + the @n'th link, or %NULL if @n is off the end of @queue @@ -16539,6 +19522,7 @@ data at the tail of the queue. Removes the last element of the queue and returns its data. + the data of the last element in the queue, or %NULL if the queue is empty @@ -16553,6 +19537,7 @@ data at the tail of the queue. Removes and returns the last element of the queue. + the #GList element at the tail of the queue, or %NULL if the queue is empty @@ -16569,6 +19554,7 @@ data at the tail of the queue. Adds a new element at the head of the queue. + @@ -16585,6 +19571,7 @@ data at the tail of the queue. Adds a new element at the head of the queue. + @@ -16603,6 +19590,7 @@ data at the tail of the queue. Inserts a new element into @queue at the given position. + @@ -16625,6 +19613,7 @@ data at the tail of the queue. Inserts @link into @queue at the given position. + @@ -16649,6 +19638,7 @@ data at the tail of the queue. Adds a new element at the tail of the queue. + @@ -16665,6 +19655,7 @@ data at the tail of the queue. Adds a new element at the tail of the queue. + @@ -16683,6 +19674,7 @@ data at the tail of the queue. Removes the first element in @queue that contains @data. + %TRUE if @data was found and removed from @queue @@ -16700,6 +19692,7 @@ data at the tail of the queue. Remove all elements whose data equals @data from @queue. + the number of elements removed from @queue @@ -16717,6 +19710,7 @@ data at the tail of the queue. Reverses the order of the items in @queue. + @@ -16729,6 +19723,7 @@ data at the tail of the queue. Sorts @queue using @compare_func. + @@ -16755,6 +19750,7 @@ data at the tail of the queue. The link is not freed. @link_ must be part of @queue. + @@ -16773,6 +19769,7 @@ The link is not freed. Creates a new #GQueue. + a newly allocated #GQueue @@ -16791,6 +19788,10 @@ lock via g_rw_lock_writer_lock()), multiple threads can gain simultaneous read-only access (by holding the 'reader' lock via g_rw_lock_reader_lock()). +It is unspecified whether readers or writers have priority in acquiring the +lock when a reader already holds the lock and a writer is queued to acquire +it. + Here is an example for an array with access functions: |[<!-- language="C" --> GRWLock lock; @@ -16839,11 +19840,12 @@ without initialisation. Otherwise, you should call g_rw_lock_init() on it and g_rw_lock_clear() when done. A GRWLock should only be accessed with the g_rw_lock_ functions. + - + @@ -16857,6 +19859,7 @@ Calling g_rw_lock_clear() when any thread holds the lock leads to undefined behaviour. Sine: 2.32 + @@ -16892,6 +19895,7 @@ needed, use g_rw_lock_clear(). Calling g_rw_lock_init() on an already initialized #GRWLock leads to undefined behaviour. + @@ -16904,11 +19908,15 @@ to undefined behaviour. Obtain a read lock on @rw_lock. If another thread currently holds -the write lock on @rw_lock or blocks waiting for it, the current -thread will block. Read locks can be taken recursively. +the write lock on @rw_lock, the current thread will block. If another thread +does not hold the write lock, but is waiting for it, it is implementation +defined whether the reader or writer will block. Read locks can be taken +recursively. It is implementation-defined how many threads are allowed to -hold read locks on the same lock simultaneously. +hold read locks on the same lock simultaneously. If the limit is hit, +or if a deadlock is detected, a critical warning will be emitted. + @@ -16923,6 +19931,7 @@ hold read locks on the same lock simultaneously. Tries to obtain a read lock on @rw_lock and returns %TRUE if the read lock was successfully obtained. Otherwise it returns %FALSE. + %TRUE if @rw_lock could be locked @@ -16939,6 +19948,7 @@ returns %FALSE. Calling g_rw_lock_reader_unlock() on a lock that is not held by the current thread leads to undefined behaviour. + @@ -16953,6 +19963,7 @@ by the current thread leads to undefined behaviour. Obtain a write lock on @rw_lock. If any thread already holds a read or write lock on @rw_lock, the current thread will block until all other threads have dropped their locks on @rw_lock. + @@ -16967,6 +19978,7 @@ until all other threads have dropped their locks on @rw_lock. Tries to obtain a write lock on @rw_lock. If any other thread holds a read or write lock on @rw_lock, it immediately returns %FALSE. Otherwise it locks @rw_lock and returns %TRUE. + %TRUE if @rw_lock could be locked @@ -16983,6 +19995,7 @@ Otherwise it locks @rw_lock and returns %TRUE. Calling g_rw_lock_writer_unlock() on a lock that is not held by the current thread leads to undefined behaviour. + @@ -16997,10 +20010,12 @@ by the current thread leads to undefined behaviour. The GRand struct is an opaque data structure. It should only be accessed through the g_rand_* functions. + Copies a #GRand into a new one with the same exact state as before. This way you can take a snapshot of the random number generator for replaying later. + the new #GRand @@ -17015,6 +20030,7 @@ replaying later. Returns the next random #gdouble from @rand_ equally distributed over the range [0..1). + a random number @@ -17029,6 +20045,7 @@ the range [0..1). Returns the next random #gdouble from @rand_ equally distributed over the range [@begin..@end). + a random number @@ -17050,6 +20067,7 @@ the range [@begin..@end). Frees the memory allocated for the #GRand. + @@ -17063,6 +20081,7 @@ the range [@begin..@end). Returns the next random #guint32 from @rand_ equally distributed over the range [0..2^32-1]. + a random number @@ -17077,6 +20096,7 @@ the range [0..2^32-1]. Returns the next random #gint32 from @rand_ equally distributed over the range [@begin..@end-1]. + a random number @@ -17098,6 +20118,7 @@ the range [@begin..@end-1]. Sets the seed for the random number generator #GRand to @seed. + @@ -17118,6 +20139,7 @@ Array can be of arbitrary size, though only the first 624 values are taken. This function is useful if you have many low entropy seeds, or if you require more then 32 bits of actual entropy for your application. + @@ -17142,6 +20164,7 @@ either from `/dev/urandom` (if existing) or from the current time (as a fallback). On Windows, the seed is taken from rand_s(). + the new #GRand @@ -17149,6 +20172,7 @@ On Windows, the seed is taken from rand_s(). Creates a new random number generator initialized with @seed. + the new #GRand @@ -17162,6 +20186,7 @@ On Windows, the seed is taken from rand_s(). Creates a new random number generator initialized with @seed. + the new #GRand @@ -17192,11 +20217,12 @@ g_rec_mutex_init() on it and g_rec_mutex_clear() when done. A GRecMutex should only be accessed with the g_rec_mutex_ functions. + - + @@ -17211,6 +20237,7 @@ Calling g_rec_mutex_clear() on a locked recursive mutex leads to undefined behaviour. Sine: 2.32 + @@ -17248,6 +20275,7 @@ leads to undefined behaviour. To undo the effect of g_rec_mutex_init() when a recursive mutex is no longer needed, use g_rec_mutex_clear(). + @@ -17265,6 +20293,7 @@ unlocked by the other thread. If @rec_mutex is already locked by the current thread, the 'lock count' of @rec_mutex is increased. The mutex will only become available again when it is unlocked as many times as it has been locked. + @@ -17279,6 +20308,7 @@ as many times as it has been locked. Tries to lock @rec_mutex. If @rec_mutex is already locked by another thread, it immediately returns %FALSE. Otherwise it locks @rec_mutex and returns %TRUE. + %TRUE if @rec_mutex could be locked @@ -17297,6 +20327,7 @@ and can lock @rec_mutex itself. Calling g_rec_mutex_unlock() on a recursive mutex that is not locked by the current thread leads to undefined behaviour. + @@ -17374,9 +20405,11 @@ The regular expressions low-level functionalities are obtained through the excellent [PCRE](http://www.pcre.org/) library written by Philip Hazel. + Compiles the regular expression to an internal form, and does the initial setup of the #GRegex structure. + a #GRegex structure or %NULL if an error occured. Call g_regex_unref() when you are done with it @@ -17399,6 +20432,7 @@ the initial setup of the #GRegex structure. Returns the number of capturing subpatterns in the pattern. + the number of capturing subpatterns @@ -17416,6 +20450,7 @@ the initial setup of the #GRegex structure. Depending on the version of PCRE that is used, this may or may not include flags set by option expressions such as `(?i)` found at the top-level within the compiled pattern. + flags from #GRegexCompileFlags @@ -17429,6 +20464,7 @@ top-level within the compiled pattern. Checks whether the pattern contains explicit CR or LF references. + %TRUE if the pattern contains explicit CR or LF references @@ -17442,6 +20478,7 @@ top-level within the compiled pattern. Returns the match options that @regex was created with. + flags from #GRegexMatchFlags @@ -17457,6 +20494,7 @@ top-level within the compiled pattern. Returns the number of the highest back reference in the pattern, or 0 if the pattern does not contain back references. + the number of the highest back reference @@ -17472,6 +20510,7 @@ back references. Gets the number of characters in the longest lookbehind assertion in the pattern. This information is useful when doing multi-segment matching using the partial matching facilities. + the number of characters in the longest lookbehind assertion. @@ -17486,6 +20525,7 @@ the partial matching facilities. Gets the pattern string associated with @regex, i.e. a copy of the string passed to g_regex_new(). + the pattern of @regex @@ -17499,6 +20539,7 @@ the string passed to g_regex_new(). Retrieves the number of the subexpression named @name. + The number of the subexpression or -1 if @name does not exists @@ -17516,11 +20557,13 @@ the string passed to g_regex_new(). - Scans for a match in string for the pattern in @regex. + Scans for a match in @string for the pattern in @regex. The @match_options are combined with the match options specified when the @regex structure was created, letting you have more flexibility in reusing #GRegex structures. +Unless %G_REGEX_RAW is specified in the options, @string must be valid UTF-8. + A #GMatchInfo structure, used to get information on the match, is stored in @match_info if not %NULL. Note that if @match_info is not %NULL then it is created even if the function returns %FALSE, @@ -17554,6 +20597,7 @@ print_uppercase_words (const gchar *string) @string is not copied and is used in #GMatchInfo internally. If you use any #GMatchInfo method (except g_match_info_free()) after freeing or modifying @string then the behaviour is undefined. + %TRUE is the string matched, %FALSE otherwise @@ -17593,6 +20637,7 @@ matched. @string is not copied and is used in #GMatchInfo internally. If you use any #GMatchInfo method (except g_match_info_free()) after freeing or modifying @string then the behaviour is undefined. + %TRUE is the string matched, %FALSE otherwise @@ -17619,7 +20664,7 @@ freeing or modifying @string then the behaviour is undefined. Using the standard algorithm for regular expression matching only -the longest match in the string is retrieved, it is not possible +the longest match in the @string is retrieved, it is not possible to obtain all the available matches. For instance matching "<a> <b> <c>" against the pattern "<.*>" you get "<a> <b> <c>". @@ -17645,6 +20690,8 @@ Setting @start_position differs from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that begins with any kind of lookbehind assertion, such as "\b". +Unless %G_REGEX_RAW is specified in the options, @string must be valid UTF-8. + A #GMatchInfo structure, used to get information on the match, is stored in @match_info if not %NULL. Note that if @match_info is not %NULL then it is created even if the function returns %FALSE, @@ -17654,6 +20701,7 @@ matched. @string is not copied and is used in #GMatchInfo internally. If you use any #GMatchInfo method (except g_match_info_free()) after freeing or modifying @string then the behaviour is undefined. + %TRUE is the string matched, %FALSE otherwise @@ -17665,12 +20713,12 @@ freeing or modifying @string then the behaviour is undefined. the string to scan for matches - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -17689,7 +20737,7 @@ freeing or modifying @string then the behaviour is undefined. - Scans for a match in string for the pattern in @regex. + Scans for a match in @string for the pattern in @regex. The @match_options are combined with the match options specified when the @regex structure was created, letting you have more flexibility in reusing #GRegex structures. @@ -17698,6 +20746,8 @@ Setting @start_position differs from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that begins with any kind of lookbehind assertion, such as "\b". +Unless %G_REGEX_RAW is specified in the options, @string must be valid UTF-8. + A #GMatchInfo structure, used to get information on the match, is stored in @match_info if not %NULL. Note that if @match_info is not %NULL then it is created even if the function returns %FALSE, @@ -17738,6 +20788,7 @@ print_uppercase_words (const gchar *string) } } ]| + %TRUE is the string matched, %FALSE otherwise @@ -17749,12 +20800,12 @@ print_uppercase_words (const gchar *string) the string to scan for matches - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -17774,6 +20825,7 @@ print_uppercase_words (const gchar *string) Increases reference count of @regex by 1. + @regex @@ -17793,7 +20845,7 @@ number-th captured subexpression of the match, '\g<name>' refers to the captured subexpression with the given name. '\0' refers to the complete match, but '\0' followed by a number is the octal representation of a character. To include a literal '\' in the -replacement, write '\\'. +replacement, write '\\\\'. There are also escapes that changes the case of the following text: @@ -17812,6 +20864,7 @@ you can use g_regex_replace_literal(). Setting @start_position differs from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that begins with any kind of lookbehind assertion, such as "\b". + a newly allocated string containing the replacements @@ -17823,12 +20876,12 @@ begins with any kind of lookbehind assertion, such as "\b". the string to perform matches against - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -17891,6 +20944,7 @@ g_hash_table_destroy (h); ... ]| + a newly allocated string containing the replacements @@ -17902,12 +20956,12 @@ g_hash_table_destroy (h); string to perform matches against - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -17937,6 +20991,7 @@ Setting @start_position differs from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that begins with any kind of lookbehind assertion, such as "\b". + a newly allocated string containing the replacements @@ -17948,12 +21003,12 @@ assertion, such as "\b". the string to perform matches against - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -17979,7 +21034,7 @@ token. As a special case, the result of splitting the empty string "" is an empty vector, not a vector containing a single string. The reason for -this special case is that being able to represent a empty vector is +this special case is that being able to represent an empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling this function. @@ -17988,6 +21043,7 @@ A pattern that can match empty strings splits @string into separate characters wherever it matches the empty string between characters. For example splitting "ab c" using as a separator "\s*", you will get "a", "b" and "c". + a %NULL-terminated gchar ** array. Free it using g_strfreev() @@ -18019,7 +21075,7 @@ token. As a special case, the result of splitting the empty string "" is an empty vector, not a vector containing a single string. The reason for -this special case is that being able to represent a empty vector is +this special case is that being able to represent an empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling this function. @@ -18032,6 +21088,7 @@ For example splitting "ab c" using as a separator "\s*", you will get Setting @start_position differs from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that begins with any kind of lookbehind assertion, such as "\b". + a %NULL-terminated gchar ** array. Free it using g_strfreev() @@ -18046,12 +21103,12 @@ it using g_strfreev() the string to split with the pattern - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -18072,6 +21129,7 @@ it using g_strfreev() Decreases reference count of @regex by 1. When reference count drops to zero, it frees all the memory associated with the regex structure. + @@ -18092,6 +21150,7 @@ for pattern references. For instance, replacement text 'foo\n' does not contain references and may be evaluated without information about actual match, but '\0\1' (whole match followed by first subpattern) requires valid #GMatchInfo object. + whether @replacement is a valid replacement string @@ -18119,6 +21178,7 @@ to compile a regex with embedded nul characters. For completeness, @length can be -1 for a nul-terminated string. In this case the output string will be of course equal to @string. + a newly-allocated escaped string @@ -18142,6 +21202,7 @@ function is useful to dynamically generate regular expressions. @string can contain nul characters that are replaced with "\0", in this case remember to specify the correct length of @string in @length. + a newly-allocated escaped string @@ -18149,12 +21210,12 @@ in @length. the string to escape - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -18170,6 +21231,7 @@ substrings, capture counts, and so on. If this function is to be called on the same @pattern more than once, it's more efficient to compile the pattern once with g_regex_new() and then use g_regex_match(). + %TRUE if the string matched, %FALSE otherwise @@ -18212,7 +21274,7 @@ g_regex_new() and then use g_regex_split(). As a special case, the result of splitting the empty string "" is an empty vector, not a vector containing a single string. The reason for this special case is that being able to represent -a empty vector is typically more useful than consistent handling +an empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling this function. @@ -18221,6 +21283,7 @@ A pattern that can match empty strings splits @string into separate characters wherever it matches the empty string between characters. For example splitting "ab c" using as a separator "\s*", you will get "a", "b" and "c". + a %NULL-terminated array of strings. Free it using g_strfreev() @@ -18250,6 +21313,7 @@ it using g_strfreev() Flags specifying compile-time options. + Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern @@ -18269,7 +21333,7 @@ it using g_strfreev() setting. - A dot metacharater (".") in the pattern matches all + A dot metacharacter (".") in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a ("?s") option setting. @@ -18286,7 +21350,7 @@ it using g_strfreev() it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" - metacharater. + metacharacter. A dollar metacharacter ("$") in the pattern @@ -18358,6 +21422,7 @@ it using g_strfreev() Error codes returned by regular expressions functions. + Compilation of the regular expression failed. @@ -18578,6 +21643,7 @@ it using g_strfreev() It is called for each occurrence of the pattern in the string passed to g_regex_replace_eval(), and it should append the replacement to @result. + %FALSE to continue the replacement process, %TRUE to stop it @@ -18601,12 +21667,13 @@ to g_regex_replace_eval(), and it should append the replacement to Flags specifying match-time options. + The pattern is forced to be "anchored", that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the "^" - metacharater. + metacharacter. Specifies that first character of the string is @@ -18691,31 +21758,51 @@ to g_regex_replace_eval(), and it should append the replacement to patterns this can only happen for pattern containing "\K". Since: 2.34 - + The search path separator character. This is ':' on UNIX machines and ';' under Windows. + - + The search path separator as a string. This is ":" on UNIX machines and ";" under Windows. + + + + Returns the size of @member in the struct definition without having a +declared instance of @struct_type. + + + + a structure type, e.g. #GOutputVector + + + a field in the structure, e.g. `size` + + + + + + The #GSList struct is used for each element in the singly-linked list. + holds the element's data, which can be a pointer to any kind of data, or any integer value using the @@ -18732,6 +21819,7 @@ list. Allocates space for one #GSList element. It is called by the g_slist_append(), g_slist_prepend(), g_slist_insert() and g_slist_insert_sorted() functions and so is rarely used on its own. + a pointer to the newly-allocated #GSList element. @@ -18762,6 +21850,7 @@ list = g_slist_append (list, "second"); number_list = g_slist_append (number_list, GINT_TO_POINTER (27)); number_list = g_slist_append (number_list, GINT_TO_POINTER (14)); ]| + the new start of the #GSList @@ -18785,6 +21874,7 @@ number_list = g_slist_append (number_list, GINT_TO_POINTER (14)); Adds the second #GSList onto the end of the first #GSList. Note that the elements of the second #GSList are not copied. They are used directly. + the start of the new #GSList @@ -18813,6 +21903,7 @@ Note that this is a "shallow" copy. If the list elements consist of pointers to data, the pointers are copied but the actual data isn't. See g_slist_copy_deep() if you need to copy the data as well. + a copy of @list @@ -18834,9 +21925,11 @@ to copy the data as well. In contrast with g_slist_copy(), this function uses @func to make a copy of each list element, in addition to copying the list container itself. -@func, as a #GCopyFunc, takes two arguments, the data to be copied and a user -pointer. It's safe to pass #NULL as user_data, if the copy function takes only -one argument. +@func, as a #GCopyFunc, takes two arguments, the data to be copied +and a @user_data pointer. On common processor architectures, it's safe to +pass %NULL as @user_data if the copy function takes only one argument. You +may get compiler warnings from this though if compiling with GCC’s +`-Wcast-function-type` warning. For instance, if @list holds a list of GObjects, you can do: |[<!-- language="C" --> @@ -18847,8 +21940,9 @@ And, to entirely free the new list, you could do: |[<!-- language="C" --> g_slist_free_full (another_list, g_object_unref); ]| + - a full copy of @list, use #g_slist_free_full to free it + a full copy of @list, use g_slist_free_full() to free it @@ -18880,6 +21974,7 @@ that is proportional to the length of the list (ie. O(n)). If you find yourself using g_slist_delete_link() frequently, you should consider a different data structure, such as the doubly-linked #GList. + the new head of @list @@ -18904,6 +21999,7 @@ consider a different data structure, such as the doubly-linked Finds the element in a #GSList which contains the given data. + the found #GSList element, or %NULL if it is not found @@ -18931,6 +22027,7 @@ the given function which should return 0 when the desired element is found. The function takes two #gconstpointer arguments, the #GSList element's data as the first argument and the given user data. + the found #GSList element, or %NULL if it is not found @@ -18956,7 +22053,11 @@ given user data. - Calls a function for each element of a #GSList. + Calls a function for each element of a #GSList. + +It is safe for @func to remove the element from @list, but it must +not modify any part of the list after that element. + @@ -18983,7 +22084,15 @@ The freed elements are returned to the slice allocator. If list elements contain dynamically-allocated memory, you should either use g_slist_free_full() or free them manually -first. +first. + +It can be combined with g_steal_pointer() to ensure the list head pointer +is not left dangling: +|[<!-- language="C" --> +GSList *list_of_borrowed_things = …; /<!-- -->* (transfer container) *<!-- -->/ +g_slist_free (g_steal_pointer (&list_of_borrowed_things)); +]| + @@ -18999,6 +22108,7 @@ first. Frees one #GSList element. It is usually used after g_slist_remove_link(). + @@ -19013,7 +22123,20 @@ It is usually used after g_slist_remove_link(). Convenience method, which frees all the memory used by a #GSList, and -calls the specified destroy function on every element's data. +calls the specified destroy function on every element's data. + +@free_func must not modify the list (eg, by removing the freed +element from it). + +It can be combined with g_steal_pointer() to ensure the list head pointer +is not left dangling ­— this also has the nice property that the head pointer +is cleared before any of the list elements are freed, to prevent double frees +from @free_func: +|[<!-- language="C" --> +GSList *list_of_owned_things = …; /<!-- -->* (transfer full) (element-type GObject) *<!-- -->/ +g_slist_free_full (g_steal_pointer (&list_of_owned_things), g_object_unref); +]| + @@ -19033,6 +22156,7 @@ calls the specified destroy function on every element's data. Gets the position of the element containing the given data (starting from 0). + the index of the element containing the data, or -1 if the data is not found @@ -19053,6 +22177,7 @@ the given data (starting from 0). Inserts a new element into the list at the given position. + the new start of the #GSList @@ -19081,6 +22206,7 @@ the given data (starting from 0). Inserts a node before @sibling containing @data. + the new head of the list. @@ -19109,6 +22235,7 @@ the given data (starting from 0). Inserts a new element into the list, using the given comparison function to determine its position. + the new start of the #GSList @@ -19137,6 +22264,7 @@ comparison function to determine its position. Inserts a new element into the list, using the given comparison function to determine its position. + the new start of the #GSList @@ -19170,6 +22298,7 @@ comparison function to determine its position. Gets the last element in a #GSList. This function iterates over the whole list. + the last element in the #GSList, or %NULL if the #GSList has no elements @@ -19192,6 +22321,7 @@ This function iterates over the whole list. This function iterates over the whole list to count its elements. To check whether the list is non-empty, it is faster to check @list against %NULL. + the number of elements in the #GSList @@ -19207,6 +22337,7 @@ check @list against %NULL. Gets the element at the given position in a #GSList. + the element, or %NULL if the position is off the end of the #GSList @@ -19229,6 +22360,7 @@ check @list against %NULL. Gets the data of the element at the given position. + the element's data, or %NULL if the position is off the end of the #GSList @@ -19250,6 +22382,7 @@ check @list against %NULL. Gets the position of the given element in the #GSList (starting from 0). + the position of the element in the #GSList, or -1 if the element is not found @@ -19282,6 +22415,7 @@ GSList *list = NULL; list = g_slist_prepend (list, "last"); list = g_slist_prepend (list, "first"); ]| + the new start of the #GSList @@ -19305,6 +22439,7 @@ list = g_slist_prepend (list, "first"); Removes an element from a #GSList. If two elements contain the same data, only the first is removed. If none of the elements contain the data, the #GSList is unchanged. + the new start of the #GSList @@ -19329,6 +22464,7 @@ If none of the elements contain the data, the #GSList is unchanged. Returns the new head of the list. Contrast with g_slist_remove() which removes only the first node matching the given data. + new head of @list @@ -19359,6 +22495,7 @@ requires time that is proportional to the length of the list (ie. O(n)). If you find yourself using g_slist_remove_link() frequently, you should consider a different data structure, such as the doubly-linked #GList. + the new start of the #GSList, without the element @@ -19382,6 +22519,7 @@ such as the doubly-linked #GList. Reverses a #GSList. + the start of the reversed #GSList @@ -19398,7 +22536,9 @@ such as the doubly-linked #GList. - Sorts a #GSList using the given comparison function. + Sorts a #GSList using the given comparison function. The algorithm +used is a stable sort. + the start of the sorted #GSList @@ -19424,6 +22564,7 @@ such as the doubly-linked #GList. Like g_slist_sort(), but the sort function accepts a user data argument. + new head of the list @@ -19451,37 +22592,132 @@ such as the doubly-linked #GList. Use this macro as the return value of a #GSourceFunc to leave the #GSource in the main loop. + + + Cast a function pointer to a #GSourceFunc, suppressing warnings from GCC 8 +onwards with `-Wextra` or `-Wcast-function-type` enabled about the function +types being incompatible. + +For example, the correct type of callback for a source created by +g_child_watch_source_new() is #GChildWatchFunc, which accepts more arguments +than #GSourceFunc. Casting the function with `(GSourceFunc)` to call +g_source_set_callback() will trigger a warning, even though it will be cast +back to the correct type before it is called by the source. + + + + a function pointer. + + + Use this macro as the return value of a #GSourceFunc to remove the #GSource from the main loop. + The square root of two. + + + Accepts a macro or a string and converts it into a string after +preprocessor argument expansion. For example, the following code: + +|[<!-- language="C" --> +#define AGE 27 +const gchar *greeting = G_STRINGIFY (AGE) " today!"; +]| + +is transformed by the preprocessor into (code equivalent to): + +|[<!-- language="C" --> +const gchar *greeting = "27 today!"; +]| + + + + a macro or a string + + + + + + + + + + + + Returns a member of a structure at a given offset, using the given type. + + + + the type of the struct field + + + a pointer to a struct + + + the offset of the field from the start of the struct, + in bytes + + + + + Returns an untyped pointer to a given offset of a struct. + + + + a pointer to a struct + + + the offset from the start of the struct, in bytes + + + + + Returns the offset, in bytes, of a member of a struct. + + + + a structure type, e.g. #GtkWidget + + + a field in the structure, e.g. @window + + + The standard delimiters, used in g_strdelimit(). + + + + + + + @@ -19499,6 +22735,7 @@ can place them here. If you want to use your own message handler you can set the @msg_handler field. The type of the message handler function is declared by #GScannerMsgFunc. + unused @@ -19584,6 +22821,7 @@ is declared by #GScannerMsgFunc. Returns the current line in the input stream (counting from 1). This is the line of the last token parsed via g_scanner_get_next_token(). + the current line @@ -19599,6 +22837,7 @@ g_scanner_get_next_token(). Returns the current position in the current line (counting from 0). This is the position of the last token parsed via g_scanner_get_next_token(). + the current position on the line @@ -19613,6 +22852,7 @@ g_scanner_get_next_token(). Gets the current token type. This is simply the @token field in the #GScanner structure. + the current token type @@ -19627,6 +22867,7 @@ field in the #GScanner structure. Gets the current token value. This is simply the @value field in the #GScanner structure. + the current token value @@ -19640,6 +22881,7 @@ field in the #GScanner structure. Frees all memory used by the #GScanner. + @@ -19653,6 +22895,7 @@ field in the #GScanner structure. Returns %TRUE if the scanner has reached the end of the file or text buffer. + %TRUE if the scanner has reached the end of the file or text buffer @@ -19667,6 +22910,7 @@ the file or text buffer. Outputs an error message, via the #GScanner message handler. + @@ -19690,6 +22934,7 @@ the file or text buffer. and also removes it from the input stream. The token data is placed in the @token, @value, @line, and @position fields of the #GScanner structure. + the type of the token @@ -19703,6 +22948,7 @@ the #GScanner structure. Prepares to scan a file. + @@ -19719,6 +22965,7 @@ the #GScanner structure. Prepares to scan a text buffer. + @@ -19741,6 +22988,7 @@ the #GScanner structure. Looks up a symbol in the current scope and return its value. If the symbol is not bound in the current scope, %NULL is returned. + the value of @symbol in the current scope, or %NULL if @symbol is not bound in the current scope @@ -19769,6 +23017,7 @@ results when changing scope or the scanner configuration after peeking the next token. Getting the next token after switching the scope or configuration will return whatever was peeked before, regardless of any symbols that may have been added or removed in the new scope. + the type of the token @@ -19782,6 +23031,7 @@ any symbols that may have been added or removed in the new scope. Adds a symbol to the given scope. + @@ -19809,6 +23059,7 @@ any symbols that may have been added or removed in the new scope. in the given scope of the #GScanner. The function is passed the symbol and value of each pair, and the given @user_data parameter. + @@ -19834,6 +23085,7 @@ parameter. Looks up a symbol in a scope and return its value. If the symbol is not bound in the scope, %NULL is returned. + the value of @symbol in the given scope, or %NULL if @symbol is not bound in the given scope. @@ -19856,6 +23108,7 @@ symbol is not bound in the scope, %NULL is returned. Removes a symbol from a scope. + @@ -19876,6 +23129,7 @@ symbol is not bound in the scope, %NULL is returned. Sets the current scope. + the old scope id @@ -19896,6 +23150,7 @@ symbol is not bound in the scope, %NULL is returned. and blows the file read ahead buffer. This is useful for third party uses of the scanners filedescriptor, which hooks onto the current scanning position. + @@ -19914,6 +23169,7 @@ followed by g_scanner_unexp_token() without an intermediate call to g_scanner_get_next_token(), as g_scanner_unexp_token() evaluates the scanner's current token (not the peeked token) to construct part of the message. + @@ -19959,6 +23215,7 @@ to construct part of the message. Outputs a warning message, via the #GScanner message handler. + @@ -19984,6 +23241,7 @@ The @config_templ structure specifies the initial settings of the scanner, which are copied into the #GScanner @config field. If you pass %NULL then the default settings are used. + the new #GScanner @@ -20000,6 +23258,7 @@ are used. Specifies the #GScanner parser configuration. Most settings can be changed during the parsing phase and will affect the lexical parsing of the next unpeeked token. + specifies which characters should be skipped by the scanner (the default is the whitespace characters: space, @@ -20140,6 +23399,7 @@ parsing of the next unpeeked token. Specifies the type of the message handler function. + @@ -20162,6 +23422,7 @@ parsing of the next unpeeked token. An enumeration specifying the base position for a g_io_channel_seek_position() operation. + the current position in the file. @@ -20175,8 +23436,10 @@ g_io_channel_seek_position() operation. The #GSequence struct is an opaque data type representing a [sequence][glib-Sequences] data type. + Adds a new item to the end of @seq. + an iterator pointing to the new item @@ -20194,7 +23457,8 @@ g_io_channel_seek_position() operation. Calls @func for each item in the sequence passing @user_data -to the function. +to the function. @func must not modify the sequence itself. + @@ -20217,6 +23481,7 @@ to the function. Frees the memory allocated for @seq. If @seq has a data destroy function associated with it, that function is called on all items in @seq. + @@ -20229,6 +23494,7 @@ in @seq. Returns the begin iterator for @seq. + the begin iterator for @seq. @@ -20242,6 +23508,7 @@ in @seq. Returns the end iterator for @seg + the end iterator for @seq @@ -20256,6 +23523,7 @@ in @seq. Returns the iterator at position @pos. If @pos is negative or larger than the number of items in @seq, the end iterator is returned. + The #GSequenceIter at position @pos @@ -20275,6 +23543,7 @@ than the number of items in @seq, the end iterator is returned. Returns the length of @seq. Note that this method is O(h) where `h' is the height of the tree. It is thus more efficient to use g_sequence_is_empty() when comparing the length to zero. + the length of @seq @@ -20287,14 +23556,19 @@ when comparing the length to zero. - Inserts @data into @sequence using @func to determine the new + Inserts @data into @seq using @cmp_func to determine the new position. The sequence must already be sorted according to @cmp_func; otherwise the new position of @data is undefined. -@cmp_func is called with two items of the @seq and @user_data. +@cmp_func is called with two items of the @seq, and @cmp_data. It should return 0 if the items are equal, a negative value if the first item comes before the second, and a positive value -if the second item comes before the first. +if the second item comes before the first. + +Note that when adding a large amount of data to a #GSequence, +it is more efficient to do unsorted insertions and then call +g_sequence_sort() or g_sequence_sort_iter(). + a #GSequenceIter pointing to the new item. @@ -20328,10 +23602,10 @@ It should return 0 if the iterators are equal, a negative value if the first iterator comes before the second, and a positive value if the second iterator comes before the first. -It is called with two iterators pointing into @seq. It should -return 0 if the iterators are equal, a negative value if the -first iterator comes before the second, and a positive value -if the second iterator comes before the first. +Note that when adding a large amount of data to a #GSequence, +it is more efficient to do unsorted insertions and then call +g_sequence_sort() or g_sequence_sort_iter(). + a #GSequenceIter pointing to the new item @@ -20350,7 +23624,7 @@ if the second iterator comes before the first. - user data passed to @cmp_func + user data passed to @iter_cmp @@ -20361,6 +23635,7 @@ if the second iterator comes before the first. This function is functionally identical to checking the result of g_sequence_get_length() being equal to zero. However this function is implemented in O(1) running time. + %TRUE if the sequence is empty, otherwise %FALSE. @@ -20379,16 +23654,14 @@ item is equal, it is not guaranteed that it is the first which is returned. In that case, you can use g_sequence_iter_next() and g_sequence_iter_prev() to get others. -@cmp_func is called with two items of the @seq and @user_data. +@cmp_func is called with two items of the @seq, and @cmp_data. It should return 0 if the items are equal, a negative value if the first item comes before the second, and a positive value if the second item comes before the first. This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions. +unsorted. + an #GSequenceIter pointing to the position of the first item found equal to @data according to @cmp_func and @@ -20401,7 +23674,7 @@ doing unsorted insertions. - data to lookup + data to look up @@ -20424,13 +23697,11 @@ if the first iterator comes before the second, and a positive value if the second iterator comes before the first. This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions. +unsorted. + an #GSequenceIter pointing to the position of - the first item found equal to @data according to @cmp_func + the first item found equal to @data according to @iter_cmp and @cmp_data, or %NULL if no such item exists @@ -20440,7 +23711,7 @@ doing unsorted insertions. - data to lookup + data to look up @@ -20455,6 +23726,7 @@ doing unsorted insertions. Adds a new item to the front of @seq + an iterator pointing to the new item @@ -20474,7 +23746,7 @@ doing unsorted insertions. Returns an iterator pointing to the position where @data would be inserted according to @cmp_func and @cmp_data. -@cmp_func is called with two items of the @seq and @user_data. +@cmp_func is called with two items of the @seq, and @cmp_data. It should return 0 if the items are equal, a negative value if the first item comes before the second, and a positive value if the second item comes before the first. @@ -20483,10 +23755,8 @@ If you are simply searching for an existing element of the sequence, consider using g_sequence_lookup(). This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions. +unsorted. + an #GSequenceIter pointing to the position where @data would have been inserted according to @cmp_func and @cmp_data @@ -20524,10 +23794,8 @@ If you are simply searching for an existing element of the sequence, consider using g_sequence_lookup_iter(). This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions. +unsorted. + a #GSequenceIter pointing to the position in @seq where @data would have been inserted according to @iter_cmp @@ -20560,6 +23828,7 @@ doing unsorted insertions. return 0 if they are equal, a negative value if the first comes before the second, and a positive value if the second comes before the first. + @@ -20580,12 +23849,13 @@ if the second comes before the first. Like g_sequence_sort(), but uses a #GSequenceIterCompareFunc instead -of a GCompareDataFunc as the compare function +of a #GCompareDataFunc as the compare function @cmp_func is called with two iterators pointing into @seq. It should return 0 if the iterators are equal, a negative value if the first iterator comes before the second, and a positive value if the second iterator comes before the first. + @@ -20606,7 +23876,9 @@ iterator comes before the first. Calls @func for each item in the range (@begin, @end) passing -@user_data to the function. +@user_data to the function. @func must not modify the sequence +itself. + @@ -20631,6 +23903,7 @@ iterator comes before the first. Returns the data that @iter points to. + the data that @iter points to @@ -20644,6 +23917,7 @@ iterator comes before the first. Inserts a new item just before the item pointed to by @iter. + an iterator pointing to the new item @@ -20664,6 +23938,7 @@ iterator comes before the first. After calling this function @dest will point to the position immediately after @src. It is allowed for @src and @dest to point into different sequences. + @@ -20680,14 +23955,15 @@ sequences. - Inserts the (@begin, @end) range at the destination pointed to by ptr. + Inserts the (@begin, @end) range at the destination pointed to by @dest. The @begin and @end iters must point into the same sequence. It is allowed for @dest to point to a different sequence than the one pointed into by @begin and @end. -If @dest is NULL, the range indicated by @begin and @end is -removed from the sequence. If @dest iter points to a place within +If @dest is %NULL, the range indicated by @begin and @end is +removed from the sequence. If @dest points to a place within the (@begin, @end) range, the range does not move. + @@ -20710,6 +23986,7 @@ the (@begin, @end) range, the range does not move. Creates a new GSequence. The @data_destroy function, if non-%NULL will be called on all items when the sequence is destroyed and on items that are removed from the sequence. + a new #GSequence @@ -20728,6 +24005,7 @@ guaranteed to be exactly in the middle. The @begin and @end iterators must both point to the same sequence and @begin must come before or be equal to @end in the sequence. + a #GSequenceIter pointing somewhere in the (@begin, @end) range @@ -20750,6 +24028,7 @@ end iterator to this function. If the sequence has a data destroy function associated with it, this function is called on the data for the removed item. + @@ -20765,6 +24044,7 @@ function is called on the data for the removed item. If the sequence has a data destroy function associated with it, this function is called on the data for the removed items. + @@ -20783,6 +24063,7 @@ function is called on the data for the removed items. Changes the data for the item pointed to by @iter to be @data. If the sequence has a data destroy function associated with it, that function is called on the existing data that @iter pointed to. + @@ -20798,15 +24079,17 @@ function is called on the existing data that @iter pointed to. - Moves the data pointed to a new position as indicated by @cmp_func. This + Moves the data pointed to by @iter to a new position as indicated by +@cmp_func. This function should be called for items in a sequence already sorted according to @cmp_func whenever some aspect of an item changes so that @cmp_func may return different values for that item. -@cmp_func is called with two items of the @seq and @user_data. +@cmp_func is called with two items of the @seq, and @cmp_data. It should return 0 if the items are equal, a negative value if the first item comes before the second, and a positive value if the second item comes before the first. + @@ -20830,10 +24113,12 @@ the second item comes before the first. a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as the compare function. -@iter_cmp is called with two iterators pointing into @seq. It should +@iter_cmp is called with two iterators pointing into the #GSequence that +@iter points into. It should return 0 if the iterators are equal, a negative value if the first iterator comes before the second, and a positive value if the second iterator comes before the first. + @@ -20855,6 +24140,7 @@ iterator comes before the first. Swaps the items pointed to by @a and @b. It is allowed for @a and @b to point into difference sequences. + @@ -20873,11 +24159,13 @@ to point into difference sequences. The #GSequenceIter struct is an opaque data type representing an iterator pointing into a #GSequence. + Returns a negative number if @a comes before @b, 0 if they are equal, and a positive number if @a comes after @b. The @a and @b iterators must point into the same sequence. + a negative number if @a comes before @b, 0 if they are equal, and a positive number if @a comes after @b @@ -20896,6 +24184,7 @@ The @a and @b iterators must point into the same sequence. Returns the position of @iter + the position of @iter @@ -20909,6 +24198,7 @@ The @a and @b iterators must point into the same sequence. Returns the #GSequence that @iter points into. + the #GSequence that @iter points into @@ -20922,6 +24212,7 @@ The @a and @b iterators must point into the same sequence. Returns whether @iter is the begin iterator + whether @iter is the begin iterator @@ -20935,6 +24226,7 @@ The @a and @b iterators must point into the same sequence. Returns whether @iter is the end iterator + Whether @iter is the end iterator @@ -20951,6 +24243,7 @@ The @a and @b iterators must point into the same sequence. If @iter is closer than -@delta positions to the beginning of the sequence, the begin iterator is returned. If @iter is closer than @delta positions to the end of the sequence, the end iterator is returned. + a #GSequenceIter which is @delta positions away from @iter @@ -20970,6 +24263,7 @@ to the end of the sequence, the end iterator is returned. Returns an iterator pointing to the next position after @iter. If @iter is the end iterator, the end iterator is returned. + a #GSequenceIter pointing to the next position after @iter @@ -20984,6 +24278,7 @@ If @iter is the end iterator, the end iterator is returned. Returns an iterator pointing to the previous position before @iter. If @iter is the begin iterator, the begin iterator is returned. + a #GSequenceIter pointing to the previous position before @iter @@ -21001,6 +24296,7 @@ If @iter is the begin iterator, the begin iterator is returned. A #GSequenceIterCompareFunc is a function used to compare iterators. It must return zero if the iterators compare equal, a negative value if @a comes before @b, and a positive value if @b comes before @a. + zero if the iterators are equal, a negative value if @a comes before @b, and a positive value if @b comes before @a. @@ -21023,6 +24319,7 @@ if @a comes before @b, and a positive value if @b comes before @a. Error codes returned by shell functions. + Mismatched or otherwise mangled quoting. @@ -21034,6 +24331,7 @@ if @a comes before @b, and a positive value if @b comes before @a. + @@ -21050,6 +24348,7 @@ if @a comes before @b, and a positive value if @b comes before @a. The `GSource` struct is an opaque data type representing an event source. + @@ -21100,6 +24399,7 @@ additional data. The size passed in must be at least The source will not initially be associated with any #GMainContext and must be added to one with g_source_attach() before it will be executed. + the newly-created #GSource. @@ -21134,6 +24434,7 @@ is attached to it. This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. + @@ -21161,6 +24462,7 @@ Do not call this API on a #GSource that you did not create. Using this API forces the linear scanning of event sources on each main loop iteration. Newly-written event sources should try to use g_source_add_unix_fd() instead of this API. + @@ -21190,6 +24492,7 @@ This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. As the name suggests, this function is not available on Windows. + an opaque tag @@ -21211,7 +24514,11 @@ As the name suggests, this function is not available on Windows. Adds a #GSource to a @context so that it will be executed within -that context. Remove it by calling g_source_destroy(). +that context. Remove it by calling g_source_destroy(). + +This function is safe to call from any thread, regardless of which thread +the @context is running in. + the ID (greater than 0) for the source within the #GMainContext. @@ -21232,7 +24539,14 @@ that context. Remove it by calling g_source_destroy(). Removes a source from its #GMainContext, if any, and mark it as destroyed. The source cannot be subsequently added to another context. It is safe to call this on sources which have already been -removed from their context. +removed from their context. + +This does not unref the #GSource: if you still hold a reference, use +g_source_unref() to drop it. + +This function is safe to call from any thread, regardless of which thread +the #GMainContext is running in. + @@ -21246,6 +24560,7 @@ removed from their context. Checks whether a source is allowed to be called recursively. see g_source_set_can_recurse(). + whether recursion is allowed. @@ -21266,6 +24581,7 @@ case it will return that #GMainContext). In particular, you can always call this function on the source returned from g_main_current_source(). But calling this function on a source whose #GMainContext has been destroyed is an error. + the #GMainContext with which the source is associated, or %NULL if the context has not @@ -21283,6 +24599,7 @@ whose #GMainContext has been destroyed is an error. This function ignores @source and is otherwise the same as g_get_current_time(). use g_source_get_time() instead + @@ -21301,7 +24618,13 @@ g_get_current_time(). Returns the numeric ID for a particular source. The ID of a source is a positive integer which is unique within a particular main loop context. The reverse -mapping from ID to source is done by g_main_context_find_source_by_id(). +mapping from ID to source is done by g_main_context_find_source_by_id(). + +You can only call this function while the source is associated to a +#GMainContext instance; calling this function before g_source_attach() +or after g_source_destroy() yields undefined behavior. The ID returned +is unique within the #GMainContext instance passed to g_source_attach(). + the ID (greater than 0) for the source @@ -21316,6 +24639,7 @@ mapping from ID to source is done by g_main_context_find_source_by_id(). Gets a name for the source, used in debugging and profiling. The name may be #NULL if it has never been set with g_source_set_name(). + the name of the source @@ -21329,6 +24653,7 @@ name may be #NULL if it has never been set with g_source_set_name(). Gets the priority of a source. + the priority of the source @@ -21346,6 +24671,7 @@ g_source_set_ready_time(). Any time before the current monotonic time (including 0) is an indication that the source will fire immediately. + the monotonic ready time, -1 for "never" @@ -21365,6 +24691,7 @@ instead of having to repeatedly get the system monotonic time. The time here is the system monotonic time, if available, or some other reasonable alternative otherwise. See g_get_monotonic_time(). + the monotonic time in microseconds @@ -21443,6 +24770,7 @@ Calls to this function from a thread other than the one acquired by the source could be destroyed immediately after this function returns. However, once a source is destroyed it cannot be un-destroyed, so this function can be used for opportunistic checks from any thread. + %TRUE if the source has been destroyed @@ -21466,6 +24794,7 @@ This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. As the name suggests, this function is not available on Windows. + @@ -21495,6 +24824,7 @@ This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. As the name suggests, this function is not available on Windows. + the conditions reported on the fd @@ -21512,6 +24842,7 @@ As the name suggests, this function is not available on Windows. Increases the reference count on a source by one. + @source @@ -21528,6 +24859,7 @@ As the name suggests, this function is not available on Windows. This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. + @@ -21549,6 +24881,7 @@ this source. This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. + @@ -21574,6 +24907,7 @@ This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. As the name suggests, this function is not available on Windows. + @@ -21594,13 +24928,19 @@ called from the source's dispatch function. The exact type of @func depends on the type of source; ie. you should not count on @func being called with @data as its first -parameter. +parameter. Cast @func with G_SOURCE_FUNC() to avoid warnings about +incompatible function types. See [memory management of sources][mainloop-memory-management] for details on how to handle memory management of @data. Typically, you won't use this function. Instead use functions specific -to the type of source you are using. +to the type of source you are using, such as g_idle_add() or g_timeout_add(). + +It is safe to call this function multiple times on a source which has already +been attached to a context. The changes will take effect for the next time +the source is dispatched after this call returns. + @@ -21629,7 +24969,12 @@ to the type of source you are using. g_source_set_callback_indirect() assumes an initial reference count on @callback_data, and thus @callback_funcs->unref will eventually be called once more -than @callback_funcs->ref. +than @callback_funcs->ref. + +It is safe to call this function multiple times on a source which has already +been attached to a context. The changes will take effect for the next time +the source is dispatched after this call returns. + @@ -21654,6 +24999,7 @@ than @callback_funcs->ref. %TRUE, then while the source is being dispatched then this source will be processed normally. Otherwise, all processing of this source is blocked until the dispatch function returns. + @@ -21668,9 +25014,42 @@ source is blocked until the dispatch function returns. + + Set @dispose as dispose function on @source. @dispose will be called once +the reference count of @source reaches 0 but before any of the state of the +source is freed, especially before the finalize function is called. + +This means that at this point @source is still a valid #GSource and it is +allow for the reference count to increase again until @dispose returns. + +The dispose function can be used to clear any "weak" references to the +@source in other data structures in a thread-safe way where it is possible +for another thread to increase the reference count of @source again while +it is being freed. + +The finalize function can not be used for this purpose as at that point +@source is already partially freed and not valid anymore. + +This should only ever be called from #GSource implementations. + + + + + + + A #GSource to set the dispose function on + + + + #GSourceDisposeFunc to set on the source + + + + Sets the source functions (can be used to override default implementations) of an unattached source. + @@ -21702,6 +25081,7 @@ Use caution if changing the name while another thread may be accessing it with g_source_get_name(); that function does not copy the value, and changing the value will free it while the other thread may be attempting to use it. + @@ -21725,6 +25105,7 @@ dispatched. A child source always has the same priority as its parent. It is not permitted to change the priority of a source once it has been added as a child of another source. + @@ -21754,7 +25135,7 @@ so yourself, from the source dispatch function. Note that if you have a pair of sources where the ready time of one suggests that it will be delivered first but the priority for the other suggests that it would be delivered first, and the ready time -for both sources is reached during the same main context iteration +for both sources is reached during the same main context iteration, then the order of dispatch is undefined. It is a no-op to call this function on a #GSource which has already been @@ -21762,6 +25143,7 @@ destroyed with g_source_destroy(). This API is only intended to be used by implementations of #GSource. Do not call this API on a #GSource that you did not create. + @@ -21781,6 +25163,7 @@ Do not call this API on a #GSource that you did not create. Decreases the reference count of a source by one. If the resulting reference count is zero the source and associated memory will be destroyed. + @@ -21792,17 +25175,15 @@ memory will be destroyed. - Removes the source with the given id from the default main context. + Removes the source with the given ID from the default main context. You must +use g_source_destroy() for sources added to a non-default main context. -The id of a #GSource is given by g_source_get_id(), or will be +The ID of a #GSource is given by g_source_get_id(), or will be returned by the functions g_source_attach(), g_idle_add(), g_idle_add_full(), g_timeout_add(), g_timeout_add_full(), g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and g_io_add_watch_full(). -See also g_source_destroy(). You must use g_source_destroy() for sources -added to a non-default main context. - It is a programmer error to attempt to remove a non-existent source. More specifically: source IDs can be reissued after a source has been @@ -21813,6 +25194,7 @@ idle may already have run and been removed by the time this function is called on its (now invalid) source ID. This source ID may have been reissued, leading to the operation being performed against the wrong source. + For historical reasons, this function always returns %TRUE @@ -21828,6 +25210,7 @@ wrong source. Removes a source from the default main loop context given the source functions and user data. If multiple sources exist with the same source functions and user data, only one will be destroyed. + %TRUE if a source was found and removed. @@ -21847,6 +25230,7 @@ same source functions and user data, only one will be destroyed. Removes a source from the default main loop context given the user data for the callback. If multiple sources exist with the same user data, only one will be destroyed. + %TRUE if a source was found and removed. @@ -21875,6 +25259,7 @@ idle may already have run and been removed by the time this function is called on its (now invalid) source ID. This source ID may have been reissued, leading to the operation being performed against the wrong source. + @@ -21893,8 +25278,10 @@ wrong source. The `GSourceCallbackFuncs` struct contains functions for managing callback objects. + + @@ -21907,6 +25294,7 @@ functions for managing callback objects. + @@ -21919,6 +25307,7 @@ functions for managing callback objects. + @@ -21939,16 +25328,36 @@ functions for managing callback objects. + + Dispose function for @source. See g_source_set_dispose_function() for +details. + + + + + + + #GSource that is currently being disposed + + + + This is just a placeholder for #GClosureMarshal, which cannot be used here for dependency reasons. + Specifies the type of function passed to g_timeout_add(), -g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). +g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). + +When calling g_source_set_callback(), you may need to cast a function of a +different type to this type. Use G_SOURCE_FUNC() to avoid warnings about +incompatible function types. + %FALSE if the source should be removed. #G_SOURCE_CONTINUE and #G_SOURCE_REMOVE are more memorable names for the return value. @@ -21983,8 +25392,10 @@ any events need to be processed. It sets the returned timeout to -1 to indicate that it doesn't mind how long the poll() call blocks. In the check function, it tests the results of the poll() call to see if the required condition has been met, and returns %TRUE if so. + + @@ -22000,6 +25411,7 @@ required condition has been met, and returns %TRUE if so. + @@ -22012,6 +25424,7 @@ required condition has been met, and returns %TRUE if so. + @@ -22030,6 +25443,7 @@ required condition has been met, and returns %TRUE if so. + @@ -22048,6 +25462,7 @@ required condition has been met, and returns %TRUE if so. + Specifies the type of the setup function passed to g_spawn_async(), @@ -22080,6 +25495,7 @@ If you need to set up the child environment differently from the parent, you should use g_get_environ(), g_environ_setenv(), and g_environ_unsetenv(), and then pass the complete environment list to the `g_spawn...` function. + @@ -22092,6 +25508,7 @@ list to the `g_spawn...` function. Error codes returned by spawning processes. + Fork failed due to lack of memory. @@ -22111,7 +25528,7 @@ list to the `g_spawn...` function. execv() returned `E2BIG` - deprecated alias for %G_SPAWN_ERROR_TOO_BIG + deprecated alias for %G_SPAWN_ERROR_TOO_BIG (deprecated since GLib 2.32) execv() returned `ENOEXEC` @@ -22159,6 +25576,7 @@ list to the `g_spawn...` function. Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). + no flags, default behaviour @@ -22208,9 +25626,11 @@ list to the `g_spawn...` function. system call, depending on the platform and/or compiler being used. See g_stat() for more information. + The GString struct contains the public fields of a GString. + points to the character data. It may move as text is added. The @str field is null-terminated and so @@ -22230,6 +25650,7 @@ See g_stat() for more information. Adds a string onto the end of a #GString, expanding it if necessary. + @string @@ -22248,6 +25669,7 @@ it if necessary. Adds a byte onto the end of a #GString, expanding it if necessary. + @string @@ -22264,13 +25686,16 @@ it if necessary. - Appends @len bytes of @val to @string. Because @len is -provided, @val may contain embedded nuls and need not -be nul-terminated. + Appends @len bytes of @val to @string. -Since this function does not stop at nul bytes, it is -the caller's responsibility to ensure that @val has at -least @len addressable bytes. +If @len is positive, @val may contain embedded nuls and need +not be nul-terminated. It is the caller's responsibility to +ensure that @val has at least @len addressable bytes. + +If @len is negative, @val must be nul-terminated and @len +is considered to request the entire string length. This +makes g_string_append_len() equivalent to g_string_append(). + @string @@ -22285,7 +25710,7 @@ least @len addressable bytes. - number of bytes of @val to use + number of bytes of @val to use, or -1 for all of @val @@ -22294,6 +25719,7 @@ least @len addressable bytes. Appends a formatted string onto the end of a #GString. This function is similar to g_string_printf() except that the text is appended to the #GString. + @@ -22315,6 +25741,7 @@ that the text is appended to the #GString. Converts a Unicode character into UTF-8, and appends it to the string. + @string @@ -22333,6 +25760,7 @@ to the string. Appends @unescaped to @string, escaped any characters that are reserved in URIs using URI-style escape sequences. + @string @@ -22362,6 +25790,7 @@ are reserved in URIs using URI-style escape sequences. This function is similar to g_string_append_printf() except that the arguments to the format string are passed as a va_list. + @@ -22382,6 +25811,7 @@ as a va_list. Converts all uppercase ASCII letters to lowercase ASCII letters. + passed-in @string pointer, with all the uppercase characters converted to lowercase in place, @@ -22397,6 +25827,7 @@ as a va_list. Converts all lowercase ASCII letters to uppercase ASCII letters. + passed-in @string pointer, with all the lowercase characters converted to uppercase in place, @@ -22415,6 +25846,7 @@ as a va_list. destroying any previous contents. It is rather like the standard strcpy() function, except that you do not have to worry about having enough space to copy the string. + @string @@ -22436,6 +25868,7 @@ have to worry about having enough space to copy the string. This function uses the locale-specific tolower() function, which is almost never the right thing. Use g_string_ascii_down() or g_utf8_strdown() instead. + the #GString @@ -22450,6 +25883,7 @@ have to worry about having enough space to copy the string. Compares two strings for equality, returning %TRUE if they are equal. For use with #GHashTable. + %TRUE if the strings are the same length and contain the same bytes @@ -22469,6 +25903,7 @@ For use with #GHashTable. Removes @len bytes from a #GString, starting at position @pos. The rest of the #GString is shifted down to fill the gap. + @string @@ -22494,6 +25929,7 @@ The rest of the #GString is shifted down to fill the gap. If @free_segment is %TRUE it also frees the character data. If it's %FALSE, the caller gains ownership of the buffer and must free it after use with g_free(). + the character data of @string (i.e. %NULL if @free_segment is %TRUE) @@ -22519,6 +25955,7 @@ Note that while #GString ensures that its buffer always has a trailing nul character (not reflected in its "len"), the returned #GBytes does not include this extra nul; i.e. it has length exactly equal to the "len" member. + A newly allocated #GBytes containing contents of @string; @string itself is freed @@ -22532,6 +25969,7 @@ equal to the "len" member. Creates a hash code for @str; for use with #GHashTable. + hash code for @str @@ -22546,6 +25984,7 @@ equal to the "len" member. Inserts a copy of a string into a #GString, expanding it if necessary. + @string @@ -22567,6 +26006,7 @@ expanding it if necessary. Inserts a byte into a #GString, expanding it if necessary. + @string @@ -22588,13 +26028,16 @@ expanding it if necessary. Inserts @len bytes of @val into @string at @pos. -Because @len is provided, @val may contain embedded -nuls and need not be nul-terminated. If @pos is -1, -bytes are inserted at the end of the string. -Since this function does not stop at nul bytes, it is -the caller's responsibility to ensure that @val has at -least @len addressable bytes. +If @len is positive, @val may contain embedded nuls and need +not be nul-terminated. It is the caller's responsibility to +ensure that @val has at least @len addressable bytes. + +If @len is negative, @val must be nul-terminated and @len +is considered to request the entire string length. + +If @pos is -1, bytes are inserted at the end of the string. + @string @@ -22614,7 +26057,7 @@ least @len addressable bytes. - number of bytes of @val to insert + number of bytes of @val to insert, or -1 for all of @val @@ -22622,6 +26065,7 @@ least @len addressable bytes. Converts a Unicode character into UTF-8, and insert it into the string at the given position. + @string @@ -22644,6 +26088,7 @@ into the string at the given position. Overwrites part of a string, lengthening it if necessary. + @string @@ -22666,6 +26111,7 @@ into the string at the given position. Overwrites part of a string, lengthening it if necessary. This function will work with embedded nuls. + @string @@ -22692,6 +26138,7 @@ This function will work with embedded nuls. Adds a string on to the start of a #GString, expanding it if necessary. + @string @@ -22710,6 +26157,7 @@ expanding it if necessary. Adds a byte onto the start of a #GString, expanding it if necessary. + @string @@ -22727,12 +26175,15 @@ expanding it if necessary. Prepends @len bytes of @val to @string. -Because @len is provided, @val may contain -embedded nuls and need not be nul-terminated. -Since this function does not stop at nul bytes, -it is the caller's responsibility to ensure that -@val has at least @len addressable bytes. +If @len is positive, @val may contain embedded nuls and need +not be nul-terminated. It is the caller's responsibility to +ensure that @val has at least @len addressable bytes. + +If @len is negative, @val must be nul-terminated and @len +is considered to request the entire string length. This +makes g_string_prepend_len() equivalent to g_string_prepend(). + @string @@ -22747,7 +26198,7 @@ it is the caller's responsibility to ensure that - number of bytes in @val to prepend + number of bytes in @val to prepend, or -1 for all of @val @@ -22755,6 +26206,7 @@ it is the caller's responsibility to ensure that Converts a Unicode character into UTF-8, and prepends it to the string. + @string @@ -22776,6 +26228,7 @@ This is similar to the standard sprintf() function, except that the #GString buffer automatically expands to contain the results. The previous contents of the #GString are destroyed. + @@ -22800,6 +26253,7 @@ the current length, the string will be truncated. If the length is greater than the current length, the contents of the newly added area are undefined. (However, as always, string->str[string->len] will be a nul byte.) + @string @@ -22817,6 +26271,7 @@ always, string->str[string->len] will be a nul byte.) Cuts off the end of the GString, leaving the first @len bytes. + @string @@ -22837,6 +26292,7 @@ always, string->str[string->len] will be a nul byte.) This function uses the locale-specific toupper() function, which is almost never the right thing. Use g_string_ascii_up() or g_utf8_strup() instead. + @string @@ -22852,6 +26308,7 @@ always, string->str[string->len] will be a nul byte.) Writes a formatted string into a #GString. This function is similar to g_string_printf() except that the arguments to the format string are passed as a va_list. + @@ -22874,10 +26331,12 @@ the arguments to the format string are passed as a va_list. An opaque data structure representing String Chunks. It should only be accessed by using the following functions. + Frees all strings contained within the #GStringChunk. After calling g_string_chunk_clear() it is not safe to access any of the strings which were contained within it. + @@ -22892,6 +26351,7 @@ access any of the strings which were contained within it. Frees all memory allocated by the #GStringChunk. After calling g_string_chunk_free() it is not safe to access any of the strings which were contained within it. + @@ -22914,6 +26374,7 @@ does not check for duplicates. Also strings added with g_string_chunk_insert() will not be searched by g_string_chunk_insert_const() when looking for duplicates. + a pointer to the copy of @string within the #GStringChunk @@ -22944,6 +26405,7 @@ should be done very carefully. Note that g_string_chunk_insert_const() will not return a pointer to a string added with g_string_chunk_insert(), even if they do match. + a pointer to the new or existing copy of @string within the #GStringChunk @@ -22970,6 +26432,7 @@ bytes. The characters in the returned string can be changed, if necessary, though you should not change anything after the end of the string. + a pointer to the copy of @string within the #GStringChunk @@ -22992,6 +26455,7 @@ though you should not change anything after the end of the string. Creates a new #GStringChunk. + a new #GStringChunk @@ -23007,30 +26471,73 @@ though you should not change anything after the end of the string. + + Creates a unique temporary directory for each unit test and uses +g_set_user_dirs() to set XDG directories to point into subdirectories of it +for the duration of the unit test. The directory tree is cleaned up after the +test finishes successfully. Note that this doesn’t take effect until +g_test_run() is called, so calls to (for example) g_get_user_home_dir() will +return the system-wide value when made in a test program’s main() function. + +The following functions will return subdirectories of the temporary directory +when this option is used. The specific subdirectory paths in use are not +guaranteed to be stable API — always use a getter function to retrieve them. + + - g_get_home_dir() + - g_get_user_cache_dir() + - g_get_system_config_dirs() + - g_get_user_config_dir() + - g_get_system_data_dirs() + - g_get_user_data_dir() + - g_get_user_runtime_dir() + +The subdirectories may not be created by the test harness; as with normal +calls to functions like g_get_user_cache_dir(), the caller must be prepared +to create the directory if it doesn’t exist. + + + Evaluates to a time span of one day. + Evaluates to a time span of one hour. + Evaluates to a time span of one millisecond. + Evaluates to a time span of one minute. + Evaluates to a time span of one second. + + + Works like g_mutex_trylock(), but for a lock defined with +#G_LOCK_DEFINE. + + + + the name of the lock + + + An opaque structure representing a test case. + + @@ -23053,6 +26560,7 @@ though you should not change anything after the end of the string. The type used for test case functions that take an extra pointer argument. + @@ -23080,6 +26588,7 @@ Note: as a general rule of automake, files that are generated only as part of the build-from-git process (but then are distributed with the tarball) always go in srcdir (even if doing a srcdir != builddir build from git) and are considered as distributed files. + a file that was included in the distribution tarball @@ -23098,6 +26607,7 @@ the test case. @fixture will be a pointer to the area of memory allocated by the test framework, of the size requested. If the requested size was zero then @fixture will be equal to @user_data. + @@ -23114,11 +26624,13 @@ zero then @fixture will be equal to @user_data. The type used for test case functions. + + @@ -23129,6 +26641,7 @@ zero then @fixture will be equal to @user_data. Internal function for gtester to free test log messages, no ABI guarantees provided. + @@ -23140,6 +26653,7 @@ zero then @fixture will be equal to @user_data. Internal function for gtester to retrieve test log messages, no ABI guarantees provided. + @@ -23151,6 +26665,7 @@ zero then @fixture will be equal to @user_data. Internal function for gtester to decode test log messages, no ABI guarantees provided. + @@ -23168,6 +26683,7 @@ zero then @fixture will be equal to @user_data. Internal function for gtester to decode test log messages, no ABI guarantees provided. + @@ -23175,6 +26691,7 @@ zero then @fixture will be equal to @user_data. Specifies the prototype of fatal log handler functions. + %TRUE if the program should abort, %FALSE otherwise @@ -23199,6 +26716,7 @@ zero then @fixture will be equal to @user_data. + @@ -23211,11 +26729,12 @@ zero then @fixture will be equal to @user_data. - - + + Internal function for gtester to free test log messages, no ABI guarantees provided. + @@ -23227,6 +26746,7 @@ zero then @fixture will be equal to @user_data. + @@ -23252,11 +26772,23 @@ zero then @fixture will be equal to @user_data. + + + + + + + + + + + Flags to pass to g_test_trap_subprocess() to control input and output. Note that in contrast with g_test_trap_fork(), the default is to not show stdout and stderr. + If this flag is given, the child process will inherit the parent's stdin. Otherwise, the child's @@ -23277,8 +26809,10 @@ not show stdout and stderr. An opaque structure representing a test suite. + Adds @test_case to @suite. + @@ -23295,6 +26829,7 @@ not show stdout and stderr. Adds @nestedsuite to @suite. + @@ -23310,12 +26845,13 @@ not show stdout and stderr. - + Test traps are guards around forked tests. These flags determine what traps to set. #GTestTrapFlags is used only with g_test_trap_fork(), which is deprecated. g_test_trap_subprocess() uses -#GTestTrapSubprocessFlags. +#GTestSubprocessFlags. + Redirect stdout of the test child to `/dev/null` so it cannot be observed on the console during test @@ -23348,6 +26884,7 @@ explicitly. The structure is opaque -- none of its fields may be directly accessed. + This function creates a new thread. The new thread starts by invoking @func with the argument data. The thread will run until @func returns @@ -23367,7 +26904,16 @@ If you are using threads to offload (potentially many) short-lived tasks, multiple #GThreads. To free the struct returned by this function, use g_thread_unref(). -Note that g_thread_join() implicitly unrefs the #GThread as well. +Note that g_thread_join() implicitly unrefs the #GThread as well. + +New threads by default inherit their scheduler policy (POSIX) or thread +priority (Windows) of the thread creating the new thread. + +This behaviour changed in GLib 2.64: before threads on Windows were not +inheriting the thread priority but were spawned with the default priority. +Starting with GLib 2.64 the behaviour is now consistent between Windows and +POSIX and all threads inherit their parent thread's priority. + the new #GThread @@ -23393,6 +26939,7 @@ it allows for the possibility of failure. If a thread can not be created (due to resource limits), @error is set and %NULL is returned. + the new #GThread, or %NULL if an error occurred @@ -23429,6 +26976,7 @@ g_thread_join() consumes the reference to the passed-in @thread. This will usually cause the #GThread struct and associated resources to be freed. Use g_thread_ref() to obtain an extra reference if you want to keep the GThread alive beyond the g_thread_join() call. + the return value of the thread @@ -23442,6 +26990,7 @@ want to keep the GThread alive beyond the g_thread_join() call. Increase the reference count on @thread. + a new reference to @thread @@ -23460,6 +27009,7 @@ resources associated with it. Note that each thread holds a reference to its #GThread while it is running, so it is safe to drop your own reference to it if you don't need it anymore. + @@ -23489,6 +27039,7 @@ You must only call g_thread_exit() from a thread that you created yourself with g_thread_new() or related APIs. You must not call this function from a thread created with another threading library or or from within a #GThreadPool. + @@ -23509,6 +27060,7 @@ were not created by GLib (i.e. those created by other threading APIs). This may be useful for thread identification purposes (i.e. comparisons) but you must not use GLib functions (such as g_thread_join()) on these threads. + the #GThread representing the current thread @@ -23519,6 +27071,7 @@ as g_thread_join()) on these threads. that other threads can run. This function is often used as a method to make busy wait less evil. + @@ -23526,6 +27079,7 @@ This function is often used as a method to make busy wait less evil. Possible errors of thread related functions. + a thread couldn't be created due to resource shortage. Try again later. @@ -23534,6 +27088,7 @@ This function is often used as a method to make busy wait less evil. Specifies the type of the @func functions passed to g_thread_new() or g_thread_try_new(). + the return value of the thread @@ -23549,6 +27104,7 @@ or g_thread_try_new(). The #GThreadPool struct represents a thread pool. It has three public read-only members, but the underlying struct is bigger, so you must not copy this struct. + the function to execute in the threads of this pool @@ -23576,6 +27132,7 @@ or only the currently running) are ready. Otherwise the function returns immediately. After calling this function @pool must not be used anymore. + @@ -23596,6 +27153,7 @@ After calling this function @pool must not be used anymore. Returns the maximal number of threads for @pool. + the maximal number of threads @@ -23609,6 +27167,7 @@ After calling this function @pool must not be used anymore. Returns the number of threads currently running in @pool. + the number of threads currently running @@ -23623,6 +27182,7 @@ After calling this function @pool must not be used anymore. Moves the item to the front of the queue of unprocessed items, so that it will be processed next. + %TRUE if the item was found and moved @@ -23653,6 +27213,7 @@ created. In that case @data is simply appended to the queue of work to do. Before version 2.32, this function did not return a success status. + %TRUE on success, %FALSE if an error occurred @@ -23689,6 +27250,7 @@ errors. An error can only occur when a new thread couldn't be created. Before version 2.32, this function did not return a success status. + %TRUE on success, %FALSE if an error occurred @@ -23715,6 +27277,7 @@ that threads are executed cannot be guaranteed 100%. Threads are scheduled by the operating system and are executed at random. It cannot be assumed that threads are executed in the order they are created. + @@ -23740,6 +27303,7 @@ created. Returns the number of tasks still unprocessed in @pool. + the number of unprocessed tasks @@ -23758,6 +27322,7 @@ being stopped. If this function returns 0, threads waiting in the thread pool for new work are not stopped. + the maximum @interval (milliseconds) to wait for new tasks in the thread pool before stopping the @@ -23767,6 +27332,7 @@ pool for new work are not stopped. Returns the maximal allowed number of unused threads. + the maximal number of unused threads @@ -23774,6 +27340,7 @@ pool for new work are not stopped. Returns the number of currently unused threads. + the number of currently unused threads @@ -23807,6 +27374,7 @@ errors. An error can only occur when @exclusive is set to %TRUE and not all @max_threads threads could be created. See #GThreadError for possible errors that may occur. Note, even in case of error a valid #GThreadPool is returned. + the new #GThreadPool @@ -23842,6 +27410,7 @@ except this is done on a per thread basis. By setting @interval to 0, idle threads will not be stopped. The default value is 15000 (15 seconds). + @@ -23859,6 +27428,7 @@ If @max_threads is -1, no limit is imposed on the number of unused threads. The default value is 2. + @@ -23873,6 +27443,7 @@ The default value is 2. Stops all currently unused threads. This does not change the maximal number of unused threads. This function can be used to regularly stop all unused threads e.g. from g_timeout_add(). + @@ -23887,6 +27458,7 @@ Second, if the time is in local time, specifies if it is local standard time or local daylight time. This is important for the case where the same local time occurs twice (during daylight savings time transitions, for example). + the time is in local standard time @@ -23897,14 +27469,18 @@ transitions, for example). the time is in UTC - + Represents a precise time, with seconds and microseconds. Similar to the struct timeval returned by the gettimeofday() UNIX system call. -GLib is attempting to unify around the use of 64bit integers to +GLib is attempting to unify around the use of 64-bit integers to represent microsecond-precision time. As such, this type will be -removed from a future version of GLib. +removed from a future version of GLib. A consequence of using `glong` for +`tv_sec` is that on 32-bit systems `GTimeVal` is subject to the year 2038 +problem. + Use #GDateTime or #guint64 instead. + seconds @@ -23913,9 +27489,12 @@ removed from a future version of GLib. microseconds - + Adds the given number of microseconds to @time_. @microseconds can also be negative to decrease the value of @time_. + #GTimeVal is not year-2038-safe. Use `guint64` for + representing microseconds since the epoch, or use #GDateTime. + @@ -23930,7 +27509,7 @@ also be negative to decrease the value of @time_. - + Converts @time_ into an RFC 3339 encoded string, relative to the Coordinated Universal Time (UTC). This is one of the many formats allowed by ISO 8601. @@ -23953,10 +27532,21 @@ Use g_date_time_format() or g_strdup_printf() if a different variation of ISO 8601 format is required. If @time_ represents a date which is too large to fit into a `struct tm`, -%NULL will be returned. This is platform dependent, but it is safe to assume -years up to 3000 are supported. The return value of g_time_val_to_iso8601() -has been nullable since GLib 2.54; before then, GLib would crash under the -same conditions. +%NULL will be returned. This is platform dependent. Note also that since +`GTimeVal` stores the number of seconds as a `glong`, on 32-bit systems it +is subject to the year 2038 problem. Accordingly, since GLib 2.62, this +function has been deprecated. Equivalent functionality is available using: +|[ +GDateTime *dt = g_date_time_new_from_unix_utc (time_val); +iso8601_string = g_date_time_format_iso8601 (dt); +g_date_time_unref (dt); +]| + +The return value of g_time_val_to_iso8601() has been nullable since GLib +2.54; before then, GLib would crash under the same conditions. + #GTimeVal is not year-2038-safe. Use + g_date_time_format_iso8601(dt) instead. + a newly allocated string containing an ISO 8601 date, or %NULL if @time_ was too large @@ -23969,14 +27559,27 @@ same conditions. - + Converts a string containing an ISO 8601 encoded date and time to a #GTimeVal and puts it into @time_. @iso_date must include year, month, day, hours, minutes, and seconds. It can optionally include fractions of a second and a time zone indicator. (In the absence of any time zone indication, the -timestamp is assumed to be in local time.) +timestamp is assumed to be in local time.) + +Any leading or trailing space in @iso_date is ignored. + +This function was deprecated, along with #GTimeVal itself, in GLib 2.62. +Equivalent functionality is available using code like: +|[ +GDateTime *dt = g_date_time_new_from_iso8601 (iso8601_string, NULL); +gint64 time_val = g_date_time_to_unix (dt); +g_date_time_unref (dt); +]| + #GTimeVal is not year-2038-safe. Use + g_date_time_new_from_iso8601() instead. + %TRUE if the conversion was successful. @@ -23996,6 +27599,7 @@ timestamp is assumed to be in local time.) #GTimeZone is an opaque structure whose members cannot be accessed directly. + Creates a #GTimeZone corresponding to @identifier. @@ -24013,7 +27617,8 @@ time values to be added to Coordinated Universal Time (UTC) to get the local time. In UNIX, the `TZ` environment variable typically corresponds -to the name of a file in the zoneinfo database, or string in +to the name of a file in the zoneinfo database, an absolute path to a file +somewhere else, or a string in "std offset [dst [offset],start[/time],end[/time]]" (POSIX) format. There are no spaces in the specification. The name of standard and daylight savings time zone must be three or more alphabetic @@ -24060,6 +27665,7 @@ for the list of time zones on Windows. You should release the return value by calling g_time_zone_unref() when you are done with it. + the requested timezone @@ -24081,11 +27687,30 @@ the `TZ` environment variable (including the possibility of %NULL). You should release the return value by calling g_time_zone_unref() when you are done with it. + the local timezone + + Creates a #GTimeZone corresponding to the given constant offset from UTC, +in seconds. + +This is equivalent to calling g_time_zone_new() with a string in the form +`[+|-]hh[:mm[:ss]]`. + + + a timezone at the given offset from UTC + + + + + offset to UTC, in seconds + + + + Creates a #GTimeZone corresponding to UTC. @@ -24094,6 +27719,7 @@ This is equivalent to calling g_time_zone_new() with a value like You should release the return value by calling g_time_zone_unref() when you are done with it. + the universal timezone @@ -24116,6 +27742,7 @@ non-existent times. If the non-existent local @time_ of 02:30 were requested on March 14th 2010 in Toronto then this function would adjust @time_ to be 03:00 and return the interval containing the adjusted time. + the interval containing @time_, never -1 @@ -24136,7 +27763,7 @@ adjusted time. - Finds an the interval within @tz that corresponds to the given @time_. + Finds an interval within @tz that corresponds to the given @time_. The meaning of @time_ depends on @type. If @type is %G_TIME_TYPE_UNIVERSAL then this function will always @@ -24154,6 +27781,7 @@ It is still possible for this function to fail. In Toronto, for example, 02:00 on March 14th 2010 does not exist (due to the leap forward to begin daylight savings time). -1 is returned in that case. + the interval containing @time_, or -1 in case of failure @@ -24180,6 +27808,7 @@ case. For example, in Toronto this is currently "EST" during the winter months and "EDT" during the summer months when daylight savings time is in effect. + the time zone abbreviation, which belongs to @tz @@ -24195,6 +27824,27 @@ is in effect. + + Get the identifier of this #GTimeZone, as passed to g_time_zone_new(). +If the identifier passed at construction time was not recognised, `UTC` will +be returned. If it was %NULL, the identifier of the local timezone at +construction time will be returned. + +The identifier will be returned in the same format as provided at +construction time: if provided as a time offset, that will be returned by +this function. + + + identifier for this timezone + + + + + a #GTimeZone + + + + Determines the offset to UTC in effect during a particular @interval of time in the time zone @tz. @@ -24202,6 +27852,7 @@ of time in the time zone @tz. The offset is the number of seconds that you add to UTC time to arrive at local time for @tz (ie: negative numbers for time zones west of GMT, positive numbers for east). + the number of seconds that should be added to UTC to get the local time in @tz @@ -24221,6 +27872,7 @@ west of GMT, positive numbers for east). Determines if daylight savings time is in effect during a particular @interval of time in the time zone @tz. + %TRUE if daylight savings time is in effect @@ -24238,6 +27890,7 @@ west of GMT, positive numbers for east). Increases the reference count on @tz. + a new reference to @tz. @@ -24251,6 +27904,7 @@ west of GMT, positive numbers for east). Decreases the reference count on @tz. + @@ -24264,10 +27918,12 @@ west of GMT, positive numbers for east). Opaque datatype that records a start time. + Resumes a timer that has previously been stopped with g_timer_stop(). g_timer_stop() must be called before using this function. + @@ -24280,6 +27936,7 @@ function. Destroys a timer, freeing associated resources. + @@ -24297,6 +27954,7 @@ elapsed time between the time it was started and the time it was stopped. The return value is the number of seconds elapsed, including any fractional part. The @microseconds out parameter is essentially useless. + seconds elapsed as a floating point value, including any fractional part. @@ -24315,10 +27973,25 @@ essentially useless. + + Exposes whether the timer is currently active. + + + %TRUE if the timer is running, %FALSE otherwise + + + + + a #GTimer. + + + + This function is useless; it's fine to call g_timer_start() on an already-started timer to reset the start time, so g_timer_reset() serves no purpose. + @@ -24334,6 +28007,7 @@ serves no purpose. report the time since g_timer_start() was called. g_timer_new() automatically marks the start time, so no need to call g_timer_start() immediately after creating the timer. + @@ -24347,6 +28021,7 @@ g_timer_start() immediately after creating the timer. Marks an end time, so calls to g_timer_elapsed() will return the difference between this end time and the start time. + @@ -24360,6 +28035,7 @@ difference between this end time and the start time. Creates a new timer, and starts timing (i.e. g_timer_start() is implicitly called for you). + a new #GTimer. @@ -24369,6 +28045,7 @@ implicitly called for you). The possible types of token returned from each g_scanner_get_next_token() call. + the end of the file @@ -24441,6 +28118,7 @@ g_scanner_get_next_token() call. A union holding the value of the token. + token symbol value @@ -24493,6 +28171,7 @@ g_scanner_get_next_token() call. The type of functions which are used to translate user-visible strings, for <option>--help</option> output. + a translation of the string for the current locale. The returned string is owned by GLib and must not be freed. @@ -24514,6 +28193,7 @@ strings, for <option>--help</option> output. Each piece of memory that is pushed onto the stack is cast to a GTrashStack*. #GTrashStack is deprecated without replacement + pointer to the previous element of the stack, gets stored in the first `sizeof (gpointer)` @@ -24526,6 +28206,7 @@ is cast to a GTrashStack*. Note that execution of this function is of O(N) complexity where N denotes the number of items on the stack. #GTrashStack is deprecated without replacement + the height of the stack @@ -24541,6 +28222,7 @@ where N denotes the number of items on the stack. Returns the element at the top of a #GTrashStack which may be %NULL. #GTrashStack is deprecated without replacement + the element at the top of the stack @@ -24555,6 +28237,7 @@ which may be %NULL. Pops a piece of memory off a #GTrashStack. #GTrashStack is deprecated without replacement + the element at the top of the stack @@ -24569,6 +28252,7 @@ which may be %NULL. Pushes a piece of memory onto a #GTrashStack. #GTrashStack is deprecated without replacement + @@ -24587,6 +28271,7 @@ which may be %NULL. Specifies which nodes are visited during several of the tree functions, including g_node_traverse() and g_node_find(). + only leaf nodes should be visited. This name has been introduced in 2.6, for older version use @@ -24615,6 +28300,7 @@ functions, including g_node_traverse() and g_node_find(). passed the key and value of each node, together with the @user_data parameter passed to g_tree_traverse(). If the function returns %TRUE, the traversal is stopped. + %TRUE to stop the traversal @@ -24646,6 +28332,7 @@ illustrated here: ![](Sorted_binary_tree_postorder.svg) - Level order: F, B, G, A, D, I, C, E, H ![](Sorted_binary_tree_breadth-first_traversal.svg) + vists a node's left child first, then the node itself, then its right child. This is the one to use if you @@ -24671,6 +28358,7 @@ illustrated here: The GTree struct is an opaque data structure representing a [balanced binary tree][glib-Balanced-Binary-Trees]. It should be accessed only by using the following functions. + Removes all keys and values from the #GTree and decreases its reference count by one. If keys and/or values are dynamically @@ -24678,6 +28366,7 @@ allocated, you should either free them first or create the #GTree using g_tree_new_full(). In the latter case the destroy functions you supplied will be called on all keys and values before destroying the #GTree. + @@ -24697,6 +28386,7 @@ The tree may not be modified while iterating over it (you can't add/remove items). To remove all items matching a predicate, you need to add each item to a list in your #GTraverseFunc as you walk over the tree, then walk the list and remove each item. + @@ -24722,6 +28412,7 @@ the tree, then walk the list and remove each item. If the #GTree contains no nodes, the height is 0. If the #GTree contains only one root node the height is 1. If the root node has children the height is 2, etc. + the height of @tree @@ -24744,6 +28435,7 @@ key is freed using that function. The tree is automatically 'balanced' as new key/value pairs are added, so that the distance from the root to every leaf is as small as possible. + @@ -24766,6 +28458,7 @@ so that the distance from the root to every leaf is as small as possible. Gets the value corresponding to the given key. Since a #GTree is automatically balanced as key/value pairs are added, key lookup is O(log n) (where n is the number of key/value pairs in the tree). + the value corresponding to the key, or %NULL if the key was not found @@ -24787,6 +28480,7 @@ is O(log n) (where n is the number of key/value pairs in the tree). associated value. This is useful if you need to free the memory allocated for the original key, for example before calling g_tree_remove(). + %TRUE if the key was found in the #GTree @@ -24800,11 +28494,11 @@ g_tree_remove(). the key to look up - + returns the original key - + returns the value associated with the key @@ -24812,6 +28506,7 @@ g_tree_remove(). Gets the number of nodes in a #GTree. + the number of nodes in @tree @@ -24827,6 +28522,7 @@ g_tree_remove(). Increments the reference count of @tree by one. It is safe to call this function from any thread. + the passed in #GTree @@ -24845,6 +28541,7 @@ If the #GTree was created using g_tree_new_full(), the key and value are freed using the supplied destroy functions, otherwise you have to make sure that any dynamically allocated values are freed yourself. If the key does not exist in the #GTree, the function does nothing. + %TRUE if the key was found (prior to 2.8, this function returned nothing) @@ -24871,6 +28568,7 @@ freed using that function. The tree is automatically 'balanced' as new key/value pairs are added, so that the distance from the root to every leaf is as small as possible. + @@ -24899,6 +28597,7 @@ the result of g_tree_search(). If @search_func returns -1, searching will proceed among the key/value pairs that have a smaller key; if @search_func returns 1, searching will proceed among the key/value pairs that have a larger key. + the value corresponding to the found key, or %NULL if the key was not found @@ -24924,6 +28623,7 @@ pairs that have a larger key. the key and value destroy functions. If the key does not exist in the #GTree, the function does nothing. + %TRUE if the key was found (prior to 2.8, this function returned nothing) @@ -24946,6 +28646,7 @@ If the key does not exist in the #GTree, the function does nothing. If you just want to visit all nodes in sorted order, use g_tree_foreach() instead. If you really need to visit nodes in a different order, consider using an [n-ary tree][glib-N-ary-Trees]. + @@ -24977,6 +28678,7 @@ be destroyed (if destroy functions were specified) and all memory allocated by @tree will be released. It is safe to call this function from any thread. + @@ -24989,6 +28691,7 @@ It is safe to call this function from any thread. Creates a new #GTree. + a newly allocated #GTree @@ -25008,6 +28711,7 @@ It is safe to call this function from any thread. Creates a new #GTree like g_tree_new() and allows to specify functions to free the memory allocated for the key and value that get called when removing the entry from the #GTree. + a newly allocated #GTree @@ -25038,6 +28742,7 @@ removing the entry from the #GTree. Creates a new #GTree with a comparison function that accepts user data. See g_tree_new() for more details. + a newly allocated #GTree @@ -25054,24 +28759,94 @@ See g_tree_new() for more details. + + This macro can be used to mark a function declaration as unavailable. +It must be placed before the function declaration. Use of a function +that has been annotated with this macros will produce a compiler warning. + + + + the major version that introduced the symbol + + + the minor version that introduced the symbol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The maximum length (in codepoints) of a compatibility or canonical decomposition of a single Unicode character. This is as defined by Unicode 6.1. + + + Hints the compiler that the expression is unlikely to evaluate to +a true value. The compiler may use this information for optimizations. + +|[<!-- language="C" --> +if (G_UNLIKELY (random () == 1)) + g_print ("a random one"); +]| + + + + the expression + + + + + Works like g_mutex_unlock(), but for a lock defined with +#G_LOCK_DEFINE. + + + + the name of the lock + + + Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@". + Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=". + Number of microseconds in one second (1 million). This macro is provided for code readability. + @@ -25081,6 +28856,7 @@ Since new unicode versions may add new types here, applications should be ready to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN. See [Unicode Line Breaking Algorithm](http://www.unicode.org/unicode/reports/tr14/). + Mandatory Break (BK) @@ -25220,6 +28996,7 @@ and is interchangeable with #PangoScript. Note that new types may be added in the future. Applications should be ready to handle unknown values. See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/). + a value never returned from g_unichar_get_script() @@ -25636,25 +29413,59 @@ See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr Osage. Since: 2.50 - Tangut. Since: 2.50 -@G_UNICODE_SCRIPT_MASARAM_GONDI, Masaram Gondi. Since: 2.54 -@G_UNICODE_SCRIPT_NUSHU, Nushu. Since: 2.54 -@G_UNICODE_SCRIPT_SOYOMBO, Soyombo. Since: 2.54 -@G_UNICODE_SCRIPT_ZANABAZAR_SQUARE Zanabazar Square. Since: 2.54 + Tangut. Since: 2.50 + Masaram Gondi. Since: 2.54 + Nushu. Since: 2.54 + Soyombo. Since: 2.54 + Zanabazar Square. Since: 2.54 + + + Dogra. Since: 2.58 + + + Gunjala Gondi. Since: 2.58 + + + Hanifi Rohingya. Since: 2.58 + + + Makasar. Since: 2.58 + + + Medefaidrin. Since: 2.58 + + + Old Sogdian. Since: 2.58 + + + Sogdian. Since: 2.58 + + + Elym. Since: 2.62 + + + Nand. Since: 2.62 + + + Rohg. Since: 2.62 + + + Wcho. Since: 2.62 These are the possible character classifications from the Unicode specification. See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values). + General category "Other, Control" (Cc) @@ -25749,6 +29560,7 @@ See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Ca The type of functions to be called when a UNIX fd watch source triggers. + %FALSE if the source should be removed @@ -25776,6 +29588,7 @@ to retrieve the full path associated to the logical id. The #GUserDirectory enumeration can be extended at later date. Not every platform has a directory for every logical id in this enumeration. + the user's Desktop directory @@ -25804,7 +29617,92 @@ enumeration. the number of enum values + + A stack-allocated #GVariantBuilder must be initialized if it is +used together with g_auto() to avoid warnings or crashes if +function returns before g_variant_builder_init() is called on the +builder. This macro can be used as initializer instead of an +explicit zeroing a variable when declaring it and a following +g_variant_builder_init(), but it cannot be assigned to a variable. + +The passed @variant_type should be a static GVariantType to avoid +lifetime issues, as copying the @variant_type does not happen in +the G_VARIANT_BUILDER_INIT() call, but rather in functions that +make sure that #GVariantBuilder is valid. + +|[ + g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING); +]| + + + + a const GVariantType* + + + + + A stack-allocated #GVariantDict must be initialized if it is used +together with g_auto() to avoid warnings or crashes if function +returns before g_variant_dict_init() is called on the builder. +This macro can be used as initializer instead of an explicit +zeroing a variable when declaring it and a following +g_variant_dict_init(), but it cannot be assigned to a variable. + +The passed @asv has to live long enough for #GVariantDict to gather +the entries from, as the gathering does not happen in the +G_VARIANT_DICT_INIT() call, but rather in functions that make sure +that #GVariantDict is valid. In context where the initialization +value has to be a constant expression, the only possible value of +@asv is %NULL. It is still possible to call g_variant_dict_init() +safely with a different @asv right after the variable was +initialized with G_VARIANT_DICT_INIT(). + +|[ + g_autoptr(GVariant) variant = get_asv_variant (); + g_auto(GVariantDict) dict = G_VARIANT_DICT_INIT (variant); +]| + + + + a GVariant* + + + + + Converts a string to a const #GVariantType. Depending on the +current debugging level, this function may perform a runtime check +to ensure that @string is a valid GVariant type string. + +It is always a programmer error to use this macro with an invalid +type string. If in doubt, use g_variant_type_string_is_valid() to +check if the string is valid. + +Since 2.24 + + + + a well-formed #GVariantType type string + + + + + Portable way to copy va_list variables. + +In order to use this function, you must include string.h yourself, +because this macro may use memmove() and GLib does not include +string.h for you. + + + + the va_list variable to place a copy of @ap2 in + + + a va_list + + + + @@ -25820,6 +29718,7 @@ If the compiler is configured to warn about the use of deprecated functions, then using functions that were deprecated in version %GLIB_VERSION_MIN_REQUIRED or earlier will cause warnings (but using functions deprecated in later releases will not). + @@ -26009,7 +29908,7 @@ This means that in total, for our "a{sv}" example, 91 bytes of type information would be allocated. The type information cache, additionally, uses a #GHashTable to -store and lookup the cached items and stores a pointer to this +store and look up the cached items and stores a pointer to this hash table in static storage. The hash table is freed when there are zero items in the type cache. @@ -26065,6 +29964,7 @@ bytes. If we were to have other dictionaries of the same type, we would use more memory for the serialised data and buffer management for those dictionaries, but the type information would be shared. + Creates a new #GVariant instance. @@ -26090,10 +29990,11 @@ const gchar *some_strings[] = { "a", "b", "c", NULL }; GVariant *new_variant; new_variant = g_variant_new ("(t^as)", - /<!-- -->* This cast is required. *<!-- -->/ + // This cast is required. (guint64) some_flags, some_strings); ]| + a new floating #GVariant instance @@ -26125,6 +30026,7 @@ same as @child_type, if given. If the @children are floating references (see g_variant_ref_sink()), the new instance takes ownership of them as if via g_variant_ref_sink(). + a floating reference to a new #GVariant array @@ -26137,7 +30039,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). an array of #GVariant pointers, the children - + @@ -26149,6 +30051,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). Creates a new boolean #GVariant instance -- either %TRUE or %FALSE. + a floating reference to a new boolean #GVariant instance @@ -26162,6 +30065,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). Creates a new byte #GVariant instance. + a floating reference to a new byte #GVariant instance @@ -26169,7 +30073,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). a #guint8 value - + @@ -26180,6 +30084,7 @@ string need not be valid UTF-8. The nul terminator character at the end of the string is stored in the array. + a floating reference to a new bytestring #GVariant instance @@ -26188,7 +30093,7 @@ the array. a normal nul-terminated string in no particular encoding - + @@ -26199,6 +30104,7 @@ the array. strings. If @length is -1 then @strv is %NULL-terminated. + a new floating #GVariant instance @@ -26206,7 +30112,7 @@ If @length is -1 then @strv is %NULL-terminated. an array of strings - + @@ -26222,6 +30128,7 @@ non-%NULL. @key must be a value of a basic type (ie: not a container). If the @key or @value are floating references (see g_variant_ref_sink()), the new instance takes ownership of them as if via g_variant_ref_sink(). + a floating reference to a new dictionary entry #GVariant @@ -26239,6 +30146,7 @@ the new instance takes ownership of them as if via g_variant_ref_sink(). Creates a new double #GVariant instance. + a floating reference to a new double #GVariant instance @@ -26264,6 +30172,7 @@ of a double-check that the form of the serialised data matches the caller's expectation. @n_elements must be the length of the @elements array. + a floating reference to a new array #GVariant instance @@ -26292,7 +30201,12 @@ expectation. inner interface for creation of new serialised values that gets called from various functions in gvariant.c. -A reference is taken on @bytes. +A reference is taken on @bytes. + +The data in @bytes must be aligned appropriately for the @type being loaded. +Otherwise this function will internally create a copy of the memory (since +GLib 2.60) or (in older versions) fail and exit the process. + a new #GVariant with a floating reference @@ -26336,7 +30250,13 @@ endianness. g_variant_byteswap() can be used to recover the original values. @notify will be called with @user_data when @data is no longer needed. The exact time of this call is unspecified and might even be -before this function returns. +before this function returns. + +Note: @data must be backed by memory that is aligned appropriately for the +@type being loaded. Otherwise this function will internally create a copy of +the memory (since GLib 2.60) or (in older versions) fail and exit the +process. + a new floating #GVariant of type @type @@ -26376,6 +30296,7 @@ before this function returns. By convention, handles are indexes into an array of file descriptors that are sent alongside a D-Bus message. If you're not interacting with D-Bus, you probably don't need them. + a floating reference to a new handle #GVariant instance @@ -26389,6 +30310,7 @@ with D-Bus, you probably don't need them. Creates a new int16 #GVariant instance. + a floating reference to a new int16 #GVariant instance @@ -26402,6 +30324,7 @@ with D-Bus, you probably don't need them. Creates a new int32 #GVariant instance. + a floating reference to a new int32 #GVariant instance @@ -26415,6 +30338,7 @@ with D-Bus, you probably don't need them. Creates a new int64 #GVariant instance. + a floating reference to a new int64 #GVariant instance @@ -26437,6 +30361,7 @@ of @child. If @child is a floating reference (see g_variant_ref_sink()), the new instance takes ownership of @child. + a floating reference to a new #GVariant maybe instance @@ -26456,6 +30381,7 @@ instance takes ownership of @child. Creates a D-Bus object path #GVariant with the contents of @string. @string must be a valid D-Bus object path. Use g_variant_is_object_path() if you're not sure. + a floating reference to a new object path #GVariant instance @@ -26475,6 +30401,7 @@ Each string must be a valid #GVariant object path; see g_variant_is_object_path(). If @length is -1 then @strv is %NULL-terminated. + a new floating #GVariant instance @@ -26482,7 +30409,7 @@ If @length is -1 then @strv is %NULL-terminated. an array of strings - + @@ -26525,6 +30452,7 @@ You may not use this function to return, unmodified, a single #GVariant pointer from the argument list. ie: @format may not solely be anything along the lines of "%*", "%?", "\%r", or anything starting with "%@". + a new floating #GVariant instance @@ -26562,6 +30490,7 @@ returning control to the user that originally provided the pointer. At this point, the caller will have their own full reference to the result. This can also be done by adding the result to a container, or by passing it to another g_variant_new() call. + a new, usually floating, #GVariant @@ -26583,6 +30512,7 @@ or by passing it to another g_variant_new() call. This is similar to calling g_strdup_printf() and then g_variant_new_string() but it saves a temporary variable and an unnecessary copy. + a floating reference to a new string #GVariant instance @@ -26603,6 +30533,7 @@ unnecessary copy. Creates a D-Bus type signature #GVariant with the contents of @string. @string must be a valid D-Bus type signature. Use g_variant_is_signature() if you're not sure. + a floating reference to a new signature #GVariant instance @@ -26620,6 +30551,7 @@ g_variant_is_signature() if you're not sure. @string must be valid UTF-8, and must not be %NULL. To encode potentially-%NULL strings, use g_variant_new() with `ms` as the [format string][gvariant-format-strings-maybe-types]. + a floating reference to a new string #GVariant instance @@ -26636,6 +30568,7 @@ potentially-%NULL strings, use g_variant_new() with `ms` as the strings. If @length is -1 then @strv is %NULL-terminated. + a new floating #GVariant instance @@ -26643,7 +30576,7 @@ If @length is -1 then @strv is %NULL-terminated. an array of strings - + @@ -26665,6 +30598,7 @@ when it is no longer required. You must not modify or access @string in any other way after passing it to this function. It is even possible that @string is immediately freed. + a floating reference to a new string #GVariant instance @@ -26686,6 +30620,7 @@ If @n_children is 0 then the unit tuple is constructed. If the @children are floating references (see g_variant_ref_sink()), the new instance takes ownership of them as if via g_variant_ref_sink(). + a floating reference to a new #GVariant tuple @@ -26693,7 +30628,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). the items to make the tuple out of - + @@ -26705,6 +30640,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). Creates a new uint16 #GVariant instance. + a floating reference to a new uint16 #GVariant instance @@ -26718,6 +30654,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). Creates a new uint32 #GVariant instance. + a floating reference to a new uint32 #GVariant instance @@ -26731,6 +30668,7 @@ new instance takes ownership of them as if via g_variant_ref_sink(). Creates a new uint64 #GVariant instance. + a floating reference to a new uint64 #GVariant instance @@ -26779,6 +30717,7 @@ returning control to the user that originally provided the pointer. At this point, the caller will have their own full reference to the result. This can also be done by adding the result to a container, or by passing it to another g_variant_new() call. + a new, usually floating, #GVariant @@ -26805,6 +30744,7 @@ variant containing the original value. If @child is a floating reference (see g_variant_ref_sink()), the new instance takes ownership of @child. + a floating reference to a new variant #GVariant instance @@ -26828,6 +30768,7 @@ contain multi-byte numeric data. That include strings, booleans, bytes and containers containing only these things (recursively). The returned value is always in normal form and is marked as trusted. + the byteswapped form of @value @@ -26854,6 +30795,7 @@ check fails then a g_critical() is printed and %FALSE is returned. This function is meant to be used by functions that wish to provide varargs accessors to #GVariant values of uncertain values (eg: g_variant_lookup() or g_menu_model_get_item_attribute()). + %TRUE if @format_string is safe to use @@ -26875,6 +30817,7 @@ g_variant_lookup() or g_menu_model_get_item_attribute()). Classifies @value according to its top-level type. + the #GVariantClass of @value @@ -26906,6 +30849,7 @@ the handling of incomparable values (ie: NaN) is undefined. If you only require an equality comparison, g_variant_equal() is more general. + negative value if a < b; zero if a = b; @@ -26928,6 +30872,7 @@ general. returning a constant string, the string is duplicated. The return value must be freed using g_free(). + a newly allocated string @@ -26958,6 +30903,7 @@ stored there. In any case, the resulting array will be For an empty array, @length will be set to 0 and a pointer to a %NULL pointer will be returned. + an array of strings @@ -26986,6 +30932,7 @@ is stored there. In any case, the resulting array will be For an empty array, @length will be set to 0 and a pointer to a %NULL pointer will be returned. + an array of strings @@ -27010,6 +30957,7 @@ a constant string, the string is duplicated. The string will always be UTF-8 encoded. The return value must be freed using g_free(). + a newly allocated string, UTF-8 encoded @@ -27036,6 +30984,7 @@ is stored there. In any case, the resulting array will be For an empty array, @length will be set to 0 and a pointer to a %NULL pointer will be returned. + an array of strings @@ -27058,6 +31007,7 @@ For an empty array, @length will be set to 0 and a pointer to a The types of @one and @two are #gconstpointer only to allow use of this function with #GHashTable. They must each be a #GVariant. + %TRUE if @one and @two are equal @@ -27090,6 +31040,7 @@ extended in the future. the values and also determines if the values are copied or borrowed, see the section on [GVariant format strings][gvariant-format-strings-pointers]. + @@ -27113,6 +31064,7 @@ see the section on It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_BOOLEAN. + %TRUE or %FALSE @@ -27129,9 +31081,10 @@ other than %G_VARIANT_TYPE_BOOLEAN. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_BYTE. + - a #guchar - + a #guint8 + @@ -27159,10 +31112,11 @@ It is an error to call this function with a @value that is not an array of bytes. The return value remains valid as long as @value exists. + the constant string - + @@ -27184,9 +31138,10 @@ stored there. In any case, the resulting array will be For an empty array, @length will be set to 0 and a pointer to a %NULL pointer will be returned. + an array of constant strings - + @@ -27211,6 +31166,7 @@ g_variant_get(). the values and also determines if the values are copied or borrowed, see the section on [GVariant format strings][gvariant-format-strings-pointers]. + @@ -27245,7 +31201,13 @@ in the container. See g_variant_n_children(). The returned value is never floating. You should free it with g_variant_unref() when you're done with it. +There may be implementation specific restrictions on deeply nested values, +which would result in the unit tuple being returned as the child value, +instead of further nested children. #GVariant is guaranteed to handle +nesting up to at least 64 levels. + This function is O(1). + the child at the specified index @@ -27287,6 +31249,7 @@ implicitly (for instance "the file always contains a %G_VARIANT_TYPE_VARIANT and it is always in little-endian order") or explicitly (by storing the type and/or endianness in addition to the serialised data). + the serialised form of @value, or %NULL @@ -27303,6 +31266,7 @@ serialised data). The semantics of this function are exactly the same as g_variant_get_data(), except that the returned #GBytes holds a reference to the variant data. + A new #GBytes representing the variant data @@ -27319,6 +31283,7 @@ a reference to the variant data. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_DOUBLE. + a #gdouble @@ -27346,7 +31311,7 @@ as an array of the given C type, with @element_size set to the size the appropriate type: - %G_VARIANT_TYPE_INT16 (etc.): #gint16 (etc.) - %G_VARIANT_TYPE_BOOLEAN: #guchar (not #gboolean!) -- %G_VARIANT_TYPE_BYTE: #guchar +- %G_VARIANT_TYPE_BYTE: #guint8 - %G_VARIANT_TYPE_HANDLE: #guint32 - %G_VARIANT_TYPE_DOUBLE: #gdouble @@ -27357,6 +31322,7 @@ expectation. @n_elements, which must be non-%NULL, is set equal to the number of items in the array. + a pointer to the fixed array @@ -27388,6 +31354,7 @@ than %G_VARIANT_TYPE_HANDLE. By convention, handles are indexes into an array of file descriptors that are sent alongside a D-Bus message. If you're not interacting with D-Bus, you probably don't need them. + a #gint32 @@ -27404,13 +31371,14 @@ with D-Bus, you probably don't need them. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_INT16. + a #gint16 - a int16 #GVariant instance + an int16 #GVariant instance @@ -27420,13 +31388,14 @@ other than %G_VARIANT_TYPE_INT16. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_INT32. + a #gint32 - a int32 #GVariant instance + an int32 #GVariant instance @@ -27436,13 +31405,14 @@ other than %G_VARIANT_TYPE_INT32. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_INT64. + a #gint64 - a int64 #GVariant instance + an int64 #GVariant instance @@ -27450,6 +31420,7 @@ other than %G_VARIANT_TYPE_INT64. Given a maybe-typed #GVariant instance, extract its value. If the value is Nothing, then this function returns %NULL. + the contents of @value, or %NULL @@ -27477,7 +31448,15 @@ If @value is found not to be in normal form then a new trusted It makes sense to call this function if you've received #GVariant data from untrusted sources and you want to ensure your serialised -output is definitely in normal form. +output is definitely in normal form. + +If @value is already in normal form, a new reference will be returned +(which will be floating if @value is floating). If it is not in normal form, +the newly created #GVariant will be returned with a single non-floating +reference. Typically, g_variant_take_ref() should be called on the return +value from this function to guarantee ownership of a single non-floating +reference to it. + a trusted #GVariant @@ -27500,9 +31479,10 @@ is stored there. In any case, the resulting array will be For an empty array, @length will be set to 0 and a pointer to a %NULL pointer will be returned. + an array of constant strings - + @@ -27529,6 +31509,7 @@ already been calculated (ie: this function has been called before) then this function is O(1). Otherwise, the size is calculated, an operation which is approximately O(n) in the number of values involved. + the serialised size of @value @@ -27555,6 +31536,7 @@ It is an error to call this function with a @value of any type other than those three. The return value remains valid as long as @value exists. + the constant string, UTF-8 encoded @@ -27582,9 +31564,10 @@ is stored there. In any case, the resulting array will be For an empty array, @length will be set to 0 and a pointer to a %NULL pointer will be returned. + an array of constant strings - + @@ -27604,6 +31587,7 @@ For an empty array, @length will be set to 0 and a pointer to a The return value is valid for the lifetime of @value and must not be freed. + a #GVariantType @@ -27619,6 +31603,7 @@ be freed. Returns the type string of @value. Unlike the result of calling g_variant_type_peek_string(), this string is nul-terminated. This string belongs to #GVariant and must not be freed. + the type string for the type of @value @@ -27635,6 +31620,7 @@ string belongs to #GVariant and must not be freed. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_UINT16. + a #guint16 @@ -27651,6 +31637,7 @@ other than %G_VARIANT_TYPE_UINT16. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_UINT32. + a #guint32 @@ -27667,6 +31654,7 @@ other than %G_VARIANT_TYPE_UINT32. It is an error to call this function with a @value of any type other than %G_VARIANT_TYPE_UINT64. + a #guint64 @@ -27703,6 +31691,7 @@ varargs call by the user. the values and also determines if the values are copied or borrowed, see the section on [GVariant format strings][gvariant-format-strings-pointers]. + @@ -27729,6 +31718,7 @@ see the section on Unboxes @value. The result is the #GVariant instance that was contained in @value. + the item contained in the variant @@ -27750,6 +31740,7 @@ function as a basis for building protocols or file formats. The type of @value is #gconstpointer only to allow use of this function with #GHashTable. @value must be a #GVariant. + a hash value corresponding to @value @@ -27763,6 +31754,7 @@ function with #GHashTable. @value must be a #GVariant. Checks if @value is a container. + %TRUE if @value is a container @@ -27784,6 +31776,7 @@ or g_variant_take_ref(). See g_variant_ref_sink() for more information about floating reference counts. + whether @value is floating @@ -27805,7 +31798,11 @@ check. If @value is found to be in normal form then it will be marked as being trusted. If the value was already marked as being trusted then -this function will immediately return %TRUE. +this function will immediately return %TRUE. + +There may be implementation specific restrictions on deeply nested values. +GVariant is guaranteed to handle nesting up to at least 64 levels. + %TRUE if @value is in normal form @@ -27819,6 +31816,7 @@ this function will immediately return %TRUE. Checks if a value has a type matching the provided type. + %TRUE if the type of @value matches @type @@ -27843,6 +31841,7 @@ need it. A reference is taken to @value and will be released only when g_variant_iter_free() is called. + a new heap-allocated #GVariantIter @@ -27869,6 +31868,7 @@ see the section on This function is currently implemented with a linear scan. If you plan to do many lookups then #GVariantDict may be more efficient. + %TRUE if a value was unpacked @@ -27879,7 +31879,7 @@ plan to do many lookups then #GVariantDict may be more efficient. - the key to lookup in the dictionary + the key to look up in the dictionary @@ -27903,7 +31903,7 @@ In the event that @dictionary has the type a{sv}, the @expected_type string specifies what type of value is expected to be inside of the variant. If the value inside the variant has a different type then %NULL is returned. In the event that @dictionary has a value type other -than v then @expected_type must directly match the key type and it is +than v then @expected_type must directly match the value type and it is used to unpack the value directly or an error occurs. In either case, if @key is not found in @dictionary, %NULL is returned. @@ -27914,6 +31914,7 @@ value will have this type. This function is currently implemented with a linear scan. If you plan to do many lookups then #GVariantDict may be more efficient. + the value of the dictionary key, or %NULL @@ -27924,7 +31925,7 @@ plan to do many lookups then #GVariantDict may be more efficient. - the key to lookup in the dictionary + the key to look up in the dictionary @@ -27945,6 +31946,7 @@ array. For tuples it is the number of tuple items (which depends only on the type). For dictionary entries, it is always 2 This function is O(1). + the number of children in the container @@ -27963,6 +31965,7 @@ The format is described [here][gvariant-text]. If @type_annotate is %TRUE, then type information is included in the output. + a newly-allocated string holding the result. @@ -27984,6 +31987,7 @@ the output. If @string is non-%NULL then it is appended to and returned. Else, a new empty #GString is allocated and it is returned. + a #GString containing the string @@ -28006,6 +32010,7 @@ a new empty #GString is allocated and it is returned. Increases the reference count of @value. + the same @value @@ -28040,6 +32045,7 @@ at that point and the caller will not need to unreference it. This makes certain common styles of programming much easier while still maintaining normal refcounting semantics in situations where values are not floating. + the same @value @@ -28064,6 +32070,7 @@ serialised variant successfully, its type and (if the destination machine might be different) its endianness must also be available. This function is approximately O(n) in the size of @data. + @@ -28111,6 +32118,7 @@ reference. If g_variant_take_ref() runs first then the result will be that the floating reference is converted to a hard reference and an additional reference on top of that one is added. It is best to avoid this situation. + the same @value @@ -28125,6 +32133,7 @@ avoid this situation. Decreases the reference count of @value. When its reference count drops to 0, the memory used by the variant is freed. + @@ -28140,10 +32149,11 @@ drops to 0, the memory used by the variant is freed. should ensure that a string is a valid D-Bus object path before passing it to g_variant_new_object_path(). -A valid object path starts with '/' followed by zero or more -sequences of characters separated by '/' characters. Each sequence -must contain only the characters "[A-Z][a-z][0-9]_". No sequence -(including the one following the final '/' character) may be empty. +A valid object path starts with `/` followed by zero or more +sequences of characters separated by `/` characters. Each sequence +must contain only the characters `[A-Z][a-z][0-9]_`. No sequence +(including the one following the final `/` character) may be empty. + %TRUE if @string is a D-Bus object path @@ -28162,6 +32172,7 @@ passing it to g_variant_new_signature(). D-Bus type signatures consist of zero or more definite #GVariantType strings in sequence. + %TRUE if @string is a D-Bus type signature @@ -28204,7 +32215,12 @@ In case of any error, %NULL will be returned. If @error is non-%NULL then it will be set to reflect the error that occurred. Officially, the language understood by the parser is "any string -produced by g_variant_print()". +produced by g_variant_print()". + +There may be implementation specific restrictions on deeply nested values, +which would result in a %G_VARIANT_PARSE_ERROR_RECURSION error. #GVariant is +guaranteed to handle nesting up to at least 64 levels. + a non-floating reference to a #GVariant, or %NULL @@ -28258,6 +32274,7 @@ The format of the message may change in a future version. If @source_str was not nul-terminated when you passed it to g_variant_parse() then you must add nul termination before using this function. + the printed message @@ -28294,8 +32311,11 @@ following functions. #GVariantBuilder is not threadsafe in any way. Do not attempt to access it from more than one thread. + + + @@ -28303,13 +32323,13 @@ access it from more than one thread. - + - + @@ -28324,6 +32344,7 @@ any other call. In most cases it is easier to place a #GVariantBuilder directly on the stack of the calling function and initialise it with g_variant_builder_init(). + a #GVariantBuilder @@ -28366,6 +32387,7 @@ make_pointless_dictionary (void) return g_variant_builder_end (&builder); } ]| + @@ -28411,6 +32433,7 @@ make_pointless_dictionary (void) return g_variant_builder_end (&builder); } ]| + @@ -28440,6 +32463,7 @@ a variant, etc. If @value is a floating reference (see g_variant_ref_sink()), the @builder instance takes ownership of @value. + @@ -28469,6 +32493,7 @@ This function leaves the #GVariantBuilder structure set to all-zeros. It is valid to call this function on either an initialised #GVariantBuilder or one that is set to all-zeros but it is not valid to call this function on uninitialised memory. + @@ -28486,6 +32511,7 @@ the most recent call to g_variant_builder_open(). It is an error to call this function in any way that would create an inconsistent value to be constructed (ie: too few values added to the subcontainer). + @@ -28514,6 +32540,7 @@ required). It is also an error to call this function if the builder was created with an indefinite array or maybe type and no children have been added; in this case it is impossible to infer the type of the empty array. + a new, floating, #GVariant @@ -28555,6 +32582,7 @@ with this function. If you ever pass a reference to a should assume that the person receiving that reference may try to use reference counting; you should use g_variant_builder_new() instead of this function. + @@ -28606,6 +32634,7 @@ g_variant_builder_close (&builder); output = g_variant_builder_end (&builder); ]| + @@ -28625,6 +32654,7 @@ output = g_variant_builder_end (&builder); Don't call this on stack-allocated #GVariantBuilder instances or bad things will happen. + a new reference to @builder @@ -28644,6 +32674,7 @@ associated with the #GVariantBuilder. Don't call this on stack-allocated #GVariantBuilder instances or bad things will happen. + @@ -28657,6 +32688,7 @@ things will happen. The range of possible top-level types of #GVariant instances. + The #GVariant is a boolean. @@ -28804,8 +32836,11 @@ key is not found. Each returns the new dictionary as a floating return result; } ]| + + + @@ -28813,13 +32848,13 @@ key is not found. Each returns the new dictionary as a floating - + - + @@ -28835,6 +32870,7 @@ In some cases it may be easier to place a #GVariantDict directly on the stack of the calling function and initialise it with g_variant_dict_init(). This is particularly useful when you are using #GVariantDict to construct a #GVariant. + a #GVariantDict @@ -28862,6 +32898,7 @@ It is valid to call this function on either an initialised #GVariantDict or one that was previously cleared by an earlier call to g_variant_dict_clear() but it is not valid to call this function on uninitialised memory. + @@ -28874,6 +32911,7 @@ on uninitialised memory. Checks if @key exists in @dict. + %TRUE if @key is in @dict @@ -28884,7 +32922,7 @@ on uninitialised memory. - the key to lookup in the dictionary + the key to look up in the dictionary @@ -28897,6 +32935,7 @@ It is not permissible to use @dict in any way after this call except for reference counting operations (in the case of a heap-allocated #GVariantDict) or by reinitialising it with g_variant_dict_init() (in the case of stack-allocated). + a new, floating, #GVariant @@ -28925,6 +32964,7 @@ pass a reference to a #GVariantDict outside of the control of your own code then you should assume that the person receiving that reference may try to use reference counting; you should use g_variant_dict_new() instead of this function. + @@ -28944,6 +32984,7 @@ g_variant_dict_new() instead of this function. This call is a convenience wrapper that is exactly equivalent to calling g_variant_new() followed by g_variant_dict_insert_value(). + @@ -28970,6 +33011,7 @@ calling g_variant_new() followed by g_variant_dict_insert_value(). Inserts (or replaces) a key in a #GVariantDict. @value is consumed if it is floating. + @@ -28999,6 +33041,7 @@ value and returns %TRUE. @format_string determines the C types that are used for unpacking the values and also determines if the values are copied or borrowed, see the section on [GVariant format strings][gvariant-format-strings-pointers]. + %TRUE if a value was unpacked @@ -29009,7 +33052,7 @@ section on [GVariant format strings][gvariant-format-strings-pointers]. - the key to lookup in the dictionary + the key to look up in the dictionary @@ -29034,6 +33077,7 @@ returned. If the key is found and the value has the correct type, it is returned. If @expected_type was specified then any non-%NULL return value will have this type. + the value of the dictionary key, or %NULL @@ -29044,7 +33088,7 @@ value will have this type. - the key to lookup in the dictionary + the key to look up in the dictionary @@ -29058,6 +33102,7 @@ value will have this type. Don't call this on stack-allocated #GVariantDict instances or bad things will happen. + a new reference to @dict @@ -29071,6 +33116,7 @@ things will happen. Removes a key and its associated value from a #GVariantDict. + %TRUE if the key was found and removed @@ -29094,6 +33140,7 @@ associated with the #GVariantDict. Don't call this on stack-allocated #GVariantDict instances or bad things will happen. + @@ -29108,8 +33155,9 @@ things will happen. #GVariantIter is an opaque data structure and can only be accessed using the following functions. + - + @@ -29124,6 +33172,7 @@ need it. A reference is taken to the container that @iter is iterating over and will be releated only when g_variant_iter_free() is called. + a new heap-allocated #GVariantIter @@ -29139,6 +33188,7 @@ and will be releated only when g_variant_iter_free() is called. Frees a heap-allocated #GVariantIter. Only call this function on iterators that were returned by g_variant_iter_new() or g_variant_iter_copy(). + @@ -29156,6 +33206,7 @@ ignored. The iterator remains valid for as long as @value exists, and need not be freed in any way. + the number of items in @value @@ -29234,6 +33285,7 @@ the values and also determines if the values are copied or borrowed. See the section on [GVariant format strings][gvariant-format-strings-pointers]. + %TRUE if a value was unpacked, or %FALSE if there was no value @@ -29260,6 +33312,7 @@ iterating over. This is the total number of items -- not the number of items remaining. This function might be useful for preallocation of arrays. + the number of children in the container @@ -29313,6 +33366,7 @@ the values and also determines if the values are copied or borrowed. See the section on [GVariant format strings][gvariant-format-strings-pointers]. + %TRUE if a value was unpacked, or %FALSE if there as no value @@ -29360,6 +33414,7 @@ Here is an example for iterating with g_variant_iter_next_value(): } } ]| + a #GVariant, or %NULL @@ -29374,6 +33429,7 @@ Here is an example for iterating with g_variant_iter_next_value(): Error codes returned by parsing text-format GVariants. + generic error (unused) @@ -29428,6 +33484,9 @@ Here is an example for iterating with g_variant_iter_next_value(): no value given + + variant was too deeply nested; #GVariant is only guaranteed to handle nesting up to 64 levels (Since: 2.64) + This section introduces the GVariant type system. It is based, in @@ -29510,7 +33569,10 @@ The valid basic type strings are "b", "y", "n", "q", "i", "u", "x", "t", The above definition is recursive to arbitrary depth. "aaaaai" and "(ui(nq((y)))s)" are both valid type strings, as is -"a(aa(ui)(qna{ya(yd)}))". +"a(aa(ui)(qna{ya(yd)}))". In order to not hit memory limits, #GVariant +imposes a limit on recursion depth of 65 nested containers. This is the +limit in the D-Bus specification (64) plus one to allow a #GDBusMessage to +be nested in a top-level tuple. The meaning of each of the characters is as follows: - `b`: the type string of %G_VARIANT_TYPE_BOOLEAN; a boolean value. @@ -29574,6 +33636,7 @@ the value is any type at all. This is, by definition, a dictionary, so this type string corresponds to %G_VARIANT_TYPE_DICTIONARY. Note that, due to the restriction that the key of a dictionary entry must be a basic type, "{**}" is not a valid type string. + Creates a new #GVariantType corresponding to the type string given by @type_string. It is appropriate to call g_variant_type_free() on @@ -29581,6 +33644,7 @@ the return value. It is a programmer error to call this function with an invalid type string. Use g_variant_type_string_is_valid() if you are unsure. + a new #GVariantType @@ -29597,6 +33661,7 @@ string. Use g_variant_type_string_is_valid() if you are unsure. type @type. It is appropriate to call g_variant_type_free() on the return value. + a new array #GVariantType @@ -29615,6 +33680,7 @@ Since 2.24 of type @key and a value of type @value. It is appropriate to call g_variant_type_free() on the return value. + a new dictionary entry #GVariantType @@ -29637,6 +33703,7 @@ Since 2.24 type @type or Nothing. It is appropriate to call g_variant_type_free() on the return value. + a new maybe #GVariantType @@ -29657,6 +33724,7 @@ Since 2.24 @items is %NULL-terminated. It is appropriate to call g_variant_type_free() on the return value. + a new tuple #GVariantType @@ -29666,7 +33734,7 @@ Since 2.24 an array of #GVariantTypes, one for each item - + @@ -29679,6 +33747,7 @@ Since 2.24 Makes a copy of a #GVariantType. It is appropriate to call g_variant_type_free() on the return value. @type may not be %NULL. + a new #GVariantType @@ -29696,6 +33765,7 @@ Since 2.24 Returns a newly-allocated copy of the type string corresponding to @type. The returned string is nul-terminated. It is appropriate to call g_free() on the return value. + the corresponding type string @@ -29713,6 +33783,7 @@ Since 2.24 Determines the element type of an array or maybe type. This function may only be used with array or maybe types. + the element type of @type @@ -29737,6 +33808,7 @@ subtypes, use g_variant_type_is_subtype_of(). The argument types of @type1 and @type2 are only #gconstpointer to allow use with #GHashTable without function pointer casting. For both arguments, a valid #GVariantType must be provided. + %TRUE if @type1 and @type2 are exactly equal @@ -29769,6 +33841,7 @@ the key. This call, together with g_variant_type_next() provides an iterator interface over tuple and dictionary entry types. + the first item type of @type, or %NULL @@ -29790,6 +33863,7 @@ type constructor functions. In the case that @type is %NULL, this function does nothing. Since 2.24 + @@ -29804,6 +33878,7 @@ Since 2.24 Returns the length of the type string corresponding to the given @type. This function must be used to determine the valid extent of the memory region returned by g_variant_type_peek_string(). + the length of the corresponding type string @@ -29823,6 +33898,7 @@ Since 2.24 The argument type of @type is only #gconstpointer to allow use with #GHashTable without function pointer casting. A valid #GVariantType must be provided. + the hash value @@ -29843,6 +33919,7 @@ type string for @type starts with an 'a'. This function returns %TRUE for any indefinite type for which every definite subtype is an array type -- %G_VARIANT_TYPE_ARRAY, for example. + %TRUE if @type is an array type @@ -29866,6 +33943,7 @@ Only a basic type may be used as the key of a dictionary entry. This function returns %FALSE for all indefinite types except %G_VARIANT_TYPE_BASIC. + %TRUE if @type is a basic type @@ -29888,6 +33966,7 @@ entry types plus the variant type. This function returns %TRUE for any indefinite type for which every definite subtype is a container -- %G_VARIANT_TYPE_ARRAY, for example. + %TRUE if @type is a container type @@ -29912,6 +33991,7 @@ this function on the result of g_variant_get_type() will always result in %TRUE being returned. Calling this function on an indefinite type like %G_VARIANT_TYPE_ARRAY, however, will result in %FALSE being returned. + %TRUE if @type is definite @@ -29932,6 +34012,7 @@ true if the type string for @type starts with a '{'. This function returns %TRUE for any indefinite type for which every definite subtype is a dictionary entry type -- %G_VARIANT_TYPE_DICT_ENTRY, for example. + %TRUE if @type is a dictionary entry type @@ -29952,6 +34033,7 @@ type string for @type starts with an 'm'. This function returns %TRUE for any indefinite type for which every definite subtype is a maybe type -- %G_VARIANT_TYPE_MAYBE, for example. + %TRUE if @type is a maybe type @@ -29971,6 +34053,7 @@ Since 2.24 This function returns %TRUE if @type is a subtype of @supertype. All types are considered to be subtypes of themselves. Aside from that, only indefinite types can have subtypes. + %TRUE if @type is a subtype of @supertype @@ -29996,6 +34079,7 @@ type string for @type starts with a '(' or if @type is This function returns %TRUE for any indefinite type for which every definite subtype is a tuple type -- %G_VARIANT_TYPE_TUPLE, for example. + %TRUE if @type is a tuple type @@ -30011,6 +34095,7 @@ Since 2.24 Determines if the given @type is the variant type. + %TRUE if @type is the variant type @@ -30030,6 +34115,7 @@ Since 2.24 This function may only be used with a dictionary entry type. Other than the additional restriction, this call is equivalent to g_variant_type_first(). + the key type of the dictionary entry @@ -30053,6 +34139,7 @@ but must not be used with the generic tuple type In the case of a dictionary entry type, this function will always return 2. + the number of items in @type @@ -30078,6 +34165,7 @@ returns the value type. If called on the value type of a dictionary entry then this call returns %NULL. For tuples, %NULL is returned when @type is the last item in a tuple. + the next #GVariantType after @type, or %NULL @@ -30097,6 +34185,7 @@ result is not nul-terminated; in order to determine its length you must call g_variant_type_get_string_length(). To get a nul-terminated string, see g_variant_type_dup_string(). + the corresponding type string (not nul-terminated) @@ -30114,6 +34203,7 @@ Since 2.24 Determines the value type of a dictionary entry type. This function may only be used with a dictionary entry type. + the value type of the dictionary entry @@ -30128,6 +34218,7 @@ Since 2.24 + @@ -30137,10 +34228,22 @@ Since 2.24 + + + + + + + + + + + Checks if @type_string is a valid GVariant type string. This call is equivalent to calling g_variant_type_string_scan() and confirming that the following character is a nul terminator. + %TRUE if @type_string is exactly one valid type string @@ -30168,6 +34271,7 @@ string does not end before @limit then %FALSE is returned. For the simple case of checking if a string is a valid type string, see g_variant_type_string_is_valid(). + %TRUE if a valid type string was found @@ -30192,11 +34296,31 @@ see g_variant_type_string_is_valid(). Declares a type of function which takes no arguments and has no return value. It is used to specify the type function passed to g_atexit(). + + + On Windows, this macro defines a DllMain() function that stores +the actual DLL name that the code being compiled will be included in. + +On non-Windows platforms, expands to nothing. + + + + empty or "static" + + + the name of the (pointer to the) char array where + the DLL name will be stored. If this is used, you must also + include `windows.h`. If you need a more complex DLL entry + point function, you cannot use this + + + + @@ -30212,6 +34336,7 @@ Windows. Software that needs to handle file permissions on Windows more exactly should use the Win32 API. See your C library manual for more details about access(). + zero if the pathname refers to an existing file system object that has all the tested permissions, or -1 otherwise @@ -30222,7 +34347,7 @@ See your C library manual for more details about access(). a pathname in the GLib file name encoding (UTF-8 on Windows) - + as in access() @@ -30230,10 +34355,124 @@ See your C library manual for more details about access(). + + Allocates @size bytes on the stack; these bytes will be freed when the current +stack frame is cleaned up. This macro essentially just wraps the alloca() +function present on most UNIX variants. +Thus it provides the same advantages and pitfalls as alloca(): + +- alloca() is very fast, as on most systems it's implemented by just adjusting + the stack pointer register. + +- It doesn't cause any memory fragmentation, within its scope, separate alloca() + blocks just build up and are released together at function end. + +- Allocation sizes have to fit into the current stack frame. For instance in a + threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes, + so be sparse with alloca() uses. + +- Allocation failure due to insufficient stack space is not indicated with a %NULL + return like e.g. with malloc(). Instead, most systems probably handle it the same + way as out of stack space situations from infinite function recursion, i.e. + with a segmentation fault. + +- Special care has to be taken when mixing alloca() with GNU C variable sized arrays. + Stack space allocated with alloca() in the same scope as a variable sized array + will be freed together with the variable sized array upon exit of that scope, and + not upon exit of the enclosing function scope. + + + + number of bytes to allocate. + + + + + Adds the value on to the end of the array. The array will grow in +size automatically if necessary. + +g_array_append_val() is a macro which uses a reference to the value +parameter @v. This means that you cannot use it with literal values +such as "27". You must use variables. + + + + a #GArray + + + the value to append to the #GArray + + + + + Returns the element of a #GArray at the given index. The return +value is cast to the given type. + +This example gets a pointer to an element in a #GArray: +|[<!-- language="C" --> + EDayViewEvent *event; + // This gets a pointer to the 4th element in the array of + // EDayViewEvent structs. + event = &g_array_index (events, EDayViewEvent, 3); +]| + + + + a #GArray + + + the type of the elements + + + the index of the element to return + + + + + Inserts an element into an array at the given index. + +g_array_insert_val() is a macro which uses a reference to the value +parameter @v. This means that you cannot use it with literal values +such as "27". You must use variables. + + + + a #GArray + + + the index to place the element at + + + the value to insert into the array + + + + + Adds the value on to the start of the array. The array will grow in +size automatically if necessary. + +This operation is slower than g_array_append_val() since the +existing elements in the array have to be moved to make space for +the new element. + +g_array_prepend_val() is a macro which uses a reference to the value +parameter @v. This means that you cannot use it with literal values +such as "27". You must use variables. + + + + a #GArray + + + the value to prepend to the #GArray + + + Determines the numeric value of a character as a decimal digit. Differs from g_unichar_digit_value() because it takes a char, so there's no worry about sign extension if characters are signed. + If @c is a decimal digit (according to g_ascii_isdigit()), its numeric value. Otherwise, -1. @@ -30256,6 +34495,7 @@ the string back using g_ascii_strtod() gives the same machine-number guaranteed that the size of the resulting string will never be larger than @G_ASCII_DTOSTR_BUF_SIZE bytes, including the terminating nul character, which is always added. + The pointer to the buffer with the converted string. @@ -30285,6 +34525,7 @@ The returned buffer is guaranteed to be nul-terminated. If you just want to want to serialize the value into a string, use g_ascii_dtostr(). + The pointer to the buffer with the converted string. @@ -30309,6 +34550,176 @@ string, use g_ascii_dtostr(). + + Determines whether a character is alphanumeric. + +Unlike the standard C library isalnum() function, this only +recognizes standard ASCII letters and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to cast to #guchar before +passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is alphabetic (i.e. a letter). + +Unlike the standard C library isalpha() function, this only +recognizes standard ASCII letters and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to cast to #guchar before +passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is a control character. + +Unlike the standard C library iscntrl() function, this only +recognizes standard ASCII control characters and ignores the +locale, returning %FALSE for all non-ASCII characters. Also, +unlike the standard library function, this takes a char, not +an int, so don't call it on %EOF, but no need to cast to #guchar +before passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is digit (0-9). + +Unlike the standard C library isdigit() function, this takes +a char, not an int, so don't call it on %EOF, but no need to +cast to #guchar before passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is a printing character and not a space. + +Unlike the standard C library isgraph() function, this only +recognizes standard ASCII characters and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to cast to #guchar before +passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is an ASCII lower case letter. + +Unlike the standard C library islower() function, this only +recognizes standard ASCII letters and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to worry about casting +to #guchar before passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is a printing character. + +Unlike the standard C library isprint() function, this only +recognizes standard ASCII characters and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to cast to #guchar before +passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is a punctuation character. + +Unlike the standard C library ispunct() function, this only +recognizes standard ASCII letters and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to cast to #guchar before +passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is a white-space character. + +Unlike the standard C library isspace() function, this only +recognizes standard ASCII white-space and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to cast to #guchar before +passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is an ASCII upper case letter. + +Unlike the standard C library isupper() function, this only +recognizes standard ASCII letters and ignores the locale, +returning %FALSE for all non-ASCII characters. Also, unlike +the standard library function, this takes a char, not an int, +so don't call it on %EOF, but no need to worry about casting +to #guchar before passing a possibly non-ASCII character in. + + + + any character + + + + + Determines whether a character is a hexadecimal-digit character. + +Unlike the standard C library isxdigit() function, this takes +a char, not an int, so don't call it on %EOF, but no need to +cast to #guchar before passing a possibly non-ASCII character in. + + + + any character + + + Compare two strings, ignoring the case of ASCII characters. @@ -30325,6 +34736,7 @@ characters include all ASCII letters. If you compare two CP932 strings using this function, you will get false matches. Both @s1 and @s2 must be non-%NULL. + 0 if the strings match, a negative value if @s1 < @s2, or a positive value if @s1 > @s2. @@ -30343,6 +34755,7 @@ Both @s1 and @s2 must be non-%NULL. Converts all upper case ASCII letters to lower case ASCII letters. + a newly-allocated string, with all the upper case characters in @str converted to lower case, with semantics that @@ -30383,6 +34796,7 @@ bounds - %G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS. See g_ascii_strtoll() if you have more complex needs such as parsing a string which starts with a number, but then has other characters. + %TRUE if @str was a number, otherwise %FALSE. @@ -30417,7 +34831,8 @@ This function assumes that @str contains only a number of the given @base that is within inclusive bounds limited by @min and @max. If this is true, then the converted number is stored in @out_num. An empty string is not a valid input. A string with leading or -trailing whitespace is also an invalid input. +trailing whitespace is also an invalid input. A string with a leading sign +(`-` or `+`) is not a valid input for the unsigned parser. @base can be between 2 and 36 inclusive. Hexadecimal numbers must not be prefixed with "0x" or "0X". Such a problem does not exist @@ -30432,6 +34847,7 @@ bounds - %G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS. See g_ascii_strtoull() if you have more complex needs such as parsing a string which starts with a number, but then has other characters. + %TRUE if @str was a number, otherwise %FALSE. @@ -30470,6 +34886,7 @@ characters as if they are not letters. The same warning as in g_ascii_strcasecmp() applies: Use this function only on strings known to be in encodings where bytes corresponding to ASCII letters always represent themselves. + 0 if the strings match, a negative value if @s1 < @s2, or a positive value if @s1 > @s2. @@ -30514,6 +34931,7 @@ zero is returned and %ERANGE is stored in %errno. This function resets %errno before calling strtod() so that you can reliably detect overflow and underflow. + the #gdouble value. @@ -30548,6 +34966,7 @@ If the base is outside the valid range, zero is returned, and `EINVAL` is stored in `errno`. If the string conversion fails, zero is returned, and @endptr returns @nptr (if @endptr is non-%NULL). + the #gint64 value or zero on error. @@ -30575,6 +34994,11 @@ does in the C locale. It does this without actually changing the current locale, since that would not be thread-safe. +Note that input with a leading minus sign (`-`) is accepted, and will return +the negation of the parsed number, unless that would overflow a #guint64. +Critically, this means you cannot assume that a short fixed length input will +never result in a low return value, as the input could have a leading `-`. + This function is typically used when reading configuration files or other non-user input that should be locale independent. To handle input from the user you should normally use the @@ -30586,6 +35010,7 @@ If the base is outside the valid range, zero is returned, and `EINVAL` is stored in `errno`. If the string conversion fails, zero is returned, and @endptr returns @nptr (if @endptr is non-%NULL). + the #guint64 value or zero on error. @@ -30608,6 +35033,7 @@ If the string conversion fails, zero is returned, and @endptr returns Converts all lower case ASCII letters to upper case ASCII letters. + a newly allocated string, with all the lower case characters in @str converted to upper case, with semantics that @@ -30636,6 +35062,7 @@ letters in a particular character set. Also unlike the standard library function, this takes and returns a char, not an int, so don't call it on %EOF but no need to worry about casting to #guchar before passing a possibly non-ASCII character in. + the result of converting @c to lower case. If @c is not an ASCII upper case letter, @c is returned unchanged. @@ -30658,6 +35085,7 @@ letters in a particular character set. Also unlike the standard library function, this takes and returns a char, not an int, so don't call it on %EOF but no need to worry about casting to #guchar before passing a possibly non-ASCII character in. + the result of converting @c to upper case. If @c is not an ASCII lower case letter, @c is returned unchanged. @@ -30675,6 +35103,7 @@ before passing a possibly non-ASCII character in. digit. Differs from g_unichar_xdigit_value() because it takes a char, so there's no worry about sign extension if characters are signed. + If @c is a hex digit (according to g_ascii_isxdigit()), its numeric value. Otherwise, -1. @@ -30687,7 +35116,323 @@ are signed. + + Debugging macro to terminate the application if the assertion +fails. If the assertion fails (i.e. the expression is not true), +an error message is logged and the application is terminated. + +The macro can be turned off in final releases of code by defining +`G_DISABLE_ASSERT` when compiling the application, so code must +not depend on any side effects from @expr. Similarly, it must not be used +in unit tests, otherwise the unit tests will be ineffective if compiled with +`G_DISABLE_ASSERT`. Use g_assert_true() and related macros in unit tests +instead. + + + + the expression to check + + + + + Debugging macro to compare two floating point numbers. + +The effect of `g_assert_cmpfloat (n1, op, n2)` is +the same as `g_assert_true (n1 op n2)`. The advantage +of this macro is that it can produce a message that includes the +actual values of @n1 and @n2. + + + + a floating point number + + + The comparison operator to use. + One of `==`, `!=`, `<`, `>`, `<=`, `>=`. + + + another floating point number + + + + + Debugging macro to compare two floating point numbers within an epsilon. + +The effect of `g_assert_cmpfloat_with_epsilon (n1, n2, epsilon)` is +the same as `g_assert_true (abs (n1 - n2) < epsilon)`. The advantage +of this macro is that it can produce a message that includes the +actual values of @n1 and @n2. + + + + a floating point number + + + another floating point number + + + a numeric value that expresses the expected tolerance + between @n1 and @n2 + + + + + Debugging macro to compare to unsigned integers. + +This is a variant of g_assert_cmpuint() that displays the numbers +in hexadecimal notation in the message. + + + + an unsigned integer + + + The comparison operator to use. + One of `==`, `!=`, `<`, `>`, `<=`, `>=`. + + + another unsigned integer + + + + + Debugging macro to compare two integers. + +The effect of `g_assert_cmpint (n1, op, n2)` is +the same as `g_assert_true (n1 op n2)`. The advantage +of this macro is that it can produce a message that includes the +actual values of @n1 and @n2. + + + + an integer + + + The comparison operator to use. + One of `==`, `!=`, `<`, `>`, `<=`, `>=`. + + + another integer + + + + + Debugging macro to compare memory regions. If the comparison fails, +an error message is logged and the application is either terminated +or the testcase marked as failed. + +The effect of `g_assert_cmpmem (m1, l1, m2, l2)` is +the same as `g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0)`. +The advantage of this macro is that it can produce a message that +includes the actual values of @l1 and @l2. + +@m1 may be %NULL if (and only if) @l1 is zero; similarly for @m2 and @l2. + +|[<!-- language="C" --> + g_assert_cmpmem (buf->data, buf->len, expected, sizeof (expected)); +]| + + + + pointer to a buffer + + + length of @m1 + + + pointer to another buffer + + + length of @m2 + + + + + Debugging macro to compare two strings. If the comparison fails, +an error message is logged and the application is either terminated +or the testcase marked as failed. +The strings are compared using g_strcmp0(). + +The effect of `g_assert_cmpstr (s1, op, s2)` is +the same as `g_assert_true (g_strcmp0 (s1, s2) op 0)`. +The advantage of this macro is that it can produce a message that +includes the actual values of @s1 and @s2. + +|[<!-- language="C" --> + g_assert_cmpstr (mystring, ==, "fubar"); +]| + + + + a string (may be %NULL) + + + The comparison operator to use. + One of `==`, `!=`, `<`, `>`, `<=`, `>=`. + + + another string (may be %NULL) + + + + + Debugging macro to compare two unsigned integers. + +The effect of `g_assert_cmpuint (n1, op, n2)` is +the same as `g_assert_true (n1 op n2)`. The advantage +of this macro is that it can produce a message that includes the +actual values of @n1 and @n2. + + + + an unsigned integer + + + The comparison operator to use. + One of `==`, `!=`, `<`, `>`, `<=`, `>=`. + + + another unsigned integer + + + + + Debugging macro to compare two #GVariants. If the comparison fails, +an error message is logged and the application is either terminated +or the testcase marked as failed. The variants are compared using +g_variant_equal(). + +The effect of `g_assert_cmpvariant (v1, v2)` is the same as +`g_assert_true (g_variant_equal (v1, v2))`. The advantage of this macro is +that it can produce a message that includes the actual values of @v1 and @v2. + + + + pointer to a #GVariant + + + pointer to another #GVariant + + + + + Debugging macro to check that a method has returned +the correct #GError. + +The effect of `g_assert_error (err, dom, c)` is +the same as `g_assert_true (err != NULL && err->domain +== dom && err->code == c)`. The advantage of this +macro is that it can produce a message that includes the incorrect +error message and code. + +This can only be used to test for a specific error. If you want to +test that @err is set, but don't care what it's set to, just use +`g_assert_nonnull (err)`. + + + + a #GError, possibly %NULL + + + the expected error domain (a #GQuark) + + + the expected error code + + + + + Debugging macro to check an expression is false. + +If the assertion fails (i.e. the expression is not false), +an error message is logged and the application is either +terminated or the testcase marked as failed. + +Note that unlike g_assert(), this macro is unaffected by whether +`G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, +conversely, g_assert() should not be used in tests. + +See g_test_set_nonfatal_assertions(). + + + + the expression to check + + + + + Debugging macro to check that a #GError is not set. + +The effect of `g_assert_no_error (err)` is +the same as `g_assert_true (err == NULL)`. The advantage +of this macro is that it can produce a message that includes +the error message and code. + + + + a #GError, possibly %NULL + + + + + Debugging macro to check an expression is not %NULL. + +If the assertion fails (i.e. the expression is %NULL), +an error message is logged and the application is either +terminated or the testcase marked as failed. + +Note that unlike g_assert(), this macro is unaffected by whether +`G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, +conversely, g_assert() should not be used in tests. + +See g_test_set_nonfatal_assertions(). + + + + the expression to check + + + + + Debugging macro to check an expression is %NULL. + +If the assertion fails (i.e. the expression is not %NULL), +an error message is logged and the application is either +terminated or the testcase marked as failed. + +Note that unlike g_assert(), this macro is unaffected by whether +`G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, +conversely, g_assert() should not be used in tests. + +See g_test_set_nonfatal_assertions(). + + + + the expression to check + + + + + Debugging macro to check that an expression is true. + +If the assertion fails (i.e. the expression is not true), +an error message is logged and the application is either +terminated or the testcase marked as failed. + +Note that unlike g_assert(), this macro is unaffected by whether +`G_DISABLE_ASSERT` is defined. Hence it should only be used in tests and, +conversely, g_assert() should not be used in tests. + +See g_test_set_nonfatal_assertions(). + + + + the expression to check + + + + @@ -30710,6 +35455,7 @@ are signed. + @@ -30732,6 +35478,7 @@ are signed. + @@ -30766,6 +35513,7 @@ are signed. + @@ -30797,6 +35545,7 @@ are signed. + @@ -30828,23 +35577,31 @@ are signed. + Internal function used to print messages from the public g_assert() and +g_assert_not_reached() macros. + + log domain + file containing the assertion + line number of the assertion + function containing the assertion + expression which failed @@ -30881,6 +35638,7 @@ As can be seen from the above, for portability it's best to avoid calling g_atexit() (or atexit()) except in the main executable of a program. It is best to avoid g_atexit(). + @@ -30901,6 +35659,7 @@ This call acts as a full compiler and hardware memory barrier. Before version 2.30, this function did not return a value (but g_atomic_int_exchange_and_add() did, and had the same meaning). + the value of @atomic before the add, signed @@ -30924,6 +35683,7 @@ This call acts as a full compiler and hardware memory barrier. Think of this operation as an atomic version of `{ tmp = *atomic; *atomic &= val; return tmp; }`. + the value of @atomic before the operation, unsigned @@ -30949,6 +35709,7 @@ Think of this operation as an atomic version of `{ if (*atomic == oldval) { *atomic = newval; return TRUE; } else return FALSE; }`. This call acts as a full compiler and hardware memory barrier. + %TRUE if the exchange took place @@ -30975,6 +35736,7 @@ Think of this operation as an atomic version of `{ *atomic -= 1; return (*atomic == 0); }`. This call acts as a full compiler and hardware memory barrier. + %TRUE if the resultant value is zero @@ -30991,6 +35753,7 @@ This call acts as a full compiler and hardware memory barrier. value of the integer (which it now does). It is retained only for compatibility reasons. Don't use this function in new code. Use g_atomic_int_add() instead. + the value of @atomic before the add, signed @@ -31011,6 +35774,7 @@ compatibility reasons. Don't use this function in new code. This call acts as a full compiler and hardware memory barrier (before the get). + the value of the integer @@ -31028,6 +35792,7 @@ memory barrier (before the get). Think of this operation as an atomic version of `{ *atomic += 1; }`. This call acts as a full compiler and hardware memory barrier. + @@ -31046,6 +35811,7 @@ Think of this operation as an atomic version of `{ tmp = *atomic; *atomic |= val; return tmp; }`. This call acts as a full compiler and hardware memory barrier. + the value of @atomic before the operation, unsigned @@ -31066,6 +35832,7 @@ This call acts as a full compiler and hardware memory barrier. This call acts as a full compiler and hardware memory barrier (after the set). + @@ -31088,6 +35855,7 @@ Think of this operation as an atomic version of `{ tmp = *atomic; *atomic ^= val; return tmp; }`. This call acts as a full compiler and hardware memory barrier. + the value of @atomic before the operation, unsigned @@ -31110,6 +35878,7 @@ Think of this operation as an atomic version of `{ tmp = *atomic; *atomic += val; return tmp; }`. This call acts as a full compiler and hardware memory barrier. + the value of @atomic before the add, signed @@ -31133,6 +35902,7 @@ Think of this operation as an atomic version of `{ tmp = *atomic; *atomic &= val; return tmp; }`. This call acts as a full compiler and hardware memory barrier. + the value of @atomic before the operation, unsigned @@ -31158,6 +35928,7 @@ Think of this operation as an atomic version of `{ if (*atomic == oldval) { *atomic = newval; return TRUE; } else return FALSE; }`. This call acts as a full compiler and hardware memory barrier. + %TRUE if the exchange took place @@ -31182,6 +35953,7 @@ This call acts as a full compiler and hardware memory barrier. This call acts as a full compiler and hardware memory barrier (before the get). + the value of the pointer @@ -31201,6 +35973,7 @@ Think of this operation as an atomic version of `{ tmp = *atomic; *atomic |= val; return tmp; }`. This call acts as a full compiler and hardware memory barrier. + the value of @atomic before the operation, unsigned @@ -31221,6 +35994,7 @@ This call acts as a full compiler and hardware memory barrier. This call acts as a full compiler and hardware memory barrier (after the set). + @@ -31243,6 +36017,7 @@ Think of this operation as an atomic version of `{ tmp = *atomic; *atomic ^= val; return tmp; }`. This call acts as a full compiler and hardware memory barrier. + the value of @atomic before the operation, unsigned @@ -31258,10 +36033,230 @@ This call acts as a full compiler and hardware memory barrier. + + Atomically acquires a reference on the data pointed by @mem_block. + + + a pointer to the data, + with its reference count increased + + + + + a pointer to reference counted data + + + + + + Allocates @block_size bytes of memory, and adds atomic +reference counting semantics to it. + +The data will be freed when its reference count drops to +zero. + +The allocated data is guaranteed to be suitably aligned for any +built-in type. + + + a pointer to the allocated memory + + + + + the size of the allocation, must be greater than 0 + + + + + + Allocates @block_size bytes of memory, and adds atomic +referenc counting semantics to it. + +The contents of the returned data is set to zero. + +The data will be freed when its reference count drops to +zero. + +The allocated data is guaranteed to be suitably aligned for any +built-in type. + + + a pointer to the allocated memory + + + + + the size of the allocation, must be greater than 0 + + + + + + Allocates a new block of data with atomic reference counting +semantics, and copies @block_size bytes of @mem_block +into it. + + + a pointer to the allocated + memory + + + + + the number of bytes to copy, must be greater than 0 + + + + the memory to copy + + + + + + Retrieves the size of the reference counted data pointed by @mem_block. + + + the size of the data, in bytes + + + + + a pointer to reference counted data + + + + + + A convenience macro to allocate atomically reference counted +data with the size of the given @type. + +This macro calls g_atomic_rc_box_alloc() with `sizeof (@type)` and +casts the returned pointer to a pointer of the given @type, +avoiding a type cast in the source code. + + + + the type to allocate, typically a structure name + + + + + A convenience macro to allocate atomically reference counted +data with the size of the given @type, and set its contents +to zero. + +This macro calls g_atomic_rc_box_alloc0() with `sizeof (@type)` and +casts the returned pointer to a pointer of the given @type, +avoiding a type cast in the source code. + + + + the type to allocate, typically a structure name + + + + + Atomically releases a reference on the data pointed by @mem_block. + +If the reference was the last one, it will free the +resources allocated for @mem_block. + + + + + + + a pointer to reference counted data + + + + + + Atomically releases a reference on the data pointed by @mem_block. + +If the reference was the last one, it will call @clear_func +to clear the contents of @mem_block, and then will free the +resources allocated for @mem_block. + + + + + + + a pointer to reference counted data + + + + a function to call when clearing the data + + + + + + Atomically compares the current value of @arc with @val. + + + %TRUE if the reference count is the same + as the given value + + + + + the address of an atomic reference count variable + + + + the value to compare + + + + + + Atomically decreases the reference count. + + + %TRUE if the reference count reached 0, and %FALSE otherwise + + + + + the address of an atomic reference count variable + + + + + + Atomically increases the reference count. + + + + + + + the address of an atomic reference count variable + + + + + + Initializes a reference count variable. + + + + + + + the address of an atomic reference count variable + + + + Decode a sequence of Base-64 encoded text into binary data. Note that the returned binary data is not necessarily zero-terminated, so it should not be used as a character string. + newly allocated buffer containing the binary data @@ -31285,6 +36280,7 @@ so it should not be used as a character string. Decode a sequence of Base-64 encoded text into binary data by overwriting the input data. + The binary data that @text responds. This pointer is the same as the input @text. @@ -31304,7 +36300,7 @@ by overwriting the input data. - + Incrementally decode a sequence of binary data from its Base-64 stringified representation. By calling this function multiple times you can convert data in chunks to avoid having to have the full encoded data in memory. @@ -31313,6 +36309,7 @@ The output buffer must be large enough to fit all the data that will be written to it. Since base64 encodes 3 bytes in 4 chars you need at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero state). + The number of bytes of output that was written @@ -31320,7 +36317,7 @@ state). binary input data - + @@ -31328,7 +36325,7 @@ state). max length of @in data to decode - + output buffer @@ -31347,6 +36344,7 @@ state). Encode a sequence of binary data into its Base-64 stringified representation. + a newly allocated, zero-terminated Base-64 encoded string representing @data. The returned string must @@ -31354,9 +36352,9 @@ representation. - + the binary data to encode - + @@ -31374,6 +36372,7 @@ be written to it. It will need up to 4 bytes, or up to 5 bytes if line-breaking is enabled. The @out array will not be automatically nul-terminated. + The number of bytes of output that was written @@ -31411,14 +36410,15 @@ The output buffer must be large enough to fit all the data that will be written to it. Due to the way base64 encodes you will need at least: (@len / 3 + 1) * 4 + 4 bytes (+ 4 may be needed in case of non-zero state). If you enable line-breaking you will need at least: -((@len / 3 + 1) * 4 + 4) / 72 + 1 bytes of extra space. +((@len / 3 + 1) * 4 + 4) / 76 + 1 bytes of extra space. @break_lines is typically used when putting base64-encoded data in emails. -It breaks the lines at 72 columns instead of putting all of the text on +It breaks the lines at 76 columns instead of putting all of the text on the same line. This avoids problems with long lines in the email system. Note however that it breaks the lines with `LF` characters, not `CR LF` sequences, so the result cannot be passed directly to SMTP or certain other protocols. + The number of bytes of output that was written @@ -31426,7 +36426,7 @@ or certain other protocols. the binary data to encode - + @@ -31462,15 +36462,16 @@ string. that g_path_get_basename() allocates new memory for the returned string, unlike this function which returns a pointer into the argument. + the name of the file without any leading directory components - + the name of the file - + @@ -31488,6 +36489,7 @@ between 0 and 31 then the result is undefined. This function accesses @address atomically. All other accesses to @address must be atomic in order for this function to work reliably. + @@ -31507,6 +36509,7 @@ reliably. from (but not including) @nth_bit upwards. Bits are numbered from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the 0th bit, set @nth_bit to -1. + the index of the first bit set which is higher than @nth_bit, or -1 if no higher bits are set @@ -31529,6 +36532,7 @@ from (but not including) @nth_bit downwards. Bits are numbered from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the last bit, set @nth_bit to -1 or GLIB_SIZEOF_LONG * 8. + the index of the first bit set which is lower than @nth_bit, or -1 if no lower bits are set @@ -31548,6 +36552,7 @@ usually). To start searching from the last bit, set @nth_bit to Gets the number of bits used to hold @number, e.g. if @number is 4, 3 bits are needed. + the number of bits used to hold @number @@ -31572,6 +36577,7 @@ between 0 and 31 then the result is undefined. This function accesses @address atomically. All other accesses to @address must be atomic in order for this function to work reliably. + %TRUE if the lock was acquired @@ -31595,6 +36601,7 @@ woken up. This function accesses @address atomically. All other accesses to @address must be atomic in order for this function to work reliably. + @@ -31630,6 +36637,7 @@ parameters (reading from left to right) is used. No attempt is made to force the resulting filename to be an absolute path. If the first element is a relative path, the result will be a relative path. + a newly-allocated string that must be freed with g_free(). @@ -31638,7 +36646,7 @@ be a relative path. the first element in the path - + remaining elements in path, terminated by %NULL @@ -31646,10 +36654,31 @@ be a relative path. + + Behaves exactly like g_build_filename(), but takes the path elements +as a va_list. This function is mainly meant for language bindings. + + + a newly-allocated string that must be freed + with g_free(). + + + + + the first element in the path + + + + va_list of remaining elements in path + + + + Behaves exactly like g_build_filename(), but takes the path elements as a string array, instead of varargs. This function is mainly meant for language bindings. + a newly-allocated string that must be freed with g_free(). @@ -31692,6 +36721,7 @@ of that element. Other than for determination of the number of leading and trailing copies of the separator, elements consisting only of copies of the separator are ignored. + a newly-allocated string that must be freed with g_free(). @@ -31700,11 +36730,11 @@ of the separator are ignored. a string used to separator the elements of the path. - + the first element in the path - + remaining elements in path, terminated by %NULL @@ -31716,6 +36746,7 @@ of the separator are ignored. Behaves exactly like g_build_path(), but takes the path elements as a string array, instead of varargs. This function is mainly meant for language bindings. + a newly-allocated string that must be freed with g_free(). @@ -31740,6 +36771,7 @@ meant for language bindings. %TRUE it frees the actual byte data. If the reference count of @array is greater than one, the #GByteArray wrapper is preserved but the size of @array will be set to zero. + the element data if @free_segment is %FALSE, otherwise %NULL. The element data should be freed using g_free(). @@ -31767,6 +36799,7 @@ will be set to zero. This is identical to using g_bytes_new_take() and g_byte_array_free() together. + a new immutable #GBytes representing same byte data that was in the array @@ -31783,6 +36816,7 @@ together. Creates a new #GByteArray with a reference count of 1. + the new #GByteArray @@ -31793,6 +36827,7 @@ together. Create byte array containing the data. The data will be owned by the array and will be freed with g_free(), i.e. it could be allocated using g_strdup(). + a new #GByteArray @@ -31812,11 +36847,36 @@ and will be freed with g_free(), i.e. it could be allocated using g_strdup(). + + Frees the data in the array and resets the size to zero, while +the underlying array is preserved for use elsewhere and returned +to the caller. + + + the element data, which should be + freed using g_free(). + + + + + a #GByteArray. + + + + + + pointer to retrieve the number of + elements of the original array + + + + Atomically decrements the reference count of @array by one. If the reference count drops to 0, all memory allocated by the array is released. This function is thread-safe and may be called from any thread. + @@ -31829,11 +36889,45 @@ thread. + + Gets the canonical file name from @filename. All triple slashes are turned into +single slashes, and all `..` and `.`s resolved against @relative_to. + +Symlinks are not followed, and the returned path is guaranteed to be absolute. + +If @filename is an absolute path, @relative_to is ignored. Otherwise, +@relative_to will be prepended to @filename to make it absolute. @relative_to +must be an absolute path, or %NULL. If @relative_to is %NULL, it'll fallback +to g_get_current_dir(). + +This function never fails, and will canonicalize file paths even if they don't +exist. + +No file system I/O is done. + + + a newly allocated string with the +canonical file path + + + + + the name of the file + + + + the relative directory, or %NULL +to use the current working directory + + + + A wrapper for the POSIX chdir() function. The function changes the current directory of the process to @path. See your C library manual for more details about chdir(). + 0 on success, -1 if an error occurred. @@ -31842,7 +36936,7 @@ See your C library manual for more details about chdir(). a pathname in the GLib file name encoding (UTF-8 on Windows) - + @@ -31861,6 +36955,7 @@ of the running library is newer than the version the running library must be binary compatible with the version @required_major.required_minor.@required_micro (same major version.) + %NULL if the GLib library is compatible with the given version, or a string describing the version mismatch. @@ -31885,6 +36980,7 @@ version @required_major.required_minor.@required_micro Gets the length in bytes of digests of type @checksum_type + the checksum length, or -1 if @checksum_type is not supported. @@ -31911,11 +37007,14 @@ source is still active. Typically, you will want to call g_spawn_close_pid() in the callback function for the source. GLib supports only a single callback per process id. +On POSIX platforms, the same restrictions mentioned for +g_child_watch_source_new() apply to this function. This internally creates a main loop source using g_child_watch_source_new() and attaches it to the main loop context using g_source_attach(). You can do these steps manually if you need greater control. + the ID (greater than 0) of the event source. @@ -31955,11 +37054,14 @@ is still active. Typically, you should invoke g_spawn_close_pid() in the callback function for the source. GLib supports only a single callback per process id. +On POSIX platforms, the same restrictions mentioned for +g_child_watch_source_new() apply to this function. This internally creates a main loop source using g_child_watch_source_new() and attaches it to the main loop context using g_source_attach(). You can do these steps manually if you need greater control. + the ID (greater than 0) of the event source. @@ -32004,14 +37106,25 @@ Note that on platforms where #GPid must be explicitly closed source is still active. Typically, you will want to call g_spawn_close_pid() in the callback function for the source. -Note further that using g_child_watch_source_new() is not -compatible with calling `waitpid` with a nonpositive first -argument in the application. Calling waitpid() for individual -pids will still work fine. +On POSIX platforms, the following restrictions apply to this API +due to limitations in POSIX process interfaces: -Similarly, on POSIX platforms, the @pid passed to this function must -be greater than 0 (i.e. this function must wait for a specific child, -and cannot wait for one of many children by using a nonpositive argument). +* @pid must be a child of this process +* @pid must be positive +* the application must not call `waitpid` with a non-positive + first argument, for instance in another thread +* the application must not wait for @pid to exit by any other + mechanism, including `waitpid(pid, ...)` or a second child-watch + source for the same @pid +* the application must not ignore SIGCHILD + +If any of those conditions are not met, this and related APIs will +not work correctly. This can often be diagnosed via a GLib warning +stating that `ECHILD` was received by `waitpid`. + +Calling `waitpid` for specific processes other than @pid remains a +valid thing to do. + the newly-created child watch source @@ -32027,10 +37140,58 @@ Windows a handle for a process (which doesn't have to be a child). If @err or *@err is %NULL, does nothing. Otherwise, calls g_error_free() on *@err and sets *@err to %NULL. + + + Clears a numeric handler, such as a #GSource ID. + +@tag_ptr must be a valid pointer to the variable holding the handler. + +If the ID is zero then this function does nothing. +Otherwise, clear_func() is called with the ID as a parameter, and the tag is +set to zero. + +A macro is also included that allows this function to be used without +pointer casts. + + + + + + + a pointer to the handler ID + + + + the function to call to clear the handler + + + + + + Clears a pointer to a #GList, freeing it and, optionally, freeing its elements using @destroy. + +@list_ptr must be a valid pointer. If @list_ptr points to a null #GList, this does nothing. + + + + + + + a #GList return location + + + + + + the function to pass to g_list_free_full() or %NULL to not free elements + + + + Clears a reference to a variable. @@ -32041,7 +37202,12 @@ Otherwise, the variable is destroyed using @destroy and the pointer is set to %NULL. A macro is also included that allows this function to be used without -pointer casts. +pointer casts. This will mask any warnings about incompatible function types +or calling conventions, so you must ensure that your @destroy function is +compatible with being called as `GDestroyNotify` using the standard calling +convention for the platform that GLib was compiled for; otherwise the program +will experience undefined behaviour. + @@ -32057,6 +37223,27 @@ pointer casts. + + Clears a pointer to a #GSList, freeing it and, optionally, freeing its elements using @destroy. + +@slist_ptr must be a valid pointer. If @slist_ptr points to a null #GSList, this does nothing. + + + + + + + a #GSList return location + + + + + + the function to pass to g_slist_free_full() or %NULL to not free elements + + + + This wraps the close() call; in case of error, %errno will be preserved, but the error will also be stored as a #GError in @error. @@ -32065,6 +37252,7 @@ Besides using #GError, there is another major reason to prefer this function over the call provided by the system; on Unix, it will attempt to correctly handle %EINTR, which has platform-specific semantics. + %TRUE on success, %FALSE if there was an error. @@ -32082,6 +37270,7 @@ convenience wrapper for g_checksum_new(), g_checksum_get_string() and g_checksum_free(). The hexadecimal string returned will be in lower case. + the digest of the binary data as a string in hexadecimal. The returned string should be freed with g_free() when done using it. @@ -32104,6 +37293,7 @@ convenience wrapper for g_checksum_new(), g_checksum_get_string() and g_checksum_free(). The hexadecimal string returned will be in lower case. + the digest of the binary data as a string in hexadecimal. The returned string should be freed with g_free() when done using it. @@ -32116,7 +37306,7 @@ The hexadecimal string returned will be in lower case. binary blob to compute the digest of - + @@ -32130,6 +37320,7 @@ The hexadecimal string returned will be in lower case. Computes the checksum of a string. The hexadecimal string returned will be in lower case. + the checksum as a hexadecimal string. The returned string should be freed with g_free() when done using it. @@ -32156,6 +37347,7 @@ convenience wrapper for g_hmac_new(), g_hmac_get_string() and g_hmac_unref(). The hexadecimal string returned will be in lower case. + the HMAC of the binary data as a string in hexadecimal. The returned string should be freed with g_free() when done using it. @@ -32182,6 +37374,7 @@ convenience wrapper for g_hmac_new(), g_hmac_get_string() and g_hmac_unref(). The hexadecimal string returned will be in lower case. + the HMAC of the binary data as a string in hexadecimal. The returned string should be freed with g_free() when done using it. @@ -32194,7 +37387,7 @@ The hexadecimal string returned will be in lower case. the key to use in the HMAC - + @@ -32204,7 +37397,7 @@ The hexadecimal string returned will be in lower case. binary blob to compute the HMAC of - + @@ -32218,6 +37411,7 @@ The hexadecimal string returned will be in lower case. Computes the HMAC for a string. The hexadecimal string returned will be in lower case. + the HMAC as a hexadecimal string. The returned string should be freed with g_free() @@ -32231,7 +37425,7 @@ The hexadecimal string returned will be in lower case. the key to use in the HMAC - + @@ -32253,7 +37447,7 @@ The hexadecimal string returned will be in lower case. Converts a string from one character set to another. Note that you should use g_iconv() for streaming conversions. -Despite the fact that @byes_read can return information about partial +Despite the fact that @bytes_read can return information about partial characters, the g_convert_... functions are not generally suitable for streaming. If the underlying converter maintains internal state, then this won't be preserved across successive calls to g_convert(), @@ -32264,16 +37458,23 @@ could combine with the base character.) Using extensions such as "//TRANSLIT" may not work (or may not work well) on many platforms. Consider using g_str_to_ascii() instead. + - If the conversion was successful, a newly allocated - nul-terminated string, which must be freed with - g_free(). Otherwise %NULL and @error will be set. - + + If the conversion was successful, a newly allocated buffer + containing the converted string, which must be freed with g_free(). + Otherwise %NULL and @error will be set. + + + - the string to convert - + + the string to convert. + + + the length of the string in bytes, or -1 if the string is @@ -32290,20 +37491,20 @@ well) on many platforms. Consider using g_str_to_ascii() instead. character set of @str. - - location to store the number of bytes in the - input string that were successfully converted, or %NULL. + + location to store the number of bytes in + the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - stored will the byte offset after the last valid + stored will be the byte offset after the last valid input sequence. - - the number of bytes stored in the output buffer (not - including the terminating nul). + + the number of bytes stored in + the output buffer (not including the terminating nul). @@ -32323,7 +37524,7 @@ to @to_codeset in their iconv() functions, in which case GLib will simply return that approximate conversion. Note that you should use g_iconv() for streaming conversions. -Despite the fact that @byes_read can return information about partial +Despite the fact that @bytes_read can return information about partial characters, the g_convert_... functions are not generally suitable for streaming. If the underlying converter maintains internal state, then this won't be preserved across successive calls to g_convert(), @@ -32331,16 +37532,23 @@ g_convert_with_iconv() or g_convert_with_fallback(). (An example of this is the GNU C converter for CP1255 which does not emit a base character until it knows that the next character is not a mark that could combine with the base character.) + - If the conversion was successful, a newly allocated - nul-terminated string, which must be freed with - g_free(). Otherwise %NULL and @error will be set. - + + If the conversion was successful, a newly allocated buffer + containing the converted string, which must be freed with g_free(). + Otherwise %NULL and @error will be set. + + + - the string to convert - + + the string to convert. + + + the length of the string in bytes, or -1 if the string is @@ -32358,50 +37566,65 @@ could combine with the base character.) - UTF-8 string to use in place of character not + UTF-8 string to use in place of characters not present in the target encoding. (The string must be representable in the target encoding). - If %NULL, characters not in the target encoding will - be represented as Unicode escapes \uxxxx or \Uxxxxyyyy. + If %NULL, characters not in the target encoding will + be represented as Unicode escapes \uxxxx or \Uxxxxyyyy. - - location to store the number of bytes in the - input string that were successfully converted, or %NULL. + + location to store the number of bytes in + the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. - - the number of bytes stored in the output buffer (not - including the terminating nul). + + the number of bytes stored in + the output buffer (not including the terminating nul). - + Converts a string from one character set to another. Note that you should use g_iconv() for streaming conversions. -Despite the fact that @byes_read can return information about partial +Despite the fact that @bytes_read can return information about partial characters, the g_convert_... functions are not generally suitable for streaming. If the underlying converter maintains internal state, then this won't be preserved across successive calls to g_convert(), g_convert_with_iconv() or g_convert_with_fallback(). (An example of this is the GNU C converter for CP1255 which does not emit a base character until it knows that the next character is not a mark that -could combine with the base character.) +could combine with the base character.) + +Characters which are valid in the input character set, but which have no +representation in the output character set will result in a +%G_CONVERT_ERROR_ILLEGAL_SEQUENCE error. This is in contrast to the iconv() +specification, which leaves this behaviour implementation defined. Note that +this is the same error code as is returned for an invalid byte sequence in +the input character set. To get defined behaviour for conversion of +unrepresentable characters, use g_convert_with_fallback(). + - If the conversion was successful, a newly allocated - nul-terminated string, which must be freed with + + If the conversion was successful, a newly allocated buffer + containing the converted string, which must be freed with g_free(). Otherwise %NULL and @error will be set. - + + + - the string to convert - + + the string to convert. + + + the length of the string in bytes, or -1 if the string is @@ -32414,28 +37637,29 @@ could combine with the base character.) conversion descriptor from g_iconv_open() - - location to store the number of bytes in the - input string that were successfully converted, or %NULL. + + location to store the number of bytes in + the input string that were successfully converted, or %NULL. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - stored will the byte offset after the last valid + stored will be the byte offset after the last valid input sequence. - - the number of bytes stored in the output buffer (not - including the terminating nul). + + the number of bytes stored in + the output buffer (not including the terminating nul). - + Frees all the data elements of the datalist. The data elements' destroy functions are called if they have been set. + @@ -32446,13 +37670,18 @@ if they have been set. - + Calls the given function for each data element of the datalist. The function is called with each data element's #GQuark id and data, together with the given @user_data parameter. Note that this function is NOT thread-safe. So unless @datalist can be protected from any modifications during invocation of this function, it should -not be called. +not be called. + +@func can make changes to @datalist, but the iteration will not +reflect changes made during the g_datalist_foreach() call, other +than skipping over elements that are removed. + @@ -32461,7 +37690,7 @@ not be called. a datalist. - + the function to call for each data element. @@ -32474,8 +37703,10 @@ not be called. Gets a data element, using its string identifier. This is slower than g_datalist_id_get_data() because it compares strings. + - the data element, or %NULL if it is not found. + the data element, or %NULL if it + is not found. @@ -32492,6 +37723,7 @@ g_datalist_id_get_data() because it compares strings. Gets flags values packed in together with the datalist. See g_datalist_set_flags(). + the flags of the datalist @@ -32517,6 +37749,7 @@ is not allowed to read or modify the datalist. This function can be useful to avoid races when multiple threads are using the same datalist and the same key. + the result of calling @dup_func on the value associated with @key_id in @datalist, or %NULL if not set. @@ -32532,7 +37765,7 @@ threads are using the same datalist and the same key. the #GQuark identifying a data element - + function to duplicate the old value @@ -32544,8 +37777,10 @@ threads are using the same datalist and the same key. Retrieves the data element corresponding to @key_id. + - the data element, or %NULL if it is not found. + the data element, or %NULL if + it is not found. @@ -32559,11 +37794,25 @@ threads are using the same datalist and the same key. - + + Removes an element, using its #GQuark identifier. + + + + a datalist. + + + the #GQuark identifying the data element. + + + + Removes an element, without calling its destroy notification function. + - the data previously stored at @key_id, or %NULL if none. + the data previously stored at @key_id, + or %NULL if none. @@ -32577,7 +37826,7 @@ function. - + Compares the member that is associated with @key_id in @datalist to @oldval, and if they are the same, replace @oldval with @newval. @@ -32587,10 +37836,11 @@ operation, for a member of @datalist. If the previous value was replaced then ownership of the old value (@oldval) is passed to the caller, including -the registred destroy notify for it (passed out in @old_destroy). +the registered destroy notify for it (passed out in @old_destroy). Its up to the caller to free this as he wishes, which may or may not include using @old_destroy as sometimes replacement should not destroy the object in the normal way. + %TRUE if the existing value for @key_id was replaced by @newval, %FALSE otherwise. @@ -32617,17 +37867,36 @@ should not destroy the object in the normal way. destroy notify for the new value - + destroy notify for the existing value - + + Sets the data corresponding to the given #GQuark id. Any previous +data with the same key is removed, and its destroy function is +called. + + + + a datalist. + + + the #GQuark to identify the data element. + + + the data element, or %NULL to remove any previous element + corresponding to @q. + + + + Sets the data corresponding to the given #GQuark id, and the function to be called when the element is removed from the datalist. Any previous data with the same key is removed, and its destroy function is called. + @@ -32645,7 +37914,7 @@ function is called. corresponding to @key_id. - + the function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated @@ -32655,9 +37924,10 @@ function is called. - + Resets the datalist to %NULL. It does not free any memory or call any destroy functions. + @@ -32668,6 +37938,70 @@ any destroy functions. + + Removes an element using its string identifier. The data element's +destroy function is called if it has been set. + + + + a datalist. + + + the string identifying the data element. + + + + + Removes an element, without calling its destroy notifier. + + + + a datalist. + + + the string identifying the data element. + + + + + Sets the data element corresponding to the given string identifier. + + + + a datalist. + + + the string to identify the data element. + + + the data element, or %NULL to remove any previous element + corresponding to @k. + + + + + Sets the data element corresponding to the given string identifier, +and the function to be called when the data element is removed. + + + + a datalist. + + + the string to identify the data element. + + + the data element, or %NULL to remove any previous element + corresponding to @k. + + + the function to call when the data element is removed. + This function will be called with the data element and can be used to + free any memory allocated for it. If @d is %NULL, then @f must + also be %NULL. + + + Turns on flag values for a data list. This function is used to keep a small number of boolean flags in an object with @@ -32675,6 +38009,7 @@ a data list without using any additional space. It is not generally useful except in circumstances where space is very tight. (It is used in the base #GObject type, for example.) + @@ -32695,6 +38030,7 @@ example.) Turns off flag values for a data list. See g_datalist_unset_flags() + @@ -32716,6 +38052,7 @@ example.) Destroys the dataset, freeing all memory allocated, and calling any destroy functions set for data elements. + @@ -32726,11 +38063,16 @@ destroy functions set for data elements. - + Calls the given function for each data element which is associated with the given location. Note that this function is NOT thread-safe. -So unless @datalist can be protected from any modifications during -invocation of this function, it should not be called. +So unless @dataset_location can be protected from any modifications +during invocation of this function, it should not be called. + +@func can make changes to the dataset, but the iteration will not +reflect changes made during the g_dataset_foreach() call, other +than skipping over elements that are removed. + @@ -32739,7 +38081,7 @@ invocation of this function, it should not be called. the location identifying the dataset. - + the function to call for each data element. @@ -32749,11 +38091,24 @@ invocation of this function, it should not be called. + + Gets the data element corresponding to a string. + + + + the location identifying the dataset. + + + the string identifying the data element. + + + Gets the data element corresponding to a #GQuark. + - the data element corresponding to the #GQuark, or %NULL if - it is not found. + the data element corresponding to + the #GQuark, or %NULL if it is not found. @@ -32767,11 +38122,26 @@ invocation of this function, it should not be called. - + + Removes a data element from a dataset. The data element's destroy +function is called if it has been set. + + + + the location identifying the dataset. + + + the #GQuark id identifying the data element. + + + + Removes an element, without calling its destroy notification function. + - the data previously stored at @key_id, or %NULL if none. + the data previously stored at @key_id, + or %NULL if none. @@ -32785,11 +38155,29 @@ function. - + + Sets the data element associated with the given #GQuark id. Any +previous data with the same key is removed, and its destroy function +is called. + + + + the location identifying the dataset. + + + the #GQuark id to identify the data element. + + + the data element. + + + + Sets the data element associated with the given #GQuark id, and also the function to call when the data element is destroyed. Any previous data with the same key is removed, and its destroy function is called. + @@ -32815,9 +38203,71 @@ is called. + + Removes a data element corresponding to a string. Its destroy +function is called if it has been set. + + + + the location identifying the dataset. + + + the string identifying the data element. + + + + + Removes an element, without calling its destroy notifier. + + + + the location identifying the dataset. + + + the string identifying the data element. + + + + + Sets the data corresponding to the given string identifier. + + + + the location identifying the dataset. + + + the string to identify the data element. + + + the data element. + + + + + Sets the data corresponding to the given string identifier, and the +function to call when the data element is destroyed. + + + + the location identifying the dataset. + + + the string to identify the data element. + + + the data element. + + + the function to call when the data element is removed. This + function will be called with the data element and can be used to + free any memory allocated for it. + + + Returns the number of days in a month, taking leap years into account. + number of days in @month during the @year @@ -32841,6 +38291,7 @@ plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Mondays are in the year, i.e. there are 53 Mondays if one of the extra days happens to be a Monday.) + number of Mondays in the year @@ -32860,6 +38311,7 @@ plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Sundays are in the year, i.e. there are 53 Sundays if one of the extra days happens to be a Sunday.) + the number of weeks in @year @@ -32878,6 +38330,7 @@ For the purposes of this function, leap year is every year divisible by 4 unless that year is divisible by 100. If it is divisible by 100 it would be a leap year only if that year is also divisible by 400. + %TRUE if the year is a leap year @@ -32903,6 +38356,7 @@ addition to those implemented by the platform's C library. For example, don't expect that using g_date_strftime() would make the \%F provided by the C99 strftime() work on Windows where the C library only complies to C89. + number of characters written to the buffer, or 0 the buffer was too small @@ -32929,6 +38383,7 @@ where the C library only complies to C89. A comparison function for #GDateTimes that is suitable as a #GCompareFunc. Both #GDateTimes must be non-%NULL. + -1, 0 or 1 if @dt1 is less than, equal to or greater than @dt2. @@ -32950,6 +38405,7 @@ as a #GCompareFunc. Both #GDateTimes must be non-%NULL. Equal here means that they represent the same moment after converting them to the same time zone. + %TRUE if @dt1 and @dt2 are equal @@ -32967,6 +38423,7 @@ them to the same time zone. Hashes @datetime into a #guint, suitable for use within #GHashTable. + a #guint containing the hash @@ -32981,6 +38438,7 @@ them to the same time zone. Returns %TRUE if the day of the month is valid (a day is valid if it's between 1 and 31 inclusive). + %TRUE if the day is valid @@ -32996,6 +38454,7 @@ between 1 and 31 inclusive). Returns %TRUE if the day-month-year triplet forms a valid, existing day in the range of days #GDate understands (Year 1 or later, no more than a few thousand years in the future). + %TRUE if the date is a valid one @@ -33018,6 +38477,7 @@ a few thousand years in the future). Returns %TRUE if the Julian day is valid. Anything greater than zero is basically a valid Julian, though there is a 32-bit limit. + %TRUE if the Julian day is valid @@ -33032,6 +38492,7 @@ is basically a valid Julian, though there is a 32-bit limit. Returns %TRUE if the month value is valid. The 12 #GDateMonth enumeration values are the only valid months. + %TRUE if the month is valid @@ -33046,6 +38507,7 @@ enumeration values are the only valid months. Returns %TRUE if the weekday is valid. The seven #GDateWeekday enumeration values are the only valid weekdays. + %TRUE if the weekday is valid @@ -33060,6 +38522,7 @@ values are the only valid weekdays. Returns %TRUE if the year is valid. Any year greater than 0 is valid, though there is a 16-bit limit to what #GDate will understand. + %TRUE if the year is valid @@ -33076,6 +38539,7 @@ though there is a 16-bit limit to what #GDate will understand. category instead of always using `LC_MESSAGES`. See g_dgettext() for more information about how this functions differs from calling dcgettext() directly. + the translated string for the given locale category @@ -33129,6 +38593,7 @@ cases the application should call textdomain() after initializing GTK+. Applications should normally not use this function directly, but use the _() macro for translations. + The translated string @@ -33157,6 +38622,7 @@ basename, no directory components are allowed. If template is Note that in contrast to g_mkdtemp() (and mkdtemp()) @tmpl is not modified, and might thus be a read-only literal string. + The actual name used. This string should be freed with g_free() when not needed any longer and is @@ -33168,7 +38634,7 @@ modified, and might thus be a read-only literal string. Template for directory name, as in g_mkdtemp(), basename only, or %NULL for a default template - + @@ -33180,6 +38646,7 @@ keys in a #GHashTable. This equality function is also appropriate for keys that are integers stored in pointers, such as `GINT_TO_POINTER (n)`. + %TRUE if the two keys match. @@ -33203,6 +38670,7 @@ when using opaque pointers compared by pointer value as keys in a This hash function is also appropriate for keys that are integers stored in pointers, such as `GINT_TO_POINTER (n)`. + a hash value corresponding to the key. @@ -33221,6 +38689,7 @@ translations for the current locale. See g_dgettext() for details of how this differs from dngettext() proper. + The translated string @@ -33251,6 +38720,7 @@ proper. It can be passed to g_hash_table_new() as the @key_equal_func parameter, when using non-%NULL pointers to doubles as keys in a #GHashTable. + %TRUE if the two keys match. @@ -33271,6 +38741,7 @@ parameter, when using non-%NULL pointers to doubles as keys in a It can be passed to g_hash_table_new() as the @hash_func parameter, It can be passed to g_hash_table_new() as the @hash_func parameter, when using non-%NULL pointers to doubles as keys in a #GHashTable. + a hash value corresponding to the key. @@ -33296,6 +38767,7 @@ with dgettext() proper. Applications should normally not use this function directly, but use the C_() macro for translations with context. + The translated string @@ -33328,6 +38800,7 @@ with dgettext() proper. This function differs from C_() in that it is not a macro and thus you may use non-string-literals as context and msgid arguments. + The translated string @@ -33351,55 +38824,58 @@ thus you may use non-string-literals as context and msgid arguments. Returns the value of the environment variable @variable in the provided list @envp. + the value of the environment variable, or %NULL if the environment variable is not set in @envp. The returned string is owned by @envp, and will be freed if @variable is set or unset again. - + - an environment - list (eg, as returned from g_get_environ()), or %NULL + + an environment list (eg, as returned from g_get_environ()), or %NULL for an empty environment list - + the environment variable to get - + Sets the environment variable @variable in the provided list @envp to @value. + - the - updated environment list. Free it using g_strfreev(). + + the updated environment list. Free it using g_strfreev(). - + - an - environment list that can be freed using g_strfreev() (e.g., as + + an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL for an empty environment list - + - the environment variable to set, must not contain '=' - + the environment variable to set, must not + contain '=' + the value for to set the variable to - + whether to change the variable if it already exists @@ -33410,25 +38886,27 @@ provided list @envp. Removes the environment variable @variable from the provided environment @envp. + - the - updated environment list. Free it using g_strfreev(). + + the updated environment list. Free it using g_strfreev(). - + - an environment - list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), - or %NULL for an empty environment list + + an environment list that can be freed using g_strfreev() (e.g., as + returned from g_get_environ()), or %NULL for an empty environment list - + - the environment variable to remove, must not contain '=' - + the environment variable to remove, must not + contain '=' + @@ -33441,6 +38919,7 @@ assume that all #GFileError values will exist. Normally a #GFileError value goes into a #GError returned from a function that manipulates files. So you would use g_file_error_from_errno() when constructing a #GError. + #GFileError corresponding to the given @errno @@ -33468,6 +38947,7 @@ stored in @contents will be nul-terminated, so for text files you can pass %FALSE and sets @error. The error domain is #G_FILE_ERROR. Possible error codes are those in the #GFileError enumeration. In the error case, @contents is set to %NULL and @length is set to zero. + %TRUE on success, %FALSE if an error occurred @@ -33475,7 +38955,7 @@ codes are those in the #GFileError enumeration. In the error case, name of a file to read contents from, in the GLib file name encoding - + location to store an allocated string, use g_free() to free @@ -33507,6 +38987,7 @@ Upon success, and if @name_used is non-%NULL, the actual name used is returned in @name_used. This string should be freed with g_free() when not needed any longer. The returned name is in the GLib file name encoding. + A file handle (as from open()) to the file opened for reading and writing. The file is opened in binary mode on platforms @@ -33518,7 +38999,7 @@ name encoding. Template for file name, as in g_mkstemp(), basename only, or %NULL for a default template - + location to store actual name used, @@ -33531,6 +39012,7 @@ name encoding. Reads the contents of the symbolic link @filename like the POSIX readlink() function. The returned string is in the encoding used for filenames. Use g_filename_to_utf8() to convert it to UTF-8. + A newly-allocated string with the contents of the symbolic link, or %NULL if an error occurred. @@ -33539,7 +39021,7 @@ for filenames. Use g_filename_to_utf8() to convert it to UTF-8. the symbolic link - + @@ -33555,6 +39037,17 @@ file which is then renamed to the final name. Notes: lists, metadata etc. may be lost. If @filename is a symbolic link, the link itself will be replaced, not the linked file. +- On UNIX, if @filename already exists and is non-empty, and if the system + supports it (via a journalling filesystem or equivalent), the fsync() + call (or equivalent) will be used to ensure atomic replacement: @filename + will contain either its old contents or @contents, even in the face of + system power loss, the disk being unsafely removed, etc. + +- On UNIX, if @filename does not already exist or is empty, there is a + possibility that system power loss etc. after calling this function will + leave @filename empty or full of NUL bytes, depending on the underlying + filesystem. + - On Windows renaming a file will not remove an existing file with the new name, so on Windows there is a race condition between the existing file being removed and the temporary file being renamed. @@ -33569,6 +39062,7 @@ Possible error codes are those in the #GFileError enumeration. Note that the name for the temporary file is constructed by appending up to 7 characters to @filename. + %TRUE on success, %FALSE if an error occurred @@ -33577,11 +39071,11 @@ to 7 characters to @filename. name of a file to write @contents to, in the GLib file name encoding - + string to write to the file - + @@ -33633,6 +39127,7 @@ On Windows, there are no symlinks, so testing for %G_FILE_TEST_IS_EXECUTABLE will just check that the file exists and its name indicates that it is executable, checking for well-known extensions and those listed in the `PATHEXT` environment variable. + whether a test was %TRUE @@ -33641,7 +39136,7 @@ extensions and those listed in the `PATHEXT` environment variable. a filename to test in the GLib file name encoding - + bitfield of #GFileTest flags @@ -33666,6 +39161,7 @@ translation of well known locations can be done. This function is preferred over g_filename_display_name() if you know the whole path, as it allows translation. + a newly allocated string containing a rendition of the basename of the filename in valid UTF-8 @@ -33675,7 +39171,7 @@ whole path, as it allows translation. an absolute pathname in the GLib file name encoding - + @@ -33695,6 +39191,7 @@ encoding. If you know the whole pathname of the file you should use g_filename_display_basename(), since that allows location-based translation of filenames. + a newly allocated string containing a rendition of the filename in valid UTF-8 @@ -33704,13 +39201,14 @@ translation of filenames. a pathname hopefully in the GLib file name encoding - + Converts an escaped ASCII-encoded URI to a local filename in the encoding used for filenames. + a newly-allocated string holding the resulting filename, or %NULL on an error. @@ -33733,13 +39231,18 @@ encoding used for filenames. Converts a string from UTF-8 to the encoding GLib uses for filenames. Note that on Windows GLib uses UTF-8 for filenames; on other platforms, this function indirectly depends on the -[current locale][setlocale]. +[current locale][setlocale]. + +The input string shall not contain nul characters even if the @len +argument is positive. A nul character found inside the string will result +in error %G_CONVERT_ERROR_ILLEGAL_SEQUENCE. If the filename encoding is +not UTF-8 and the conversion output contains a nul character, the error +%G_CONVERT_ERROR_EMBEDDED_NUL is set and the function returns %NULL. + The converted string, or %NULL on an error. - - - + @@ -33757,14 +39260,14 @@ on other platforms, this function indirectly depends on the Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error - #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - stored will the byte offset after the last valid + %G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value + stored will be the byte offset after the last valid input sequence. - - the number of bytes stored in the output buffer (not - including the terminating nul). + + the number of bytes stored in + the output buffer (not including the terminating nul). @@ -33772,6 +39275,7 @@ on other platforms, this function indirectly depends on the Converts an absolute filename to an escaped ASCII-encoded URI, with the path component following Section 3.3. of RFC 2396. + a newly-allocated string holding the resulting URI, or %NULL on an error. @@ -33782,7 +39286,7 @@ component following Section 3.3. of RFC 2396. an absolute filename specified in the GLib file name encoding, which is the on-disk file name bytes on Unix, and UTF-8 on Windows - + A UTF-8 encoded hostname, or %NULL for none. @@ -33794,7 +39298,16 @@ component following Section 3.3. of RFC 2396. Converts a string which is in the encoding used by GLib for filenames into a UTF-8 string. Note that on Windows GLib uses UTF-8 for filenames; on other platforms, this function indirectly depends on -the [current locale][setlocale]. +the [current locale][setlocale]. + +The input string shall not contain nul characters even if the @len +argument is positive. A nul character found inside the string will result +in error %G_CONVERT_ERROR_ILLEGAL_SEQUENCE. +If the source encoding is not UTF-8 and the conversion output contains a +nul character, the error %G_CONVERT_ERROR_EMBEDDED_NUL is set and the +function returns %NULL. Use g_convert() to produce output that +may contain embedded nul characters. + The converted string, or %NULL on an error. @@ -33802,7 +39315,7 @@ the [current locale][setlocale]. a string in the encoding for filenames - + the length of the string, or -1 if the string is @@ -33817,8 +39330,8 @@ the [current locale][setlocale]. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error - #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - stored will the byte offset after the last valid + %G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value + stored will be the byte offset after the last valid input sequence. @@ -33847,15 +39360,16 @@ Windows 32-bit system directory, then in the Windows directory, and finally in the directories in the `PATH` environment variable. If the program is found, the return value contains the full name including the type suffix. - - a newly-allocated string with the absolute path, - or %NULL + + + a newly-allocated + string with the absolute path, or %NULL a program name in the GLib file name encoding - + @@ -33863,7 +39377,9 @@ including the type suffix. Formats a size (for example the size of a file) into a human readable string. Sizes are rounded to the nearest size prefix (kB, MB, GB) and are displayed rounded to the nearest tenth. E.g. the file size -3292528 bytes will be converted into the string "3.2 MB". +3292528 bytes will be converted into the string "3.2 MB". The returned string +is UTF-8, and may use a non-breaking space to separate the number and units, +to ensure they aren’t separated when line wrapped. The prefix units base is 1000 (i.e. 1 kB is 1000 bytes). @@ -33871,9 +39387,10 @@ This string should be freed with g_free() when not needed any longer. See g_format_size_full() for more options about how the size might be formatted. + - a newly-allocated formatted string containing a human readable - file size + a newly-allocated formatted string containing + a human readable file size @@ -33895,9 +39412,10 @@ The prefix units base is 1024 (i.e. 1 KB is 1024 bytes). This string should be freed with g_free() when not needed any longer. This function is broken due to its use of SI suffixes to denote IEC units. Use g_format_size() instead. + - a newly-allocated formatted string containing a human - readable file size + a newly-allocated formatted string + containing a human readable file size @@ -33912,9 +39430,10 @@ This string should be freed with g_free() when not needed any longer. This function is similar to g_format_size() but allows for flags that modify the output. See #GFormatSizeFlags. + - a newly-allocated formatted string containing a human - readable file size + a newly-allocated formatted string + containing a human readable file size @@ -33930,7 +39449,10 @@ that modify the output. See #GFormatSizeFlags. An implementation of the standard fprintf() function which supports -positional parameters, as specified in the Single Unix Specification. +positional parameters, as specified in the Single Unix Specification. + +`glib/gprintf.h` must be explicitly included in order to use this function. + the number of bytes printed. @@ -33943,7 +39465,7 @@ positional parameters, as specified in the Single Unix Specification. a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the arguments to insert in the output. @@ -33956,6 +39478,7 @@ positional parameters, as specified in the Single Unix Specification. If @mem is %NULL it simply returns, so there is no need to check @mem against %NULL before calling this function. + @@ -33974,8 +39497,10 @@ g_get_prgname(), which gets a non-localized name. If g_set_application_name() has not been called, returns the result of g_get_prgname() (which may be %NULL if g_set_prgname() has also not been called). - - human-readable application name. may return %NULL + + + human-readable application + name. May return %NULL @@ -33991,11 +39516,16 @@ used by the "narrow" versions of C library and Win32 functions that handle file names. It might be different from the character set used by the C library's current locale. +On Linux, the character set is found by consulting nl_langinfo() if +available. If not, the environment variables `LC_ALL`, `LC_CTYPE`, `LANG` +and `CHARSET` are queried in order. + The return value is %TRUE if the locale's encoding is UTF-8, in that case you can perhaps avoid calling g_convert(). The string returned in @charset is not allocated, and should not be freed. + %TRUE if the returned charset is UTF-8 @@ -34010,12 +39540,44 @@ freed. Gets the character set for the current locale. + a newly allocated string containing the name of the character set. This string must be freed with g_free(). + + Obtains the character set used by the console attached to the process, +which is suitable for printing output to the terminal. + +Usually this matches the result returned by g_get_charset(), but in +environments where the locale's character set does not match the encoding +of the console this function tries to guess a more suitable value instead. + +On Windows the character set returned by this function is the +output code page used by the console associated with the calling process. +If the codepage can't be determined (for example because there is no +console attached) UTF-8 is assumed. + +The return value is %TRUE if the locale's encoding is UTF-8, in that +case you can perhaps avoid calling g_convert(). + +The string returned in @charset is not allocated, and should not be +freed. + + + %TRUE if the returned charset is UTF-8 + + + + + return location for character set + name, or %NULL. + + + + Gets the current directory. @@ -34027,15 +39589,19 @@ Since GLib 2.40, this function will return the value of the "PWD" environment variable if it is set and it happens to be the same as the current directory. This can make a difference in the case that the current directory is the target of a symbolic link. + the current directory - + Equivalent to the UNIX gettimeofday() function, but portable. You may find g_get_real_time() to be more convenient. + #GTimeVal is not year-2038-safe. Use g_get_real_time() + instead. + @@ -34057,11 +39623,12 @@ except portable. The return value is freshly allocated and it should be freed with g_strfreev() when it is no longer needed. + - the list of - environment variables + + the list of environment variables - + @@ -34090,14 +39657,18 @@ The returned @charsets belong to GLib and must not be freed. Note that on Unix, regardless of the locale character set or `G_FILENAME_ENCODING` value, the actual file names present on a system might be in any random encoding or just gibberish. + %TRUE if the filename encoding is UTF-8. - - return location for the %NULL-terminated list of encoding names - + + + return location for the %NULL-terminated list of encoding names + + + @@ -34122,9 +39693,10 @@ old behaviour (and if you don't wish to increase your GLib dependency to ensure that the new behaviour is in effect) then you should either directly check the `HOME` environment variable yourself or unset it before calling any functions in GLib. + the current user's home directory - + @@ -34139,7 +39711,10 @@ of the machine is changed while an application is running, the return value from this function does not change. The returned string is owned by GLib and should not be modified or freed. If no name can be determined, a default fixed string "localhost" is -returned. +returned. + +The encoding of the returned string is UTF-8. + the host name of the machine. @@ -34157,25 +39732,59 @@ For example, if LANGUAGE=de:en_US, then the returned list is This function consults the environment variables `LANGUAGE`, `LC_ALL`, `LC_MESSAGES` and `LANG` to find the list of locales specified by the user. + a %NULL-terminated array of strings owned by GLib that must not be modified or freed. - + + + Computes a list of applicable locale names with a locale category name, +which can be used to construct the fallback locale-dependent filenames +or search paths. The returned list is sorted from most desirable to +least desirable and always contains the default locale "C". + +This function consults the environment variables `LANGUAGE`, `LC_ALL`, +@category_name, and `LANG` to find the list of locales specified by the +user. + +g_get_language_names() returns g_get_language_names_with_category("LC_MESSAGES"). + + + a %NULL-terminated array of strings owned by + the thread g_get_language_names_with_category was called from. + It must not be modified or freed. It must be copied if planned to be used in another thread. + + + + + + + a locale category name + + + + Returns a list of derived variants of @locale, which can be used to e.g. construct locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable. -This function handles territory, charset and extra locale modifiers. +This function handles territory, charset and extra locale modifiers. See +[`setlocale(3)`](man:setlocale) for information about locales and their format. -For example, if @locale is "fr_BE", then the returned list -is "fr_BE", "fr". +@locale itself is guaranteed to be returned in the output. + +For example, if @locale is `fr_BE`, then the returned list +is `fr_BE`, `fr`. If @locale is `en_GB.UTF-8@euro`, then the returned list +is `en_GB.UTF-8@euro`, `en_GB.UTF-8`, `en_GB@euro`, `en_GB`, `en.UTF-8@euro`, +`en.UTF-8`, `en@euro`, `en`. If you need the list of variants for the current locale, use g_get_language_names(). + a newly allocated array of newly allocated strings with the locale variants. Free with @@ -34202,6 +39811,7 @@ suspended. We try to use the clock that corresponds as closely as possible to the passage of time as measured by system calls such as poll() but it may not always be possible to do this. + the monotonic time, in microseconds @@ -34212,11 +39822,34 @@ may not always be possible to do this. schedule simultaneously for this process. This is intended to be used as a parameter to g_thread_pool_new() for CPU bound tasks and similar cases. + Number of schedulable threads, always greater than 0 + + Get information about the operating system. + +On Linux this comes from the `/etc/os-release` file. On other systems, it may +come from a variety of sources. You can either use the standard key names +like %G_OS_INFO_KEY_NAME or pass any UTF-8 string key name. For example, +`/etc/os-release` provides a number of other less commonly used values that may +be useful. No key is guaranteed to be provided, so the caller should always +check if the result is %NULL. + + + The associated value for the requested key or %NULL if + this information is not provided. + + + + + a key for the OS info being requested, for example %G_OS_INFO_KEY_NAME. + + + + Gets the name of the program. This name should not be localized, in contrast to g_get_application_name(). @@ -34226,9 +39859,11 @@ g_application_run(). In case of GDK or GTK+ it is set in gdk_init(), which is called by gtk_init() and the #GtkApplication::startup handler. The program name is found by taking the last component of @argv[0]. - - the name of the program. The returned string belongs - to GLib and must not be modified or freed. + + + the name of the program, + or %NULL if it has not been set yet. The returned string belongs + to GLib and must not be modified or freed. @@ -34238,9 +39873,10 @@ entry in the `passwd` file. The encoding of the returned string is system-defined. (On Windows, it is, however, always UTF-8.) If the real user name cannot be determined, the string "Unknown" is returned. + the user's real name. - + @@ -34253,6 +39889,7 @@ that the return value is often more convenient than dealing with a You should only use this call if you are actually interested in the real wall-clock time. g_get_monotonic_time() is probably more useful for measuring intervals. + the number of microseconds since January 1, 1970 UTC. @@ -34276,11 +39913,12 @@ that is not user specific. For example, an application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder. This information will not roam and is available to anyone using the computer. + a %NULL-terminated array of strings owned by GLib that must not be modified or freed. - + @@ -34317,11 +39955,12 @@ itself. Note that on Windows the returned list can vary depending on where this function is called. + a %NULL-terminated array of strings owned by GLib that must not be modified or freed. - + @@ -34341,9 +39980,10 @@ as a default. The encoding of the returned string is system-defined. On Windows, it is always UTF-8. The return value is never %NULL or the empty string. + the directory to use for temporary files. - + @@ -34360,10 +40000,11 @@ If `XDG_CACHE_HOME` is undefined, the directory that serves as a common repository for temporary Internet files is used instead. A typical path is `C:\Documents and Settings\username\Local Settings\Temporary Internet Files`. See the [documentation for `CSIDL_INTERNET_CACHE`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_internet_cache). + - a string owned by GLib that must not be modified - or freed. - + a string owned by GLib that + must not be modified or freed. + @@ -34381,10 +40022,11 @@ to roaming) application data is used instead. See the [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata). Note that in this case on Windows it will be the same as what g_get_user_data_dir() returns. + - a string owned by GLib that must not be modified - or freed. - + a string owned by GLib that + must not be modified or freed. + @@ -34402,10 +40044,11 @@ opposed to roaming) application data is used instead. See the [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata). Note that in this case on Windows it will be the same as what g_get_user_config_dir() returns. + - a string owned by GLib that must not be modified - or freed. - + a string owned by GLib that must + not be modified or freed. + @@ -34413,9 +40056,10 @@ as what g_get_user_config_dir() returns. string is system-defined. On UNIX, it might be the preferred file name encoding, or something else, and there is no guarantee that it is even consistent on a machine. On Windows, it is always UTF-8. + the user name of the current user. - + @@ -34429,10 +40073,11 @@ This is the directory specified in the `XDG_RUNTIME_DIR` environment variable. In the case that this variable is not set, we return the value of g_get_user_cache_dir(), after verifying that it exists. + a string owned by GLib that must not be modified or freed. - + @@ -34446,11 +40091,12 @@ not been set up. Depending on the platform, the user might be able to change the path of the special directory without requiring the session to restart; GLib will not reflect any change once the special directories are loaded. + the path to the specified special directory, or %NULL if the logical id was not found. The returned string is owned by GLib and should not be modified or freed. - + @@ -34467,17 +40113,18 @@ be in some consistent character set and encoding. On Windows, they are in UTF-8. On Windows, in case the environment variable's value contains references to other environment variables, they are expanded. + the value of the environment variable, or %NULL if the environment variable is not found. The returned string may be overwritten by the next call to g_getenv(), g_setenv() or g_unsetenv(). - + the environment variable to get - + @@ -34486,9 +40133,18 @@ references to other environment variables, they are expanded. is equivalent to calling g_hash_table_replace() with @key as both the key and the value. +In particular, this means that if @key already exists in the hash table, then +the old copy of @key in the hash table is freed and @key replaces it in the +table. + When a hash table only ever contains keys that have themselves as the corresponding value it is able to be stored more efficiently. See -the discussion in the section description. +the discussion in the section description. + +Starting from GLib 2.40, this function returns a boolean value to +indicate whether the newly added value was already in the hash table +or not. + %TRUE if the key did not exist yet @@ -34501,7 +40157,7 @@ the discussion in the section description. - + a key to insert @@ -34509,6 +40165,7 @@ the discussion in the section description. Checks if @key is in @hash_table. + %TRUE if @key is in @hash_table, %FALSE otherwise. @@ -34534,6 +40191,7 @@ you should either free them first or create the #GHashTable with destroy notifiers using g_hash_table_new_full(). In the latter case the destroy functions you supplied will be called on all keys and values during the destruction phase. + @@ -34547,6 +40205,16 @@ destruction phase. + + This function is deprecated and will be removed in the next major +release of GLib. It does nothing. + + + + a #GHashTable + + + Inserts a new key and value into a #GHashTable. @@ -34555,7 +40223,12 @@ value is replaced with the new value. If you supplied a @value_destroy_func when creating the #GHashTable, the old value is freed using that function. If you supplied a @key_destroy_func when creating the #GHashTable, the passed -key is freed using that function. +key is freed using that function. + +Starting from GLib 2.40, this function returns a boolean value to +indicate whether the newly added value was already in the hash table +or not. + %TRUE if the key did not exist yet @@ -34583,6 +40256,7 @@ key is freed using that function. distinguish between a key that is not present and one which is present and has the value %NULL. If you need this distinction, use g_hash_table_lookup_extended(). + the associated value, or %NULL if the key is not found @@ -34610,6 +40284,7 @@ for example before calling g_hash_table_remove(). You can actually pass %NULL for @lookup_key to test whether the %NULL key exists, provided the hash and equal functions of @hash_table are %NULL-safe. + %TRUE if the key was found in the #GHashTable @@ -34644,6 +40319,7 @@ If the #GHashTable was created using g_hash_table_new_full(), the key and value are freed using the supplied destroy functions, otherwise you have to make sure that any dynamically allocated values are freed yourself. + %TRUE if the key was found and removed from the #GHashTable @@ -34669,6 +40345,7 @@ If the #GHashTable was created using g_hash_table_new_full(), the keys and values are freed using the supplied destroy functions, otherwise you have to make sure that any dynamically allocated values are freed yourself. + @@ -34689,7 +40366,12 @@ already exists in the #GHashTable, it gets replaced by the new key. If you supplied a @value_destroy_func when creating the #GHashTable, the old value is freed using that function. If you supplied a @key_destroy_func when creating the -#GHashTable, the old key is freed using that function. +#GHashTable, the old key is freed using that function. + +Starting from GLib 2.40, this function returns a boolean value to +indicate whether the newly added value was already in the hash table +or not. + %TRUE if the key did not exist yet @@ -34714,6 +40396,7 @@ If you supplied a @key_destroy_func when creating the Returns the number of elements contained in the #GHashTable. + the number of key/value pairs in the #GHashTable. @@ -34731,6 +40414,7 @@ If you supplied a @key_destroy_func when creating the Removes a key and its associated value from a #GHashTable without calling the key and value destroy functions. + %TRUE if the key was found and removed from the #GHashTable @@ -34752,6 +40436,7 @@ calling the key and value destroy functions. Removes all keys and their associated values from a #GHashTable without calling the key and value destroy functions. + @@ -34765,11 +40450,62 @@ without calling the key and value destroy functions. + + Looks up a key in the #GHashTable, stealing the original key and the +associated value and returning %TRUE if the key was found. If the key was +not found, %FALSE is returned. + +If found, the stolen key and value are removed from the hash table without +calling the key and value destroy functions, and ownership is transferred to +the caller of this method; as with g_hash_table_steal(). + +You can pass %NULL for @lookup_key, provided the hash and equal functions +of @hash_table are %NULL-safe. + + + %TRUE if the key was found in the #GHashTable + + + + + a #GHashTable + + + + + + + the key to look up + + + + return location for the + original key + + + + return location + for the value associated with the key + + + + + + This function is deprecated and will be removed in the next major +release of GLib. It does nothing. + + + + a #GHashTable + + + Atomically decrements the reference count of @hash_table by one. If the reference count drops to 0, all keys and values will be destroyed, and all memory allocated by the hash table is released. This function is MT-safe and may be called from any thread. + @@ -34783,8 +40519,21 @@ This function is MT-safe and may be called from any thread. + + Appends a #GHook onto the end of a #GHookList. + + + + a #GHookList + + + the #GHook to add to the end of @hook_list + + + Destroys a #GHook, given its ID. + %TRUE if the #GHook was found in the #GHookList and destroyed @@ -34803,6 +40552,7 @@ This function is MT-safe and may be called from any thread. Removes one #GHook from a #GHookList, marking it inactive and calling g_hook_unref() on it. + @@ -34820,6 +40570,7 @@ inactive and calling g_hook_unref() on it. Calls the #GHookList @finalize_hook function if it exists, and frees the memory allocated for the #GHook. + @@ -34836,6 +40587,7 @@ and frees the memory allocated for the #GHook. Inserts a #GHook into a #GHookList, before a given #GHook. + @@ -34856,6 +40608,7 @@ and frees the memory allocated for the #GHook. Prepends a #GHook on the start of a #GHookList. + @@ -34874,6 +40627,7 @@ and frees the memory allocated for the #GHook. Decrements the reference count of a #GHook. If the reference count falls to 0, the #GHook is removed from the #GHookList and g_hook_free() is called to free it. + @@ -34897,6 +40651,7 @@ before displaying it to the user. Note that a hostname might contain a mix of encoded and unencoded segments, and so it is possible for g_hostname_is_non_ascii() and g_hostname_is_ascii_encoded() to both return %TRUE for a name. + %TRUE if @hostname contains any ASCII-encoded segments. @@ -34912,6 +40667,7 @@ segments. Tests if @hostname is the string form of an IPv4 or IPv6 address. (Eg, "192.168.0.1".) + %TRUE if @hostname is an IP address @@ -34931,6 +40687,7 @@ before using it in non-IDN-aware contexts. Note that a hostname might contain a mix of encoded and unencoded segments, and so it is possible for g_hostname_is_non_ascii() and g_hostname_is_ascii_encoded() to both return %TRUE for a name. + %TRUE if @hostname contains any non-ASCII characters @@ -34946,6 +40703,7 @@ g_hostname_is_ascii_encoded() to both return %TRUE for a name. Converts @hostname to its canonical ASCII form; an ASCII-only string containing no uppercase letters and not ending with a trailing dot. + an ASCII hostname, which must be freed, or %NULL if @hostname is in some way invalid. @@ -34966,6 +40724,7 @@ and not ending with a trailing dot. Of course if @hostname is not an internationalized hostname, then the canonical presentation form will be entirely ASCII. + a UTF-8 hostname, which must be freed, or %NULL if @hostname is in some way invalid. @@ -34978,13 +40737,39 @@ the canonical presentation form will be entirely ASCII. - + + Converts a 32-bit integer value from host to network byte order. + + + + a 32-bit integer value in host byte order + + + + + Converts a 16-bit integer value from host to network byte order. + + + + a 16-bit integer value in host byte order + + + + Same as the standard UNIX routine iconv(), but may be implemented via libiconv on UNIX flavors that lack a native implementation. GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers. +more convenient than the raw iconv wrappers. + +Note that the behaviour of iconv() for characters which are valid in the +input character set, but which have no representation in the output character +set, is implementation defined. This function may return success (with a +positive number of non-reversible conversions as replacement characters were +used), or it may return -1 and set an error such as %EILSEQ, in such a +situation. + count of non-reversible conversions, or -1 on error @@ -35012,6 +40797,30 @@ more convenient than the raw iconv wrappers. + + Same as the standard UNIX routine iconv_open(), but +may be implemented via libiconv on UNIX flavors that lack +a native implementation. + +GLib provides g_convert() and g_locale_to_utf8() which are likely +more convenient than the raw iconv wrappers. + + + a "conversion descriptor", or (GIConv)-1 if + opening the converter failed. + + + + + destination codeset + + + + source codeset + + + + Adds a function to be called whenever there are no higher priority events pending to the default main loop. The function is given the @@ -35027,6 +40836,7 @@ and attaches it to the global #GMainContext using g_source_attach(), so the callback will be invoked in whichever thread is running that main context. You can do these steps manually if you need greater control or to use a custom main context. + the ID (greater than 0) of the event source. @@ -35055,6 +40865,7 @@ and attaches it to the global #GMainContext using g_source_attach(), so the callback will be invoked in whichever thread is running that main context. You can do these steps manually if you need greater control or to use a custom main context. + the ID (greater than 0) of the event source. @@ -35081,6 +40892,7 @@ use a custom main context. Removes the idle function with the given data. + %TRUE if an idle source was found and removed. @@ -35100,6 +40912,7 @@ and must be added to one with g_source_attach() before it will be executed. Note that the default priority for idle sources is %G_PRIORITY_DEFAULT_IDLE, as compared to other sources which have a default priority of %G_PRIORITY_DEFAULT. + the newly-created idle source @@ -35111,6 +40924,7 @@ have a default priority of %G_PRIORITY_DEFAULT. It can be passed to g_hash_table_new() as the @key_equal_func parameter, when using non-%NULL pointers to 64-bit integers as keys in a #GHashTable. + %TRUE if the two keys match. @@ -35132,6 +40946,7 @@ parameter, when using non-%NULL pointers to 64-bit integers as keys in a It can be passed to g_hash_table_new() as the @hash_func parameter, when using non-%NULL pointers to 64-bit integer values as keys in a #GHashTable. + a hash value corresponding to the key. @@ -35153,6 +40968,7 @@ parameter, when using non-%NULL pointers to integers as keys in a Note that this function acts on pointers to #gint, not on #gint directly: if your hash table's keys are of the form `GINT_TO_POINTER (n)`, use g_direct_equal() instead. + %TRUE if the two keys match. @@ -35176,6 +40992,7 @@ when using non-%NULL pointers to integer values as keys in a #GHashTable. Note that this function acts on pointers to #gint, not on #gint directly: if your hash table's keys are of the form `GINT_TO_POINTER (n)`, use g_direct_hash() instead. + a hash value corresponding to the key. @@ -35191,7 +41008,12 @@ directly: if your hash table's keys are of the form Returns a canonical representation for @string. Interned strings can be compared for equality by comparing the pointers, instead of using strcmp(). g_intern_static_string() does not copy the string, -therefore @string must not be freed or modified. +therefore @string must not be freed or modified. + +This function must not be used before library constructors have finished +running. In particular, this means it cannot be used to initialize global +variables in C++. + a canonical representation for the string @@ -35206,7 +41028,12 @@ therefore @string must not be freed or modified. Returns a canonical representation for @string. Interned strings can be compared for equality by comparing the pointers, instead of -using strcmp(). +using strcmp(). + +This function must not be used before library constructors have finished +running. In particular, this means it cannot be used to initialize global +variables in C++. + a canonical representation for the string @@ -35221,6 +41048,7 @@ using strcmp(). Adds the #GIOChannel into the default main loop context with the default priority. + the event source id @@ -35251,6 +41079,7 @@ with the given priority. This internally creates a main loop source using g_io_create_watch() and attaches it to the main loop context with g_source_attach(). You can do these steps manually if you need greater control. + the event source id @@ -35284,6 +41113,7 @@ You can do these steps manually if you need greater control. Converts an `errno` error number to a #GIOChannelError. + a #GIOChannelError error number, e.g. %G_IO_CHANNEL_ERROR_INVAL. @@ -35306,6 +41136,9 @@ You can do these steps manually if you need greater control. given @channel. For example, if condition is #G_IO_IN, the source will be dispatched when there's data available for reading. +The callback function invoked by the #GSource should be added with +g_source_set_callback(), but it has type #GIOFunc (not #GSourceFunc). + g_io_add_watch() is a simpler interface to this same functionality, for the case where you want to add the source to the default main loop context at the default priority. @@ -35313,6 +41146,7 @@ at the default priority. On Windows, polling a #GSource created to watch a channel for a socket puts the socket in non-blocking mode. This is a side-effect of the implementation and unavoidable. + a new #GSource @@ -35333,6 +41167,28 @@ implementation and unavoidable. + + A convenience macro to get the next element in a #GList. +Note that it is considered perfectly acceptable to access +@list->next directly. + + + + an element in a #GList + + + + + A convenience macro to get the previous element in a #GList. +Note that it is considered perfectly acceptable to access +@list->prev directly. + + + + an element in a #GList + + + Gets the names of all variables set in the environment. @@ -35342,11 +41198,13 @@ from the C library directly. On Windows, the strings in the environ array are in system codepage encoding, while in most of the typical use cases for environment variables in GLib-using programs you want the UTF-8 encoding that this function and g_getenv() provide. + - a %NULL-terminated - list of strings which must be freed with g_strfreev(). + + a %NULL-terminated list of strings which must be freed with + g_strfreev(). - + @@ -35354,11 +41212,20 @@ the UTF-8 encoding that this function and g_getenv() provide. Converts a string from UTF-8 to the encoding used for strings by the C runtime (usually the same as that used by the operating system) in the [current locale][setlocale]. On Windows this means -the system codepage. +the system codepage. + +The input string shall not contain nul characters even if the @len +argument is positive. A nul character found inside the string will result +in error %G_CONVERT_ERROR_ILLEGAL_SEQUENCE. Use g_convert() to convert +input that may contain embedded nul characters. + - A newly-allocated buffer containing the converted string, - or %NULL on an error, and error will be set. - + + A newly-allocated buffer containing the converted string, + or %NULL on an error, and error will be set. + + + @@ -35367,9 +41234,7 @@ the system codepage. the length of the string, or -1 if the string is - nul-terminated (Note that some encodings may allow nul - bytes to occur inside strings. In that case, using -1 - for the @len parameter is unsafe) + nul-terminated. @@ -35378,8 +41243,8 @@ the system codepage. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error - #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - stored will the byte offset after the last valid + %G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value + stored will be the byte offset after the last valid input sequence. @@ -35393,17 +41258,28 @@ the system codepage. Converts a string which is in the encoding used for strings by the C runtime (usually the same as that used by the operating -system) in the [current locale][setlocale] into a UTF-8 string. +system) in the [current locale][setlocale] into a UTF-8 string. + +If the source encoding is not UTF-8 and the conversion output contains a +nul character, the error %G_CONVERT_ERROR_EMBEDDED_NUL is set and the +function returns %NULL. +If the source encoding is UTF-8, an embedded nul character is treated with +the %G_CONVERT_ERROR_ILLEGAL_SEQUENCE error for backward compatibility with +earlier versions of this library. Use g_convert() to produce output that +may contain embedded nul characters. + - A newly-allocated buffer containing the converted string, - or %NULL on an error, and error will be set. + The converted string, or %NULL on an error. - a string in the encoding of the current locale. On Windows + a string in the + encoding of the current locale. On Windows this means the system codepage. - + + + the length of the string, or -1 if the string is @@ -35418,8 +41294,8 @@ system) in the [current locale][setlocale] into a UTF-8 string. Even if the conversion was successful, this may be less than @len if there were partial characters at the end of the input. If the error - #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value - stored will the byte offset after the last valid + %G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value + stored will be the byte offset after the last valid input sequence. @@ -35433,8 +41309,9 @@ system) in the [current locale][setlocale] into a UTF-8 string. Logs an error or debugging message. -If the log level has been set as fatal, the abort() -function is called to terminate the program. +If the log level has been set as fatal, G_BREAKPOINT() is called +to terminate the program. See the documentation for G_BREAKPOINT() for +details of the debugging options this provides. If g_log_default_handler() is used as the log handler function, a new-line character will automatically be appended to @..., and need not be entered @@ -35442,6 +41319,7 @@ manually. If [structured logging is enabled][using-structured-logging] this will output via the structured log writer function (see g_log_set_writer_func()). + @@ -35471,7 +41349,7 @@ for the default allows to install an alternate default log handler. This is used if no log handler has been set for the particular log domain and log level combination. It outputs the message to stderr -or stdout and if the log level is fatal it calls abort(). It automatically +or stdout and if the log level is fatal it calls G_BREAKPOINT(). It automatically prints a new-line character after the message, so one does not need to be manually included in @message. @@ -35492,6 +41370,7 @@ the rest. This has no effect if structured logging is enabled; see [Using Structured Logging][using-structured-logging]. + @@ -35520,6 +41399,7 @@ default "" application domain This has no effect if structured logging is enabled; see [Using Structured Logging][using-structured-logging]. + @@ -35552,6 +41432,7 @@ Structured log messages (using g_log_structured() and g_log_structured_array()) are fatal only if the default log writer is used; otherwise it is up to the writer function to determine which log messages are fatal. See [Using Structured Logging][using-structured-logging]. + the old fatal mask @@ -35572,6 +41453,7 @@ g_log_default_handler() as default log handler. This has no effect if structured logging is enabled; see [Using Structured Logging][using-structured-logging]. + the previous default log handler @@ -35595,7 +41477,13 @@ This has no effect on structured log messages (using g_log_structured() or g_log_structured_array()). To change the fatal behaviour for specific log messages, programs must install a custom log writer function using g_log_set_writer_func(). See -[Using Structured Logging][using-structured-logging]. +[Using Structured Logging][using-structured-logging]. + +This function is mostly intended to be used with +%G_LOG_LEVEL_CRITICAL. You should typically not set +%G_LOG_LEVEL_WARNING, %G_LOG_LEVEL_MESSAGE, %G_LOG_LEVEL_INFO or +%G_LOG_LEVEL_DEBUG as fatal except inside of test programs. + the old fatal mask for the log domain @@ -35642,6 +41530,7 @@ This example adds a log handler for all messages from GLib: g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, my_log_handler, NULL); ]| + the id of the new handler @@ -35670,10 +41559,11 @@ g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL - Like g_log_sets_handler(), but takes a destroy notify for the @user_data. + Like g_log_set_handler(), but takes a destroy notify for the @user_data. This has no effect if structured logging is enabled; see [Using Structured Logging][using-structured-logging]. + the id of the new handler @@ -35715,6 +41605,7 @@ install a writer function, as there must be a single, central point where log messages are formatted and outputted. There can only be one writer function. It is an error to set more than one. + @@ -35738,7 +41629,7 @@ There can only be one writer function. It is an error to set more than one.Log a message with structured data. The message will be passed through to the log writer set by the application using g_log_set_writer_func(). If the message is fatal (i.e. its log level is %G_LOG_LEVEL_ERROR), the program will -be aborted at the end of this function. If the log writer returns +be aborted by calling G_BREAKPOINT() at the end of this function. If the log writer returns %G_LOG_WRITER_UNHANDLED (failure), no other fallback writers will be tried. See the documentation for #GLogWriterFunc for information on chaining writers. @@ -35813,6 +41704,7 @@ field for which printf()-style formatting is supported. The default writer function for `stdout` and `stderr` will automatically append a new-line character after the message, so you should not add one manually to the format string. + @@ -35844,6 +41736,7 @@ See g_log_structured() for more documentation. This assumes that @log_level is already present in @fields (typically as the `PRIORITY` field). + @@ -35856,7 +41749,7 @@ This assumes that @log_level is already present in @fields (typically as the key–value pairs of structured data to add to the log message - + @@ -35866,6 +41759,35 @@ This assumes that @log_level is already present in @fields (typically as the + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Log a message with structured data, accepting the data within a #GVariant. This version is especially useful for use in other languages, via introspection. @@ -35881,6 +41803,7 @@ to the log writer as such. The size of the array should not be higher than g_variant_print() will be used to convert the value into a string. For more details on its usage and about the parameters, see g_log_structured(). + @@ -35917,6 +41840,7 @@ if no other is set using g_log_set_writer_func(). As with g_log_default_handler(), this function drops debug and informational messages unless their log domain (or `all`) is listed in the space-separated `G_MESSAGES_DEBUG` environment variable. + %G_LOG_WRITER_HANDLED on success, %G_LOG_WRITER_UNHANDLED otherwise @@ -35930,7 +41854,7 @@ messages unless their log domain (or `all`) is listed in the space-separated key–value pairs of structured data forming the log message - + @@ -35954,6 +41878,7 @@ unknown fields. The returned string does **not** have a trailing new-line character. It is encoded in the character set of the current locale, which is not necessarily UTF-8. + string containing the formatted log message, in the character set of the current locale @@ -35968,7 +41893,7 @@ UTF-8. key–value pairs of structured data forming the log message - + @@ -35993,6 +41918,7 @@ the following construct without needing any additional error handling: |[<!-- language="C" --> is_journald = g_log_writer_is_journald (fileno (stderr)); ]| + %TRUE if @output_fd points to the journal, %FALSE otherwise @@ -36014,6 +41940,7 @@ This is suitable for use as a #GLogWriterFunc. If GLib has been compiled without systemd support, this function is still defined, but will always return %G_LOG_WRITER_UNHANDLED. + %G_LOG_WRITER_HANDLED on success, %G_LOG_WRITER_UNHANDLED otherwise @@ -36027,7 +41954,7 @@ defined, but will always return %G_LOG_WRITER_UNHANDLED. key–value pairs of structured data forming the log message - + @@ -36054,6 +41981,7 @@ in the output. A trailing new-line character is added to the log message when it is printed. This is suitable for use as a #GLogWriterFunc. + %G_LOG_WRITER_HANDLED on success, %G_LOG_WRITER_UNHANDLED otherwise @@ -36067,7 +41995,7 @@ This is suitable for use as a #GLogWriterFunc. key–value pairs of structured data forming the log message - + @@ -36085,6 +42013,7 @@ This is suitable for use as a #GLogWriterFunc. Check whether the given @output_fd file descriptor supports ANSI color escape sequences. If so, they can safely be used when formatting log messages. + %TRUE if ANSI color escapes are supported, %FALSE otherwise @@ -36099,8 +42028,9 @@ messages. Logs an error or debugging message. -If the log level has been set as fatal, the abort() -function is called to terminate the program. +If the log level has been set as fatal, G_BREAKPOINT() is called +to terminate the program. See the documentation for G_BREAKPOINT() for +details of the debugging options this provides. If g_log_default_handler() is used as the log handler function, a new-line character will automatically be appended to @..., and need not be entered @@ -36108,6 +42038,7 @@ manually. If [structured logging is enabled][using-structured-logging] this will output via the structured log writer function (see g_log_set_writer_func()). + @@ -36131,11 +42062,33 @@ application domain + + + + + + + + + + + + + + + + + + + + + Returns the global default main context. This is the main context used for main loop functions when a main loop is not explicitly specified, and corresponds to the "main" main loop. See also g_main_context_get_thread_default(). + the global default main context. @@ -36153,6 +42106,7 @@ always return %NULL if you are running in the default thread.) If you need to hold a reference on the context, use g_main_context_ref_thread_default() instead. + the thread-default #GMainContext, or %NULL if the thread-default context is the global default context. @@ -36166,6 +42120,7 @@ it with g_main_context_ref(). In addition, unlike g_main_context_get_thread_default(), if the thread-default context is the global default context, this will return that #GMainContext (with a ref added to it) rather than returning %NULL. + the thread-default #GMainContext. Unref with g_main_context_unref() when you are done with it. @@ -36174,6 +42129,7 @@ is the global default context, this will return that #GMainContext Returns the currently firing source for this thread. + The currently firing source or %NULL. @@ -36281,6 +42237,7 @@ following techniques: arbitrary callbacks. Instead, structure your code so that you simply return to the main loop and then get called again when there is more work to do. + The main loop recursion level in the current thread @@ -36289,6 +42246,7 @@ following techniques: Allocates @n_bytes bytes of memory. If @n_bytes is 0 it returns %NULL. + a pointer to the allocated memory @@ -36303,6 +42261,7 @@ If @n_bytes is 0 it returns %NULL. Allocates @n_bytes bytes of memory, initialized to 0's. If @n_bytes is 0 it returns %NULL. + a pointer to the allocated memory @@ -36317,6 +42276,7 @@ If @n_bytes is 0 it returns %NULL. This function is similar to g_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication. + a pointer to the allocated memory @@ -36335,6 +42295,7 @@ but care is taken to detect possible overflow during multiplication. This function is similar to g_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication. + a pointer to the allocated memory @@ -36383,6 +42344,7 @@ attributes (of type %G_MARKUP_ERROR_INVALID_CONTENT) as well as parse errors for boolean-valued attributes (again of type %G_MARKUP_ERROR_INVALID_CONTENT). In all of these cases %FALSE will be returned and @error will be set as appropriate. + %TRUE if successful @@ -36440,6 +42402,7 @@ the range of &#x1; ... &#x1f; for all control sequences except for tabstop, newline and carriage return. The character references in this range are not valid XML 1.0, but they are valid XML 1.1 and will be accepted by the GMarkup parser. + a newly allocated string with the escaped text @@ -36474,6 +42437,7 @@ output = g_markup_printf_escaped ("<purchase>" "</purchase>", store, item); ]| + newly allocated result from formatting operation. Free with g_free(). @@ -36494,6 +42458,7 @@ output = g_markup_printf_escaped ("<purchase>" Formats the data in @args according to @format, escaping all string and character arguments in the fashion of g_markup_escape_text(). See g_markup_printf_escaped(). + newly allocated result from formatting operation. Free with g_free(). @@ -36513,11 +42478,12 @@ of g_markup_escape_text(). See g_markup_printf_escaped(). Checks whether the allocator used by g_malloc() is the system's malloc implementation. If it returns %TRUE memory allocated with -malloc() can be used interchangeable with memory allocated using g_malloc(). +malloc() can be used interchangeably with memory allocated using g_malloc(). This function is useful for avoiding an extra copy of allocated memory returned by a non-GLib-based API. GLib always uses the system malloc, so this function always returns %TRUE. + if %TRUE, malloc() and g_malloc() can be mixed. @@ -36528,6 +42494,7 @@ returns %TRUE. no longer works. There are many other useful tools for memory profiling these days which can be used instead. Use other memory profiling tools instead + @@ -36537,7 +42504,9 @@ profiling these days which can be used instead. However, its use was incompatible with the use of global constructors in GLib and GIO, because those use the GLib allocators before main is reached. Therefore this function is now deprecated and is just a stub. - Use other memory profiling tools instead + This function now does nothing. Use other memory +profiling tools instead + @@ -36551,6 +42520,7 @@ reached. Therefore this function is now deprecated and is just a stub. Allocates @byte_size bytes of memory, and copies @byte_size bytes into it from @mem. If @mem is %NULL it returns %NULL. + a pointer to the newly-allocated copy of the memory, or %NULL if @mem is %NULL. @@ -36567,9 +42537,27 @@ from @mem. If @mem is %NULL it returns %NULL. + + Copies a block of memory @len bytes long, from @src to @dest. +The source and destination areas may overlap. + Just use memmove(). + + + + the destination address to copy the bytes to. + + + the source address to copy the bytes from. + + + the number of bytes to copy. + + + Create a directory if it doesn't already exist. Create intermediate parent directories as needed, too. + 0 if the directory already exists, or was successfully created. Returns -1 if an error occurred, with errno set. @@ -36578,7 +42566,7 @@ created. Returns -1 if an error occurred, with errno set. a pathname in the GLib file name encoding - + permissions to use for newly created directories @@ -36602,6 +42590,7 @@ on Windows it should be in UTF-8. If you are going to be creating a temporary directory inside the directory returned by g_get_tmp_dir(), you might want to use g_dir_make_tmp() instead. + A pointer to @tmpl, which has been modified to hold the directory name. In case of errors, %NULL is @@ -36631,6 +42620,7 @@ should be in UTF-8. If you are going to be creating a temporary directory inside the directory returned by g_get_tmp_dir(), you might want to use g_dir_make_tmp() instead. + A pointer to @tmpl, which has been modified to hold the directory name. In case of errors, %NULL is @@ -36659,6 +42649,7 @@ sequence does not have to occur at the very end of the template. The X string will be modified to form the name of a file that didn't exist. The string should be in the GLib file name encoding. Most importantly, on Windows it should be in UTF-8. + A file handle (as from open()) to the file opened for reading and writing. The file is opened in binary @@ -36686,6 +42677,7 @@ template and you can pass a @mode and additional @flags. The X string will be modified to form the name of a file that didn't exist. The string should be in the GLib file name encoding. Most importantly, on Windows it should be in UTF-8. + A file handle (as from open()) to the file opened for reading and writing. The file handle should be @@ -36709,8 +42701,186 @@ on Windows it should be in UTF-8. + + Allocates @n_structs elements of type @struct_type. +The returned pointer is cast to a pointer to the given type. +If @n_structs is 0 it returns %NULL. +Care is taken to avoid overflow when calculating the size of the allocated block. + +Since the returned pointer is already casted to the right type, +it is normally unnecessary to cast it explicitly, and doing +so might hide memory allocation errors. + + + + the type of the elements to allocate + + + the number of elements to allocate + + + + + Allocates @n_structs elements of type @struct_type, initialized to 0's. +The returned pointer is cast to a pointer to the given type. +If @n_structs is 0 it returns %NULL. +Care is taken to avoid overflow when calculating the size of the allocated block. + +Since the returned pointer is already casted to the right type, +it is normally unnecessary to cast it explicitly, and doing +so might hide memory allocation errors. + + + + the type of the elements to allocate. + + + the number of elements to allocate. + + + + + Wraps g_alloca() in a more typesafe manner. + + + + Type of memory chunks to be allocated + + + Number of chunks to be allocated + + + + + Inserts a #GNode as the last child of the given parent. + + + + the #GNode to place the new #GNode under + + + the #GNode to insert + + + + + Inserts a new #GNode as the last child of the given parent. + + + + the #GNode to place the new #GNode under + + + the data for the new #GNode + + + + + Gets the first child of a #GNode. + + + + a #GNode + + + + + Inserts a new #GNode at the given position. + + + + the #GNode to place the new #GNode under + + + the position to place the new #GNode at. If position is -1, + the new #GNode is inserted as the last child of @parent + + + the data for the new #GNode + + + + + Inserts a new #GNode after the given sibling. + + + + the #GNode to place the new #GNode under + + + the sibling #GNode to place the new #GNode after + + + the data for the new #GNode + + + + + Inserts a new #GNode before the given sibling. + + + + the #GNode to place the new #GNode under + + + the sibling #GNode to place the new #GNode before + + + the data for the new #GNode + + + + + Gets the next sibling of a #GNode. + + + + a #GNode + + + + + Inserts a new #GNode as the first child of the given parent. + + + + the #GNode to place the new #GNode under + + + the data for the new #GNode + + + + + Gets the previous sibling of a #GNode. + + + + a #GNode + + + + + Converts a 32-bit integer value from network to host byte order. + + + + a 32-bit integer value in network byte order + + + + + Converts a 16-bit integer value from network to host byte order. + + + + a 16-bit integer value in network byte order + + + Set the pointer at the specified location to %NULL. + @@ -36768,7 +42938,12 @@ a stack trace. The prompt is then shown again. If "[P]roceed" is selected, the function returns. -This function may cause different actions on non-UNIX platforms. +This function may cause different actions on non-UNIX platforms. + +On Windows consider using the `G_DEBUGGER` environment +variable (see [Running GLib Applications](glib-running.html)) and +calling g_on_error_stack_trace() instead. + @@ -36789,7 +42964,14 @@ option is selected. You can get the current process's program name with g_get_prgname(), assuming that you have called gtk_init() or gdk_init(). -This function may cause different actions on non-UNIX platforms. +This function may cause different actions on non-UNIX platforms. + +When running on Windows, this function is *not* called by +g_on_error_query(). If called directly, it will raise an +exception, which will crash the program. If the `G_DEBUGGER` environment +variable is set, a debugger will be invoked to attach and +handle that exception (see [Running GLib Applications](glib-running.html)). + @@ -36801,6 +42983,46 @@ This function may cause different actions on non-UNIX platforms. + + The first call to this routine by a process with a given #GOnce +struct calls @func with the given argument. Thereafter, subsequent +calls to g_once() with the same #GOnce struct do not call @func +again, but return the stored result of the first call. On return +from g_once(), the status of @once will be %G_ONCE_STATUS_READY. + +For example, a mutex or a thread-specific data key must be created +exactly once. In a threaded environment, calling g_once() ensures +that the initialization is serialized across multiple threads. + +Calling g_once() recursively on the same #GOnce struct in +@func will lead to a deadlock. + +|[<!-- language="C" --> + gpointer + get_debug_flags (void) + { + static GOnce my_once = G_ONCE_INIT; + + g_once (&my_once, parse_debug_flags, NULL); + + return my_once.retval; + } +]| + + + + a #GOnce structure + + + the #GThreadFunc function associated to @once. This function + is called only once, regardless of the number of times it and + its associated #GOnce struct are passed to g_once(). + + + data to be passed to @func + + + Function to be called when starting a critical initialization section. The argument @location must point to a static @@ -36824,6 +43046,7 @@ like this: // use initialization_value here ]| + %TRUE if the initialization section should be entered, %FALSE and blocks otherwise @@ -36843,6 +43066,7 @@ like this: other than 0. Sets the variable to the initialization value, and releases concurrent threads blocking in g_once_init_enter() on this initialization variable. + @@ -36876,6 +43100,7 @@ corresponding to "foo" and "bar". If @string is equal to "help", all the available keys in @keys are printed out to standard error. + the combined set of bit flags. @@ -36889,7 +43114,7 @@ commas, or %NULL. pointer to an array of #GDebugKey which associate strings with bit flags. - + @@ -36906,6 +43131,7 @@ If @file_name ends with a directory separator it gets the component before the last slash. If @file_name consists only of directory separators (and on Windows, possibly a drive letter), a single separator is returned. If @file_name is empty, it gets ".". + a newly allocated string containing the last component of the filename @@ -36914,15 +43140,18 @@ separator is returned. If @file_name is empty, it gets ".". the name of the file - + - Gets the directory components of a file name. + Gets the directory components of a file name. For example, the directory +component of `/usr/bin/test` is `/usr/bin`. The directory component of `/` +is `/`. If the file name has no directory components "." is returned. The returned string should be freed when no longer needed. + the directory components of the file @@ -36930,7 +43159,7 @@ The returned string should be freed when no longer needed. the name of the file - + @@ -36946,7 +43175,7 @@ current directory introduce vagueness. This function interprets as an absolute file name one that either begins with a directory separator such as "\Users\tml" or begins with the root on a drive, for example "C:\Windows". The first case also includes UNC paths -such as "\\myserver\docs\foo". In all cases, either slashes or +such as "\\\\myserver\docs\foo". In all cases, either slashes or backslashes are accepted. Note that a file name relative to the current drive root does not @@ -36959,6 +43188,7 @@ function, but they obviously are not relative to the normal current directory as returned by getcwd() or g_get_current_dir() either. Such paths should be avoided, or need to be handled using Windows-specific code. + %TRUE if @file_name is absolute @@ -36966,7 +43196,7 @@ Windows-specific code. a file name - + @@ -36974,15 +43204,16 @@ Windows-specific code. Returns a pointer into @file_name after the root component, i.e. after the "/" in UNIX or "C:\" under Windows. If @file_name is not an absolute path it returns %NULL. + a pointer into @file_name after the root component - + a file name - + @@ -37004,6 +43235,7 @@ Note also that the reverse of a UTF-8 encoded string can in general not be obtained by g_strreverse(). This works only if the string does not contain any multibyte characters. GLib offers the g_utf8_strreverse() function to reverse UTF-8 encoded strings. + %TRUE if @string matches @pspec @@ -37033,6 +43265,7 @@ g_utf8_strreverse() function to reverse UTF-8 encoded strings. function is to be called in a loop, it's more efficient to compile the pattern once with g_pattern_spec_new() and call g_pattern_match_string() repeatedly. + %TRUE if @string matches @pspec @@ -37052,6 +43285,7 @@ g_pattern_match_string() repeatedly. Matches a string against a compiled pattern. If the string is to be matched against more than one pattern, consider using g_pattern_match() instead while supplying the reversed string. + %TRUE if @string matches @pspec @@ -37073,6 +43307,7 @@ pointer-sized values). For portability reasons, you may only lock on the bottom 32 bits of the pointer. + @@ -37093,6 +43328,7 @@ other pointer-sized values). For portability reasons, you may only lock on the bottom 32 bits of the pointer. + %TRUE if the lock was acquired @@ -37114,6 +43350,7 @@ pointer-sized values). For portability reasons, you may only lock on the bottom 32 bits of the pointer. + @@ -37136,9 +43373,9 @@ directly if you need to block until a file descriptor is ready, but don't want to run the full main loop. Each element of @fds is a #GPollFD describing a single file -descriptor to poll. The %fd field indicates the file descriptor, -and the %events field indicates the events to poll for. On return, -the %revents fields will be filled with the events that actually +descriptor to poll. The @fd field indicates the file descriptor, +and the @events field indicates the events to poll for. On return, +the @revents fields will be filled with the events that actually occurred. On POSIX systems, the file descriptors in @fds can be any sort of @@ -37146,8 +43383,9 @@ file descriptor, but the situation is much more complicated on Windows. If you need to use g_poll() in code that has to run on Windows, the easiest solution is to construct all of your #GPollFDs with g_io_channel_win32_make_pollfd(). + - the number of entries in @fds whose %revents fields + the number of entries in @fds whose @revents fields were filled in, or 0 if the operation timed out, or -1 on error or if the call was interrupted. @@ -37173,13 +43411,13 @@ error message. If @err is %NULL (ie: no error variable) then do nothing. If *@err is %NULL (ie: an error variable is present but there is no -error condition) then also do nothing. Whether or not it makes sense -to take advantage of this feature is up to you. +error condition) then also do nothing. + - + a return location for a #GError @@ -37204,6 +43442,7 @@ messages, since it may be redirected by applications to special purpose message windows or even files. Instead, libraries should use g_log(), g_log_structured(), or the convenience macros g_message(), g_warning() and g_error(). + @@ -37227,6 +43466,7 @@ new-line character. g_printerr() should not be used from within libraries. Instead g_log() or g_log_structured() should be used, or the convenience macros g_message(), g_warning() and g_error(). + @@ -37247,7 +43487,10 @@ positional parameters, as specified in the Single Unix Specification. As with the standard printf(), this does not automatically append a trailing new-line character to the message, so typically @format should end with its -own new-line character. +own new-line character. + +`glib/gprintf.h` must be explicitly included in order to use this function. + the number of bytes printed. @@ -37256,7 +43499,7 @@ own new-line character. a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the arguments to insert in the output. @@ -37267,6 +43510,7 @@ own new-line character. Calculates the maximum space needed to store the output of the sprintf() function. + the maximum space needed to store the formatted string @@ -37291,6 +43535,7 @@ The error variable @dest points to must be %NULL. Note that @src is no longer valid after this call. If you want to keep using the same GError*, you need to set it to %NULL after calling this function on it. + @@ -37309,6 +43554,7 @@ after calling this function on it. If @dest is %NULL, free @src; otherwise, moves @src into *@dest. *@dest must be %NULL. After the move, add a prefix as with g_prefix_error(). + @@ -37339,6 +43585,7 @@ multiple times in @haystack, the index of the first instance is returned. This does pointer comparisons only. If you want to use more complex equality checks, such as string comparisons, use g_ptr_array_find_with_equal_func(). + %TRUE if @needle is one of the elements of @haystack @@ -37371,6 +43618,7 @@ the first instance is returned. @equal_func is called with the element from the array as its first parameter, and @needle as its second parameter. If @equal_func is %NULL, pointer equality is used. + %TRUE if @needle is one of the elements of @haystack @@ -37399,11 +43647,27 @@ equality is used. + + Returns the pointer at the given index of the pointer array. + +This does not perform bounds checking on the given @index_, +so you are responsible for checking it against the array length. + + + + a #GPtrArray + + + the index of the pointer to return + + + This is just like the standard C qsort() function, but the comparison routine accepts a user data argument. This is guaranteed to be a stable sort since version 2.32. + @@ -37442,7 +43706,12 @@ will continue to exist until the program terminates. It can be used with statically allocated strings in the main program, but not with statically allocated memory in dynamically loaded modules, if you expect to ever unload the module again (e.g. do not use this -function in GTK+ theme engines). +function in GTK+ theme engines). + +This function must not be used before library constructors have finished +running. In particular, this means it cannot be used to initialize global +variables in C++. + the #GQuark identifying the string, or 0 if @string is %NULL @@ -37457,7 +43726,12 @@ function in GTK+ theme engines). Gets the #GQuark identifying the given string. If the string does not currently have an associated #GQuark, a new #GQuark is created, -using a copy of the string. +using a copy of the string. + +This function must not be used before library constructors have finished +running. In particular, this means it cannot be used to initialize global +variables in C++. + the #GQuark identifying the string, or 0 if @string is %NULL @@ -37471,6 +43745,7 @@ using a copy of the string. Gets the string associated with the given #GQuark. + the string associated with the #GQuark @@ -37487,7 +43762,11 @@ using a copy of the string. %NULL or it has no associated #GQuark. If you want the GQuark to be created if it doesn't already exist, -use g_quark_from_string() or g_quark_from_static_string(). +use g_quark_from_string() or g_quark_from_static_string(). + +This function must not be used before library constructors have finished +running. + the #GQuark associated with the string, or 0 if @string is %NULL or there is no #GQuark associated with it @@ -37500,8 +43779,19 @@ use g_quark_from_string() or g_quark_from_static_string(). + + Returns a random #gboolean from @rand_. +This corresponds to an unbiased coin toss. + + + + a #GRand + + + Returns a random #gdouble equally distributed over the range [0..1). + a random number @@ -37510,6 +43800,7 @@ use g_quark_from_string() or g_quark_from_static_string(). Returns a random #gdouble equally distributed over the range [@begin..@end). + a random number @@ -37528,6 +43819,7 @@ use g_quark_from_string() or g_quark_from_static_string(). Return a random #guint32 equally distributed over the range [0..2^32-1]. + a random number @@ -37536,6 +43828,7 @@ use g_quark_from_string() or g_quark_from_static_string(). Returns a random #gint32 equally distributed over the range [@begin..@end-1]. + a random number @@ -37554,6 +43847,7 @@ use g_quark_from_string() or g_quark_from_static_string(). Sets the seed for the global random number generator, which is used by the g_random_* functions, to @seed. + @@ -37564,12 +43858,172 @@ by the g_random_* functions, to @seed. + + Acquires a reference on the data pointed by @mem_block. + + + a pointer to the data, + with its reference count increased + + + + + a pointer to reference counted data + + + + + + Allocates @block_size bytes of memory, and adds reference +counting semantics to it. + +The data will be freed when its reference count drops to +zero. + +The allocated data is guaranteed to be suitably aligned for any +built-in type. + + + a pointer to the allocated memory + + + + + the size of the allocation, must be greater than 0 + + + + + + Allocates @block_size bytes of memory, and adds reference +counting semantics to it. + +The contents of the returned data is set to zero. + +The data will be freed when its reference count drops to +zero. + +The allocated data is guaranteed to be suitably aligned for any +built-in type. + + + a pointer to the allocated memory + + + + + the size of the allocation, must be greater than 0 + + + + + + Allocates a new block of data with reference counting +semantics, and copies @block_size bytes of @mem_block +into it. + + + a pointer to the allocated + memory + + + + + the number of bytes to copy, must be greater than 0 + + + + the memory to copy + + + + + + Retrieves the size of the reference counted data pointed by @mem_block. + + + the size of the data, in bytes + + + + + a pointer to reference counted data + + + + + + A convenience macro to allocate reference counted data with +the size of the given @type. + +This macro calls g_rc_box_alloc() with `sizeof (@type)` and +casts the returned pointer to a pointer of the given @type, +avoiding a type cast in the source code. + + + + the type to allocate, typically a structure name + + + + + A convenience macro to allocate reference counted data with +the size of the given @type, and set its contents to zero. + +This macro calls g_rc_box_alloc0() with `sizeof (@type)` and +casts the returned pointer to a pointer of the given @type, +avoiding a type cast in the source code. + + + + the type to allocate, typically a structure name + + + + + Releases a reference on the data pointed by @mem_block. + +If the reference was the last one, it will free the +resources allocated for @mem_block. + + + + + + + a pointer to reference counted data + + + + + + Releases a reference on the data pointed by @mem_block. + +If the reference was the last one, it will call @clear_func +to clear the contents of @mem_block, and then will free the +resources allocated for @mem_block. + + + + + + + a pointer to reference counted data + + + + a function to call when clearing the data + + + + Reallocates the memory pointed to by @mem, so that it now has space for @n_bytes bytes of memory. It returns the new address of the memory, which may have been moved. @mem may be %NULL, in which case it's considered to have zero-length. @n_bytes may be 0, in which case %NULL will be returned and @mem will be freed unless it is %NULL. + the new address of the allocated memory @@ -37588,6 +44042,7 @@ and @mem will be freed unless it is %NULL. This function is similar to g_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication. + the new address of the allocated memory @@ -37607,6 +44062,164 @@ but care is taken to detect possible overflow during multiplication. + + Compares the current value of @rc with @val. + + + %TRUE if the reference count is the same + as the given value + + + + + the address of a reference count variable + + + + the value to compare + + + + + + Decreases the reference count. + + + %TRUE if the reference count reached 0, and %FALSE otherwise + + + + + the address of a reference count variable + + + + + + Increases the reference count. + + + + + + + the address of a reference count variable + + + + + + Initializes a reference count variable. + + + + + + + the address of a reference count variable + + + + + + Acquires a reference on a string. + + + the given string, with its reference count increased + + + + + a reference counted string + + + + + + Retrieves the length of @str. + + + the length of the given string, in bytes + + + + + a reference counted string + + + + + + Creates a new reference counted string and copies the contents of @str +into it. + + + the newly created reference counted string + + + + + a NUL-terminated string + + + + + + Creates a new reference counted string and copies the content of @str +into it. + +If you call this function multiple times with the same @str, or with +the same contents of @str, it will return a new reference, instead of +creating a new string. + + + the newly created reference + counted string, or a new reference to an existing string + + + + + a NUL-terminated string + + + + + + Creates a new reference counted string and copies the contents of @str +into it, up to @len bytes. + +Since this function does not stop at nul bytes, it is the caller's +responsibility to ensure that @str has at least @len addressable bytes. + + + the newly created reference counted string + + + + + a string + + + + length of @str to use, or -1 if @str is nul-terminated + + + + + + Releases a reference on a string; if it was the last reference, the +resources allocated by the string are freed as well. + + + + + + + a reference counted string + + + + Checks whether @replacement is a valid replacement string (see g_regex_replace()), i.e. that all escape sequences in @@ -37617,6 +44230,7 @@ for pattern references. For instance, replacement text 'foo\n' does not contain references and may be evaluated without information about actual match, but '\0\1' (whole match followed by first subpattern) requires valid #GMatchInfo object. + whether @replacement is a valid replacement string @@ -37644,6 +44258,7 @@ to compile a regex with embedded nul characters. For completeness, @length can be -1 for a nul-terminated string. In this case the output string will be of course equal to @string. + a newly-allocated escaped string @@ -37667,6 +44282,7 @@ function is useful to dynamically generate regular expressions. @string can contain nul characters that are replaced with "\0", in this case remember to specify the correct length of @string in @length. + a newly-allocated escaped string @@ -37674,12 +44290,12 @@ in @length. the string to escape - + - the length of @string, or -1 if @string is nul-terminated + the length of @string, in bytes, or -1 if @string is nul-terminated @@ -37695,6 +44311,7 @@ substrings, capture counts, and so on. If this function is to be called on the same @pattern more than once, it's more efficient to compile the pattern once with g_regex_new() and then use g_regex_match(). + %TRUE if the string matched, %FALSE otherwise @@ -37737,7 +44354,7 @@ g_regex_new() and then use g_regex_split(). As a special case, the result of splitting the empty string "" is an empty vector, not a vector containing a single string. The reason for this special case is that being able to represent -a empty vector is typically more useful than consistent handling +an empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling this function. @@ -37746,6 +44363,7 @@ A pattern that can match empty strings splits @string into separate characters wherever it matches the empty string between characters. For example splitting "ab c" using as a separator "\s*", you will get "a", "b" and "c". + a %NULL-terminated array of strings. Free it using g_strfreev() @@ -37777,36 +44395,85 @@ it using g_strfreev() that the latest on-disk version is used. Call this only if you just changed the data on disk yourself. -Due to threadsafety issues this may cause leaking of strings +Due to thread safety issues this may cause leaking of strings that were previously returned from g_get_user_special_dir() that can't be freed. We ensure to only leak the data for the directories that actually changed value though. + + + Reallocates the memory pointed to by @mem, so that it now has space for +@n_structs elements of type @struct_type. It returns the new address of +the memory, which may have been moved. +Care is taken to avoid overflow when calculating the size of the allocated block. + + + + the type of the elements to allocate + + + the currently allocated memory + + + the number of elements to allocate + + + + + + + + + + + Internal function used to print messages from the public g_return_if_fail() +and g_return_val_if_fail() macros. + + log domain + function containing the assertion + expression which failed + + + + + + + + + + + + + + + + A wrapper for the POSIX rmdir() function. The rmdir() function deletes a directory from the filesystem. See your C library manual for more details about how rmdir() works on your system. + 0 if the directory was successfully removed, -1 if an error occurred @@ -37816,12 +44483,78 @@ on your system. a pathname in the GLib file name encoding (UTF-8 on Windows) - + + + Adds a symbol to the default scope. + Use g_scanner_scope_add_symbol() instead. + + + + a #GScanner + + + the symbol to add + + + the value of the symbol + + + + + Calls a function for each symbol in the default scope. + Use g_scanner_scope_foreach_symbol() instead. + + + + a #GScanner + + + the function to call with each symbol + + + data to pass to the function + + + + + There is no reason to use this macro, since it does nothing. + This macro does nothing. + + + + a #GScanner + + + + + Removes a symbol from the default scope. + Use g_scanner_scope_remove_symbol() instead. + + + + a #GScanner + + + the symbol to remove + + + + + There is no reason to use this macro, since it does nothing. + This macro does nothing. + + + + a #GScanner + + + Returns the data that @iter points to. + the data that @iter points to @@ -37835,6 +44568,7 @@ on your system. Inserts a new item just before the item pointed to by @iter. + an iterator pointing to the new item @@ -37855,6 +44589,7 @@ on your system. After calling this function @dest will point to the position immediately after @src. It is allowed for @src and @dest to point into different sequences. + @@ -37871,14 +44606,15 @@ sequences. - Inserts the (@begin, @end) range at the destination pointed to by ptr. + Inserts the (@begin, @end) range at the destination pointed to by @dest. The @begin and @end iters must point into the same sequence. It is allowed for @dest to point to a different sequence than the one pointed into by @begin and @end. -If @dest is NULL, the range indicated by @begin and @end is -removed from the sequence. If @dest iter points to a place within +If @dest is %NULL, the range indicated by @begin and @end is +removed from the sequence. If @dest points to a place within the (@begin, @end) range, the range does not move. + @@ -37904,6 +44640,7 @@ guaranteed to be exactly in the middle. The @begin and @end iterators must both point to the same sequence and @begin must come before or be equal to @end in the sequence. + a #GSequenceIter pointing somewhere in the (@begin, @end) range @@ -37926,6 +44663,7 @@ end iterator to this function. If the sequence has a data destroy function associated with it, this function is called on the data for the removed item. + @@ -37941,6 +44679,7 @@ function is called on the data for the removed item. If the sequence has a data destroy function associated with it, this function is called on the data for the removed items. + @@ -37959,6 +44698,7 @@ function is called on the data for the removed items. Changes the data for the item pointed to by @iter to be @data. If the sequence has a data destroy function associated with it, that function is called on the existing data that @iter pointed to. + @@ -37976,6 +44716,7 @@ function is called on the existing data that @iter pointed to. Swaps the items pointed to by @a and @b. It is allowed for @a and @b to point into difference sequences. + @@ -38002,6 +44743,7 @@ be called once. The application name will be used in contexts such as error messages, or when displaying an application's name in the task list. + @@ -38015,6 +44757,7 @@ or when displaying an application's name in the task list. Does nothing if @err is %NULL; if @err is non-%NULL, then *@err must be %NULL. A new #GError is created and assigned to *@err. + @@ -38047,6 +44790,7 @@ must be %NULL. A new #GError is created and assigned to *@err. Unlike g_set_error(), @message is not a printf()-style format string. Use this function if @message contains text you don't have control over, that could include printf() escape sequences. + @@ -38080,6 +44824,7 @@ gdk_init(), which is called by gtk_init() and the taking the last component of @argv[0]. Note that for thread-safety reasons this function can only be called once. + @@ -38098,6 +44843,7 @@ the new handler. The default handler simply outputs the message to stdout. By providing your own handler you can redirect the output, to a GTK+ widget or a log file for example. + the old print handler @@ -38117,6 +44863,7 @@ the new handler. The default handler simply outputs the message to stderr. By providing your own handler you can redirect the output, to a GTK+ widget or a log file for example. + the old error message handler @@ -38148,18 +44895,20 @@ If you need to set up the environment for a child process, you can use g_get_environ() to get an environment array, modify that with g_environ_setenv() and g_environ_unsetenv(), and then pass that array directly to execvpe(), g_spawn_async(), or the like. + %FALSE if the environment variable couldn't be set. - the environment variable to set, must not contain '='. - + the environment variable to set, must not + contain '='. + the value for to set the variable to. - + whether to change the variable if it already exists. @@ -38182,6 +44931,7 @@ contains none of the unsupported shell expansions. If the input does contain such expansions, they are passed through literally. Possible errors are those from the #G_SHELL_ERROR domain. Free the returned vector with g_strfreev(). + %TRUE on success, %FALSE if error set @@ -38189,17 +44939,17 @@ domain. Free the returned vector with g_strfreev(). command line to parse - + return location for number of args - return - location for array of args + + return location for array of args - + @@ -38211,14 +44961,15 @@ the shell, for example, you should first quote it with this function. The return value must be freed with g_free(). The quoting style used is undefined (single or double quotes may be used). + quoted string - + a literal string - + @@ -38244,20 +44995,61 @@ literal string exactly. escape sequences are not allowed; not even like 'foo'\''bar'. Double quotes allow $, `, ", \, and newline to be escaped with backslash. Otherwise double quotes preserve things literally. + an unquoted string - + shell-quoted string - + + + Performs a checked addition of @a and @b, storing the result in +@dest. + +If the operation is successful, %TRUE is returned. If the operation +overflows then the state of @dest is undefined and %FALSE is +returned. + + + + a pointer to the #gsize destination + + + the #gsize left operand + + + the #gsize right operand + + + + + Performs a checked multiplication of @a and @b, storing the result in +@dest. + +If the operation is successful, %TRUE is returned. If the operation +overflows then the state of @dest is undefined and %FALSE is +returned. + + + + a pointer to the #gsize destination + + + the #gsize left operand + + + the #gsize right operand + + + Allocates a block of memory from the slice allocator. -The block adress handed out can be expected to be aligned +The block address handed out can be expected to be aligned to at least 1 * sizeof (void*), though in general slices are 2 * sizeof (void*) bytes aligned, if a malloc() fallback implementation is used instead, @@ -38265,6 +45057,7 @@ the alignment may be reduced in a libc dependent fashion. Note that the underlying slice allocation mechanism can be changed with the [`G_SLICE=always-malloc`][G_SLICE] environment variable. + a pointer to the allocated memory block, which will be %NULL if and only if @mem_size is 0 @@ -38282,6 +45075,7 @@ environment variable. the returned memory to 0. Note that the underlying slice allocation mechanism can be changed with the [`G_SLICE=always-malloc`][G_SLICE] environment variable. + a pointer to the allocated block, which will be %NULL if and only if @mem_size is 0 @@ -38299,6 +45093,7 @@ environment variable. and copies @block_size bytes into it from @mem_block. @mem_block must be non-%NULL if @block_size is non-zero. + a pointer to the allocated memory block, which will be %NULL if and only if @mem_size is 0 @@ -38315,6 +45110,49 @@ and copies @block_size bytes into it from @mem_block. + + A convenience macro to duplicate a block of memory using +the slice allocator. + +It calls g_slice_copy() with `sizeof (@type)` +and casts the returned pointer to a pointer of the given type, +avoiding a type cast in the source code. +Note that the underlying slice allocation mechanism can +be changed with the [`G_SLICE=always-malloc`][G_SLICE] +environment variable. + +This can never return %NULL. + + + + the type to duplicate, typically a structure name + + + the memory to copy into the allocated block + + + + + A convenience macro to free a block of memory that has +been allocated from the slice allocator. + +It calls g_slice_free1() using `sizeof (type)` +as the block size. +Note that the exact release behaviour can be changed with the +[`G_DEBUG=gc-friendly`][G_DEBUG] environment variable, also see +[`G_SLICE`][G_SLICE] for related debugging options. + +If @mem is %NULL, this macro does nothing. + + + + the type of the block to free, typically a structure name + + + a pointer to the block to free + + + Frees a block of memory. @@ -38325,6 +45163,7 @@ can be changed with the [`G_DEBUG=gc-friendly`][G_DEBUG] environment variable, also see [`G_SLICE`][G_SLICE] for related debugging options. If @mem_block is %NULL, this function does nothing. + @@ -38339,6 +45178,30 @@ If @mem_block is %NULL, this function does nothing. + + Frees a linked list of memory blocks of structure type @type. +The memory blocks must be equal-sized, allocated via +g_slice_alloc() or g_slice_alloc0() and linked together by +a @next pointer (similar to #GSList). The name of the +@next field in @type is passed as third argument. +Note that the exact release behaviour can be changed with the +[`G_DEBUG=gc-friendly`][G_DEBUG] environment variable, also see +[`G_SLICE`][G_SLICE] for related debugging options. + +If @mem_chain is %NULL, this function does nothing. + + + + the type of the @mem_chain blocks + + + a pointer to the first block of the chain + + + the field name of the next pointer in @type + + + Frees a linked list of memory blocks of structure type @type. @@ -38351,6 +45214,7 @@ Note that the exact release behaviour can be changed with the [`G_SLICE`][G_SLICE] for related debugging options. If @mem_chain is %NULL, this function does nothing. + @@ -38370,6 +45234,7 @@ If @mem_chain is %NULL, this function does nothing. + @@ -38380,6 +45245,7 @@ If @mem_chain is %NULL, this function does nothing. + @@ -38395,7 +45261,47 @@ If @mem_chain is %NULL, this function does nothing. + + A convenience macro to allocate a block of memory from the +slice allocator. + +It calls g_slice_alloc() with `sizeof (@type)` and casts the +returned pointer to a pointer of the given type, avoiding a type +cast in the source code. Note that the underlying slice allocation +mechanism can be changed with the [`G_SLICE=always-malloc`][G_SLICE] +environment variable. + +This can never return %NULL as the minimum allocation size from +`sizeof (@type)` is 1 byte. + + + + the type to allocate, typically a structure name + + + + + A convenience macro to allocate a block of memory from the +slice allocator and set the memory to 0. + +It calls g_slice_alloc0() with `sizeof (@type)` +and casts the returned pointer to a pointer of the given type, +avoiding a type cast in the source code. +Note that the underlying slice allocation mechanism can +be changed with the [`G_SLICE=always-malloc`][G_SLICE] +environment variable. + +This can never return %NULL as the minimum allocation size from +`sizeof (@type)` is 1 byte. + + + + the type to allocate, typically a structure name + + + + @@ -38408,6 +45314,17 @@ If @mem_chain is %NULL, this function does nothing. + + A convenience macro to get the next element in a #GSList. +Note that it is considered perfectly acceptable to access +@slist->next directly. + + + + an element in a #GSList. + + + A safer form of the standard sprintf() function. The output is guaranteed to not exceed @n characters (including the terminating nul character), so @@ -38426,6 +45343,7 @@ traditional snprintf(), which returns the length of the output string. The format string may contain positional parameters, as specified in the Single Unix Specification. + the number of bytes which would be produced if the buffer was large enough. @@ -38444,7 +45362,7 @@ the Single Unix Specification. a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the arguments to insert in the output. @@ -38453,17 +45371,15 @@ the Single Unix Specification. - Removes the source with the given id from the default main context. + Removes the source with the given ID from the default main context. You must +use g_source_destroy() for sources added to a non-default main context. -The id of a #GSource is given by g_source_get_id(), or will be +The ID of a #GSource is given by g_source_get_id(), or will be returned by the functions g_source_attach(), g_idle_add(), g_idle_add_full(), g_timeout_add(), g_timeout_add_full(), g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and g_io_add_watch_full(). -See also g_source_destroy(). You must use g_source_destroy() for sources -added to a non-default main context. - It is a programmer error to attempt to remove a non-existent source. More specifically: source IDs can be reissued after a source has been @@ -38474,6 +45390,7 @@ idle may already have run and been removed by the time this function is called on its (now invalid) source ID. This source ID may have been reissued, leading to the operation being performed against the wrong source. + For historical reasons, this function always returns %TRUE @@ -38489,6 +45406,7 @@ wrong source. Removes a source from the default main loop context given the source functions and user data. If multiple sources exist with the same source functions and user data, only one will be destroyed. + %TRUE if a source was found and removed. @@ -38508,6 +45426,7 @@ same source functions and user data, only one will be destroyed. Removes a source from the default main loop context given the user data for the callback. If multiple sources exist with the same user data, only one will be destroyed. + %TRUE if a source was found and removed. @@ -38536,6 +45455,7 @@ idle may already have run and been removed by the time this function is called on its (now invalid) source ID. This source ID may have been reissued, leading to the operation being performed against the wrong source. + @@ -38557,6 +45477,7 @@ size of a #GHashTable. The built-in array of primes ranges from 11 to 13845163 such that each prime is approximately 1.5-2 times the previous prime. + the smallest prime number from a built-in array of primes which is larger than @num @@ -38579,30 +45500,34 @@ reference when you don't need it any more. If you are writing a GTK+ application, and the program you are spawning is a graphical application too, then to ensure that the spawned program opens its windows on the right screen, you may want to use #GdkAppLaunchContext, -#GAppLaunchcontext, or set the %DISPLAY environment variable. +#GAppLaunchContext, or set the %DISPLAY environment variable. Note that the returned @child_pid on Windows is a handle to the child process and not its identifier. Process handles and process identifiers are different concepts on Windows. + %TRUE on success, %FALSE if error is set - child's current working directory, or %NULL to inherit parent's - + child's current working + directory, or %NULL to inherit parent's + - child's argument vector + + child's argument vector - + - child's environment, or %NULL to inherit parent's + + child's environment, or %NULL to inherit parent's - + @@ -38623,6 +45548,77 @@ are different concepts on Windows. + + Identical to g_spawn_async_with_pipes() but instead of +creating pipes for the stdin/stdout/stderr, you can pass existing +file descriptors into this function through the @stdin_fd, +@stdout_fd and @stderr_fd parameters. The following @flags +also have their behaviour slightly tweaked as a result: + +%G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standard output +will be discarded, instead of going to the same location as the parent's +standard output. If you use this flag, @standard_output must be -1. +%G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error +will be discarded, instead of going to the same location as the parent's +standard error. If you use this flag, @standard_error must be -1. +%G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's +standard input (by default, the child's standard input is attached to +/dev/null). If you use this flag, @standard_input must be -1. + +It is valid to pass the same fd in multiple parameters (e.g. you can pass +a single fd for both stdout and stderr). + + + %TRUE on success, %FALSE if an error was set + + + + + child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding + + + + child's argument vector, in the GLib file name encoding + + + + + + child's environment, or %NULL to inherit parent's, in the GLib file name encoding + + + + + + flags from #GSpawnFlags + + + + function to run in the child just before exec() + + + + user data for @child_setup + + + + return location for child process ID, or %NULL + + + + file descriptor to use for child's stdin, or -1 + + + + file descriptor to use for child's stdout, or -1 + + + + file descriptor to use for child's stderr, or -1 + + + + Executes a child program asynchronously (your program will not block waiting for the child to exit). The child program is @@ -38664,7 +45660,7 @@ eventually calls) paste the argument vector elements together into a command line, and the C runtime startup code does a corresponding reconstruction of an argument vector from the command line, to be passed to main(). Complications arise when you have argument vector -elements that contain spaces of double quotes. The spawn*() functions +elements that contain spaces or double quotes. The `spawn*()` functions don't do any quoting or escaping, but on the other hand the startup code does do unquoting and unescaping in order to enable receiving arguments with embedded spaces or double quotes. To work around this @@ -38692,10 +45688,11 @@ the %SIGCHLD signal manually. On Windows, calling g_spawn_close_pid() is equivalent to calling CloseHandle() on the process handle returned in @child_pid). See g_child_watch_add(). -%G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that the parent's open file -descriptors will be inherited by the child; otherwise all descriptors -except stdin/stdout/stderr will be closed before calling exec() in -the child. %G_SPAWN_SEARCH_PATH means that @argv[0] need not be an +Open UNIX file descriptors marked as `FD_CLOEXEC` will be automatically +closed in the child process. %G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that +other open file descriptors will be inherited by the child; otherwise all +descriptors except stdin/stdout/stderr will be closed before calling exec() +in the child. %G_SPAWN_SEARCH_PATH means that @argv[0] need not be an absolute path, it will be looked for in the `PATH` environment variable. %G_SPAWN_SEARCH_PATH_FROM_ENVP means need not be an absolute path, it will be looked for in the `PATH` variable from @@ -38709,7 +45706,7 @@ will be discarded, instead of going to the same location as the parent's standard error. If you use this flag, @standard_error must be %NULL. %G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's standard input (by default, the child's standard input is attached to -/dev/null). If you use this flag, @standard_input must be %NULL. +`/dev/null`). If you use this flag, @standard_input must be %NULL. %G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of @argv is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally g_spawn_async_with_pipes() @@ -38746,8 +45743,8 @@ The caller of g_spawn_async_with_pipes() must close these file descriptors when they are no longer in use. If these parameters are %NULL, the corresponding pipe won't be created. -If @standard_input is NULL, the child's standard input is attached to -/dev/null unless %G_SPAWN_CHILD_INHERITS_STDIN is set. +If @standard_input is %NULL, the child's standard input is attached to +`/dev/null` unless %G_SPAWN_CHILD_INHERITS_STDIN is set. If @standard_error is NULL, the child's standard error goes to the same location as the parent's standard error unless %G_SPAWN_STDERR_TO_DEV_NULL @@ -38770,29 +45767,49 @@ and @standard_error will not be filled with valid values. If @child_pid is not %NULL and an error does not occur then the returned process reference must be closed using g_spawn_close_pid(). +On modern UNIX platforms, GLib can use an efficient process launching +codepath driven internally by posix_spawn(). This has the advantage of +avoiding the fork-time performance costs of cloning the parent process +address space, and avoiding associated memory overcommit checks that are +not relevant in the context of immediately executing a distinct process. +This optimized codepath will be used provided that the following conditions +are met: + +1. %G_SPAWN_DO_NOT_REAP_CHILD is set +2. %G_SPAWN_LEAVE_DESCRIPTORS_OPEN is set +3. %G_SPAWN_SEARCH_PATH_FROM_ENVP is not set +4. @working_directory is %NULL +5. @child_setup is %NULL +6. The program is of a recognised binary format, or has a shebang. Otherwise, GLib will have to execute the program through the shell, which is not done using the optimized codepath. + If you are writing a GTK+ application, and the program you are spawning is a graphical application too, then to ensure that the spawned program opens its windows on the right screen, you may want to use #GdkAppLaunchContext, -#GAppLaunchcontext, or set the %DISPLAY environment variable. +#GAppLaunchContext, or set the %DISPLAY environment variable. + %TRUE on success, %FALSE if an error was set - child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding - + child's current working + directory, or %NULL to inherit parent's, in the GLib file name encoding + - child's argument vector, in the GLib file name encoding + child's argument + vector, in the GLib file name encoding - + - child's environment, or %NULL to inherit parent's, in the GLib file name encoding + + child's environment, or %NULL to inherit parent's, in the GLib file + name encoding - + @@ -38862,6 +45879,7 @@ the available platform via a macro such as %G_OS_UNIX, and use WIFEXITED() and WEXITSTATUS() on @exit_status directly. Do not attempt to scan or parse the error message string; it may be translated and/or change in future versions of GLib. + %TRUE if child exited successfully, %FALSE otherwise (and @error will be set) @@ -38879,6 +45897,7 @@ change in future versions of GLib. which must be closed to prevent resource leaking. g_spawn_close_pid() is provided for this purpose. It should be used on all platforms, even though it doesn't do anything under UNIX. + @@ -38899,6 +45918,7 @@ consider using g_spawn_async() directly if appropriate. Possible errors are those from g_shell_parse_argv() and g_spawn_async(). The same concerns on Windows apply as for g_spawn_command_line_sync(). + %TRUE on success, %FALSE if error is set @@ -38906,7 +45926,7 @@ The same concerns on Windows apply as for g_spawn_command_line_sync(). a command line - + @@ -38933,6 +45953,7 @@ canonical Windows paths, like "c:\\program files\\app\\app.exe", as the backslashes will be eaten, and the space will act as a separator. You need to enclose such paths with single quotes, like "'c:\\program files\\app\\app.exe' 'e:\\folder\\argument.txt'". + %TRUE on success, %FALSE if an error was set @@ -38940,7 +45961,7 @@ separator. You need to enclose such paths with single quotes, like a command line - + return location for child output @@ -38981,7 +46002,8 @@ If @exit_status is non-%NULL, the platform-specific exit status of the child is stored there; see the documentation of g_spawn_check_exit_status() for how to use and interpret this. Note that it is invalid to pass %G_SPAWN_DO_NOT_REAP_CHILD in -@flags. +@flags, and on POSIX platforms, the same restrictions as for +g_child_watch_source_new() apply. If an error occurs, no data is returned in @standard_output, @standard_error, or @exit_status. @@ -38989,25 +46011,29 @@ If an error occurs, no data is returned in @standard_output, This function calls g_spawn_async_with_pipes() internally; see that function for full details on the other parameters and details on how these functions work on Windows. + %TRUE on success, %FALSE if an error was set - child's current working directory, or %NULL to inherit parent's - + child's current working + directory, or %NULL to inherit parent's + - child's argument vector + + child's argument vector - + - child's environment, or %NULL to inherit parent's + + child's environment, or %NULL to inherit parent's - + @@ -39047,7 +46073,10 @@ positional parameters, as specified in the Single Unix Specification. Note that it is usually better to use g_snprintf(), to avoid the risk of buffer overflow. +`glib/gprintf.h` must be explicitly included in order to use this function. + See also g_strdup_printf(). + the number of bytes printed. @@ -39062,7 +46091,7 @@ See also g_strdup_printf(). a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the arguments to insert in the output. @@ -39070,11 +46099,68 @@ See also g_strdup_printf(). + + Sets @pp to %NULL, returning the value that was there before. + +Conceptually, this transfers the ownership of the pointer from the +referenced variable to the "caller" of the macro (ie: "steals" the +reference). + +The return value will be properly typed, according to the type of +@pp. + +This can be very useful when combined with g_autoptr() to prevent the +return value of a function from being automatically freed. Consider +the following example (which only works on GCC and clang): + +|[ +GObject * +create_object (void) +{ + g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); + + if (early_error_case) + return NULL; + + return g_steal_pointer (&obj); +} +]| + +It can also be used in similar ways for 'out' parameters and is +particularly useful for dealing with optional out parameters: + +|[ +gboolean +get_object (GObject **obj_out) +{ + g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL); + + if (early_error_case) + return FALSE; + + if (obj_out) + *obj_out = g_steal_pointer (&obj); + + return TRUE; +} +]| + +In the above example, the object will be automatically freed in the +early error case and also in the case that %NULL was given for +@obj_out. + + + + a pointer to a pointer + + + Copies a nul-terminated string into the dest buffer, include the trailing nul, and return a pointer to the trailing nul byte. This is useful for concatenating multiple strings together without having to repeatedly scan for the end. + a pointer to trailing nul byte. @@ -39096,9 +46182,10 @@ if they are equal. It can be passed to g_hash_table_new() as the @key_equal_func parameter, when using non-%NULL strings as keys in a #GHashTable. -Note that this function is primarily meant as a hash table comparison -function. For a general-purpose, %NULL-safe string comparison function, -see g_strcmp0(). +This function is typically used for hash table comparisons, but can be used +for general purpose comparisons of non-%NULL strings. For a %NULL-safe string +comparison function, see g_strcmp0(). + %TRUE if the two keys match @@ -39116,6 +46203,7 @@ see g_strcmp0(). Looks whether the string @str begins with @prefix. + %TRUE if @str begins with @prefix, %FALSE otherwise. @@ -39133,6 +46221,7 @@ see g_strcmp0(). Looks whether the string @str ends with @suffix. + %TRUE if @str end with @suffix, %FALSE otherwise. @@ -39163,6 +46252,7 @@ when using non-%NULL strings as keys in a #GHashTable. Note that this function may not be a perfect fit for all use cases. For example, it produces some hash collisions with strings as short as 2. + a hash value corresponding to the key @@ -39177,6 +46267,7 @@ as 2. Determines if a string is pure ASCII. A string is pure ASCII if it contains no bytes with the high bit set. + %TRUE if @str is ASCII @@ -39206,11 +46297,12 @@ your corpus and build an index on the returned folded tokens, then call g_str_tokenize_and_fold() on the search term and perform lookups into that index. -As some examples, searching for "fred" would match the potential hit -"Smith, Fred" and also "Frédéric". Searching for "Fréd" would match -"Frédéric" but not "Frederic" (due to the one-directional nature of -accent matching). Searching "fo" would match "Foo" and "Bar Foo -Baz", but not "SFO" (because no word as "fo" as a prefix). +As some examples, searching for ‘fred’ would match the potential hit +‘Smith, Fred’ and also ‘Frédéric’. Searching for ‘Fréd’ would match +‘Frédéric’ but not ‘Frederic’ (due to the one-directional nature of +accent matching). Searching ‘fo’ would match ‘Foo’ and ‘Bar Foo +Baz’, but not ‘SFO’ (because no word has ‘fo’ as a prefix). + %TRUE if @potential_hit is a hit @@ -39242,13 +46334,14 @@ change by version or even by runtime environment. If the source language of @str is known, it can used to improve the accuracy of the translation by passing it as @from_locale. It should be a valid POSIX locale string (of the form -"language[_territory][.codeset][@modifier]"). +`language[_territory][.codeset][@modifier]`). If @from_locale is %NULL then the current locale is used. If you want to do translation for no specific locale, and you want it -to be done independently of the currently locale, specify "C" for +to be done independently of the currently locale, specify `"C"` for @from_locale. + a string in plain ASCII @@ -39280,6 +46373,7 @@ The number of ASCII alternatives that are generated and the method for doing so is unspecified, but @translit_locale (if specified) may improve the transliteration if the language of the source string is known. + the folded tokens @@ -39312,7 +46406,15 @@ and return @string itself, not a copy. The return value is to allow nesting such as |[<!-- language="C" --> g_ascii_strup (g_strcanon (str, "abc", '?')) +]| + +In order to modify a copy, you may use `g_strdup()`: +|[<!-- language="C" --> + reformatted = g_strcanon (g_strdup (const_str), "abc", '?'); + ... + g_free (reformatted); ]| + @string @@ -39337,6 +46439,7 @@ nesting such as strcasecmp() function on platforms which support it. See g_strncasecmp() for a discussion of why this function is deprecated and how to replace it. + 0 if the strings match, a negative value if @s1 < @s2, or a positive value if @s1 > @s2. @@ -39363,6 +46466,7 @@ on statically allocated strings. The pointer to @string is returned to allow the nesting of functions. Also see g_strchug() and g_strstrip(). + @string @@ -39385,6 +46489,7 @@ statically allocated strings. The pointer to @string is returned to allow the nesting of functions. Also see g_strchomp() and g_strstrip(). + @string @@ -39400,6 +46505,7 @@ Also see g_strchomp() and g_strstrip(). Compares @str1 and @str2 like strcmp(). Handles %NULL gracefully by sorting it before non-%NULL strings. Comparing two %NULL pointers returns 0. + an integer less than, equal to, or greater than zero, if @str1 is <, == or > than @str2. @@ -39419,6 +46525,7 @@ Comparing two %NULL pointers returns 0. Replaces all escaped characters with their one byte equivalent. This function does the reverse conversion of g_strescape(). + a newly-allocated copy of @source with all escaped character compressed @@ -39441,6 +46548,7 @@ g_strconcat() will start appending random memory junk to your string. Note that this function is usually not the right function to use to assemble a translated message from pieces, since proper translation often requires the pieces to be reordered. + a newly-allocated string containing all the string arguments @@ -39464,7 +46572,15 @@ and returns @string itself, not a copy. The return value is to allow nesting such as |[<!-- language="C" --> g_ascii_strup (g_strdelimit (str, "abc", '?')) +]| + +In order to modify a copy, you may use `g_strdup()`: +|[<!-- language="C" --> + reformatted = g_strdelimit (g_strdup (const_str), "abc", '?'); + ... + g_free (reformatted); ]| + @string @@ -39490,6 +46606,7 @@ allow nesting such as This function is totally broken for the reasons discussed in the g_strncasecmp() docs - use g_ascii_strdown() or g_utf8_strdown() instead. + the string @@ -39505,6 +46622,7 @@ instead. Duplicates a string. If @str is %NULL it returns %NULL. The returned string should be freed with g_free() when no longer needed. + a newly-allocated copy of @str @@ -39520,7 +46638,12 @@ when no longer needed. Similar to the standard C sprintf() function but safer, since it calculates the maximum space required and allocates memory to hold the result. The returned string should be freed with g_free() when no -longer needed. +longer needed. + +The returned string is guaranteed to be non-NULL, unless @format +contains `%lc` or `%ls` conversions, which can fail if no multibyte +representation is available for the given character. + a newly-allocated string holding the result @@ -39543,8 +46666,13 @@ calculates the maximum space required and allocates memory to hold the result. The returned string should be freed with g_free() when no longer needed. +The returned string is guaranteed to be non-NULL, unless @format +contains `%lc` or `%ls` conversions, which can fail if no multibyte +representation is available for the given character. + See also g_vasprintf(), which offers the same functionality, but additionally returns the length of the allocated string. + a newly-allocated string holding the result @@ -39566,6 +46694,7 @@ additionally returns the length of the allocated string. the new array should be freed by first freeing each string, then the array itself. g_strfreev() does this for you. If called on a %NULL value, g_strdupv() simply returns %NULL. + a new %NULL-terminated array of strings. @@ -39598,6 +46727,7 @@ as soon as the call returns: g_strerror (saved_errno); ]| + a UTF-8 string describing the error code. If the error code is unknown, it returns a string like "unknown error (<code>)". @@ -39620,6 +46750,7 @@ replaced with a '\' followed by their octal representation. Characters supplied in @exceptions are not escaped. g_strcompress() does the reverse conversion. + a newly-allocated copy of @source with certain characters escaped. See above. @@ -39641,6 +46772,7 @@ g_strcompress() does the reverse conversion. string it contains. If @str_array is %NULL, this function simply returns. + @@ -39653,6 +46785,7 @@ If @str_array is %NULL, this function simply returns. Creates a new #GString, initialized with the given string. + the new #GString @@ -39673,6 +46806,7 @@ and can contain embedded nul bytes. Since this function does not stop at nul bytes, it is the caller's responsibility to ensure that @init has at least @len addressable bytes. + a new #GString @@ -39693,6 +46827,7 @@ bytes. bytes. This is useful if you are going to add a lot of text to the string and don't want it to be reallocated too often. + the new #GString @@ -39707,6 +46842,7 @@ too often. An auxiliary function for gettext() support (see Q_()). + @msgval, unless @msgval is identical to @msgid and contains a '|' character, in which case a pointer to @@ -39728,6 +46864,7 @@ too often. Joins a number of strings together to form one long string, with the optional @separator inserted between each of them. The returned string should be freed with g_free(). + a newly-allocated string containing all of the strings joined together, with @separator between them @@ -39753,6 +46890,7 @@ should be freed with g_free(). If @str_array has no items, the return value will be an empty string. If @str_array contains a single item, @separator will not appear in the resulting string. + a newly-allocated string containing all of the strings joined together, with @separator between them @@ -39784,6 +46922,7 @@ characters of dest to start with). Caveat: this is supposedly a more secure alternative to strcat() or strncat(), but for real security g_strconcat() is harder to mess up. + size of attempted result, which is MIN (dest_size, strlen (original dest)) + strlen (src), so if retval >= dest_size, @@ -39821,6 +46960,7 @@ returns the size of the attempted result, strlen (src), so if Caveat: strlcpy() is supposedly more secure than strcpy() or strncpy(), but if you really want to avoid screwups, g_strdup() is an even better idea. + length of @src @@ -39859,6 +46999,7 @@ the strings. which only works on ASCII and is not locale-sensitive, and g_utf8_casefold() followed by strcmp() on the resulting strings, which is good for case-insensitive sorting of UTF-8. + 0 if the strings match, a negative value if @s1 < @s2, or a positive value if @s1 > @s2. @@ -39888,6 +47029,7 @@ needed. To copy a number of characters from a UTF-8 encoded string, use g_utf8_strncpy() instead. + a newly-allocated buffer containing the first @n bytes of @str, nul-terminated @@ -39907,6 +47049,7 @@ use g_utf8_strncpy() instead. Creates a new string @length bytes long filled with @fill_char. The returned string should be freed when no longer needed. + a newly-allocated string filled the @fill_char @@ -39929,6 +47072,7 @@ The returned string should be freed when no longer needed. Note that g_strreverse() doesn't work on UTF-8 strings containing multibyte characters. For that purpose, use g_utf8_strreverse(). + the same pointer passed in as @string @@ -39943,6 +47087,7 @@ g_utf8_strreverse(). Searches the string @haystack for the last occurrence of the string @needle. + a pointer to the found occurrence, or %NULL if not found. @@ -39963,6 +47108,7 @@ of the string @needle. Searches the string @haystack for the last occurrence of the string @needle, limiting the length of the search to @haystack_len. + a pointer to the found occurrence, or %NULL if not found. @@ -39988,6 +47134,7 @@ to @haystack_len. You should use this function in preference to strsignal(), because it returns a string in UTF-8 encoding, and since not all platforms support the strsignal() function. + a UTF-8 string describing the signal. If the signal is unknown, it returns "unknown signal (<signum>)". @@ -40011,10 +47158,11 @@ and "". As a special case, the result of splitting the empty string "" is an empty vector, not a vector containing a single string. The reason for this -special case is that being able to represent a empty vector is typically +special case is that being able to represent an empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling g_strsplit(). + a newly-allocated %NULL-terminated array of strings. Use g_strfreev() to free it. @@ -40055,13 +47203,14 @@ vector containing the four strings "", "def", "ghi", and "". As a special case, the result of splitting the empty string "" is an empty vector, not a vector containing a single string. The reason for this -special case is that being able to represent a empty vector is typically +special case is that being able to represent an empty vector is typically more useful than consistent handling of empty elements. If you do need to represent empty elements, you'll need to check for the empty string before calling g_strsplit_set(). Note that this function works on bytes not characters, so it can't be used to delimit UTF-8 strings for anything but ASCII characters. + a newly-allocated %NULL-terminated array of strings. Use g_strfreev() to free it. @@ -40090,6 +47239,7 @@ to delimit UTF-8 strings for anything but ASCII characters. Searches the string @haystack for the first occurrence of the string @needle, limiting the length of the search to @haystack_len. + a pointer to the found occurrence, or %NULL if not found. @@ -40112,6 +47262,16 @@ to @haystack_len. + + Removes leading and trailing whitespace from a string. +See g_strchomp() and g_strchug(). + + + + a string to remove the leading and trailing whitespace from + + + Converts a string to a #gdouble value. It calls the standard strtod() function to handle the conversion, but @@ -40124,6 +47284,7 @@ you know that you must expect both locale formatted and C formatted numbers should you use this. Make sure that you don't pass strings such as comma separated lists of values, since the commas may be interpreted as a decimal point in some locales, causing unexpected results. + the #gdouble value. @@ -40145,6 +47306,7 @@ point in some locales, causing unexpected results. This function is totally broken for the reasons discussed in the g_strncasecmp() docs - use g_ascii_strup() or g_utf8_strup() instead. + the string @@ -40158,6 +47320,7 @@ point in some locales, causing unexpected results. Checks if @strv contains @str. @strv must not be %NULL. + %TRUE if @str is an element of @strv, according to g_str_equal(). @@ -40173,14 +47336,39 @@ point in some locales, causing unexpected results. + + Checks if @strv1 and @strv2 contain exactly the same elements in exactly the +same order. Elements are compared using g_str_equal(). To match independently +of order, sort the arrays first (using g_qsort_with_data() or similar). + +Two empty arrays are considered equal. Neither @strv1 not @strv2 may be +%NULL. + + + %TRUE if @strv1 and @strv2 are equal + + + + + a %NULL-terminated array of strings + + + + another %NULL-terminated array of strings + + + + + Returns the length of the given %NULL-terminated -string array @str_array. +string array @str_array. @str_array must not be %NULL. + length of @str_array. @@ -40192,6 +47380,36 @@ string array @str_array. + + Hook up a new test case at @testpath, similar to g_test_add_func(). +A fixture data structure with setup and teardown functions may be provided, +similar to g_test_create_case(). + +g_test_add() is implemented as a macro, so that the fsetup(), ftest() and +fteardown() callbacks can expect a @Fixture pointer as their first argument +in a type safe manner. They otherwise have type #GTestFixtureFunc. + + + + The test path for a new test case. + + + The type of a fixture data structure. + + + Data argument for the test functions. + + + The function to set up the fixture data. + + + The actual test function. + + + The function to tear down the fixture data. + + + Create a new test case, similar to g_test_create_case(). However the test is assumed to use no fixture, and test suites are automatically @@ -40201,7 +47419,12 @@ will be passed as first argument to @test_func. If @testpath includes the component "subprocess" anywhere in it, the test will be skipped by default, and only run if explicitly -required via the `-p` command-line option or g_test_trap_subprocess(). +required via the `-p` command-line option or g_test_trap_subprocess(). + +No component of @testpath may start with a dot (`.`) if the +%G_TEST_OPTION_ISOLATE_DIRS option is being used; and it is recommended to +do so even if it isn’t. + @@ -40223,6 +47446,7 @@ required via the `-p` command-line option or g_test_trap_subprocess(). Create a new test case, as with g_test_add_data_func(), but freeing @test_data after the test run is complete. + @@ -40253,7 +47477,12 @@ slash-separated portions of @testpath. If @testpath includes the component "subprocess" anywhere in it, the test will be skipped by default, and only run if explicitly -required via the `-p` command-line option or g_test_trap_subprocess(). +required via the `-p` command-line option or g_test_trap_subprocess(). + +No component of @testpath may start with a dot (`.`) if the +%G_TEST_OPTION_ISOLATE_DIRS option is being used; and it is recommended to +do so even if it isn’t. + @@ -40269,6 +47498,7 @@ required via the `-p` command-line option or g_test_trap_subprocess(). + @@ -40294,6 +47524,7 @@ required via the `-p` command-line option or g_test_trap_subprocess(). + @@ -40316,7 +47547,12 @@ required via the `-p` command-line option or g_test_trap_subprocess(). This function adds a message to test reports that associates a bug URI with a test case. Bug URIs are constructed from a base URI set with g_test_bug_base() -and @bug_uri_snippet. +and @bug_uri_snippet. If g_test_bug_base() has not been called, it is +assumed to be the empty string, so a full URI can be provided to +g_test_bug() instead. + +See also: g_test_summary() + @@ -40338,7 +47574,11 @@ a test case changes the base URI for the scope of the test case only. Bug URIs are constructed by appending a bug specific URI portion to @uri_pattern, or by replacing the special string -'\%s' within @uri_pattern if that is present. +'\%s' within @uri_pattern if that is present. + +If g_test_bug_base() is not called, bug URIs are formed solely +from the value provided by g_test_bug(). + @@ -40372,6 +47612,7 @@ This allows for casual running of tests directly from the commandline in the srcdir == builddir case and should also support running of installed tests, assuming the data files have been installed in the same relative path as the test binary. + the path of the file, to be freed using g_free() @@ -40406,6 +47647,7 @@ fixture teardown is most useful if the same fixture is used for multiple tests. In this cases, g_test_create_case() will be called with the same fixture, but varying @test_name and @data_test arguments. + a newly allocated #GTestCase. @@ -40439,6 +47681,7 @@ called with the same fixture, but varying @test_name and Create a new test suite with the name @suite_name. + A newly allocated #GTestSuite instance. @@ -40485,6 +47728,7 @@ abort; use g_test_trap_subprocess() in this case. If messages at %G_LOG_LEVEL_DEBUG are emitted, but not explicitly expected via g_test_expect_message() then they will be ignored. + @@ -40517,6 +47761,7 @@ produce additional diagnostic messages or even continue running the test. If not called from inside a test, this function does nothing. + @@ -40532,6 +47777,7 @@ continuing after a failed assertion might be harmful. The return value of this function is only meaningful if it is called from inside a test function. + %TRUE if the test has failed @@ -40543,9 +47789,10 @@ specified by @file_type. This is approximately the same as calling g_test_build_filename("."), but you don't need to free the return value. + the path of the directory, owned by GLib - + @@ -40567,6 +47814,7 @@ It is safe to use this function from a thread inside of a testcase but you must ensure that all such uses occur before the main testcase function returns (ie: it is best to ensure that all threads have been joined). + the path, automatically freed at the end of the testcase @@ -40588,6 +47836,7 @@ joined). Get the toplevel test suite for the test path API. + the toplevel #GTestSuite @@ -40604,6 +47853,7 @@ produce additional diagnostic messages or even continue running the test. If not called from inside a test, this function does nothing. + @@ -40632,19 +47882,35 @@ So far, the following arguments are understood: be skipped (ie, a test whose name contains "/subprocess"). - `-m {perf|slow|thorough|quick|undefined|no-undefined}`: Execute tests according to these test modes: - `perf`: Performance tests, may take long and report results. + `perf`: Performance tests, may take long and report results (off by default). - `slow`, `thorough`: Slow and thorough tests, may take quite long and maximize coverage. + `slow`, `thorough`: Slow and thorough tests, may take quite long and maximize coverage + (off by default). - `quick`: Quick tests, should run really quickly and give good coverage. + `quick`: Quick tests, should run really quickly and give good coverage (the default). `undefined`: Tests for undefined behaviour, may provoke programming errors under g_test_trap_subprocess() or g_test_expect_message() to check - that appropriate assertions or warnings are given + that appropriate assertions or warnings are given (the default). `no-undefined`: Avoid tests for undefined behaviour -- `--debug-log`: Debug test logging output. +- `--debug-log`: Debug test logging output. + +Options which can be passed to @... are: + + - `"no_g_set_prgname"`: Causes g_test_init() to not call g_set_prgname(). + - %G_TEST_OPTION_ISOLATE_DIRS: Creates a unique temporary directory for each + unit test and uses g_set_user_dirs() to set XDG directories to point into + that temporary directory for the duration of the unit test. See the + documentation for %G_TEST_OPTION_ISOLATE_DIRS. + +Since 2.58, if tests are compiled with `G_DISABLE_ASSERT` defined, +g_test_init() will print an error and exit. This is to prevent no-op tests +from being executed, as g_assert() is commonly (erroneously) used in unit +tests, and is a no-op when compiled with `G_DISABLE_ASSERT`. Ensure your +tests are compiled without `G_DISABLE_ASSERT` defined. + @@ -40660,9 +47926,7 @@ So far, the following arguments are understood: - %NULL-terminated list of special options. Currently the only - defined option is `"no_g_set_prgname"`, which - will cause g_test_init() to not call g_set_prgname(). + %NULL-terminated list of special options, documented below. @@ -40689,6 +47953,7 @@ g_log_structured() or g_log_structured_array()). To change the fatal behaviour for specific log messages, programs must install a custom log writer function using g_log_set_writer_func().See [Using Structured Logging][using-structured-logging]. + @@ -40704,6 +47969,7 @@ writer function using g_log_set_writer_func().See + @@ -40719,6 +47985,7 @@ The test should generally strive to maximize the reported quantities (larger values are better than smaller ones), this and @maximized_quantity can determine sorting order for test result reports. + @@ -40739,6 +48006,7 @@ order for test result reports. Add a message to the test report. + @@ -40759,6 +48027,7 @@ The test should generally strive to minimize the reported quantities (smaller values are better than larger ones), this and @minimized_quantity can determine sorting order for test result reports. + @@ -40784,6 +48053,7 @@ to auto destruct allocated test resources at the end of a test run. Resources are released in reverse queue order, that means enqueueing callback A before callback B will cause B() to be called before A() during teardown. + @@ -40802,6 +48072,7 @@ A() during teardown. Enqueue a pointer to be released with g_free() during the next teardown phase. This is equivalent to calling g_test_queue_destroy() with a destroy callback of g_free(). + @@ -40812,9 +48083,21 @@ with a destroy callback of g_free(). + + Enqueue an object to be released with g_object_unref() during +the next teardown phase. This is equivalent to calling +g_test_queue_destroy() with a destroy callback of g_object_unref(). + + + + the object to unref + + + Get a reproducible random floating point number, see g_test_rand_int() for details on test case random numbers. + a random number from the seeded random number generator. @@ -40823,6 +48106,7 @@ see g_test_rand_int() for details on test case random numbers. Get a reproducible random floating pointer number out of a specified range, see g_test_rand_int() for details on test case random numbers. + a number with @range_start <= number < @range_end. @@ -40848,6 +48132,7 @@ given when starting test programs. For individual test cases however, the random number generator is reseeded, to avoid dependencies between tests and to make --seed effective for all test cases. + a random number from the seeded random number generator. @@ -40856,6 +48141,7 @@ effective for all test cases. Get a reproducible random integer number out of a specified range, see g_test_rand_int() for details on test case random numbers. + a number with @begin <= number < @end. @@ -40901,11 +48187,14 @@ on the order that tests are run in. If you need to ensure that some particular code runs before or after a given test case, use g_test_add(), which lets you specify setup and teardown functions. -If all tests are skipped, this function will return 0 if -producing TAP output, or 77 (treated as "skip test" by Automake) otherwise. +If all tests are skipped or marked as incomplete (expected failures), +this function will return 0 if producing TAP output, or 77 (treated +as "skip test" by Automake) otherwise. + 0 on success, 1 on failure (assuming it returns at all), - 0 or 77 if all tests were skipped with g_test_skip() + 0 or 77 if all tests were skipped with g_test_skip() and/or + g_test_incomplete() @@ -40916,9 +48205,9 @@ test path arguments (`-p testpath` and `-s testpath`) as parsed by g_test_init(). See the g_test_run() documentation for more information on the order that tests are run in. - g_test_run_suite() or g_test_run() may only be called once in a program. + 0 on success @@ -40944,6 +48233,7 @@ Note that the g_assert_not_reached() and g_assert() are not affected by this. This function can only be called after g_test_init(). + @@ -40957,6 +48247,7 @@ produce additional diagnostic messages or even continue running the test. If not called from inside a test, this function does nothing. + @@ -40970,14 +48261,49 @@ If not called from inside a test, this function does nothing. Returns %TRUE (after g_test_init() has been called) if the test program is running under g_test_trap_subprocess(). + %TRUE if the test program is running under g_test_trap_subprocess(). + + Set the summary for a test, which describes what the test checks, and how it +goes about checking it. This may be included in test report output, and is +useful documentation for anyone reading the source code or modifying a test +in future. It must be a single line. + +This should be called at the top of a test function. + +For example: +|[<!-- language="C" --> +static void +test_array_sort (void) +{ + g_test_summary ("Test my_array_sort() sorts the array correctly and stably, " + "including testing zero length and one-element arrays."); + + … +} +]| + +See also: g_test_bug() + + + + + + + One or two sentences summarising what the test checks, and how it + checks it. + + + + Get the time since the last start of the timer with g_test_timer_start(). + the time since the last start of the timer, as a double @@ -40985,6 +48311,7 @@ g_test_trap_subprocess(). Report the last result of g_test_timer_elapsed(). + the last result of g_test_timer_elapsed(), as a double @@ -40993,11 +48320,60 @@ g_test_trap_subprocess(). Start a timing test. Call g_test_timer_elapsed() when the task is supposed to be done. Call this function again to restart the timer. + + + Assert that the stderr output of the last test subprocess +matches @serrpattern. See g_test_trap_subprocess(). + +This is sometimes used to test situations that are formally +considered to be undefined behaviour, like code that hits a +g_assert() or g_error(). In these situations you should skip the +entire test, including the call to g_test_trap_subprocess(), unless +g_test_undefined() returns %TRUE to indicate that undefined +behaviour may be tested. + + + + a glob-style [pattern][glib-Glob-style-pattern-matching] + + + + + Assert that the stderr output of the last test subprocess +does not match @serrpattern. See g_test_trap_subprocess(). + + + + a glob-style [pattern][glib-Glob-style-pattern-matching] + + + + + Assert that the stdout output of the last test subprocess matches +@soutpattern. See g_test_trap_subprocess(). + + + + a glob-style [pattern][glib-Glob-style-pattern-matching] + + + + + Assert that the stdout output of the last test subprocess +does not match @soutpattern. See g_test_trap_subprocess(). + + + + a glob-style [pattern][glib-Glob-style-pattern-matching] + + + + @@ -41054,6 +48430,7 @@ termination and validates child program outputs. This function is implemented only on Unix platforms, and is not always reliable due to problems inherent in fork-without-exec. Use g_test_trap_subprocess() instead. + %TRUE for the forked child and %FALSE for the executing parent process. @@ -41071,6 +48448,7 @@ fork-without-exec. Use g_test_trap_subprocess() instead. Check the result of the last g_test_trap_subprocess() call. + %TRUE if the last test subprocess terminated successfully. @@ -41078,6 +48456,7 @@ fork-without-exec. Use g_test_trap_subprocess() instead. Check the result of the last g_test_trap_subprocess() call. + %TRUE if the last test subprocess got killed due to a timeout. @@ -41145,6 +48524,7 @@ message. return g_test_run (); } ]| + @@ -41182,6 +48562,7 @@ You must only call g_thread_exit() from a thread that you created yourself with g_thread_new() or related APIs. You must not call this function from a thread created with another threading library or or from within a #GThreadPool. + @@ -41199,6 +48580,7 @@ being stopped. If this function returns 0, threads waiting in the thread pool for new work are not stopped. + the maximum @interval (milliseconds) to wait for new tasks in the thread pool before stopping the @@ -41208,6 +48590,7 @@ pool for new work are not stopped. Returns the maximal allowed number of unused threads. + the maximal number of unused threads @@ -41215,6 +48598,7 @@ pool for new work are not stopped. Returns the number of currently unused threads. + the number of currently unused threads @@ -41230,6 +48614,7 @@ except this is done on a per thread basis. By setting @interval to 0, idle threads will not be stopped. The default value is 15000 (15 seconds). + @@ -41247,6 +48632,7 @@ If @max_threads is -1, no limit is imposed on the number of unused threads. The default value is 2. + @@ -41261,6 +48647,7 @@ The default value is 2. Stops all currently unused threads. This does not change the maximal number of unused threads. This function can be used to regularly stop all unused threads e.g. from g_timeout_add(). + @@ -41275,6 +48662,7 @@ were not created by GLib (i.e. those created by other threading APIs). This may be useful for thread identification purposes (i.e. comparisons) but you must not use GLib functions (such as g_thread_join()) on these threads. + the #GThread representing the current thread @@ -41285,18 +48673,32 @@ as g_thread_join()) on these threads. that other threads can run. This function is often used as a method to make busy wait less evil. + - + Converts a string containing an ISO 8601 encoded date and time to a #GTimeVal and puts it into @time_. @iso_date must include year, month, day, hours, minutes, and seconds. It can optionally include fractions of a second and a time zone indicator. (In the absence of any time zone indication, the -timestamp is assumed to be in local time.) +timestamp is assumed to be in local time.) + +Any leading or trailing space in @iso_date is ignored. + +This function was deprecated, along with #GTimeVal itself, in GLib 2.62. +Equivalent functionality is available using code like: +|[ +GDateTime *dt = g_date_time_new_from_iso8601 (iso8601_string, NULL); +gint64 time_val = g_date_time_to_unix (dt); +g_date_time_unref (dt); +]| + #GTimeVal is not year-2038-safe. Use + g_date_time_new_from_iso8601() instead. + %TRUE if the conversion was successful. @@ -41339,8 +48741,11 @@ the callback will be invoked in whichever thread is running that main context. You can do these steps manually if you need greater control or to use a custom main context. +It is safe to call this function from any thread. + The interval given is in terms of monotonic time, not wall clock time. See g_get_monotonic_time(). + the ID (greater than 0) of the event source. @@ -41384,8 +48789,9 @@ the callback will be invoked in whichever thread is running that main context. You can do these steps manually if you need greater control or to use a custom main context. -The interval given in terms of monotonic time, not wall clock time. +The interval given is in terms of monotonic time, not wall clock time. See g_get_monotonic_time(). + the ID (greater than 0) of the event source. @@ -41426,6 +48832,8 @@ g_timeout_source_new_seconds() and attaches it to the main loop context using g_source_attach(). You can do these steps manually if you need greater control. Also see g_timeout_add_seconds_full(). +It is safe to call this function from any thread. + Note that the first call of the timer may not be precise for timeouts of one second. If you need finer precision and have such a timeout, you may want to use g_timeout_add() instead. @@ -41435,6 +48843,7 @@ on how to handle the return value and memory management of @data. The interval given is in terms of monotonic time, not wall clock time. See g_get_monotonic_time(). + the ID (greater than 0) of the event source. @@ -41489,8 +48898,11 @@ g_timeout_source_new_seconds() and attaches it to the main loop context using g_source_attach(). You can do these steps manually if you need greater control. +It is safe to call this function from any thread. + The interval given is in terms of monotonic time, not wall clock time. See g_get_monotonic_time(). + the ID (greater than 0) of the event source. @@ -41528,6 +48940,7 @@ executed. The interval given is in terms of monotonic time, not wall clock time. See g_get_monotonic_time(). + the newly-created timeout source @@ -41549,8 +48962,9 @@ executed. The scheduling granularity/accuracy of this timeout source will be in seconds. -The interval given in terms of monotonic time, not wall clock time. +The interval given is in terms of monotonic time, not wall clock time. See g_get_monotonic_time(). + the newly-created timeout source @@ -41568,6 +48982,7 @@ See g_get_monotonic_time(). Note that execution of this function is of O(N) complexity where N denotes the number of items on the stack. #GTrashStack is deprecated without replacement + the height of the stack @@ -41583,6 +48998,7 @@ where N denotes the number of items on the stack. Returns the element at the top of a #GTrashStack which may be %NULL. #GTrashStack is deprecated without replacement + the element at the top of the stack @@ -41597,6 +49013,7 @@ which may be %NULL. Pops a piece of memory off a #GTrashStack. #GTrashStack is deprecated without replacement + the element at the top of the stack @@ -41611,6 +49028,7 @@ which may be %NULL. Pushes a piece of memory onto a #GTrashStack. #GTrashStack is deprecated without replacement + @@ -41628,6 +49046,7 @@ which may be %NULL. Attempts to allocate @n_bytes, and returns %NULL on failure. Contrast with g_malloc(), which aborts the program on failure. + the allocated memory, or %NULL. @@ -41642,6 +49061,7 @@ Contrast with g_malloc(), which aborts the program on failure. Attempts to allocate @n_bytes, initialized to 0's, and returns %NULL on failure. Contrast with g_malloc0(), which aborts the program on failure. + the allocated memory, or %NULL @@ -41656,6 +49076,7 @@ failure. Contrast with g_malloc0(), which aborts the program on failure. This function is similar to g_try_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication. + the allocated memory, or %NULL @@ -41674,6 +49095,7 @@ but care is taken to detect possible overflow during multiplication. This function is similar to g_try_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication. + the allocated memory, or %NULL. @@ -41689,12 +49111,44 @@ but care is taken to detect possible overflow during multiplication. + + Attempts to allocate @n_structs elements of type @struct_type, and returns +%NULL on failure. Contrast with g_new(), which aborts the program on failure. +The returned pointer is cast to a pointer to the given type. +The function returns %NULL when @n_structs is 0 of if an overflow occurs. + + + + the type of the elements to allocate + + + the number of elements to allocate + + + + + Attempts to allocate @n_structs elements of type @struct_type, initialized +to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts +the program on failure. +The returned pointer is cast to a pointer to the given type. +The function returns %NULL when @n_structs is 0 or if an overflow occurs. + + + + the type of the elements to allocate + + + the number of elements to allocate + + + Attempts to realloc @mem to a new size, @n_bytes, and returns %NULL on failure. Contrast with g_realloc(), which aborts the program on failure. If @mem is %NULL, behaves the same as g_try_malloc(). + the allocated memory, or %NULL. @@ -41713,6 +49167,7 @@ If @mem is %NULL, behaves the same as g_try_malloc(). This function is similar to g_try_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, but care is taken to detect possible overflow during multiplication. + the allocated memory, or %NULL. @@ -41732,10 +49187,30 @@ but care is taken to detect possible overflow during multiplication. + + Attempts to reallocate the memory pointed to by @mem, so that it now has +space for @n_structs elements of type @struct_type, and returns %NULL on +failure. Contrast with g_renew(), which aborts the program on failure. +It returns the new address of the memory, which may have been moved. +The function returns %NULL if an overflow occurs. + + + + the type of the elements to allocate + + + the currently allocated memory + + + the number of elements to allocate + + + Convert a string from UCS-4 to UTF-16. A 0 character will be added to the result after the converted text. - + + a pointer to a newly allocated UTF-16 string. This value must be freed with g_free(). If an error occurs, %NULL will be returned and @error set. @@ -41768,6 +49243,7 @@ added to the result after the converted text. Convert a string from a 32-bit fixed width representation as UCS-4. to UTF-8. The result will be terminated with a 0 byte. + a pointer to a newly allocated UTF-8 string. This value must be freed with g_free(). If an error occurs, @@ -41798,6 +49274,86 @@ to UTF-8. The result will be terminated with a 0 byte. + + Performs a checked addition of @a and @b, storing the result in +@dest. + +If the operation is successful, %TRUE is returned. If the operation +overflows then the state of @dest is undefined and %FALSE is +returned. + + + + a pointer to the #guint64 destination + + + the #guint64 left operand + + + the #guint64 right operand + + + + + Performs a checked multiplication of @a and @b, storing the result in +@dest. + +If the operation is successful, %TRUE is returned. If the operation +overflows then the state of @dest is undefined and %FALSE is +returned. + + + + a pointer to the #guint64 destination + + + the #guint64 left operand + + + the #guint64 right operand + + + + + Performs a checked addition of @a and @b, storing the result in +@dest. + +If the operation is successful, %TRUE is returned. If the operation +overflows then the state of @dest is undefined and %FALSE is +returned. + + + + a pointer to the #guint destination + + + the #guint left operand + + + the #guint right operand + + + + + Performs a checked multiplication of @a and @b, storing the result in +@dest. + +If the operation is successful, %TRUE is returned. If the operation +overflows then the state of @dest is undefined and %FALSE is +returned. + + + + a pointer to the #guint destination + + + the #guint left operand + + + the #guint right operand + + + Determines the break type of @c. @c should be a Unicode character (to derive a character from UTF-8 encoded text, use @@ -41805,6 +49361,7 @@ g_utf8_get_char()). The break type is used to find word and line breaks ("text boundaries"), Pango implements the Unicode boundary resolution algorithms and normally you would use a function such as pango_break() instead of caring about break types yourself. + the break type of @c @@ -41818,6 +49375,7 @@ as pango_break() instead of caring about break types yourself. Determines the canonical combining class of a Unicode character. + the combining class of the character @@ -41846,6 +49404,7 @@ If @a and @b do not compose a new character, @ch is set to zero. See [UAX#15](http://unicode.org/reports/tr15/) for details. + %TRUE if the characters could be composed @@ -41859,7 +49418,7 @@ for details. a Unicode character - + return location for the composed character @@ -41889,6 +49448,7 @@ g_unichar_fully_decompose(). See [UAX#15](http://unicode.org/reports/tr15/) for details. + %TRUE if the character could be decomposed @@ -41898,11 +49458,11 @@ for details. a Unicode character - + return location for the first component of @ch - + return location for the second component of @ch @@ -41911,6 +49471,7 @@ for details. Determines the numeric value of a character as a decimal digit. + If @c is a decimal digit (according to g_unichar_isdigit()), its numeric value. Otherwise, -1. @@ -41943,6 +49504,7 @@ as %G_UNICHAR_MAX_DECOMPOSITION_LENGTH. See [UAX#15](http://unicode.org/reports/tr15/) for details. + the length of the full decomposition. @@ -41956,7 +49518,7 @@ for details. whether perform canonical or compatibility decomposition - + location to store decomposed result, or %NULL @@ -41976,6 +49538,7 @@ If @ch has the Unicode mirrored property and there is another unicode character that typically has a glyph that is the mirror image of @ch's glyph and @mirrored_ch is set, it puts that character in the address pointed to by @mirrored_ch. Otherwise the original character is put. + %TRUE if @ch has a mirrored character, %FALSE otherwise @@ -41999,6 +49562,7 @@ result is undefined. This function is equivalent to pango_script_for_unichar() and the two are interchangeable. + the #GUnicodeScript for the character. @@ -42014,6 +49578,7 @@ two are interchangeable. Determines whether a character is alphanumeric. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is an alphanumeric character @@ -42029,6 +49594,7 @@ with g_utf8_get_char(). Determines whether a character is alphabetic (i.e. a letter). Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is an alphabetic character @@ -42044,6 +49610,7 @@ g_utf8_get_char(). Determines whether a character is a control character. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is a control character @@ -42058,6 +49625,7 @@ g_utf8_get_char(). Determines if a given character is assigned in the Unicode standard. + %TRUE if the character has an assigned value @@ -42073,6 +49641,7 @@ standard. Determines whether a character is numeric (i.e. a digit). This covers ASCII 0-9 and also digits in other languages/scripts. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is a digit @@ -42090,6 +49659,7 @@ some UTF-8 text, obtain a character value with g_utf8_get_char(). spaces). g_unichar_isprint() is similar, but returns %TRUE for spaces. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is printable unless it's a space @@ -42105,6 +49675,7 @@ g_utf8_get_char(). Determines whether a character is a lowercase letter. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is a lowercase letter @@ -42126,6 +49697,7 @@ Note: in most cases where isalpha characters are allowed, ismark characters should be allowed to as they are essential for writing most European languages as well as many non-Latin scripts. + %TRUE if @c is a mark character @@ -42142,6 +49714,7 @@ scripts. Unlike g_unichar_isgraph(), returns %TRUE for spaces. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is printable @@ -42157,6 +49730,7 @@ g_utf8_get_char(). Determines whether a character is punctuation or a symbol. Given some UTF-8 text, obtain a character value with g_utf8_get_char(). + %TRUE if @c is a punctuation or symbol character @@ -42176,6 +49750,7 @@ character value with g_utf8_get_char(). (Note: don't use this to do word breaking; you have to use Pango or equivalent to get word breaking right, the algorithm is fairly complex.) + %TRUE if @c is a space character @@ -42194,6 +49769,7 @@ have three case variants instead of just two. The titlecase form is used at the beginning of a word where only the first letter is capitalized. The titlecase form of the DZ digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z. + %TRUE if the character is titlecase @@ -42207,6 +49783,7 @@ digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z. Determines if a character is uppercase. + %TRUE if @c is an uppercase character @@ -42221,6 +49798,7 @@ digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z. Determines if a character is typically rendered in a double-width cell. + %TRUE if the character is wide @@ -42243,6 +49821,7 @@ for details. If a character passes the g_unichar_iswide() test then it will also pass this test, but not the other way around. Note that some characters may pass both this test and g_unichar_iszerowidth(). + %TRUE if the character is wide in legacy East Asian locales @@ -42256,6 +49835,7 @@ pass both this test and g_unichar_iszerowidth(). Determines if a character is a hexidecimal digit. + %TRUE if the character is a hexadecimal digit @@ -42277,6 +49857,7 @@ A typical use of this function is with one of g_unichar_iswide() or g_unichar_iswide_cjk() to determine the number of cells a string occupies when displayed on a grid display (terminals). However, note that not all terminals support zero-width rendering of zero-width marks. + %TRUE if the character has zero width @@ -42290,6 +49871,7 @@ terminals support zero-width rendering of zero-width marks. Converts a single character to UTF-8. + number of bytes written @@ -42309,6 +49891,7 @@ terminals support zero-width rendering of zero-width marks. Converts a character to lower case. + the result of converting @c to lower case. If @c is not an upperlower or titlecase character, @@ -42324,6 +49907,7 @@ terminals support zero-width rendering of zero-width marks. Converts a character to the titlecase. + the result of converting @c to titlecase. If @c is not an uppercase or lowercase character, @@ -42339,9 +49923,10 @@ terminals support zero-width rendering of zero-width marks. Converts a character to uppercase. + the result of converting @c to uppercase. - If @c is not an lowercase or titlecase character, + If @c is not a lowercase or titlecase character, or has no upper case equivalent @c is returned unchanged. @@ -42354,6 +49939,7 @@ terminals support zero-width rendering of zero-width marks. Classifies a Unicode character by type. + the type of the character. @@ -42369,6 +49955,7 @@ terminals support zero-width rendering of zero-width marks. Checks whether @ch is a valid Unicode character. Some possible integer values of @ch will not be valid. 0 is considered a valid character, though it's normally a string terminator. + %TRUE if @ch is a valid Unicode character @@ -42383,6 +49970,7 @@ character, though it's normally a string terminator. Determines the numeric value of a character as a hexidecimal digit. + If @c is a hex digit (according to g_unichar_isxdigit()), its numeric value. Otherwise, -1. @@ -42399,6 +49987,7 @@ g_unichar_isxdigit()), its numeric value. Otherwise, -1. Computes the canonical decomposition of a Unicode character. Use the more flexible g_unichar_fully_decompose() instead. + a newly allocated string of Unicode characters. @result_len is set to the resulting length of the string. @@ -42420,6 +50009,7 @@ g_unichar_isxdigit()), its numeric value. Otherwise, -1. This rearranges decomposed characters in the string according to their combining classes. See the Unicode manual for more information. + @@ -42444,6 +50034,7 @@ big-endian fashion. That is, the code expected for Arabic is See [Codes for the representation of names of scripts](http://unicode.org/iso15924/codelists.html) for details. + the Unicode script for @iso15924, or of %G_UNICODE_SCRIPT_INVALID_CODE if @iso15924 is zero and @@ -42467,6 +50058,7 @@ big-endian fashion. That is, the code returned for Arabic is See [Codes for the representation of names of scripts](http://unicode.org/iso15924/codelists.html) for details. + the ISO 15924 code for @script, encoded as an integer, of zero if @script is %G_UNICODE_SCRIPT_INVALID_CODE or @@ -42499,6 +50091,7 @@ The return value of this function can be passed to g_source_remove() to cancel the watch at any time that it exists. The source will never close the fd -- you must do it yourself. + the ID (greater than 0) of the event source @@ -42513,7 +50106,7 @@ The source will never close the fd -- you must do it yourself. - a #GPollFDFunc + a #GUnixFDSourceFunc @@ -42529,6 +50122,7 @@ The source will never close the fd -- you must do it yourself. This is the same as g_unix_fd_add(), except that it allows you to specify a non-default priority and a provide a #GDestroyNotify for @user_data. + the ID (greater than 0) of the event source @@ -42565,6 +50159,7 @@ specify a non-default priority and a provide a #GDestroyNotify for descriptor. The source will never close the fd -- you must do it yourself. + the newly created #GSource @@ -42580,6 +50175,31 @@ The source will never close the fd -- you must do it yourself. + + Get the `passwd` file entry for the given @user_name using `getpwnam_r()`. +This can fail if the given @user_name doesn’t exist. + +The returned `struct passwd` has been allocated using g_malloc() and should +be freed using g_free(). The strings referenced by the returned struct are +included in the same allocation, so are valid until the `struct passwd` is +freed. + +This function is safe to call from multiple threads concurrently. + +You will need to include `pwd.h` to get the definition of `struct passwd`. + + + passwd entry, or %NULL on error; free the returned + value with g_free() + + + + + the username to get the passwd file entry for + + + + Similar to the UNIX pipe() call, but on modern systems like Linux uses the pipe2() system call, which atomically creates a pipe with @@ -42589,6 +50209,7 @@ must still be done separately with fcntl(). This function does not take %O_CLOEXEC, it takes %FD_CLOEXEC as if for fcntl(); these are different on Linux/glibc. + %TRUE on success, %FALSE if not (and errno will be set). @@ -42608,6 +50229,7 @@ for fcntl(); these are different on Linux/glibc. Control the non-blocking state of the given file descriptor, according to @nonblock. On most systems this uses %O_NONBLOCK, but on some older ones may use %O_NDELAY. + %TRUE if successful @@ -42627,6 +50249,7 @@ on some older ones may use %O_NDELAY. A convenience function for g_unix_signal_source_new(), which attaches to the default #GMainContext. You can remove the watch using g_source_remove(). + An ID (greater than 0) for the event source @@ -42650,6 +50273,7 @@ using g_source_remove(). A convenience function for g_unix_signal_source_new(), which attaches to the default #GMainContext. You can remove the watch using g_source_remove(). + An ID (greater than 0) for the event source @@ -42702,6 +50326,7 @@ functions like sigprocmask() is not defined. The source will not initially be associated with any #GMainContext and must be added to one with g_source_attach() before it will be executed. + A newly created #GSource @@ -42722,6 +50347,7 @@ file is freed. See your C library manual for more details about unlink(). Note that on Windows, it is in general not possible to delete files that are open to some process, or mapped into memory. + 0 if the name was successfully deleted, -1 if an error occurred @@ -42731,7 +50357,7 @@ are open to some process, or mapped into memory. a pathname in the GLib file name encoding (UTF-8 on Windows) - + @@ -42753,13 +50379,15 @@ If you need to set up the environment for a child process, you can use g_get_environ() to get an environment array, modify that with g_environ_setenv() and g_environ_unsetenv(), and then pass that array directly to execvpe(), g_spawn_async(), or the like. + - the environment variable to remove, must not contain '=' - + the environment variable to remove, must + not contain '=' + @@ -42772,6 +50400,7 @@ But if you specify characters in @reserved_chars_allowed they are not escaped. This is useful for the "reserved" characters in the URI specification, since those are allowed unescaped in some portions of a URI. + an escaped version of @unescaped. The returned string should be freed when no longer needed. @@ -42797,6 +50426,7 @@ freed when no longer needed. Splits an URI list conforming to the text/uri-list mime type defined in RFC 2483 into individual URIs, discarding any comments. The URIs are not validated. + a newly allocated %NULL-terminated list of strings holding the individual URIs. The array should be freed @@ -42818,6 +50448,7 @@ discarding any comments. The URIs are not validated. URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] ]| Common schemes include "file", "http", "svn+ssh", etc. + The "Scheme" component of the URI, or %NULL on error. The returned string should be freed when no longer needed. @@ -42838,6 +50469,7 @@ as an escaped character in @escaped_string then that is an error and %NULL will be returned. This is useful it you want to avoid for instance having a slash being expanded in an escaped path element, which might confuse pathname handling. + an unescaped version of @escaped_string or %NULL on error. The returned string should be freed when no longer needed. As a @@ -42868,6 +50500,7 @@ as an escaped character in @escaped_string then that is an error and %NULL will be returned. This is useful it you want to avoid for instance having a slash being expanded in an escaped path element, which might confuse pathname handling. + an unescaped version of @escaped_string. The returned string should be freed when no longer needed. @@ -42892,6 +50525,7 @@ There are 1 million microseconds per second (represented by the #G_USEC_PER_SEC macro). g_usleep() may have limited precision, depending on hardware and operating system; don't rely on the exact length of the sleep. + @@ -42905,7 +50539,8 @@ length of the sleep. Convert a string from UTF-16 to UCS-4. The result will be nul-terminated. - + + a pointer to a newly allocated UCS-4 string. This value must be freed with g_free(). If an error occurs, %NULL will be returned and @error set. @@ -42950,6 +50585,7 @@ string; it may e.g. include embedded NUL characters. The only validation done by this function is to ensure that the input can be correctly interpreted as UTF-16, i.e. it doesn't contain things unpaired surrogates. + a pointer to a newly allocated UTF-8 string. This value must be freed with g_free(). If an error occurs, @@ -42993,6 +50629,7 @@ ordering, though it is a fairly good one. Getting this exactly right would require a more sophisticated collation function that takes case sensitivity into account. GLib does not currently provide such a function. + a newly allocated string, that is a case independent form of @str. @@ -43016,6 +50653,7 @@ When sorting a large number of strings, it will be significantly faster to obtain collation keys with g_utf8_collate_key() and compare the keys with strcmp() when sorting instead of sorting the original strings. + < 0 if @str1 compares before @str2, 0 if they compare equal, > 0 if @str1 compares after @str2. @@ -43042,6 +50680,7 @@ with strcmp() will always be the same as comparing the two original keys with g_utf8_collate(). Note that this function depends on the [current locale][setlocale]. + a newly allocated string. This string should be freed with g_free() when you are done with it. @@ -43070,6 +50709,7 @@ would like to treat numbers intelligently so that "file1" "file10" "file5" is sorted as "file1" "file5" "file10". Note that this function depends on the [current locale][setlocale]. + a newly allocated string. This string should be freed with g_free() when you are done with it. @@ -43097,7 +50737,8 @@ If @end is %NULL, the return value will never be %NULL: if the end of the string is reached, a pointer to the terminating nul byte is returned. If @end is non-%NULL, the return value will be %NULL if the end of the string is reached. - + + a pointer to the found character or %NULL if @end is set and is reached @@ -43122,7 +50763,8 @@ UTF-8 characters are present in @str before @p. @p does not have to be at the beginning of a UTF-8 character. No check is made to see if the character found is actually valid other than it starts with an appropriate byte. - + + a pointer to the found character or %NULL. @@ -43144,6 +50786,7 @@ If @p does not point to a valid UTF-8 encoded character, results are undefined. If you are not sure that the bytes are complete valid Unicode characters, you should use g_utf8_get_char_validated() instead. + the resulting character @@ -43164,6 +50807,7 @@ overlong encodings of valid characters. Note that g_utf8_get_char_validated() returns (gunichar)-2 if @max_len is positive and any of the bytes in the first UTF-8 character sequence are nul. + the resulting character. If @p points to a partial sequence at the end of a string that could begin a valid @@ -43193,6 +50837,7 @@ a string that was incorrectly declared to be UTF-8, and you need a valid UTF-8 version of it that can be logged or displayed to the user, with the assumption that it is close enough to ASCII or UTF-8 to be mostly readable as-is. + a valid UTF-8 string whose content resembles @str @@ -43209,6 +50854,20 @@ readable as-is. + + Skips to the next character in a UTF-8 string. The string must be +valid; this macro is as fast as possible, and has no error-checking. +You would use this macro to iterate over a string character by +character. The macro returns the start of the next UTF-8 character. +Before using this macro, use g_utf8_validate() to validate strings +that may contain invalid UTF-8. + + + + Pointer to the start of a valid UTF-8 character + + + Converts a string into canonical form, standardizing such issues as whether a character with an accent @@ -43235,10 +50894,11 @@ than a maximally decomposed form. This is often useful if you intend to convert the string to a legacy encoding or pass it to a system with less capable Unicode handling. - - a newly allocated string, that is the - normalized form of @str, or %NULL if @str is not - valid UTF-8. + + + a newly allocated string, that + is the normalized form of @str, or %NULL if @str + is not valid UTF-8. @@ -43270,7 +50930,8 @@ Therefore you should be sure that @offset is within string boundaries before calling that function. Call g_utf8_strlen() when unsure. This limitation exists as this function is called frequently during text rendering and therefore has to be as fast as possible. - + + the resulting pointer @@ -43286,11 +50947,12 @@ text rendering and therefore has to be as fast as possible. - Converts from a pointer to position within a string to a integer + Converts from a pointer to position within a string to an integer character offset. Since 2.10, this function allows @pos to be before @str, and returns a negative offset in this case. + the resulting character offset @@ -43313,7 +50975,8 @@ a negative offset in this case. is made to see if the character found is actually valid other than it starts with an appropriate byte. If @p might be the first character of the string, you must use g_utf8_find_prev_char() instead. - + + a pointer to the found character @@ -43328,7 +50991,8 @@ character of the string, you must use g_utf8_find_prev_char() instead. Finds the leftmost occurrence of the given Unicode character in a UTF-8 encoded string, while limiting the search to @len bytes. If @len is -1, allow unbounded search. - + + %NULL if the string does not contain the character, otherwise, a pointer to the start of the leftmost occurrence of the character in the string. @@ -43354,6 +51018,7 @@ If @len is -1, allow unbounded search. to lowercase. The exact manner that this is done depends on the current locale, and may result in the number of characters in the string changing. + a newly allocated string, with all characters converted to lowercase. @@ -43374,6 +51039,7 @@ characters in the string changing. Computes the length of the string in characters, not including the terminating nul character. If the @max'th byte falls in the middle of a character, the last (partial) character is not counted. + the length of the string in characters @@ -43397,8 +51063,12 @@ middle of a character, the last (partial) character is not counted. Like the standard C strncpy() function, but copies a given number of characters instead of a given number of bytes. The @src string must be valid UTF-8 encoded text. (Use g_utf8_validate() on all -text before trying to use UTF-8 utility functions with it.) - +text before trying to use UTF-8 utility functions with it.) + +Note you must ensure @dest is at least 4 * @n to fit the +largest possible UTF-8 characters + + @dest @@ -43421,7 +51091,8 @@ text before trying to use UTF-8 utility functions with it.) Find the rightmost occurrence of the given Unicode character in a UTF-8 encoded string, while limiting the search to @len bytes. If @len is -1, allow unbounded search. - + + %NULL if the string does not contain the character, otherwise, a pointer to the start of the rightmost occurrence of the character in the string. @@ -43456,6 +51127,7 @@ for display purposes. Note that unlike g_strreverse(), this function returns newly-allocated memory, which should be freed with g_free() when no longer needed. + a newly-allocated string which is the reverse of @str @@ -43478,6 +51150,7 @@ to uppercase. The exact manner that this is done depends on the current locale, and may result in the number of characters in the string increasing. (For instance, the German ess-zet will be changed to SS.) + a newly allocated string, with all characters converted to uppercase. @@ -43497,6 +51170,7 @@ German ess-zet will be changed to SS.) Copies a substring out of a UTF-8 encoded string. The substring will contain @end_pos - @start_pos characters. + a newly allocated copy of the requested substring. Free with g_free() when no longer needed. @@ -43521,7 +51195,8 @@ The substring will contain @end_pos - @start_pos characters. Convert a string from UTF-8 to a 32-bit fixed width representation as UCS-4. A trailing 0 character will be added to the string after the converted text. - + + a pointer to a newly allocated UCS-4 string. This value must be freed with g_free(). If an error occurs, %NULL will be returned and @error set. @@ -43560,7 +51235,8 @@ representation as UCS-4, assuming valid UTF-8 input. This function is roughly twice as fast as g_utf8_to_ucs4() but does no error checking on the input. A trailing 0 character will be added to the string after the converted text. - + + a pointer to a newly allocated UCS-4 string. This value must be freed with g_free(). @@ -43585,7 +51261,8 @@ will be added to the string after the converted text. Convert a string from UTF-8 to UTF-16. A 0 character will be added to the result after the converted text. - + + a pointer to a newly allocated UTF-16 string. This value must be freed with g_free(). If an error occurs, %NULL will be returned and @error set. @@ -43632,6 +51309,7 @@ Returns %TRUE if all of @str was valid. Many GLib and GTK+ routines require valid UTF-8 as input; so data read from a file or the network should be checked with g_utf8_validate() before doing anything else with it. + %TRUE if the text was valid UTF-8 @@ -43639,7 +51317,7 @@ doing anything else with it. a pointer to character data - + @@ -43653,6 +51331,33 @@ doing anything else with it. + + Validates UTF-8 encoded text. + +As with g_utf8_validate(), but @max_len must be set, and hence this function +will always return %FALSE if any of the bytes of @str are nul. + + + %TRUE if the text was valid UTF-8 + + + + + a pointer to character data + + + + + + max bytes to validate + + + + return location for end of valid data + + + + Parses the string @str and verify if it is a UUID. @@ -43662,6 +51367,7 @@ The function accepts the following syntax: Note that hyphens are required within the UUID string itself, as per the aforementioned RFC. + %TRUE if @str is a valid UUID, %FALSE otherwise. @@ -43674,13 +51380,17 @@ as per the aforementioned RFC. - Generates a random UUID (RFC 4122 version 4) as a string. + Generates a random UUID (RFC 4122 version 4) as a string. It has the same +randomness guarantees as #GRand, so must not be used for cryptographic +purposes such as key generation, nonces, salts or one-time pads. + A string that should be freed with g_free(). + @@ -43690,10 +51400,11 @@ as per the aforementioned RFC. should ensure that a string is a valid D-Bus object path before passing it to g_variant_new_object_path(). -A valid object path starts with '/' followed by zero or more -sequences of characters separated by '/' characters. Each sequence -must contain only the characters "[A-Z][a-z][0-9]_". No sequence -(including the one following the final '/' character) may be empty. +A valid object path starts with `/` followed by zero or more +sequences of characters separated by `/` characters. Each sequence +must contain only the characters `[A-Z][a-z][0-9]_`. No sequence +(including the one following the final `/` character) may be empty. + %TRUE if @string is a D-Bus object path @@ -43712,6 +51423,7 @@ passing it to g_variant_new_signature(). D-Bus type signatures consist of zero or more definite #GVariantType strings in sequence. + %TRUE if @string is a D-Bus type signature @@ -43754,7 +51466,12 @@ In case of any error, %NULL will be returned. If @error is non-%NULL then it will be set to reflect the error that occurred. Officially, the language understood by the parser is "any string -produced by g_variant_print()". +produced by g_variant_print()". + +There may be implementation specific restrictions on deeply nested values, +which would result in a %G_VARIANT_PARSE_ERROR_RECURSION error. #GVariant is +guaranteed to handle nesting up to at least 64 levels. + a non-floating reference to a #GVariant, or %NULL @@ -43808,6 +51525,7 @@ The format of the message may change in a future version. If @source_str was not nul-terminated when you passed it to g_variant_parse() then you must add nul termination before using this function. + the printed message @@ -43836,6 +51554,7 @@ function. + @@ -43845,10 +51564,22 @@ function. + + + + + + + + + + + Checks if @type_string is a valid GVariant type string. This call is equivalent to calling g_variant_type_string_scan() and confirming that the following character is a nul terminator. + %TRUE if @type_string is exactly one valid type string @@ -43876,6 +51607,7 @@ string does not end before @limit then %FALSE is returned. For the simple case of checking if a string is a valid type string, see g_variant_type_string_is_valid(). + %TRUE if a valid type string was found @@ -43900,7 +51632,14 @@ see g_variant_type_string_is_valid(). positional parameters, as specified in the Single Unix Specification. This function is similar to g_vsprintf(), except that it allocates a string to hold the output, instead of putting the output in a buffer -you allocate in advance. +you allocate in advance. + +The returned value in @string is guaranteed to be non-NULL, unless +@format contains `%lc` or `%ls` conversions, which can fail if no +multibyte representation is available for the given character. + +`glib/gprintf.h` must be explicitly included in order to use this function. + the number of bytes printed. @@ -43913,7 +51652,7 @@ you allocate in advance. a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the list of arguments to insert in the output. @@ -43923,7 +51662,10 @@ you allocate in advance. An implementation of the standard fprintf() function which supports -positional parameters, as specified in the Single Unix Specification. +positional parameters, as specified in the Single Unix Specification. + +`glib/gprintf.h` must be explicitly included in order to use this function. + the number of bytes printed. @@ -43936,7 +51678,7 @@ positional parameters, as specified in the Single Unix Specification. a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the list of arguments to insert in the output. @@ -43946,7 +51688,10 @@ positional parameters, as specified in the Single Unix Specification. An implementation of the standard vprintf() function which supports -positional parameters, as specified in the Single Unix Specification. +positional parameters, as specified in the Single Unix Specification. + +`glib/gprintf.h` must be explicitly included in order to use this function. + the number of bytes printed. @@ -43955,7 +51700,7 @@ positional parameters, as specified in the Single Unix Specification. a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the list of arguments to insert in the output. @@ -43981,6 +51726,7 @@ vsnprintf(), which returns the length of the output string. The format string may contain positional parameters, as specified in the Single Unix Specification. + the number of bytes which would be produced if the buffer was large enough. @@ -43999,7 +51745,7 @@ the Single Unix Specification. a standard printf() format string, but notice string precision pitfalls][string-precision] - + the list of arguments to insert in the output. @@ -44009,7 +51755,10 @@ the Single Unix Specification. An implementation of the standard vsprintf() function which supports -positional parameters, as specified in the Single Unix Specification. +positional parameters, as specified in the Single Unix Specification. + +`glib/gprintf.h` must be explicitly included in order to use this function. + the number of bytes printed. @@ -44022,7 +51771,7 @@ positional parameters, as specified in the Single Unix Specification. a standard printf() format string, but notice [string precision pitfalls][string-precision] - + the list of arguments to insert in the output. @@ -44030,24 +51779,41 @@ positional parameters, as specified in the Single Unix Specification. + + Logs a warning if the expression is not true. + + + + the expression to check + + + + Internal function used to print messages from the public g_warn_if_reached() +and g_warn_if_fail() macros. + + log domain + file containing the warning + line number of the warning + function containing the warning + expression which failed diff --git a/gir-files/GModule-2.0.gir b/gir-files/GModule-2.0.gir index 03237ba56..a873bc978 100644 --- a/gir-files/GModule-2.0.gir +++ b/gir-files/GModule-2.0.gir @@ -11,8 +11,10 @@ and/or use gtk-doc annotations. --> The #GModule struct is an opaque data structure to represent a [dynamically-loaded module][glib-Dynamic-Loading-of-Modules]. It should only be accessed via the following functions. + Closes a module. + %TRUE on success @@ -27,6 +29,7 @@ It should only be accessed via the following functions. Ensures that a module will never be unloaded. Any future g_module_close() calls on the module will be ignored. + @@ -41,6 +44,7 @@ Any future g_module_close() calls on the module will be ignored. Returns the filename that the module was opened with. If @module refers to the application itself, "main" is returned. + the filename of the module @@ -55,6 +59,7 @@ If @module refers to the application itself, "main" is returned. Gets a symbol pointer from a module, such as one exported by #G_MODULE_EXPORT. Note that a valid symbol can be %NULL. + %TRUE on success @@ -88,6 +93,7 @@ For example, calling g_module_build_path() on a Linux system with a @directory of `/lib` and a @module_name of "mylibrary" will return `/lib/libmylibrary.so`. On a Windows system, using `\Windows` as the directory it will return `\Windows\mylibrary.dll`. + the complete path of the module, including the standard library prefix and suffix. This should be freed when no longer needed @@ -108,6 +114,7 @@ directory it will return `\Windows\mylibrary.dll`. Gets a string describing the last module error. + a string describing the last module error @@ -122,10 +129,11 @@ If that fails and @file_name has the ".la"-suffix (and is a libtool archive) it tries to open the corresponding module. If that fails and it doesn't have the proper module suffix for the platform (#G_MODULE_SUFFIX), this suffix will be appended and the corresponding -module will be opended. If that fails and @file_name doesn't have the +module will be opened. If that fails and @file_name doesn't have the ".la"-suffix, this suffix is appended and g_module_open() tries to open the corresponding module. If eventually that fails as well, %NULL is returned. + a #GModule on success, or %NULL on failure @@ -145,6 +153,7 @@ returned. Checks if modules are supported on the current platform. + %TRUE if modules are supported @@ -157,6 +166,7 @@ If a module contains a function named g_module_check_init() it is called automatically when the module is loaded. It is passed the #GModule structure and should return %NULL on success or a string describing the initialization error. + %NULL on success, or a string describing the initialization error @@ -171,6 +181,7 @@ error. Flags passed to g_module_open(). Note that these flags are not supported on all platforms. + specifies that symbols are only resolved when needed. The default action is to bind all symbols when the module @@ -191,6 +202,7 @@ Note that these flags are not supported on all platforms. If a module contains a function named g_module_unload() it is called automatically when the module is unloaded. It is passed the #GModule structure. + @@ -215,6 +227,7 @@ For example, calling g_module_build_path() on a Linux system with a @directory of `/lib` and a @module_name of "mylibrary" will return `/lib/libmylibrary.so`. On a Windows system, using `\Windows` as the directory it will return `\Windows\mylibrary.dll`. + the complete path of the module, including the standard library prefix and suffix. This should be freed when no longer needed @@ -235,6 +248,7 @@ directory it will return `\Windows\mylibrary.dll`. Gets a string describing the last module error. + a string describing the last module error @@ -242,6 +256,7 @@ directory it will return `\Windows\mylibrary.dll`. Checks if modules are supported on the current platform. + %TRUE if modules are supported diff --git a/gir-files/GObject-2.0.gir b/gir-files/GObject-2.0.gir index 255d99052..8a729057f 100644 --- a/gir-files/GObject-2.0.gir +++ b/gir-files/GObject-2.0.gir @@ -13,25 +13,118 @@ arrays of parameter values to signal emissions into C language callback invocations. It is merely an alias to #GClosureMarshal since the #GClosure mechanism takes over responsibility of actual function invocation for the signal system. + This is the signature of va_list marshaller functions, an optional marshaller that can be used in some situations to avoid marshalling the signal argument into GValues. + A numerical value which represents the unique identifier of a registered type. + + + A convenience macro to ease adding private data to instances of a new type +in the @_C_ section of G_DEFINE_TYPE_WITH_CODE() or +G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). + +For instance: + +|[<!-- language="C" --> + typedef struct _MyObject MyObject; + typedef struct _MyObjectClass MyObjectClass; + + typedef struct { + gint foo; + gint bar; + } MyObjectPrivate; + + G_DEFINE_TYPE_WITH_CODE (MyObject, my_object, G_TYPE_OBJECT, + G_ADD_PRIVATE (MyObject)) +]| + +Will add MyObjectPrivate as the private data to any instance of the MyObject +type. + +G_DEFINE_TYPE_* macros will automatically create a private function +based on the arguments to this macro, which can be used to safely +retrieve the private data from an instance of the type; for instance: + +|[<!-- language="C" --> + gint + my_object_get_foo (MyObject *obj) + { + MyObjectPrivate *priv = my_object_get_instance_private (obj); + + g_return_val_if_fail (MY_IS_OBJECT (obj), 0); + + return priv->foo; + } + + void + my_object_set_bar (MyObject *obj, + gint bar) + { + MyObjectPrivate *priv = my_object_get_instance_private (obj); + + g_return_if_fail (MY_IS_OBJECT (obj)); + + if (priv->bar != bar) + priv->bar = bar; + } +]| + +Note that this macro can only be used together with the G_DEFINE_TYPE_* +macros, since it depends on variable names from those macros. + +Also note that private structs added with these macros must have a struct +name of the form `TypeNamePrivate`. + +It is safe to call the `_get_instance_private` function on %NULL or invalid +objects since it's only adding an offset to the instance pointer. In that +case the returned pointer must not be dereferenced. + + + + the name of the type in CamelCase + + + + + A convenience macro to ease adding private data to instances of a new dynamic +type in the @_C_ section of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See +G_ADD_PRIVATE() for details, it is similar but for static types. + +Note that this macro can only be used together with the +G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable +names from that macro. + + + + the name of the type in CamelCase + + + + + + + + + + A callback function used by the type system to finalize those portions of a derived types class structure that were setup from the corresponding GBaseInitFunc() function. Class finalization basically works the inverse way in which class initialization is performed. See GClassInitFunc() for a discussion of the class initialization process. + @@ -51,6 +144,7 @@ For example, class members (such as strings) that are not sufficiently handled by a plain memory copy of the parent class into the derived class have to be altered. See GClassInitFunc() for a discussion of the class initialization process. + @@ -141,6 +235,7 @@ binding, source, and target instances to drop. #GBinding is available since GObject 2.26 Retrieves the flags passed when constructing the #GBinding. + the #GBindingFlags used by the #GBinding @@ -154,6 +249,7 @@ binding, source, and target instances to drop. Retrieves the #GObject instance used as the source of the binding. + the source #GObject @@ -168,6 +264,7 @@ binding, source, and target instances to drop. Retrieves the name of the property of #GBinding:source used as the source of the binding. + the name of the source property @@ -181,6 +278,7 @@ of the binding. Retrieves the #GObject instance used as the target of the binding. + the target #GObject @@ -195,6 +293,7 @@ of the binding. Retrieves the name of the property of #GBinding:target used as the target of the binding. + the name of the target property @@ -214,6 +313,7 @@ This function will release the reference that is being held on the @binding instance; if you want to hold on to the #GBinding instance after calling g_binding_unbind(), you will need to hold a reference to it. + @@ -234,7 +334,10 @@ to it. The name of the property of #GBinding:source that should be used -as the source of the binding +as the source of the binding. + +This should be in [canonical form][canonical-parameter-names] to get the +best performance. @@ -243,7 +346,10 @@ as the source of the binding The name of the property of #GBinding:target that should be used -as the target of the binding +as the target of the binding. + +This should be in [canonical form][canonical-parameter-names] to get the +best performance. @@ -281,6 +387,7 @@ is the @source_property on the @source object, and @to_value is the @target_property on the @target object. If this is the @transform_from function of a %G_BINDING_BIDIRECTIONAL binding, then those roles are reversed. + %TRUE if the transformation was successful, and %FALSE otherwise @@ -308,6 +415,7 @@ then those roles are reversed. This function is provided by the user and should produce a copy of the passed in boxed structure. + The newly created copy of the boxed structure. @@ -322,6 +430,7 @@ of the passed in boxed structure. This function is provided by the user and should free the boxed structure passed. + @@ -332,8 +441,28 @@ structure passed. + + Cast a function pointer to a #GCallback. + + + + a function pointer. + + + + + Checks whether the user data of the #GCClosure should be passed as the +first parameter to the callback. See g_cclosure_new_swap(). + + + + a #GCClosure + + + A #GCClosure is a specialization of #GClosure for C function callbacks. + the #GClosure @@ -347,6 +476,7 @@ structure passed. take two boxed pointers as arguments and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as g_signal_accumulator_true_handled(). + @@ -384,6 +514,7 @@ accumulator, such as g_signal_accumulator_true_handled(). The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__BOXED_BOXED(). + @@ -426,47 +557,44 @@ accumulator, such as g_signal_accumulator_true_handled(). - A #GClosureMarshal function for use with signals with handlers that -take a flags type as an argument and return a boolean. If you have -such a signal, you will probably also need to use an accumulator, -such as g_signal_accumulator_true_handled(). + A marshaller for a #GCClosure with a callback of type +`gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter +denotes a flags type. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + a #GValue which can store the returned #gboolean - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding instance and arg1 - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__FLAGS(). + @@ -509,46 +637,43 @@ such as g_signal_accumulator_true_handled(). - A #GClosureMarshal function for use with signals with handlers that -take a #GObject and a pointer and produce a string. It is highly -unlikely that your signal handler fits this description. + A marshaller for a #GCClosure with a callback of type +`gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + a #GValue, which can store the returned string - The length of the @param_values array. + 3 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding instance, arg1 and arg2 - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_STRING__OBJECT_POINTER(). + @@ -591,45 +716,43 @@ unlikely that your signal handler fits this description. - A #GClosureMarshal function for use with signals with a single -boolean argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gboolean parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOOLEAN(). + @@ -672,45 +795,43 @@ boolean argument. - A #GClosureMarshal function for use with signals with a single -argument which is any boxed pointer type. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GBoxed* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOXED(). + @@ -753,45 +874,43 @@ argument which is any boxed pointer type. - A #GClosureMarshal function for use with signals with a single -character argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gchar arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gchar parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__CHAR(). + @@ -834,45 +953,43 @@ character argument. - A #GClosureMarshal function for use with signals with one -double-precision floating point argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gdouble parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__DOUBLE(). + @@ -915,45 +1032,43 @@ double-precision floating point argument. - A #GClosureMarshal function for use with signals with a single -argument with an enumerated type. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes an enumeration type.. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the enumeration parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ENUM(). + @@ -996,45 +1111,43 @@ argument with an enumerated type. - A #GClosureMarshal function for use with signals with a single -argument with a flags types. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes a flags type. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the flags parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLAGS(). + @@ -1077,45 +1190,43 @@ argument with a flags types. - A #GClosureMarshal function for use with signals with one -single-precision floating point argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gfloat parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLOAT(). + @@ -1158,45 +1269,43 @@ single-precision floating point argument. - A #GClosureMarshal function for use with signals with a single -integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gint arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gint parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__INT(). + @@ -1239,45 +1348,43 @@ integer argument. - A #GClosureMarshal function for use with signals with with a single -long integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, glong arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #glong parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__LONG(). + @@ -1320,45 +1427,43 @@ long integer argument. - A #GClosureMarshal function for use with signals with a single -#GObject argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GObject* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__OBJECT(). + @@ -1401,45 +1506,43 @@ long integer argument. - A #GClosureMarshal function for use with signals with a single -argument of type #GParamSpec. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GParamSpec* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__PARAM(). + @@ -1482,49 +1585,43 @@ argument of type #GParamSpec. - A #GClosureMarshal function for use with signals with a single raw -pointer argument type. - -If it is possible, it is better to use one of the more specific -functions such as g_cclosure_marshal_VOID__OBJECT() or -g_cclosure_marshal_VOID__OBJECT(). + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gpointer parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__POINTER(). + @@ -1567,45 +1664,43 @@ g_cclosure_marshal_VOID__OBJECT(). - A #GClosureMarshal function for use with signals with a single string -argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gchar* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__STRING(). + @@ -1648,45 +1743,43 @@ argument. - A #GClosureMarshal function for use with signals with a single -unsigned character argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, guchar arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #guchar parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UCHAR(). + @@ -1729,83 +1822,78 @@ unsigned character argument. - A #GClosureMarshal function for use with signals with with a single -unsigned integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, guint arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #guint parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a unsigned int -and a pointer as arguments. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 3 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding instance, arg1 and arg2 - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT_POINTER(). + @@ -1849,6 +1937,7 @@ and a pointer as arguments. The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT(). + @@ -1891,45 +1980,43 @@ and a pointer as arguments. - A #GClosureMarshal function for use with signals with a single -unsigned long integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gulong arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gulong parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ULONG(). + @@ -1971,46 +2058,44 @@ unsigned long integer argument. - - A #GClosureMarshal function for use with signals with a single -#GVariant argument. + + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GVariant* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VARIANT(). + @@ -2053,44 +2138,43 @@ unsigned long integer argument. - A #GClosureMarshal function for use with signals with no arguments. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 1 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding only the instance - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VOID(). + @@ -2138,6 +2222,7 @@ unsigned long integer argument. Normally this function is not passed explicitly to g_signal_new(), but used automatically by GLib when specifying a %NULL marshaller. + @@ -2176,6 +2261,7 @@ but used automatically by GLib when specifying a %NULL marshaller. A generic #GVaClosureMarshal function implemented via [libffi](http://sourceware.org/libffi/). + @@ -2220,9 +2306,12 @@ but used automatically by GLib when specifying a %NULL marshaller. Creates a new closure which invokes @callback_func with @user_data as -the last parameter. - - a new #GCClosure +the last parameter. + +@destroy_data will be called as a finalize notifier on the #GClosure. + + + a floating reference to a new #GCClosure @@ -2246,6 +2335,7 @@ calls g_object_watch_closure() on @object and the created closure. This function is useful when you have a callback closely associated with a #GObject, and want the callback to no longer run after the object is is freed. + a new #GCClosure @@ -2267,6 +2357,7 @@ and calls g_object_watch_closure() on @object and the created closure. This function is useful when you have a callback closely associated with a #GObject, and want the callback to no longer run after the object is is freed. + a new #GCClosure @@ -2284,9 +2375,12 @@ after the object is is freed. Creates a new closure which invokes @callback_func with @user_data as -the first parameter. - - a new #GCClosure +the first parameter. + +@destroy_data will be called as a finalize notifier on the #GClosure. + + + a floating reference to a new #GCClosure @@ -2305,12 +2399,35 @@ the first parameter. + + Check if the closure still needs a marshaller. See g_closure_set_marshal(). + + + + a #GClosure + + + + + Get the total number of notifiers connected with the closure @cl. +The count includes the meta marshaller, the finalize and invalidate notifiers +and the marshal guards. Note that each guard counts as two notifiers. +See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(), +g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards(). + + + + a #GClosure + + + The type used for callback functions in structure definitions and function signatures. This doesn't mean that all callback functions must take no parameters and return void. The required signature of a callback function is determined by the context in which is used (e.g. the signal to which it is connected). Use G_CALLBACK() to cast the callback function to a #GCallback. + @@ -2323,6 +2440,7 @@ Also, specification of a GClassFinalizeFunc() in the #GTypeInfo structure of a static type is invalid, because classes of static types will never be finalized (they are artificially kept alive when their reference count drops to zero). + @@ -2433,6 +2551,7 @@ is called to complete the initialization process with the static members Corresponding finalization counter parts to the GBaseInitFunc() functions have to be provided to release allocated resources at class finalization time. + @@ -2459,9 +2578,11 @@ In the case of C programs, a closure usually just holds a pointer to a function and maybe a data argument, and the marshaller converts between #GValue and native C types. The GObject library provides the #GCClosure type for this purpose. Bindings for -other languages need marshallers which convert between #GValue<!-- --->s and suitable representations in the runtime of the language in -order to use functions written in that languages as callbacks. +other languages need marshallers which convert between #GValues +and suitable representations in the runtime of the language in +order to use functions written in that language as callbacks. Use +g_closure_set_marshal() to set the marshaller on such a custom +closure implementation. Within GObject, closures play an important role in the implementation of signals. When a signal is registered, the @@ -2489,6 +2610,7 @@ callback function/data pointer combination: - g_closure_invalidate() and invalidation notifiers allow callbacks to be automatically removed when the objects they point to go away. + @@ -2525,6 +2647,7 @@ callback function/data pointer combination: + @@ -2561,6 +2684,7 @@ callback function/data pointer combination: @data field of the closure and calls g_object_watch_closure() on @object and the created closure. This function is mainly useful when implementing new types of closures. + a newly allocated #GClosure @@ -2615,8 +2739,9 @@ MyClosure *my_closure_new (gpointer data) return my_closure; } ]| - - a newly allocated #GClosure + + + a floating reference to a new #GClosure @@ -2638,6 +2763,7 @@ notifiers on a single closure are invoked in unspecified order. If a single call to g_closure_unref() results in the closure being both invalidated and finalized, then the invalidate notifiers will be run before the finalize notifiers. + @@ -2661,6 +2787,7 @@ be run before the finalize notifiers. @closure is invalidated with g_closure_invalidate(). Invalidation notifiers are invoked before finalization notifiers, in an unspecified order. + @@ -2684,6 +2811,7 @@ unspecified order. closure callback, respectively. This is typically used to protect the extra arguments for the duration of the callback. See g_object_watch_closure() for an example of marshal guards. + @@ -2726,18 +2854,20 @@ that you've previously called g_closure_ref(). Note that g_closure_invalidate() will also be called when the reference count of a closure drops to zero (unless it has already been invalidated before). + - GClosure to invalidate + #GClosure to invalidate Invokes the closure, i.e. executes the callback represented by the @closure. + @@ -2760,7 +2890,7 @@ been invalidated before). an array of #GValues holding the arguments on which to invoke the callback of @closure - + @@ -2773,6 +2903,7 @@ been invalidated before). Increments the reference count on a closure to force it staying alive while the caller holds a pointer to it. + The @closure passed in, for convenience @@ -2788,6 +2919,7 @@ alive while the caller holds a pointer to it. Removes a finalization notifier. Notice that notifiers are automatically removed after they are run. + @@ -2811,6 +2943,7 @@ Notice that notifiers are automatically removed after they are run. Removes an invalidation notifier. Notice that notifiers are automatically removed after they are run. + @@ -2837,6 +2970,7 @@ information to the marshaller. (See g_closure_set_meta_marshal().) For GObject's C predefined marshallers (the g_cclosure_marshal_*() functions), what it provides is a callback function to use instead of @closure->callback. + @@ -2866,6 +3000,7 @@ g_signal_type_cclosure_new()) retrieve the callback function from a fixed offset in the class structure. The meta marshaller retrieves the right callback and passes it to the marshaller as the @marshal_data argument. + @@ -2926,6 +3061,7 @@ foo_notify_set_closure (GClosure *closure) Because g_closure_sink() may decrement the reference count of a closure (if it hasn't been called on @closure yet) just like g_closure_unref(), g_closure_ref() should be called prior to this function. + @@ -2941,6 +3077,7 @@ g_closure_ref() should be called prior to this function. Decrements the reference count of a closure after it was previously incremented by the same caller. If no other callers are using the closure, then the closure will be destroyed and freed. + @@ -2954,6 +3091,7 @@ closure, then the closure will be destroyed and freed. The type used for marshaller functions. + @@ -2976,7 +3114,7 @@ closure, then the closure will be destroyed and freed. an array of #GValues holding the arguments on which to invoke the callback of @closure - + @@ -2996,6 +3134,7 @@ closure, then the closure will be destroyed and freed. The type used for the various notification callbacks which can be registered on closures. + @@ -3011,6 +3150,7 @@ on closures. + @@ -3021,6 +3161,7 @@ on closures. The connection flags are used to specify the behaviour of a signal's connection. + whether the handler should be called before or after the default handler of the signal. @@ -3030,9 +3171,718 @@ connection. calling the handler; see g_signal_connect_swapped() for an example. + + A convenience macro for emitting the usual declarations in the +header file for a type which is intended to be subclassed. + +You might use it in a header as follows: + +|[ +#ifndef _gtk_frobber_h_ +#define _gtk_frobber_h_ + +#define GTK_TYPE_FROBBER gtk_frobber_get_type () +GDK_AVAILABLE_IN_3_12 +G_DECLARE_DERIVABLE_TYPE (GtkFrobber, gtk_frobber, GTK, FROBBER, GtkWidget) + +struct _GtkFrobberClass +{ + GtkWidgetClass parent_class; + + void (* handle_frob) (GtkFrobber *frobber, + guint n_frobs); + + gpointer padding[12]; +}; + +GtkWidget * gtk_frobber_new (void); + +... + +#endif +]| + +This results in the following things happening: + +- the usual gtk_frobber_get_type() function is declared with a return type of #GType + +- the GtkFrobber struct is created with GtkWidget as the first and only item. You are expected to use + a private structure from your .c file to store your instance variables. + +- the GtkFrobberClass type is defined as a typedef to struct _GtkFrobberClass, which is left undefined. + You should do this from the header file directly after you use the macro. + +- the GTK_FROBBER() and GTK_FROBBER_CLASS() casts are emitted as static inline functions along with + the GTK_IS_FROBBER() and GTK_IS_FROBBER_CLASS() type checking functions and GTK_FROBBER_GET_CLASS() + function. + +- g_autoptr() support being added for your type, based on the type of your parent class + +You can only use this function if your parent type also supports g_autoptr(). + +Because the type macro (GTK_TYPE_FROBBER in the above example) is not a callable, you must continue to +manually define this as a macro for yourself. + +The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro +to be used in the usual way with export control and API versioning macros. + +If you are writing a library, it is important to note that it is possible to convert a type from using +G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you +should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be +subclassed. Once a class structure has been exposed it is not possible to change its size or remove or +reorder items without breaking the API and/or ABI. If you want to declare your own class structure, use +G_DECLARE_DERIVABLE_TYPE(). If you want to declare a class without exposing the class or instance +structures, use G_DECLARE_FINAL_TYPE(). + +If you must use G_DECLARE_DERIVABLE_TYPE() you should be sure to include some padding at the bottom of your +class structure to leave space for the addition of future virtual functions. + + + + The name of the new type, in camel case (like GtkWidget) + + + The name of the new type in lowercase, with words + separated by '_' (like 'gtk_widget') + + + The name of the module, in all caps (like 'GTK') + + + The bare name of the type, in all caps (like 'WIDGET') + + + the name of the parent type, in camel case (like GtkWidget) + + + + + A convenience macro for emitting the usual declarations in the header file for a type which is not (at the +present time) intended to be subclassed. + +You might use it in a header as follows: + +|[ +#ifndef _myapp_window_h_ +#define _myapp_window_h_ + +#include <gtk/gtk.h> + +#define MY_APP_TYPE_WINDOW my_app_window_get_type () +G_DECLARE_FINAL_TYPE (MyAppWindow, my_app_window, MY_APP, WINDOW, GtkWindow) + +MyAppWindow * my_app_window_new (void); + +... + +#endif +]| + +This results in the following things happening: + +- the usual my_app_window_get_type() function is declared with a return type of #GType + +- the MyAppWindow types is defined as a typedef of struct _MyAppWindow. The struct itself is not + defined and should be defined from the .c file before G_DEFINE_TYPE() is used. + +- the MY_APP_WINDOW() cast is emitted as static inline function along with the MY_APP_IS_WINDOW() type + checking function + +- the MyAppWindowClass type is defined as a struct containing GtkWindowClass. This is done for the + convenience of the person defining the type and should not be considered to be part of the ABI. In + particular, without a firm declaration of the instance structure, it is not possible to subclass the type + and therefore the fact that the size of the class structure is exposed is not a concern and it can be + freely changed at any point in the future. + +- g_autoptr() support being added for your type, based on the type of your parent class + +You can only use this function if your parent type also supports g_autoptr(). + +Because the type macro (MY_APP_TYPE_WINDOW in the above example) is not a callable, you must continue to +manually define this as a macro for yourself. + +The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro +to be used in the usual way with export control and API versioning macros. + +If you want to declare your own class structure, use G_DECLARE_DERIVABLE_TYPE(). + +If you are writing a library, it is important to note that it is possible to convert a type from using +G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you +should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be +subclassed. Once a class structure has been exposed it is not possible to change its size or remove or +reorder items without breaking the API and/or ABI. + + + + The name of the new type, in camel case (like GtkWidget) + + + The name of the new type in lowercase, with words + separated by '_' (like 'gtk_widget') + + + The name of the module, in all caps (like 'GTK') + + + The bare name of the type, in all caps (like 'WIDGET') + + + the name of the parent type, in camel case (like GtkWidget) + + + + + A convenience macro for emitting the usual declarations in the header file for a GInterface type. + +You might use it in a header as follows: + +|[ +#ifndef _my_model_h_ +#define _my_model_h_ + +#define MY_TYPE_MODEL my_model_get_type () +GDK_AVAILABLE_IN_3_12 +G_DECLARE_INTERFACE (MyModel, my_model, MY, MODEL, GObject) + +struct _MyModelInterface +{ + GTypeInterface g_iface; + + gpointer (* get_item) (MyModel *model); +}; + +gpointer my_model_get_item (MyModel *model); + +... + +#endif +]| + +This results in the following things happening: + +- the usual my_model_get_type() function is declared with a return type of #GType + +- the MyModelInterface type is defined as a typedef to struct _MyModelInterface, + which is left undefined. You should do this from the header file directly after + you use the macro. + +- the MY_MODEL() cast is emitted as static inline functions along with + the MY_IS_MODEL() type checking function and MY_MODEL_GET_IFACE() function. + +- g_autoptr() support being added for your type, based on your prerequisite type. + +You can only use this function if your prerequisite type also supports g_autoptr(). + +Because the type macro (MY_TYPE_MODEL in the above example) is not a callable, you must continue to +manually define this as a macro for yourself. + +The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro +to be used in the usual way with export control and API versioning macros. + + + + The name of the new type, in camel case (like GtkWidget) + + + The name of the new type in lowercase, with words + separated by '_' (like 'gtk_widget') + + + The name of the module, in all caps (like 'GTK') + + + The bare name of the type, in all caps (like 'WIDGET') + + + the name of the prerequisite type, in camel case (like GtkWidget) + + + + + A convenience macro for type implementations. +Similar to G_DEFINE_TYPE(), but defines an abstract type. +See G_DEFINE_TYPE_EXTENDED() for an example. + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + + + A convenience macro for type implementations. +Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and +allows you to insert custom code into the *_get_type() function, e.g. +interface implementations via G_IMPLEMENT_INTERFACE(). +See G_DEFINE_TYPE_EXTENDED() for an example. + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + Custom code that gets inserted in the @type_name_get_type() function. + + + + + Similar to G_DEFINE_TYPE_WITH_PRIVATE(), but defines an abstract type. +See G_DEFINE_TYPE_EXTENDED() for an example. + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + + + A convenience macro for boxed type implementations, which defines a +type_name_get_type() function registering the boxed type. + + + + The name of the new type, in Camel case + + + The name of the new type, in lowercase, with words + separated by '_' + + + the #GBoxedCopyFunc for the new type + + + the #GBoxedFreeFunc for the new type + + + + + A convenience macro for boxed type implementations. +Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the +type_name_get_type() function, e.g. to register value transformations with +g_value_register_transform_func(), for instance: + +|[<!-- language="C" --> +G_DEFINE_BOXED_TYPE_WITH_CODE (GdkRectangle, gdk_rectangle, + gdk_rectangle_copy, + gdk_rectangle_free, + register_rectangle_transform_funcs (g_define_type_id)) +]| + +Similarly to the %G_DEFINE_TYPE family of macros, the #GType of the newly +defined boxed type is exposed in the `g_define_type_id` variable. + + + + The name of the new type, in Camel case + + + The name of the new type, in lowercase, with words + separated by '_' + + + the #GBoxedCopyFunc for the new type + + + the #GBoxedFreeFunc for the new type + + + Custom code that gets inserted in the *_get_type() function + + + + + A convenience macro for dynamic type implementations, which declares a +class initialization function, an instance initialization function (see +#GTypeInfo for information about these) and a static variable named +`t_n`_parent_class pointing to the parent class. Furthermore, +it defines a `*_get_type()` and a static `*_register_type()` functions +for use in your `module_init()`. + +See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example. + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + + + A more general version of G_DEFINE_DYNAMIC_TYPE() which +allows to specify #GTypeFlags and custom code. + +|[ +G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget, + gtk_gadget, + GTK_TYPE_THING, + 0, + G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO, + gtk_gadget_gizmo_init)); +]| +expands to +|[ +static void gtk_gadget_init (GtkGadget *self); +static void gtk_gadget_class_init (GtkGadgetClass *klass); +static void gtk_gadget_class_finalize (GtkGadgetClass *klass); + +static gpointer gtk_gadget_parent_class = NULL; +static GType gtk_gadget_type_id = 0; + +static void gtk_gadget_class_intern_init (gpointer klass) +{ + gtk_gadget_parent_class = g_type_class_peek_parent (klass); + gtk_gadget_class_init ((GtkGadgetClass*) klass); +} + +GType +gtk_gadget_get_type (void) +{ + return gtk_gadget_type_id; +} + +static void +gtk_gadget_register_type (GTypeModule *type_module) +{ + const GTypeInfo g_define_type_info = { + sizeof (GtkGadgetClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gtk_gadget_class_intern_init, + (GClassFinalizeFunc) gtk_gadget_class_finalize, + NULL, // class_data + sizeof (GtkGadget), + 0, // n_preallocs + (GInstanceInitFunc) gtk_gadget_init, + NULL // value_table + }; + gtk_gadget_type_id = g_type_module_register_type (type_module, + GTK_TYPE_THING, + "GtkGadget", + &g_define_type_info, + (GTypeFlags) flags); + { + const GInterfaceInfo g_implement_interface_info = { + (GInterfaceInitFunc) gtk_gadget_gizmo_init + }; + g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info); + } +} +]| + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + #GTypeFlags to pass to g_type_module_register_type() + + + Custom code that gets inserted in the *_get_type() function. + + + + + A convenience macro for #GTypeInterface definitions, which declares +a default vtable initialization function and defines a *_get_type() +function. + +The macro expects the interface initialization function to have the +name `t_n ## _default_init`, and the interface structure to have the +name `TN ## Interface`. + +The initialization function has signature +`static void t_n ## _default_init (TypeName##Interface *klass);`, rather than +the full #GInterfaceInitFunc signature, for brevity and convenience. If you +need to use an initialization function with an `iface_data` argument, you +must write the #GTypeInterface definitions manually. + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words separated by '_'. + + + The #GType of the prerequisite type for the interface, or 0 +(%G_TYPE_INVALID) for no prerequisite type. + + + + + A convenience macro for #GTypeInterface definitions. Similar to +G_DEFINE_INTERFACE(), but allows you to insert custom code into the +*_get_type() function, e.g. additional interface implementations +via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See +G_DEFINE_TYPE_EXTENDED() for a similar example using +G_DEFINE_TYPE_WITH_CODE(). + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words separated by '_'. + + + The #GType of the prerequisite type for the interface, or 0 +(%G_TYPE_INVALID) for no prerequisite type. + + + Custom code that gets inserted in the *_get_type() function. + + + + + A convenience macro for pointer type implementations, which defines a +type_name_get_type() function registering the pointer type. + + + + The name of the new type, in Camel case + + + The name of the new type, in lowercase, with words + separated by '_' + + + + + A convenience macro for pointer type implementations. +Similar to G_DEFINE_POINTER_TYPE(), but allows to insert +custom code into the type_name_get_type() function. + + + + The name of the new type, in Camel case + + + The name of the new type, in lowercase, with words + separated by '_' + + + Custom code that gets inserted in the *_get_type() function + + + + + A convenience macro for type implementations, which declares a class +initialization function, an instance initialization function (see #GTypeInfo +for information about these) and a static variable named `t_n_parent_class` +pointing to the parent class. Furthermore, it defines a *_get_type() function. +See G_DEFINE_TYPE_EXTENDED() for an example. + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + + + The most general convenience macro for type implementations, on which +G_DEFINE_TYPE(), etc are based. + +|[<!-- language="C" --> +G_DEFINE_TYPE_EXTENDED (GtkGadget, + gtk_gadget, + GTK_TYPE_WIDGET, + 0, + G_ADD_PRIVATE (GtkGadget) + G_IMPLEMENT_INTERFACE (TYPE_GIZMO, + gtk_gadget_gizmo_init)); +]| +expands to +|[<!-- language="C" --> +static void gtk_gadget_init (GtkGadget *self); +static void gtk_gadget_class_init (GtkGadgetClass *klass); +static gpointer gtk_gadget_parent_class = NULL; +static gint GtkGadget_private_offset; +static void gtk_gadget_class_intern_init (gpointer klass) +{ + gtk_gadget_parent_class = g_type_class_peek_parent (klass); + if (GtkGadget_private_offset != 0) + g_type_class_adjust_private_offset (klass, &GtkGadget_private_offset); + gtk_gadget_class_init ((GtkGadgetClass*) klass); +} +static inline gpointer gtk_gadget_get_instance_private (GtkGadget *self) +{ + return (G_STRUCT_MEMBER_P (self, GtkGadget_private_offset)); +} + +GType +gtk_gadget_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + if (g_once_init_enter (&g_define_type_id__volatile)) + { + GType g_define_type_id = + g_type_register_static_simple (GTK_TYPE_WIDGET, + g_intern_static_string ("GtkGadget"), + sizeof (GtkGadgetClass), + (GClassInitFunc) gtk_gadget_class_intern_init, + sizeof (GtkGadget), + (GInstanceInitFunc) gtk_gadget_init, + 0); + { + GtkGadget_private_offset = + g_type_add_instance_private (g_define_type_id, sizeof (GtkGadgetPrivate)); + } + { + const GInterfaceInfo g_implement_interface_info = { + (GInterfaceInitFunc) gtk_gadget_gizmo_init + }; + g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info); + } + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + return g_define_type_id__volatile; +} +]| +The only pieces which have to be manually provided are the definitions of +the instance and class structure and the definitions of the instance and +class init functions. + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + #GTypeFlags to pass to g_type_register_static() + + + Custom code that gets inserted in the *_get_type() function. + + + + + A convenience macro for type implementations. +Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the +*_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE(). +See G_DEFINE_TYPE_EXTENDED() for an example. + + + + The name of the new type, in Camel case. + + + The name of the new type in lowercase, with words separated by '_'. + + + The #GType of the parent type. + + + Custom code that gets inserted in the *_get_type() function. + + + + + A convenience macro for type implementations, which declares a class +initialization function, an instance initialization function (see #GTypeInfo +for information about these), a static variable named `t_n_parent_class` +pointing to the parent class, and adds private instance data to the type. +Furthermore, it defines a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() +for an example. + +Note that private structs added with this macros must have a struct +name of the form @TN Private. + +The private instance data can be retrieved using the automatically generated +getter function `t_n_get_instance_private()`. + +See also: G_ADD_PRIVATE() + + + + The name of the new type, in Camel case. + + + The name of the new type, in lowercase, with words + separated by '_'. + + + The #GType of the parent type. + + + + + Casts a derived #GEnumClass structure into a #GEnumClass structure. + + + + a valid #GEnumClass + + + + + Get the type identifier from a given #GEnumClass structure. + + + + a #GEnumClass + + + + + Get the static type name from a given #GEnumClass structure. + + + + a #GEnumClass + + + The class of an enumeration type holds information about its possible values. + the parent class @@ -3058,6 +3908,7 @@ possible values. A structure which contains a single enum value, its name, and its nickname. + the enum value @@ -3071,9 +3922,37 @@ nickname. + + Casts a derived #GFlagsClass structure into a #GFlagsClass structure. + + + + a valid #GFlagsClass + + + + + Get the type identifier from a given #GFlagsClass structure. + + + + a #GFlagsClass + + + + + Get the static type name from a given #GFlagsClass structure. + + + + a #GFlagsClass + + + The class of a flags type holds information about its possible values. + the parent class @@ -3095,6 +3974,7 @@ possible values. A structure which contains a single flags value, its name, and its nickname. + the flags value @@ -3108,10 +3988,406 @@ nickname. + + A convenience macro to ease interface addition in the `_C_` section +of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). +See G_DEFINE_TYPE_EXTENDED() for an example. + +Note that this macro can only be used together with the G_DEFINE_TYPE_* +macros, since it depends on variable names from those macros. + + + + The #GType of the interface to add + + + The interface init function, of type #GInterfaceInitFunc + + + + + A convenience macro to ease interface addition in the @_C_ section +of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED() +for an example. + +Note that this macro can only be used together with the +G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable +names from that macro. + + + + The #GType of the interface to add + + + The interface init function + + + + + Casts a #GInitiallyUnowned or derived pointer into a (GInitiallyUnowned*) +pointer. Depending on the current debugging level, this function may invoke +certain runtime checks to identify invalid casts. + + + + Object which is subject to casting. + + + + + Casts a derived #GInitiallyUnownedClass structure into a +#GInitiallyUnownedClass structure. + + + + a valid #GInitiallyUnownedClass + + + + + Get the class structure associated to a #GInitiallyUnowned instance. + + + + a #GInitiallyUnowned instance. + + + + + + + + + + + + Checks whether @class "is a" valid #GEnumClass structure of type %G_TYPE_ENUM +or derived. + + + + a #GEnumClass + + + + + Checks whether @class "is a" valid #GFlagsClass structure of type %G_TYPE_FLAGS +or derived. + + + + a #GFlagsClass + + + + + Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_INITIALLY_UNOWNED. + + + + Instance to check for being a %G_TYPE_INITIALLY_UNOWNED. + + + + + Checks whether @class "is a" valid #GInitiallyUnownedClass structure of type +%G_TYPE_INITIALLY_UNOWNED or derived. + + + + a #GInitiallyUnownedClass + + + + + Checks whether a valid #GTypeInstance pointer is of type %G_TYPE_OBJECT. + + + + Instance to check for being a %G_TYPE_OBJECT. + + + + + Checks whether @class "is a" valid #GObjectClass structure of type +%G_TYPE_OBJECT or derived. + + + + a #GObjectClass + + + + + Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM +or derived. + + + + a #GParamSpec + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR. + + + + a valid #GParamSpec instance + + + + + Checks whether @pclass "is a" valid #GParamSpecClass structure of type +%G_TYPE_PARAM or derived. + + + + a #GParamSpecClass + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ENUM. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLAGS. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE. + + + + a #GParamSpec + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE. + + + + a #GParamSpec + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_PARAM. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_STRING. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR. + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY. + Use #GArray instead of #GValueArray + + + + a valid #GParamSpec instance + + + + + Checks whether the given #GParamSpec is of type %G_TYPE_PARAM_VARIANT. + + + + a #GParamSpec + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Checks if @value is a valid and initialized #GValue structure. + + + + A #GValue structure. + + + All the fields in the GInitiallyUnowned structure are private to the #GInitiallyUnowned implementation and should never be accessed directly. + @@ -3124,6 +4400,7 @@ accessed directly. The class structure for the GInitiallyUnowned type. + the parent class @@ -3135,6 +4412,7 @@ accessed directly. + @@ -3153,6 +4431,7 @@ accessed directly. + @@ -3174,6 +4453,7 @@ accessed directly. + @@ -3195,6 +4475,7 @@ accessed directly. + @@ -3207,6 +4488,7 @@ accessed directly. + @@ -3219,6 +4501,7 @@ accessed directly. + @@ -3237,6 +4520,7 @@ accessed directly. + @@ -3253,6 +4537,7 @@ accessed directly. + @@ -3267,7 +4552,7 @@ accessed directly. - + @@ -3284,6 +4569,7 @@ belongs to the type the current initializer was introduced for. The extended members of @instance are guaranteed to have been filled with zeros before this function is called. + @@ -3303,6 +4589,7 @@ zeros before this function is called. A callback function used by the type system to finalize an interface. This function should destroy any internal data and release any resources allocated by the corresponding GInterfaceInitFunc() function. + @@ -3320,6 +4607,7 @@ allocated by the corresponding GInterfaceInitFunc() function. A structure that provides information to the type system which is used specifically for managing interface types. + location of the interface initialization function @@ -3340,6 +4628,7 @@ allocate any resources required by the interface. The members of @iface_data are guaranteed to have been filled with zeros before this function is called. + @@ -3354,14 +4643,124 @@ zeros before this function is called. + + Casts a #GObject or derived pointer into a (GObject*) pointer. +Depending on the current debugging level, this function may invoke +certain runtime checks to identify invalid casts. + + + + Object which is subject to casting. + + + + + Casts a derived #GObjectClass structure into a #GObjectClass structure. + + + + a valid #GObjectClass + + + + + Return the name of a class structure's type. + + + + a valid #GObjectClass + + + + + Get the type id of a class structure. + + + + a valid #GObjectClass + + + + + Get the class structure associated to a #GObject instance. + + + + a #GObject instance. + + + + + Get the type id of an object. + + + + Object to return the type id for. + + + + + Get the name of an object's type. + + + + Object to return the type name for. + + + + + This macro should be used to emit a standard warning about unexpected +properties in set_property() and get_property() implementations. + + + + the #GObject on which set_property() or get_property() was called + + + the numeric id of the property + + + the #GParamSpec of the property + + + + + + + + + + + + + + + + All the fields in the GObject structure are private to the #GObject implementation and should never be accessed directly. - + + Creates a new instance of a #GObject subtype and sets its properties. Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) -which are not explicitly specified are set to their default values. +which are not explicitly specified are set to their default values. + +Note that in C, small integer types in variable argument lists are promoted +up to #gint or #guint as appropriate, and read back accordingly. #gint is 32 +bits on every platform on which GLib is currently supported. This means that +you can use C expressions of type #gint with g_object_new() and properties of +type #gint or #guint or smaller. Specifically, you can use integer literals +with these property types. + +When using property types of #gint64 or #guint64, you must ensure that the +value that you provide is 64 bit. This means that you should use a cast or +make use of the %G_GINT64_CONSTANT or %G_GUINT64_CONSTANT macros. + +Similarly, #gfloat is promoted to #gdouble, so you must ensure that the value +you provide is a #gdouble, even for a property of type #gfloat. + a new instance of @object_type @@ -3388,6 +4787,7 @@ which are not explicitly specified are set to their default values. Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values. + a new instance of @object_type @@ -3408,13 +4808,14 @@ which are not explicitly specified are set to their default values. - + Creates a new instance of a #GObject subtype and sets its properties using the provided arrays. Both arrays must have exactly @n_properties elements, and the names and values correspond by index. Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values. + a new instance of @object_type @@ -3431,13 +4832,13 @@ which are not explicitly specified are set to their default values. the names of each property to be set - - + + the values of each property to be set - + @@ -3450,6 +4851,7 @@ Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values. Use g_object_new_with_properties() instead. deprecated. See #GParameter for more information. + a new instance of @object_type @@ -3473,6 +4875,7 @@ deprecated. See #GParameter for more information. + @@ -3491,6 +4894,7 @@ interface. Generally, the interface vtable passed in as @g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek(). + the #GParamSpec for the property of the interface with the name @property_name, or %NULL if no @@ -3504,7 +4908,7 @@ g_type_default_interface_peek(). - name of a property to lookup. + name of a property to look up. @@ -3523,7 +4927,10 @@ interface property. This function is meant to be called from the interface's default vtable initialization function (the @class_init member of #GTypeInfo.) It must not be called after after @class_init has -been called for any object types implementing this interface. +been called for any object types implementing this interface. + +If @pspec is a floating reference, it will be consumed. + @@ -3545,6 +4952,7 @@ been called for any object types implementing this interface. vtable passed in as @g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek(). + a pointer to an array of pointers to #GParamSpec @@ -3568,6 +4976,7 @@ already been loaded, g_type_default_interface_peek(). + @@ -3578,6 +4987,7 @@ already been loaded, g_type_default_interface_peek(). + @@ -3594,6 +5004,7 @@ already been loaded, g_type_default_interface_peek(). + @@ -3604,6 +5015,7 @@ already been loaded, g_type_default_interface_peek(). + @@ -3614,6 +5026,7 @@ already been loaded, g_type_default_interface_peek(). + @@ -3643,6 +5056,7 @@ Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called. + @@ -3657,6 +5071,7 @@ called. + @@ -3704,6 +5119,7 @@ however if there are multiple toggle references to an object, none of them will ever be notified until all but one are removed. For this reason, you should only ever use a toggle reference if there is important state in the proxy object. + @@ -3734,6 +5150,7 @@ Note that as with g_object_weak_ref(), the weak references created by this method are not thread-safe: they cannot safely be used in one thread if the object's last g_object_unref() might happen in another thread. Use #GWeakRef if thread-safety is required. + @@ -3772,6 +5189,7 @@ The binding will automatically be removed when either the @source or the #GBinding instance. A #GObject can have multiple bindings. + the #GBinding instance representing the binding between the two #GObject instances. The binding is released @@ -3814,9 +5232,11 @@ will be updated as well. The @transform_from function is only used in case of bidirectional bindings, otherwise it will be ignored The binding will automatically be removed when either the @source or the -@target instances are finalized. To remove the binding without affecting the -@source and the @target you can just call g_object_unref() on the returned -#GBinding instance. +@target instances are finalized. This will release the reference that is +being held on the #GBinding instance; if you want to hold on to the +#GBinding instance, you will need to hold a reference to it. + +To remove the binding, call g_binding_unbind(). A #GObject can have multiple bindings. @@ -3825,6 +5245,7 @@ and @transform_from transformation functions; the @notify function will be called once, when the binding is removed. If you need different data for each transformation function, please use g_object_bind_property_with_closures() instead. + the #GBinding instance representing the binding between the two #GObject instances. The binding is released @@ -3867,9 +5288,9 @@ g_object_bind_property_with_closures() instead. or %NULL - - function to be called when disposing the binding, to free the - resources used by the transformation functions + + a function to call when disposing the binding, to free + resources used by the transformation functions, or %NULL if not required @@ -3882,6 +5303,7 @@ the binding. This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers. + the #GBinding instance representing the binding between the two #GObject instances. The binding is released @@ -3926,7 +5348,7 @@ function pointers. The signal specs expected by this function have the form "modifier::signal_name", where modifier can be one of the following: -* - signal: equivalent to g_signal_connect_data (..., NULL, 0) +- signal: equivalent to g_signal_connect_data (..., NULL, 0) - object-signal, object_signal: equivalent to g_signal_connect_object (..., 0) - swapped-signal, swapped_signal: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED) - swapped_object_signal, swapped-object-signal: equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED) @@ -3945,6 +5367,7 @@ The signal specs expected by this function have the form "signal::destroy", gtk_widget_destroyed, &menu->toplevel, NULL); ]| + @object @@ -3973,6 +5396,7 @@ The signal specs expected by this function have the form "any_signal", which means to disconnect any signal with matching callback and data, or "any_signal::signal_name", which only disconnects the signal named "signal_name". + @@ -4008,6 +5432,7 @@ is locked. This function can be useful to avoid races when multiple threads are using object data on the same key on the same object. + the result of calling @dup_func on the value associated with @key on @object, or %NULL if not set. @@ -4049,6 +5474,7 @@ is locked. This function can be useful to avoid races when multiple threads are using object data on the same key on the same object. + the result of calling @dup_func on the value associated with @quark on @object, or %NULL if not set. @@ -4080,6 +5506,7 @@ object. a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink(). + @@ -4100,6 +5527,7 @@ object is frozen. This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified. + @@ -4121,20 +5549,23 @@ Here is an example of using g_object_get() to get the contents of three properties: an integer, a string and an object: |[<!-- language="C" --> gint intval; + guint64 uint64val; gchar *strval; GObject *objval; g_object_get (my_object, "int-property", &intval, + "uint64-property", &uint64val, "str-property", &strval, "obj-property", &objval, NULL); - // Do something with intval, strval, objval + // Do something with intval, uint64val, strval, objval g_free (strval); g_object_unref (objval); - ]| +]| + @@ -4156,8 +5587,10 @@ of three properties: an integer, a string and an object: Gets a named field from the objects table of associations (see g_object_set_data()). + - the data if found, or %NULL if no such data exists. + the data if found, + or %NULL if no such data exists. @@ -4172,15 +5605,23 @@ of three properties: an integer, a string and an object: - Gets a property of an object. @value must have been initialized to the -expected type of the property (or a type to which the expected type can be -transformed) using g_value_init(). + Gets a property of an object. + +The @value can be: + + - an empty #GValue initialized by %G_VALUE_INIT, which will be + automatically initialized with the expected type of the property + (since GLib 2.60) + - a #GValue initialized with the expected type of the property + - a #GValue initialized with a type to which the expected type + of the property can be transformed In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset(). Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming. + @@ -4202,6 +5643,7 @@ bindings, g_object_get() is much more convenient for C programming. This function gets back user data pointers stored via g_object_set_qdata(). + The user data pointer set, or %NULL @@ -4225,6 +5667,7 @@ is responsible for freeing the memory in the appropriate manner for the type, for instance by calling g_free() or g_object_unref(). See g_object_get(). + @@ -4249,6 +5692,7 @@ See g_object_get(). Obtained properties will be set to @values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in. + @@ -4263,13 +5707,13 @@ properties are passed in. the names of each property to get - - + + the values of each property to get - + @@ -4277,6 +5721,7 @@ properties are passed in. Checks whether @object has a [floating][floating-ref] reference. + %TRUE if @object has a floating reference @@ -4299,6 +5744,7 @@ Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called. + @@ -4352,6 +5798,7 @@ and then notify a change on the "foo" property with: |[<!-- language="C" --> g_object_notify_by_pspec (self, properties[PROP_FOO]); ]| + @@ -4367,7 +5814,13 @@ and then notify a change on the "foo" property with: - Increases the reference count of @object. + Increases the reference count of @object. + +Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type +of @object will be propagated to the return type (using the GCC typeof() +extension), so any casting the caller needs to do on the return type must be +explicit. + the same @object @@ -4387,7 +5840,11 @@ In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call -adds a new normal reference increasing the reference count by one. +adds a new normal reference increasing the reference count by one. + +Since GLib 2.56, the type of @object will be propagated to the return type +under the same conditions as for g_object_ref(). + @object @@ -4402,6 +5859,7 @@ adds a new normal reference increasing the reference count by one. Removes a reference added with g_object_add_toggle_ref(). The reference count of the object is decreased by one. + @@ -4426,6 +5884,7 @@ reference count of the object is decreased by one. Removes a weak reference from @object that was previously added using g_object_add_weak_pointer(). The @weak_pointer_location has to match the one used with g_object_add_weak_pointer(). + @@ -4441,7 +5900,7 @@ to match the one used with g_object_add_weak_pointer(). - + Compares the user data for the key @key on @object with @oldval, and if they are the same, replaces @oldval with @newval. @@ -4452,9 +5911,13 @@ operation, for user data on an object. If the previous value was replaced then ownership of the old value (@oldval) is passed to the caller, including the registered destroy notify for it (passed out in @old_destroy). -Its up to the caller to free this as he wishes, which may +It’s up to the caller to free this as needed, which may or may not include using @old_destroy as sometimes replacement -should not destroy the object in the normal way. +should not destroy the object in the normal way. + +See g_object_set_data() for guidance on using a small, bounded set of values +for @key. + %TRUE if the existing value for @key was replaced by @newval, %FALSE otherwise. @@ -4481,13 +5944,13 @@ should not destroy the object in the normal way. a destroy notify for the new value - + destroy notify for the existing value - + Compares the user data for the key @quark on @object with @oldval, and if they are the same, replaces @oldval with @newval. @@ -4498,9 +5961,10 @@ operation, for user data on an object. If the previous value was replaced then ownership of the old value (@oldval) is passed to the caller, including the registered destroy notify for it (passed out in @old_destroy). -Its up to the caller to free this as he wishes, which may +It’s up to the caller to free this as needed, which may or may not include using @old_destroy as sometimes replacement should not destroy the object in the normal way. + %TRUE if the existing value for @quark was replaced by @newval, %FALSE otherwise. @@ -4527,7 +5991,7 @@ should not destroy the object in the normal way. a destroy notify for the new value - + destroy notify for the existing value @@ -4538,6 +6002,7 @@ should not destroy the object in the normal way. reference cycles. This function should only be called from object system implementations. + @@ -4551,9 +6016,15 @@ This function should only be called from object system implementations. Sets properties on an object. +The same caveats about passing integer literals as varargs apply as with +g_object_new(). In particular, any integer literals set as the values for +properties of type #gint64 or #guint64 must be 64 bits wide, using the +%G_GINT64_CONSTANT or %G_GUINT64_CONSTANT macros. + Note that the "notify" signals are queued and only emitted (in reverse order) after all properties have been set. See g_object_freeze_notify(). + @@ -4578,7 +6049,13 @@ g_object_freeze_notify(). strings to pointers. This function lets you set an association. If the object already had an association with that name, -the old association will be destroyed. +the old association will be destroyed. + +Internally, the @key is converted to a #GQuark using g_quark_from_string(). +This means a copy of @key is kept permanently (even after @object has been +finalized) — so it is recommended to only use a small, bounded set of values +for @key in your program, to avoid the #GQuark storage growing unbounded. + @@ -4603,6 +6080,7 @@ for when the association is destroyed, either by setting it to a different value or when the object is destroyed. Note that the @destroy callback is not called if @data is %NULL. + @@ -4619,7 +6097,7 @@ Note that the @destroy callback is not called if @data is %NULL. data to associate with that key - + function to call when the association is destroyed @@ -4627,6 +6105,7 @@ Note that the @destroy callback is not called if @data is %NULL. Sets a property on an object. + @@ -4654,6 +6133,7 @@ until the @object is finalized. Setting a previously set user data pointer, overrides (frees) the old pointer set, using #NULL as pointer essentially removes the data stored. + @@ -4678,6 +6158,7 @@ a void (*destroy) (gpointer) function may be specified which is called with @data as argument when the @object is finalized, or the data is being overwritten by a call to g_object_set_qdata() with the same @quark. + @@ -4694,7 +6175,7 @@ with the same @quark. An opaque user data pointer - + Function to invoke with @data as argument, when @data needs to be freed @@ -4703,6 +6184,7 @@ with the same @quark. Sets properties on an object. + @@ -4727,6 +6209,7 @@ with the same @quark. Properties to be set will be taken from @values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in. + @@ -4741,13 +6224,13 @@ properties are passed in. the names of each property to be set - - + + the values of each property to be set - + @@ -4756,8 +6239,10 @@ properties are passed in. Remove a specified datum from the object's data associations, without invoking the association's destroy handler. + - the data if found, or %NULL if no such data exists. + the data if found, or %NULL + if no such data exists. @@ -4807,6 +6292,7 @@ Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full(). + The user data pointer set, or %NULL @@ -4832,6 +6318,7 @@ Duplicate notifications for each property are squashed so that at most one in which they have been queued. It is an error to call this function when the freeze count is zero. + @@ -4850,6 +6337,7 @@ If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this. + @@ -4870,16 +6358,17 @@ added as marshal guards to the @closure, to ensure that an extra reference count is held on @object during invocation of the @closure. Usually, this function will be called on closures that use this @object as closure data. + - GObject restricting lifetime of @closure + #GObject restricting lifetime of @closure - GClosure to watch + #GClosure to watch @@ -4895,6 +6384,7 @@ Note that the weak references created by this method are not thread-safe: they cannot safely be used in one thread if the object's last g_object_unref() might happen in another thread. Use #GWeakRef if thread-safety is required. + @@ -4915,6 +6405,7 @@ Use #GWeakRef if thread-safety is required. Removes a weak reference callback to an object. + @@ -4943,11 +6434,17 @@ Use #GWeakRef if thread-safety is required. - The notify signal is emitted on an object when one of its -properties has been changed. Note that getting this signal -doesn't guarantee that the value of the property has actually -changed, it may also be emitted when the setter for the property -is called to reinstate the previous value. + The notify signal is emitted on an object when one of its properties has +its value set through g_object_set_property(), g_object_set(), et al. + +Note that getting this signal doesn’t itself guarantee that the value of +the property has actually changed. When it is emitted is determined by the +derived GObject class. If the implementor did not create the property with +%G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results +in ::notify being emitted, even if the new value is the same as the old. +If they did pass %G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only +when they explicitly call g_object_notify() or g_object_notify_by_pspec(), +and common practice is to do that only when the value has actually changed. This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the @@ -4958,7 +6455,7 @@ g_signal_connect (text_view->buffer, "notify::paste-target-list", text_view) ]| It is important to note that you must use -[canonical][canonical-parameter-name] parameter names as +[canonical parameter names][canonical-parameter-names] as detail strings for the notify signal. @@ -4974,9 +6471,8 @@ detail strings for the notify signal. The class structure for the GObject type. -<example> -<title>Implementing singletons using a constructor</title> -<programlisting> +|[<!-- language="C" --> +// Example of implementing a singleton using a constructor. static MySingleton *the_singleton = NULL; static GObject* @@ -4998,7 +6494,8 @@ my_singleton_constructor (GType type, return object; } -</programlisting></example> +]| + the parent class @@ -5010,6 +6507,7 @@ my_singleton_constructor (GType type, + @@ -5028,6 +6526,7 @@ my_singleton_constructor (GType type, + @@ -5049,6 +6548,7 @@ my_singleton_constructor (GType type, + @@ -5070,6 +6570,7 @@ my_singleton_constructor (GType type, + @@ -5082,6 +6583,7 @@ my_singleton_constructor (GType type, + @@ -5094,6 +6596,7 @@ my_singleton_constructor (GType type, + @@ -5112,6 +6615,7 @@ my_singleton_constructor (GType type, + @@ -5128,6 +6632,7 @@ my_singleton_constructor (GType type, + @@ -5142,12 +6647,13 @@ my_singleton_constructor (GType type, - + Looks up the #GParamSpec for a property of a class. + the #GParamSpec for the property, or %NULL if the class doesn't have a property of that name @@ -5226,6 +6732,7 @@ my_object_set_foo (MyObject *self, gint foo) } } ]| + @@ -5258,6 +6765,7 @@ use of properties on the same type on other threads. Note that it is possible to redefine a property in a derived class, by installing a property with the same name. This can be useful at times, e.g. to change the range of allowed values or the default value. + @@ -5278,6 +6786,7 @@ e.g. to change the range of allowed values or the default value. Get an array of #GParamSpec* for all properties of a class. + an array of #GParamSpec* which should be freed after use @@ -5313,6 +6822,7 @@ instead, so that the @param_id field of the #GParamSpec will be correct. For virtually all uses, this makes no difference. If you need to get the overridden property, you can call g_param_spec_get_redirect_target(). + @@ -5337,6 +6847,7 @@ g_param_spec_get_redirect_target(). The GObjectConstructParam struct is an auxiliary structure used to hand #GParamSpec/#GValue pairs to the @constructor of a #GObjectClass. + the #GParamSpec of the construct parameter @@ -5348,6 +6859,7 @@ a #GObjectClass. The type of the @finalize function of #GObjectClass. + @@ -5360,6 +6872,7 @@ a #GObjectClass. The type of the @get_property function of #GObjectClass. + @@ -5385,6 +6898,7 @@ a #GObjectClass. The type of the @set_property function of #GObjectClass. + @@ -5410,22 +6924,349 @@ a #GObjectClass. Mask containing the bits of #GParamSpec.flags which are reserved for GLib. + - + + Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) into +a #GParamSpec object. + + + + a valid #GParamSpec + + + + + Cast a #GParamSpec instance into a #GParamSpecBoolean. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecBoxed. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecChar. + + + + a valid #GParamSpec instance + + + + + Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure. + + + + a valid #GParamSpecClass + + + + + Cast a #GParamSpec instance into a #GParamSpecDouble. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecEnum. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecFlags. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecFloat. + + + + a valid #GParamSpec instance + + + + + Retrieves the #GParamSpecClass of a #GParamSpec. + + + + a valid #GParamSpec + + + + + Casts a #GParamSpec into a #GParamSpecGType. + + + + a #GParamSpec + + + + + Cast a #GParamSpec instance into a #GParamSpecInt. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecInt64. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecLong. + + + + a valid #GParamSpec instance + + + + + Casts a #GParamSpec instance into a #GParamSpecObject. + + + + a valid #GParamSpec instance + + + + + Casts a #GParamSpec into a #GParamSpecOverride. + + + + a #GParamSpec + + + + + Casts a #GParamSpec instance into a #GParamSpecParam. + + + + a valid #GParamSpec instance + + + + + Casts a #GParamSpec instance into a #GParamSpecPointer. + + + + a valid #GParamSpec instance + + + + + Casts a #GParamSpec instance into a #GParamSpecString. + + + + a valid #GParamSpec instance + + + + + Retrieves the #GType of this @pspec. + + + + a valid #GParamSpec + + + + + Retrieves the #GType name of this @pspec. + + + + a valid #GParamSpec + + + + + Cast a #GParamSpec instance into a #GParamSpecUChar. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecUInt. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecUInt64. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecULong. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecUnichar. + + + + a valid #GParamSpec instance + + + + + Cast a #GParamSpec instance into a #GParamSpecValueArray. + Use #GArray instead of #GValueArray + + + + a valid #GParamSpec instance + + + + + Retrieves the #GType to initialize a #GValue for this parameter. + + + + a valid #GParamSpec + + + + + Casts a #GParamSpec into a #GParamSpecVariant. + + + + a #GParamSpec + + + + #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB. Since 2.13.0 + Minimum shift count to be used for user defined flags, to be stored in #GParamSpec.flags. The maximum allowed is 10. + + + Evaluates to the @field_name inside the @inst private data +structure for @TypeName. + +Note that this macro can only be used together with the G_DEFINE_TYPE_* +and G_ADD_PRIVATE() macros, since it depends on variable names from +those macros. + + + + the name of the type in CamelCase + + + the instance of @TypeName you wish to access + + + the type of the field in the private data structure + + + the name of the field in the private data structure + + + + + Evaluates to a pointer to the @field_name inside the @inst private data +structure for @TypeName. + +Note that this macro can only be used together with the G_DEFINE_TYPE_* +and G_ADD_PRIVATE() macros, since it depends on variable names from +those macros. + + + + the name of the type in CamelCase + + + the instance of @TypeName you wish to access + + + the name of the field in the private data structure + + + + + Evaluates to the offset of the @field inside the instance private data +structure for @TypeName. + +Note that this macro can only be used together with the G_DEFINE_TYPE_* +and G_ADD_PRIVATE() macros, since it depends on variable names from +those macros. + + + + the name of the type in CamelCase + + + the name of the field in the private data structure + + + Through the #GParamFlags flag values, certain aspects of parameters can be configured. See also #G_PARAM_STATIC_STRINGS. + the parameter is readable @@ -5485,29 +7326,28 @@ required to specify parameters, such as e.g. #GObject properties. ## Parameter names # {#canonical-parameter-names} -Parameter names need to start with a letter (a-z or A-Z). -Subsequent characters can be letters, numbers or a '-'. -All other characters are replaced by a '-' during construction. -The result of this replacement is called the canonical name of -the parameter. +A property name consists of segments consisting of ASCII letters and +digits, separated by either the `-` or `_` character. The first +character of a property name must be a letter. These are the same rules as +for signal naming (see g_signal_new()). + +When creating and looking up a #GParamSpec, either separator can be +used, but they cannot be mixed. Using `-` is considerably more +efficient, and is the ‘canonical form’. Using `_` is discouraged. + Creates a new #GParamSpec instance. -A property name consists of segments consisting of ASCII letters and -digits, separated by either the '-' or '_' character. The first -character of a property name must be a letter. Names which violate these -rules lead to undefined behaviour. - -When creating and looking up a #GParamSpec, either separator can be -used, but they cannot be mixed. Using '-' is considerably more -efficient and in fact required when using property names as detail -strings for signals. +See [canonical parameter names][canonical-parameter-names] for details of +the rules for @name. Names which violate these rules lead to undefined +behaviour. Beyond the name, #GParamSpecs have two more descriptive strings associated with them, the @nick, which should be suitable for use as a label for the property in a property editor, and the @blurb, which should be a somewhat longer description, suitable for e.g. a tooltip. The @nick and @blurb should ideally be localized. + a newly allocated #GParamSpec instance @@ -5536,6 +7376,7 @@ e.g. a tooltip. The @nick and @blurb should ideally be localized. + @@ -5546,6 +7387,7 @@ e.g. a tooltip. The @nick and @blurb should ideally be localized. + @@ -5559,6 +7401,7 @@ e.g. a tooltip. The @nick and @blurb should ideally be localized. + @@ -5572,6 +7415,7 @@ e.g. a tooltip. The @nick and @blurb should ideally be localized. + @@ -5589,6 +7433,7 @@ e.g. a tooltip. The @nick and @blurb should ideally be localized. Get the short description of a #GParamSpec. + the short description of @pspec. @@ -5603,7 +7448,8 @@ e.g. a tooltip. The @nick and @blurb should ideally be localized. Gets the default value of @pspec as a pointer to a #GValue. -The #GValue will remain value for the life of @pspec. +The #GValue will remain valid for the life of @pspec. + a pointer to a #GValue which must not be modified @@ -5620,6 +7466,7 @@ The #GValue will remain value for the life of @pspec. The name is always an "interned" string (as per g_intern_string()). This allows for pointer-value comparisons. + the name of @pspec. @@ -5633,6 +7480,7 @@ This allows for pointer-value comparisons. Gets the GQuark for the name. + the GQuark for @pspec->name. @@ -5646,6 +7494,7 @@ This allows for pointer-value comparisons. Get the nickname of a #GParamSpec. + the nickname of @pspec. @@ -5659,6 +7508,7 @@ This allows for pointer-value comparisons. Gets back user data pointers stored via g_param_spec_set_qdata(). + the user data pointer set, or %NULL @@ -5682,6 +7532,7 @@ type while preserving all the properties from the parent type. Redirection is established by creating a property of type #GParamSpecOverride. See g_object_class_override_property() for an example of the use of this capability. + paramspec to which requests on this paramspec should be redirected, or %NULL if none. @@ -5696,6 +7547,7 @@ for an example of the use of this capability. Increments the reference count of @pspec. + the #GParamSpec that was passed into this function @@ -5709,6 +7561,7 @@ for an example of the use of this capability. Convenience function to ref and sink a #GParamSpec. + the #GParamSpec that was passed into this function @@ -5727,6 +7580,7 @@ g_quark_from_static_string()), and the pointer can be gotten back from the @pspec with g_param_spec_get_qdata(). Setting a previously set user data pointer, overrides (frees) the old pointer set, using %NULL as pointer essentially removes the data stored. + @@ -5751,6 +7605,7 @@ a `void (*destroy) (gpointer)` function may be specified which is called with @data as argument when the @pspec is finalized, or the data is being overwritten by a call to g_param_spec_set_qdata() with the same @quark. + @@ -5782,6 +7637,7 @@ someone calls `g_param_spec_ref (pspec); g_param_spec_sink (pspec);` in sequence on it, taking over the initial reference count (thus ending up with a @pspec that has a reference count of 1 still, but is not flagged "floating" anymore). + @@ -5797,6 +7653,7 @@ count of 1 still, but is not flagged "floating" anymore). and removes the @data from @pspec without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier. + the user data pointer set, or %NULL @@ -5814,6 +7671,7 @@ required to update user data pointers with a destroy notifier. Decrements the reference count of a @pspec. + @@ -5901,6 +7759,7 @@ required to update user data pointers with a destroy notifier. The class structure for the GParamSpec type. Normally, GParamSpec classes are filled by g_param_type_register_static(). + the parent class @@ -5911,6 +7770,7 @@ g_param_type_register_static(). + @@ -5923,6 +7783,7 @@ g_param_type_register_static(). + @@ -5938,6 +7799,7 @@ g_param_type_register_static(). + @@ -5953,6 +7815,7 @@ g_param_type_register_static(). + @@ -5970,7 +7833,7 @@ g_param_type_register_static(). - + @@ -6166,8 +8029,10 @@ properties. quickly accessed by owner and name. The implementation of the #GObject property system uses such a pool to store the #GParamSpecs of the properties all object types. + Inserts a #GParamSpec in the pool. + @@ -6189,6 +8054,7 @@ types. Gets an array of all #GParamSpecs owned by @owner_type in the pool. + a newly allocated array containing pointers to all #GParamSpecs @@ -6215,6 +8081,7 @@ the pool. Gets an #GList of all #GParamSpecs owned by @owner_type in the pool. + a #GList of all #GParamSpecs owned by @owner_type in @@ -6236,6 +8103,7 @@ the pool. Looks up a #GParamSpec in the pool. + The found #GParamSpec, or %NULL if no matching #GParamSpec was found. @@ -6263,6 +8131,7 @@ matching #GParamSpec was found. Removes a #GParamSpec from the pool. + @@ -6284,6 +8153,7 @@ If @type_prefixing is %TRUE, lookups in the newly created pool will allow to specify the owner as a colon-separated prefix of the property name, like "GtkContainer:border-width". This feature is deprecated, so you should always set @type_prefixing to %FALSE. + a newly allocated #GParamSpecPool. @@ -6336,6 +8206,7 @@ The initialized structure is passed to the g_param_type_register_static() The type system will perform a deep copy of this structure, so its memory does not need to be persistent across invocation of g_param_type_register_static(). + Size of the instance (object) structure. @@ -6346,6 +8217,7 @@ g_param_type_register_static(). + @@ -6362,6 +8234,7 @@ g_param_type_register_static(). + @@ -6374,6 +8247,7 @@ g_param_type_register_static(). + @@ -6389,6 +8263,7 @@ g_param_type_register_static(). + @@ -6404,6 +8279,7 @@ g_param_type_register_static(). + @@ -6524,7 +8400,13 @@ g_param_type_register_static(). - A #GParamSpec derived structure that contains the meta data for #GVariant properties. + A #GParamSpec derived structure that contains the meta data for #GVariant properties. + +When comparing values with g_param_values_cmp(), scalar values with the same +type will be compared with g_variant_compare(). Other non-%NULL variants will +be checked for equality with g_variant_equal(), and their sort order is +otherwise undefined. %NULL is ordered before non-%NULL variants. Two %NULL +values compare equal. private #GParamSpec portion @@ -6538,7 +8420,7 @@ g_param_type_register_static(). - + @@ -6547,6 +8429,7 @@ g_param_type_register_static(). The GParameter struct is an auxiliary structure used to hand parameter name/value pairs to g_object_newv(). This type is not introspectable. + the parameter name @@ -6558,10 +8441,12 @@ to hand parameter name/value pairs to g_object_newv(). A mask for all #GSignalFlags bits. + A mask for all #GSignalMatchType bits. + @@ -6571,6 +8456,7 @@ during a signal emission. The signal accumulator is specified at signal creation time, if it is left %NULL, no accumulation of callback return values is performed. The return value of signal emissions is then the value returned by the last callback. + The accumulator function returns whether the signal emission should be aborted. Returning %FALSE means to abort the @@ -6603,6 +8489,7 @@ allows you to tie a hook to the signal type, so that it will trap all emissions of that signal, from any object. You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag. + whether it wants to stay connected. If it returns %FALSE, the signal hook is disconnected (and destroyed). @@ -6621,7 +8508,7 @@ You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag. the instance on which the signal was emitted, followed by the parameters of the emission. - + @@ -6635,6 +8522,7 @@ You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.The signal flags are used to specify a signal's behaviour, the overall signal description outlines how especially the RUN flags control the stages of a signal emission. + Invoke the object method handler in the first emission stage. @@ -6677,6 +8565,7 @@ stages of a signal emission. The #GSignalInvocationHint structure is used to pass on additional information to callbacks during a signal emission. + The signal id of the signal invoking the callback @@ -6696,11 +8585,12 @@ to callbacks during a signal emission. The match types specify what g_signal_handlers_block_matched(), g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched() match signals by. + The signal id must be equal. - The signal detail be equal. + The signal detail must be equal. The closure must be the same. @@ -6712,12 +8602,13 @@ match signals by. The closure data must be the same. - Only unblocked signals may matched. + Only unblocked signals may be matched. A structure holding in-depth information for a specific signal. It is filled in by the g_signal_query() function. + The signal id of the signal being queried, or 0 if the signal to be queried was unknown. @@ -6751,50 +8642,527 @@ filled in by the g_signal_query() function. [param_types param_names,] gpointer data2); ]| - + + + Checks that @g_class is a class structure of the type identified by @g_type +and issues a warning if this is not the case. Returns @g_class casted +to a pointer to @c_type. %NULL is not a valid class structure. + +This macro should only be used in type implementations. + + + + Location of a #GTypeClass structure + + + The type to be returned + + + The corresponding C type of class structure of @g_type + + + + + Checks if @g_class is a class structure of the type identified by +@g_type. If @g_class is %NULL, %FALSE will be returned. + +This macro should only be used in type implementations. + + + + Location of a #GTypeClass structure + + + The type to be checked + + + + + Checks if @instance is a valid #GTypeInstance structure, +otherwise issues a warning and returns %FALSE. %NULL is not a valid +#GTypeInstance. + +This macro should only be used in type implementations. + + + + Location of a #GTypeInstance structure + + + + + Checks that @instance is an instance of the type identified by @g_type +and issues a warning if this is not the case. Returns @instance casted +to a pointer to @c_type. + +No warning will be issued if @instance is %NULL, and %NULL will be returned. + +This macro should only be used in type implementations. + + + + Location of a #GTypeInstance structure + + + The type to be returned + + + The corresponding C type of @g_type + + + + + Checks if @instance is an instance of the fundamental type identified by @g_type. +If @instance is %NULL, %FALSE will be returned. + +This macro should only be used in type implementations. + + + + Location of a #GTypeInstance structure. + + + The fundamental type to be checked + + + + + Checks if @instance is an instance of the type identified by @g_type. If +@instance is %NULL, %FALSE will be returned. + +This macro should only be used in type implementations. + + + + Location of a #GTypeInstance structure. + + + The type to be checked + + + + + Checks if @value has been initialized to hold values +of a value type. + +This macro should only be used in type implementations. + + + + a #GValue + + + + + Checks if @value has been initialized to hold values +of type @g_type. + +This macro should only be used in type implementations. + + + + a #GValue + + + The type to be checked + + + + + Gets the private class structure for a particular type. +The private structure must have been registered in the +get_type() function with g_type_add_class_private(). + +This macro should only be used in type implementations. + + + + the class of a type deriving from @private_type + + + the type identifying which private data to retrieve + + + The C type for the private structure + + + A bit in the type number that's supposed to be left untouched. + + + Get the type identifier from a given @class structure. + +This macro should only be used in type implementations. + + + + Location of a valid #GTypeClass structure + + + + + Get the type identifier from a given @instance structure. + +This macro should only be used in type implementations. + + + + Location of a valid #GTypeInstance structure + + + + + Get the type identifier from a given @interface structure. + +This macro should only be used in type implementations. + + + + Location of a valid #GTypeInterface structure + + + + + The fundamental type which is the ancestor of @type. +Fundamental types are types that serve as ultimate bases for the derived types, +thus they are the roots of distinct inheritance hierarchies. + + + + A #GType value. + + + An integer constant that represents the number of identifiers reserved for types that are assigned at compile-time. + Shift value used in converting numbers to type IDs. + + + Checks if @type has a #GTypeValueTable. + + + + A #GType value + + + + + Get the class structure of a given @instance, casted +to a specified ancestor type @g_type of the instance. + +Note that while calling a GInstanceInitFunc(), the class pointer +gets modified, so it might not always return the expected pointer. + +This macro should only be used in type implementations. + + + + Location of the #GTypeInstance structure + + + The #GType of the class to be returned + + + The C type of the class structure + + + + + Get the interface structure for interface @g_type of a given @instance. + +This macro should only be used in type implementations. + + + + Location of the #GTypeInstance structure + + + The #GType of the interface to be returned + + + The C type of the interface structure + + + + + Gets the private structure for a particular type. +The private structure must have been registered in the +class_init function with g_type_class_add_private(). + +This macro should only be used in type implementations. + Use %G_ADD_PRIVATE and the generated + `your_type_get_instance_private()` function instead + + + + the instance of a type deriving from @private_type + + + the type identifying which private data to retrieve + + + The C type for the private structure + + + + + Checks if @type is an abstract type. An abstract type cannot be +instantiated and is normally used as an abstract base class for +derived classes. + + + + A #GType value + + + + + + + + + + + + Checks if @type is a classed type. + + + + A #GType value + + + + + Checks if @type is a deep derivable type. A deep derivable type +can be used as the base class of a deep (multi-level) class hierarchy. + + + + A #GType value + + + + + Checks if @type is a derivable type. A derivable type can +be used as the base class of a flat (single-level) class hierarchy. + + + + A #GType value + + + + + Checks if @type is derived (or in object-oriented terminology: +inherited) from another type (this holds true for all non-fundamental +types). + + + + A #GType value + + + + + Checks whether @type "is a" %G_TYPE_ENUM. + + + + a #GType ID. + + + + + Checks whether @type "is a" %G_TYPE_FLAGS. + + + + a #GType ID. + + + + + Checks if @type is a fundamental type. + + + + A #GType value + + + + + Checks if @type can be instantiated. Instantiation is the +process of creating an instance (object) of this type. + + + + A #GType value + + + + + Checks if @type is an interface type. +An interface type provides a pure API, the implementation +of which is provided by another type (which is then said to conform +to the interface). GLib interfaces are somewhat analogous to Java +interfaces and C++ classes containing only pure virtual functions, +with the difference that GType interfaces are not derivable (but see +g_type_interface_add_prerequisite() for an alternative). + + + + A #GType value + + + + + Check if the passed in type id is a %G_TYPE_OBJECT or derived from it. + + + + Type id to check + + + + + Checks whether @type "is a" %G_TYPE_PARAM. + + + + a #GType ID + + + + + Checks whether the passed in type ID can be used for g_value_init(). +That is, this macro checks whether this type provides an implementation +of the #GTypeValueTable functions required for a type to create a #GValue of. + + + + A #GType value. + + + + + Checks if @type is an abstract value type. An abstract value type introduces +a value table, but can't be used for g_value_init() and is normally used as +an abstract base type for derived value types. + + + + A #GType value + + + + + Checks if @type is a value type and can be used with g_value_init(). + + + + A #GType value + + + + + Get the type ID for the fundamental type number @x. +Use g_type_fundamental_next() instead of this macro to create new fundamental +types. + + + + the fundamental type number. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE. + Last fundamental type number reserved for BSE. + First fundamental type number to create a new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib. + Last fundamental type number reserved for GLib. + First available fundamental type number to create new fundamental type id with G_TYPE_MAKE_FUNDAMENTAL(). + A callback function used for notification when the state of a toggle reference changes. See g_object_add_toggle_ref(). + @@ -6817,34 +9185,15 @@ of a toggle reference changes. See g_object_add_toggle_ref(). - A union holding one collected value. - - the field for holding integer values - - - - the field for holding long integer values - - - - the field for holding 64 bit integer values - - - - the field for holding floating point values - - - - the field for holding pointers - - + An opaque structure used as the base of all classes. + - + Registers a private structure for an instantiatable type. When an object is allocated, the private structures for @@ -6907,6 +9256,9 @@ my_object_get_some_field (MyObject *my_object) return priv->some_field; } ]| + Use the G_ADD_PRIVATE() macro with the `G_DEFINE_*` + family of macros to add instance private data to a type + @@ -6931,6 +9283,7 @@ class in order to get the private data for the type represented by You can only call this function after you have registered a private data area for @g_class using g_type_class_add_private(). + the offset, in bytes @@ -6943,6 +9296,7 @@ data area for @g_class using g_type_class_add_private(). + @@ -6964,6 +9318,7 @@ class will always exist. This function is essentially equivalent to: g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class))) + the parent class of @g_class @@ -6982,6 +9337,7 @@ g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class))) Once the last reference count of a class has been released, classes may be finalized by the type system, so further dereferencing of a class pointer after g_type_class_unref() are invalid. + @@ -6997,6 +9353,7 @@ class pointer after g_type_class_unref() are invalid. implementations. It unreferences a class without consulting the chain of #GTypeClassCacheFuncs, avoiding the recursion which would occur otherwise. + @@ -7008,6 +9365,7 @@ otherwise. + @@ -7026,6 +9384,7 @@ except that the classes reference count isn't incremented. As a consequence, this function may return %NULL if the class of the type passed in does not currently exist (hasn't been referenced before). + the #GTypeClass structure for the given type ID or %NULL if the class does not @@ -7042,6 +9401,7 @@ referenced before). A more efficient version of g_type_class_peek() which works only for static types. + the #GTypeClass structure for the given type ID or %NULL if the class does not @@ -7059,6 +9419,7 @@ static types. Increments the reference count of the class structure belonging to @type. This function will demand-create the class if it doesn't exist already. + the #GTypeClass structure for the given type ID @@ -7082,6 +9443,7 @@ g_type_class_unref_uncached() instead. The functions have to check the class id passed in to figure whether they actually want to cache the class of this type, since all classes are routed through the same #GTypeClassCacheFunc chain. + %TRUE to stop further #GTypeClassCacheFuncs from being called, %FALSE to continue @@ -7106,6 +9468,7 @@ is now deprecated. If you need to enable debugging features, use the GOBJECT_DEBUG environment variable. g_type_init() is now done automatically + Print no messages @@ -7124,6 +9487,7 @@ environment variable. Bit masks used to check or determine characteristics of a type. + Indicates an abstract type. No instances can be created for an abstract type @@ -7137,6 +9501,7 @@ environment variable. Bit masks used to check or determine specific characteristics of a fundamental type. + Indicates a classed type @@ -7153,6 +9518,7 @@ fundamental type. A structure that provides information to the type system which is used specifically for managing fundamental types. + #GTypeFundamentalFlags describing the characteristics of the fundamental type @@ -7168,6 +9534,7 @@ The initialized structure is passed to the g_type_register_static() function g_type_plugin_complete_type_info()). The type system will perform a deep copy of this structure, so its memory does not need to be persistent across invocation of g_type_register_static(). + Size of the class structure (required for interface, classed and instantiatable types) @@ -7219,10 +9586,12 @@ across invocation of g_type_register_static(). An opaque structure used as the base of all type instances. + + @@ -7238,6 +9607,7 @@ across invocation of g_type_register_static(). An opaque structure used as the base of all interface types. + @@ -7249,6 +9619,7 @@ across invocation of g_type_register_static(). of the instance type to which @g_iface belongs. This is useful when deriving the implementation of an interface from the parent type and then possibly overriding some methods. + the corresponding #GTypeInterface structure of the parent type of the @@ -7269,6 +9640,7 @@ This means that any type implementing @interface_type must also implement @prerequisite_type. Prerequisites can be thought of as an alternative to interface derivation (which GType doesn't support). An interface can have at most one instantiatable prerequisite type. + @@ -7288,6 +9660,7 @@ at most one instantiatable prerequisite type. @interface_type which has been added to @instance_type, or %NULL if @interface_type has not been added to @instance_type or does not have a #GTypePlugin structure. See g_type_add_interface_dynamic(). + the #GTypePlugin for the dynamic interface @interface_type of @instance_type @@ -7307,6 +9680,7 @@ not have a #GTypePlugin structure. See g_type_add_interface_dynamic(). Returns the #GTypeInterface structure of an interface to which the passed in class conforms. + the #GTypeInterface structure of @iface_type if implemented by @instance_class, %NULL @@ -7326,6 +9700,7 @@ passed in class conforms. Returns the prerequisites of an interfaces type. + a newly-allocated zero-terminated array of #GType containing @@ -7350,6 +9725,7 @@ passed in class conforms. A callback called after an interface vtable is initialized. See g_type_add_interface_check(). + @@ -7392,8 +9768,10 @@ implementations it contains, g_type_module_unuse() is called. loading and unloading. To create a particular module type you must derive from #GTypeModule and implement the load and unload functions in #GTypeModuleClass. + + @@ -7404,6 +9782,7 @@ in #GTypeModuleClass. + @@ -7419,12 +9798,16 @@ in the given type plugin. If the interface was already registered for the type in this plugin, nothing will be done. As long as any instances of the type exist, the type plugin will -not be unloaded. +not be unloaded. + +Since 2.56 if @module is %NULL this will call g_type_add_interface_static() +instead. This can be used when making a static build of the module. + - + a #GTypeModule @@ -7449,13 +9832,17 @@ the #GType identifier for the type is returned, otherwise the type is newly registered, and the resulting #GType identifier returned. As long as any instances of the type exist, the type plugin will -not be unloaded. +not be unloaded. + +Since 2.56 if @module is %NULL this will call g_type_register_static() +instead. This can be used when making a static build of the module. + the new or existing type ID - + a #GTypeModule @@ -7479,13 +9866,17 @@ the #GType identifier for the type is returned, otherwise the type is newly registered, and the resulting #GType identifier returned. As long as any instances of the type exist, the type plugin will -not be unloaded. +not be unloaded. + +Since 2.56 if @module is %NULL this will call g_type_register_static() +instead. This can be used when making a static build of the module. + the new or existing type ID - + a #GTypeModule @@ -7513,13 +9904,17 @@ then reloaded, and reinitialized), @module and @parent_type must be the same as they were previously. As long as any instances of the type exist, the type plugin will -not be unloaded. +not be unloaded. + +Since 2.56 if @module is %NULL this will call g_type_register_static() +instead. This can be used when making a static build of the module. + the new or existing type ID - + a #GTypeModule @@ -7543,6 +9938,7 @@ not be unloaded. Sets the name for a #GTypeModule + @@ -7563,6 +9959,7 @@ result is zero, the module will be unloaded. (However, the #GTypeModule will not be freed, and types associated with the #GTypeModule are not unregistered. Once a #GTypeModule is initialized, it must exist forever.) + @@ -7578,6 +9975,7 @@ initialized, it must exist forever.) use count was zero before, the plugin will be loaded. If loading the plugin fails, the use count is reset to its prior value. + %FALSE if the plugin needed to be loaded and loading the plugin failed. @@ -7614,12 +10012,14 @@ its prior value. In order to implement dynamic loading of types based on #GTypeModule, the @load and @unload functions in #GTypeModuleClass must be implemented. + the parent class + @@ -7632,6 +10032,7 @@ the @load and @unload functions in #GTypeModuleClass must be implemented. + @@ -7644,6 +10045,7 @@ the @load and @unload functions in #GTypeModuleClass must be implemented. + @@ -7651,6 +10053,7 @@ the @load and @unload functions in #GTypeModuleClass must be implemented. + @@ -7658,6 +10061,7 @@ the @load and @unload functions in #GTypeModuleClass must be implemented. + @@ -7665,6 +10069,7 @@ the @load and @unload functions in #GTypeModuleClass must be implemented. + @@ -7723,6 +10128,7 @@ unloading. It even handles multiple registered types per module. Calls the @complete_interface_info function from the #GTypePluginClass of @plugin. There should be no need to use this function outside of the GObject type system itself. + @@ -7750,6 +10156,7 @@ function outside of the GObject type system itself. Calls the @complete_type_info function from the #GTypePluginClass of @plugin. There should be no need to use this function outside of the GObject type system itself. + @@ -7776,6 +10183,7 @@ type system itself. Calls the @unuse_plugin function from the #GTypePluginClass of @plugin. There should be no need to use this function outside of the GObject type system itself. + @@ -7790,6 +10198,7 @@ the GObject type system itself. Calls the @use_plugin function from the #GTypePluginClass of @plugin. There should be no need to use this function outside of the GObject type system itself. + @@ -7804,6 +10213,7 @@ the GObject type system itself. The #GTypePlugin interface is used by the type system in order to handle the lifecycle of dynamically loaded types. + @@ -7830,6 +10240,7 @@ the lifecycle of dynamically loaded types. The type of the @complete_interface_info function of #GTypePluginClass. + @@ -7855,6 +10266,7 @@ the lifecycle of dynamically loaded types. The type of the @complete_type_info function of #GTypePluginClass. + @@ -7879,6 +10291,7 @@ the lifecycle of dynamically loaded types. The type of the @unuse_plugin function of #GTypePluginClass. + @@ -7892,6 +10305,7 @@ the lifecycle of dynamically loaded types. The type of the @use_plugin function of #GTypePluginClass, which gets called to increase the use count of @plugin. + @@ -7905,6 +10319,7 @@ to increase the use count of @plugin. A structure holding information for a specific type. It is filled in by the g_type_query() function. + the #GType value of the type @@ -7925,8 +10340,10 @@ It is filled in by the g_type_query() function. The #GTypeValueTable provides the functions required by the #GValue implementation, to serve as a container for values of a type. + + @@ -7939,6 +10356,7 @@ implementation, to serve as a container for values of a type. + @@ -7951,6 +10369,7 @@ implementation, to serve as a container for values of a type. + @@ -7966,6 +10385,7 @@ implementation, to serve as a container for values of a type. + @@ -7993,6 +10413,7 @@ implementation, to serve as a container for values of a type. + @@ -8020,6 +10441,7 @@ implementation, to serve as a container for values of a type. + @@ -8045,6 +10467,7 @@ implementation, to serve as a container for values of a type. Note that this function should only be used from source code that implements or has internal knowledge of the implementation of @type. + location of the #GTypeValueTable associated with @type or %NULL if there is no #GTypeValueTable associated with @type @@ -8058,21 +10481,231 @@ that implements or has internal knowledge of the implementation of - - The maximal number of #GTypeCValues which can be collected for a -single #GValue. - - + + Checks if @value holds (or contains) a value of @type. +This macro will also check for @value != %NULL and issue a +warning if the check fails. + + + + A #GValue structure. + + + A #GType value. + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_BOOLEAN. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values derived +from type %G_TYPE_BOXED. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_CHAR. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_DOUBLE. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values derived from type %G_TYPE_ENUM. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values derived from type %G_TYPE_FLAGS. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_FLOAT. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_GTYPE. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_INT. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_INT64. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_LONG. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values derived from type %G_TYPE_OBJECT. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values derived from type %G_TYPE_PARAM. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_POINTER. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_STRING. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_UCHAR. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_UINT. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_UINT64. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_ULONG. + + + + a valid #GValue structure + + + + + Checks whether the given #GValue can hold values of type %G_TYPE_VARIANT. + + + + a valid #GValue structure + + + If passed to G_VALUE_COLLECT(), allocated data won't be copied but used verbatim. This does not affect ref-counted types like objects. + + + Get the type identifier of @value. + + + + A #GValue structure. + + + + + Gets the type name of @value. + + + + A #GValue structure. + + + This is the signature of va_list marshaller functions, an optional marshaller that can be used in some situations to avoid marshalling the signal argument into GValues. + @@ -8124,16 +10757,18 @@ types. #GValue users cannot make any assumptions about how data is stored within the 2 element @data union, and the @g_type member should only be accessed through the G_VALUE_TYPE() macro. + - + Copies the value of @src_value into @dest_value. + @@ -8153,6 +10788,7 @@ only be accessed through the G_VALUE_TYPE() macro. the boxed value is duplicated and needs to be later freed with g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value), return_value); + boxed contents of @value @@ -8168,6 +10804,7 @@ return_value); Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing its reference count. If the contents of the #GValue are %NULL, then %NULL will be returned. + object content of @value, should be unreferenced when no longer needed. @@ -8183,6 +10820,7 @@ its reference count. If the contents of the #GValue are %NULL, then Get the contents of a %G_TYPE_PARAM #GValue, increasing its reference count. + #GParamSpec content of @value, should be unreferenced when no longer needed. @@ -8197,6 +10835,7 @@ reference count. Get a copy the contents of a %G_TYPE_STRING #GValue. + a newly allocated copy of the string content of @value @@ -8209,10 +10848,12 @@ reference count. - Get the contents of a variant #GValue, increasing its refcount. - - variant contents of @value, should be unrefed using - g_variant_unref() when no longer needed + Get the contents of a variant #GValue, increasing its refcount. The returned +#GVariant is never floating. + + + variant contents of @value (may be %NULL); + should be unreffed using g_variant_unref() when no longer needed @@ -8225,6 +10866,7 @@ reference count. Determines if @value will fit inside the size of a pointer value. This is an internal function introduced mainly for C marshallers. + %TRUE if @value will fit inside a pointer value. @@ -8238,6 +10880,7 @@ This is an internal function introduced mainly for C marshallers. Get the contents of a %G_TYPE_BOOLEAN #GValue. + boolean contents of @value @@ -8251,6 +10894,7 @@ This is an internal function introduced mainly for C marshallers. Get the contents of a %G_TYPE_BOXED derived #GValue. + boxed contents of @value @@ -8268,6 +10912,7 @@ type is unsigned, such as ARM and PowerPC. See g_value_get_schar(). Get the contents of a %G_TYPE_CHAR #GValue. This function's return type is broken, see g_value_get_schar() + character contents of @value @@ -8281,6 +10926,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_DOUBLE #GValue. + double contents of @value @@ -8294,6 +10940,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_ENUM #GValue. + enum contents of @value @@ -8307,6 +10954,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_FLAGS #GValue. + flags contents of @value @@ -8320,6 +10968,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_FLOAT #GValue. + float contents of @value @@ -8333,6 +10982,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_GTYPE #GValue. + the #GType stored in @value @@ -8346,6 +10996,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_INT #GValue. + integer contents of @value @@ -8359,6 +11010,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_INT64 #GValue. + 64bit integer contents of @value @@ -8372,6 +11024,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_LONG #GValue. + long integer contents of @value @@ -8385,6 +11038,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_OBJECT derived #GValue. + object contents of @value @@ -8398,6 +11052,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_PARAM #GValue. + #GParamSpec content of @value @@ -8411,6 +11066,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a pointer #GValue. + pointer contents of @value @@ -8424,6 +11080,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_CHAR #GValue. + signed 8 bit integer contents of @value @@ -8437,6 +11094,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_STRING #GValue. + string content of @value @@ -8450,6 +11108,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_UCHAR #GValue. + unsigned character contents of @value @@ -8463,6 +11122,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_UINT #GValue. + unsigned integer contents of @value @@ -8476,6 +11136,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_UINT64 #GValue. + unsigned 64bit integer contents of @value @@ -8489,6 +11150,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a %G_TYPE_ULONG #GValue. + unsigned long integer contents of @value @@ -8502,8 +11164,9 @@ Get the contents of a %G_TYPE_CHAR #GValue. Get the contents of a variant #GValue. - - variant contents of @value + + + variant contents of @value (may be %NULL) @@ -8515,6 +11178,7 @@ Get the contents of a %G_TYPE_CHAR #GValue. Initializes @value with the default value of @type. + the #GValue structure that has been passed in @@ -8538,6 +11202,7 @@ Note: The @value will be initialised with the exact type of @instance. If you wish to set the @value's type to a different GType (such as a parent class GType), you need to manually call g_value_init() and g_value_set_instance(). + @@ -8556,6 +11221,7 @@ g_value_init() and g_value_set_instance(). Returns the value contents as pointer. This function asserts that g_value_fits_pointer() returned %TRUE for the passed in value. This is an internal function introduced mainly for C marshallers. + the value contents as pointer @@ -8570,6 +11236,7 @@ This is an internal function introduced mainly for C marshallers. Clears the current value in @value and resets it to the default value (as if the value had just been initialized). + the #GValue structure that has been passed in @@ -8583,6 +11250,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean. + @@ -8599,6 +11267,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed. + @@ -8616,6 +11285,7 @@ This is an internal function introduced mainly for C marshallers. This is an internal function introduced mainly for C marshallers. Use g_value_take_boxed() instead. + @@ -8633,6 +11303,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_CHAR #GValue to @v_char. This function's input type is broken, see g_value_set_schar() + @@ -8649,6 +11320,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double. + @@ -8665,6 +11337,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_ENUM #GValue to @v_enum. + @@ -8681,6 +11354,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags. + @@ -8697,6 +11371,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_FLOAT #GValue to @v_float. + @@ -8713,6 +11388,7 @@ This is an internal function introduced mainly for C marshallers. Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype. + @@ -8730,6 +11406,7 @@ This is an internal function introduced mainly for C marshallers. Sets @value from an instantiatable type via the value_table's collect_value() function. + @@ -8746,6 +11423,7 @@ value_table's collect_value() function. Set the contents of a %G_TYPE_INT #GValue to @v_int. + @@ -8762,6 +11440,7 @@ value_table's collect_value() function. Set the contents of a %G_TYPE_INT64 #GValue to @v_int64. + @@ -8778,6 +11457,7 @@ value_table's collect_value() function. Set the contents of a %G_TYPE_LONG #GValue to @v_long. + @@ -8804,6 +11484,7 @@ need it), use g_value_take_object() instead. It is important that your #GValue holds a reference to @v_object (either its own, or one it has taken) to ensure that the object won't be destroyed while the #GValue still exists). + @@ -8821,6 +11502,7 @@ the #GValue still exists). This is an internal function introduced mainly for C marshallers. Use g_value_take_object() instead. + @@ -8837,6 +11519,7 @@ the #GValue still exists). Set the contents of a %G_TYPE_PARAM #GValue to @param. + @@ -8854,6 +11537,7 @@ the #GValue still exists). This is an internal function introduced mainly for C marshallers. Use g_value_take_param() instead. + @@ -8870,6 +11554,7 @@ the #GValue still exists). Set the contents of a pointer #GValue to @v_pointer. + @@ -8886,6 +11571,7 @@ the #GValue still exists). Set the contents of a %G_TYPE_CHAR #GValue to @v_char. + @@ -8904,6 +11590,7 @@ the #GValue still exists). Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed. The boxed value is assumed to be static, and is thus not duplicated when setting the #GValue. + @@ -8922,6 +11609,7 @@ when setting the #GValue. Set the contents of a %G_TYPE_STRING #GValue to @v_string. The string is assumed to be static, and is thus not duplicated when setting the #GValue. + @@ -8938,6 +11626,7 @@ when setting the #GValue. Set the contents of a %G_TYPE_STRING #GValue to @v_string. + @@ -8955,6 +11644,7 @@ when setting the #GValue. This is an internal function introduced mainly for C marshallers. Use g_value_take_string() instead. + @@ -8971,6 +11661,7 @@ when setting the #GValue. Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar. + @@ -8987,6 +11678,7 @@ when setting the #GValue. Set the contents of a %G_TYPE_UINT #GValue to @v_uint. + @@ -9003,6 +11695,7 @@ when setting the #GValue. Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64. + @@ -9019,6 +11712,7 @@ when setting the #GValue. Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong. + @@ -9036,6 +11730,7 @@ when setting the #GValue. Set the contents of a variant #GValue to @variant. If the variant is floating, it is consumed. + @@ -9052,8 +11747,9 @@ If the variant is floating, it is consumed. Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed -and takes over the ownership of the callers reference to @v_boxed; -the caller doesn't have to unref it any more. +and takes over the ownership of the caller’s reference to @v_boxed; +the caller doesn’t have to unref it any more. + @@ -9070,12 +11766,13 @@ the caller doesn't have to unref it any more. Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object -and takes over the ownership of the callers reference to @v_object; -the caller doesn't have to unref it any more (i.e. the reference +and takes over the ownership of the caller’s reference to @v_object; +the caller doesn’t have to unref it any more (i.e. the reference count of the object is not increased). If you want the #GValue to hold its own reference to @v_object, use g_value_set_object() instead. + @@ -9092,8 +11789,9 @@ g_value_set_object() instead. Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes -over the ownership of the callers reference to @param; the caller -doesn't have to unref it any more. +over the ownership of the caller’s reference to @param; the caller +doesn’t have to unref it any more. + @@ -9110,6 +11808,7 @@ doesn't have to unref it any more. Sets the contents of a %G_TYPE_STRING #GValue to @v_string. + @@ -9137,6 +11836,7 @@ If you want the #GValue to hold its own reference to @variant, use g_value_set_variant() instead. This is an internal function introduced mainly for C marshallers. + @@ -9159,6 +11859,7 @@ value types might incur precision lossage. Especially transformations into strings might reveal seemingly arbitrary results and shouldn't be relied upon for production code (such as rcfile value or object property serialization). + Whether a transformation rule was found and could be applied. Upon failing transformations, @dest_value is left untouched. @@ -9180,6 +11881,7 @@ as rcfile value or object property serialization). this releases all resources associated with this GValue. An unset value is the same as an uninitialized (zero-filled) #GValue structure. + @@ -9194,6 +11896,7 @@ structure. Registers a value transformation function for use in g_value_transform(). A previously registered transformation function for @src_type and @dest_type will be replaced. + @@ -9216,6 +11919,7 @@ will be replaced. Returns whether a #GValue of type @src_type can be copied into a #GValue of type @dest_type. + %TRUE if g_value_copy() is possible with @src_type and @dest_type. @@ -9236,6 +11940,7 @@ a #GValue of type @dest_type. of type @src_type into values of type @dest_type. Note that for the types to be transformable, they must be compatible or a transformation function must be registered. + %TRUE if the transformation is possible, %FALSE otherwise. @@ -9254,6 +11959,7 @@ transformation function must be registered. A #GValueArray contains an array of #GValue elements. + number of values contained in the array @@ -9270,6 +11976,7 @@ transformation function must be registered. for @n_prealloced elements. New arrays always contain 0 elements, regardless of the value of @n_prealloced. Use #GArray and g_array_sized_new() instead. + a newly allocated #GValueArray with 0 values @@ -9285,6 +11992,7 @@ regardless of the value of @n_prealloced. Insert a copy of @value as last element of @value_array. If @value is %NULL, an uninitialized value is appended. Use #GArray and g_array_append_val() instead. + the #GValueArray passed in as @value_array @@ -9304,6 +12012,7 @@ regardless of the value of @n_prealloced. Construct an exact copy of a #GValueArray by duplicating all its contents. Use #GArray and g_array_ref() instead. + Newly allocated copy of #GValueArray @@ -9315,9 +12024,10 @@ contents. - + Free a #GValueArray including its contents. Use #GArray and g_array_unref() instead. + @@ -9331,6 +12041,7 @@ contents. Return a pointer to the value at @index_ containd in @value_array. Use g_array_index() instead. + pointer to a value at @index_ in @value_array @@ -9350,6 +12061,7 @@ contents. Insert a copy of @value at specified position into @value_array. If @value is %NULL, an uninitialized value is inserted. Use #GArray and g_array_insert_val() instead. + the #GValueArray passed in as @value_array @@ -9373,6 +12085,7 @@ is %NULL, an uninitialized value is inserted. Insert a copy of @value as first element of @value_array. If @value is %NULL, an uninitialized value is prepended. Use #GArray and g_array_prepend_val() instead. + the #GValueArray passed in as @value_array @@ -9391,6 +12104,7 @@ is %NULL, an uninitialized value is inserted. Remove the value at position @index_ from @value_array. Use #GArray and g_array_remove_index() instead. + the #GValueArray passed in as @value_array @@ -9414,6 +12128,7 @@ the semantics of #GCompareFunc. The current implementation uses the same sorting algorithm as standard C qsort() function. Use #GArray and g_array_sort(). + the #GValueArray passed in as @value_array @@ -9436,6 +12151,7 @@ to the semantics of #GCompareDataFunc. The current implementation uses the same sorting algorithm as standard C qsort() function. Use #GArray and g_array_sort_with_data(). + the #GValueArray passed in as @value_array @@ -9458,7 +12174,10 @@ C qsort() function. The type of value transformation functions which can be registered with -g_value_register_transform_func(). +g_value_register_transform_func(). + +@dest_value will be initialized to the correct destination type. + @@ -9478,6 +12197,7 @@ g_value_register_transform_func(). triggered when the object is finalized. Since the object is already being finalized when the #GWeakNotify is called, there's not much you could do with the object, apart from e.g. using its address as hash-index or the like. + @@ -9513,7 +12233,9 @@ before it was disposed will continue to point to %NULL. If #GWeakRefs are taken after the object is disposed and re-referenced, they will continue to point to it until its refcount goes back to zero, at which point they too will be invalidated. + + @@ -9524,6 +12246,7 @@ After this call, the #GWeakRef is left in an undefined state. You should only call this on a #GWeakRef that previously had g_weak_ref_init() called on it. + @@ -9545,6 +12268,7 @@ its last reference at the same time in a different thread. The caller should release the resulting reference in the usual way, by using g_object_unref(). + the object pointed to by @weak_ref, or %NULL if it was empty @@ -9567,6 +12291,7 @@ This function should always be matched with a call to g_weak_ref_clear(). It is not necessary to use this function for a #GWeakRef in static storage because it will already be properly initialised. Just use g_weak_ref_set() directly. + @@ -9588,6 +12313,7 @@ properly initialised. Just use g_weak_ref_set() directly. You must own a strong reference on @object while calling this function. + @@ -9632,8 +12358,25 @@ function. + + Assert that @object is non-%NULL, then release one reference to it with +g_object_unref() and assert that it has been finalized (i.e. that there +are no more references). + +If assertions are disabled via `G_DISABLE_ASSERT`, +this macro just calls g_object_unref() without any further checks. + +This macro should only be used in regression tests. + + + + an object + + + Provide a copy of a boxed structure @src_boxed which is of type @boxed_type. + The newly created copy of the boxed structure. @@ -9652,6 +12395,7 @@ function. Free the boxed structure @boxed which is of type @boxed_type. + @@ -9670,6 +12414,7 @@ function. This function creates a new %G_TYPE_BOXED derived type id for a new boxed type with name @name. Boxed type handling functions have to be provided to copy and free opaque boxed structures of this type. + New %G_TYPE_BOXED derived type id for @name. @@ -9694,6 +12439,7 @@ provided to copy and free opaque boxed structures of this type. take two boxed pointers as arguments and return a boolean. If you have such a signal, you will probably also need to use an accumulator, such as g_signal_accumulator_true_handled(). + @@ -9730,805 +12476,737 @@ accumulator, such as g_signal_accumulator_true_handled(). - A #GClosureMarshal function for use with signals with handlers that -take a flags type as an argument and return a boolean. If you have -such a signal, you will probably also need to use an accumulator, -such as g_signal_accumulator_true_handled(). + A marshaller for a #GCClosure with a callback of type +`gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter +denotes a flags type. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + a #GValue which can store the returned #gboolean - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding instance and arg1 - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with handlers that -take a #GObject and a pointer and produce a string. It is highly -unlikely that your signal handler fits this description. + A marshaller for a #GCClosure with a callback of type +`gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + a #GValue, which can store the returned string - The length of the @param_values array. + 3 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding instance, arg1 and arg2 - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -boolean argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gboolean parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -argument which is any boxed pointer type. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GBoxed* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -character argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gchar arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gchar parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with one -double-precision floating point argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gdouble parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -argument with an enumerated type. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes an enumeration type.. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the enumeration parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -argument with a flags types. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes a flags type. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the flags parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with one -single-precision floating point argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gfloat parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gint arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gint parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with with a single -long integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, glong arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #glong parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -#GObject argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GObject* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -argument of type #GParamSpec. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GParamSpec* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single raw -pointer argument type. - -If it is possible, it is better to use one of the more specific -functions such as g_cclosure_marshal_VOID__OBJECT() or -g_cclosure_marshal_VOID__OBJECT(). + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gpointer parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single string -argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gchar* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -unsigned character argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, guchar arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #guchar parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with with a single -unsigned integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, guint arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #guint parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a unsigned int -and a pointer as arguments. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 3 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding instance, arg1 and arg2 - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with a single -unsigned long integer argument. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gulong arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #gulong parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - - A #GClosureMarshal function for use with signals with a single -#GVariant argument. + + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 2 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding the instance and the #GVariant* parameter - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller - A #GClosureMarshal function for use with signals with no arguments. + A marshaller for a #GCClosure with a callback of type +`void (*callback) (gpointer instance, gpointer user_data)`. + - A #GClosure. + the #GClosure to which the marshaller belongs - A #GValue to store the return value. May be %NULL - if the callback of closure doesn't return a value. + ignored - The length of the @param_values array. + 1 - An array of #GValues holding the arguments - on which to invoke the callback of closure. + a #GValue array holding only the instance - The invocation hint given as the last argument to - g_closure_invoke(). + the invocation hint given as the last argument + to g_closure_invoke() - Additional data specified when registering the - marshaller, see g_closure_set_marshal() and - g_closure_set_meta_marshal() + additional data specified when registering the marshaller @@ -10539,6 +13217,7 @@ unsigned long integer argument. Normally this function is not passed explicitly to g_signal_new(), but used automatically by GLib when specifying a %NULL marshaller. + @@ -10576,9 +13255,12 @@ but used automatically by GLib when specifying a %NULL marshaller. Creates a new closure which invokes @callback_func with @user_data as -the last parameter. - - a new #GCClosure +the last parameter. + +@destroy_data will be called as a finalize notifier on the #GClosure. + + + a floating reference to a new #GCClosure @@ -10602,6 +13284,7 @@ calls g_object_watch_closure() on @object and the created closure. This function is useful when you have a callback closely associated with a #GObject, and want the callback to no longer run after the object is is freed. + a new #GCClosure @@ -10623,6 +13306,7 @@ and calls g_object_watch_closure() on @object and the created closure. This function is useful when you have a callback closely associated with a #GObject, and want the callback to no longer run after the object is is freed. + a new #GCClosure @@ -10640,9 +13324,12 @@ after the object is is freed. Creates a new closure which invokes @callback_func with @user_data as -the first parameter. - - a new #GCClosure +the first parameter. + +@destroy_data will be called as a finalize notifier on the #GClosure. + + + a floating reference to a new #GCClosure @@ -10671,16 +13358,60 @@ pointer is set to %NULL. A macro is also included that allows this function to be used without pointer casts. + a pointer to a #GObject reference - + + + Disconnects a handler from @instance so it will not be called during +any future or currently ongoing emissions of the signal it has been +connected to. The @handler_id_ptr is then set to zero, which is never a valid handler ID value (see g_signal_connect()). + +If the handler ID is 0 then this function does nothing. + +A macro is also included that allows this function to be used without +pointer casts. + + + + + + + A pointer to a handler ID (of type #gulong) of the handler to be disconnected. + + + + The instance to remove the signal handler from. + + + + + + Clears a weak reference to a #GObject. + +@weak_pointer_location must not be %NULL. + +If the weak reference is %NULL then this function does nothing. +Otherwise, the weak reference to the object is removed for that location +and the pointer is set to %NULL. + +A macro is also included that allows this function to be used without +pointer casts. The function itself is static inline, so its address may vary +between compilation units. + + + + The memory address of a pointer + + + This function is meant to be called from the `complete_type_info` function of a #GTypePlugin implementation, as in the following @@ -10702,6 +13433,7 @@ my_enum_complete_type_info (GTypePlugin *plugin, g_enum_complete_type_info (type, info, values); } ]| + @@ -10724,6 +13456,7 @@ my_enum_complete_type_info (GTypePlugin *plugin, Returns the #GEnumValue for a value. + the #GEnumValue for @value, or %NULL if @value is not a member of the enumeration @@ -10742,6 +13475,7 @@ my_enum_complete_type_info (GTypePlugin *plugin, Looks up a #GEnumValue by name. + the #GEnumValue with name @name, or %NULL if the enumeration doesn't have a member @@ -10761,6 +13495,7 @@ my_enum_complete_type_info (GTypePlugin *plugin, Looks up a #GEnumValue by nickname. + the #GEnumValue with nickname @nick, or %NULL if the enumeration doesn't have a member @@ -10784,6 +13519,7 @@ my_enum_complete_type_info (GTypePlugin *plugin, It is normally more convenient to let [glib-mkenums][glib-mkenums], generate a my_enum_get_type() function from a usual C enumeration definition than to write one yourself using g_enum_register_static(). + The new type identifier. @@ -10807,6 +13543,7 @@ definition than to write one yourself using g_enum_register_static(). This is intended to be used for debugging purposes. The format of the output may change in the future. + a newly-allocated text string @@ -10826,6 +13563,7 @@ may change in the future. This function is meant to be called from the complete_type_info() function of a #GTypePlugin implementation, see the example for g_enum_complete_type_info() above. + @@ -10848,6 +13586,7 @@ g_enum_complete_type_info() above. Returns the first #GFlagsValue which is set in @value. + the first #GFlagsValue which is set in @value, or %NULL if none is set @@ -10866,6 +13605,7 @@ g_enum_complete_type_info() above. Looks up a #GFlagsValue by name. + the #GFlagsValue with name @name, or %NULL if there is no flag with that name @@ -10884,6 +13624,7 @@ g_enum_complete_type_info() above. Looks up a #GFlagsValue by nickname. + the #GFlagsValue with nickname @nick, or %NULL if there is no flag with that nickname @@ -10906,6 +13647,7 @@ g_enum_complete_type_info() above. It is normally more convenient to let [glib-mkenums][glib-mkenums] generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using g_flags_register_static(). + The new type identifier. @@ -10929,6 +13671,7 @@ sorted. Any extra bits will be shown at the end as a hexadecimal number. This is intended to be used for debugging purposes. The format of the output may change in the future. + a newly-allocated text string @@ -10945,6 +13688,7 @@ may change in the future. + @@ -10957,6 +13701,7 @@ values, and to allow for more values to be added in future without breaking API. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -10989,6 +13734,7 @@ See g_param_spec_internal() for details on property names. derived property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11018,6 +13764,7 @@ See g_param_spec_internal() for details on property names. Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property. + a newly created parameter specification @@ -11058,6 +13805,7 @@ See g_param_spec_internal() for details on property names. property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11098,6 +13846,7 @@ See g_param_spec_internal() for details on property names. property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11134,6 +13883,7 @@ See g_param_spec_internal() for details on property names. property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11169,6 +13919,7 @@ See g_param_spec_internal() for details on property names. Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11209,6 +13960,7 @@ See g_param_spec_internal() for details on property names. %G_TYPE_GTYPE property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11241,6 +13993,7 @@ See g_param_spec_internal() for details on property names. Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11280,6 +14033,7 @@ See g_param_spec_internal() for details on property names. Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11319,6 +14073,7 @@ See g_param_spec_internal() for details on property names. Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11359,6 +14114,7 @@ See g_param_spec_internal() for details on property names. derived property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11390,6 +14146,7 @@ See g_param_spec_internal() for details on property names. Creates a new property of type #GParamSpecOverride. This is used to direct operations to another paramspec, and will not be directly useful unless you are implementing a new base type similar to GObject. + the newly created #GParamSpec @@ -11410,6 +14167,7 @@ useful unless you are implementing a new base type similar to GObject. property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11443,6 +14201,7 @@ Where possible, it is better to use g_param_spec_object() or g_param_spec_boxed() to expose memory management information. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11473,6 +14232,7 @@ If @type_prefixing is %TRUE, lookups in the newly created pool will allow to specify the owner as a colon-separated prefix of the property name, like "GtkContainer:border-width". This feature is deprecated, so you should always set @type_prefixing to %FALSE. + a newly allocated #GParamSpecPool. @@ -11488,6 +14248,7 @@ deprecated, so you should always set @type_prefixing to %FALSE. Creates a new #GParamSpecString instance. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11517,6 +14278,7 @@ See g_param_spec_internal() for details on property names. Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property. + a newly created parameter specification @@ -11556,6 +14318,7 @@ See g_param_spec_internal() for details on property names. Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11596,6 +14359,7 @@ See g_param_spec_internal() for details on property names. property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11636,6 +14400,7 @@ See g_param_spec_internal() for details on property names. property. See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11677,6 +14442,7 @@ property. #GValue structures for this property can be accessed with g_value_set_uint() and g_value_get_uint(). See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11711,6 +14477,7 @@ See g_param_spec_internal() for details on property names. can be accessed with g_value_set_boxed() and g_value_get_boxed(). See g_param_spec_internal() for details on property names. + a newly created parameter specification @@ -11746,6 +14513,7 @@ property. If @default_value is floating, it is consumed. See g_param_spec_internal() for details on property names. + the newly created #GParamSpec @@ -11783,6 +14551,7 @@ See g_param_spec_internal() for details on property names. #G_TYPE_PARAM. The type system uses the information contained in the #GParamSpecTypeInfo structure pointed to by @info to manage the #GParamSpec type and its instances. + The new type identifier. @@ -11806,6 +14575,7 @@ transformed @dest_value complied to @pspec without modifications. See also g_value_type_transformable(), g_value_transform() and g_param_value_validate(). + %TRUE if transformation and validation were successful, %FALSE otherwise and @dest_value is left untouched. @@ -11833,6 +14603,7 @@ without modifications Checks whether @value contains the default value as specified in @pspec. + whether @value contains the canonical default for this @pspec @@ -11844,12 +14615,13 @@ without modifications a #GValue of correct type for @pspec - + Sets @value to its default value as specified in @pspec. + @@ -11859,7 +14631,8 @@ without modifications - a #GValue of correct type for @pspec + a #GValue of correct type for @pspec; since 2.64, you + can also pass an empty #GValue, initialized with %G_VALUE_INIT @@ -11871,6 +14644,7 @@ that integers stored in @value may not be smaller than -42 and not be greater than +42. If @value contains an integer outside of this range, it is modified accordingly, so the resulting value will fit into the range -42 .. +42. + whether modifying @value was necessary to ensure validity @@ -11890,6 +14664,7 @@ range -42 .. +42. Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1, if @value1 is found to be less than, equal to or greater than @value2, respectively. + -1, 0 or +1, for a less than, equal to or greater than result @@ -11912,6 +14687,7 @@ respectively. Creates a new %G_TYPE_POINTER derived type id for a new pointer type with name @name. + a new %G_TYPE_POINTER derived type id for @name. @@ -11923,6 +14699,79 @@ pointer type with name @name. + + Updates a #GObject pointer to refer to @new_object. It increments the +reference count of @new_object (if non-%NULL), decrements the reference +count of the current value of @object_ptr (if non-%NULL), and assigns +@new_object to @object_ptr. The assignment is not atomic. + +@object_ptr must not be %NULL. + +A macro is also included that allows this function to be used without +pointer casts. The function itself is static inline, so its address may vary +between compilation units. + +One convenient usage of this function is in implementing property setters: +|[ + void + foo_set_bar (Foo *foo, + Bar *new_bar) + { + g_return_if_fail (IS_FOO (foo)); + g_return_if_fail (new_bar == NULL || IS_BAR (new_bar)); + + if (g_set_object (&foo->bar, new_bar)) + g_object_notify (foo, "bar"); + } +]| + + + + a pointer to a #GObject reference + + + a pointer to the new #GObject to + assign to it, or %NULL to clear the pointer + + + + + Updates a pointer to weakly refer to @new_object. It assigns @new_object +to @weak_pointer_location and ensures that @weak_pointer_location will +automaticaly be set to %NULL if @new_object gets destroyed. The assignment +is not atomic. The weak reference is not thread-safe, see +g_object_add_weak_pointer() for details. + +@weak_pointer_location must not be %NULL. + +A macro is also included that allows this function to be used without +pointer casts. The function itself is static inline, so its address may vary +between compilation units. + +One convenient usage of this function is in implementing property setters: +|[ + void + foo_set_bar (Foo *foo, + Bar *new_bar) + { + g_return_if_fail (IS_FOO (foo)); + g_return_if_fail (new_bar == NULL || IS_BAR (new_bar)); + + if (g_set_weak_pointer (&foo->bar, new_bar)) + g_object_notify (foo, "bar"); + } +]| + + + + the memory address of a pointer + + + a pointer to the new #GObject to + assign to it, or %NULL to clear the pointer + + + A predefined #GSignalAccumulator for signals intended to be used as a hook for application code to provide a particular value. Usually @@ -11934,6 +14783,7 @@ usually want the signal connection to override the class handler). This accumulator will use the return value from the first signal handler that is run as the return value for the signal and not run any further handlers (ie: the first handler "wins"). + standard #GSignalAccumulator result @@ -11965,6 +14815,7 @@ callbacks will be invoked, while a return of %FALSE allows the emission to continue. The idea here is that a %TRUE return indicates that the callback handled the signal, and no further handling is needed. + standard #GSignalAccumulator result @@ -11992,6 +14843,7 @@ handling is needed. Adds an emission hook for a signal, which will get called for any emission of that signal, independent of the instance. This is possible only for signals which don't have #G_SIGNAL_NO_HOOKS flag set. + the hook id, for later use with g_signal_remove_emission_hook(). @@ -12024,6 +14876,7 @@ for signals which don't have #G_SIGNAL_NO_HOOKS flag set. be called from an overridden class closure; see g_signal_override_class_closure() and g_signal_override_class_handler(). + @@ -12032,7 +14885,7 @@ g_signal_override_class_handler(). the argument list of the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal. - + @@ -12047,6 +14900,7 @@ g_signal_override_class_handler(). only be called from an overridden class closure; see g_signal_override_class_closure() and g_signal_override_class_handler(). + @@ -12064,8 +14918,52 @@ g_signal_override_class_handler(). + + Connects a #GCallback function to a signal for a particular object. + +The handler will be called before the default handler of the signal. + +See [memory management of signal handlers][signal-memory-management] for +details on how to handle the return value and memory management of @data. + + + + the instance to connect to. + + + a string of the form "signal-name::detail". + + + the #GCallback to connect. + + + data to pass to @c_handler calls. + + + + + Connects a #GCallback function to a signal for a particular object. + +The handler will be called after the default handler of the signal. + + + + the instance to connect to. + + + a string of the form "signal-name::detail". + + + the #GCallback to connect. + + + data to pass to @c_handler calls. + + + Connects a closure to a signal for a particular object. + the handler ID (always greater than 0 for successful connections) @@ -12092,6 +14990,7 @@ g_signal_override_class_handler(). Connects a closure to a signal for a particular object. + the handler ID (always greater than 0 for successful connections) @@ -12126,6 +15025,7 @@ to g_signal_connect(), but allows to provide a #GClosureNotify for the data which will be called when the signal handler is disconnected and no longer used. Specify @connect_flags if you need `..._after()` or `..._swapped()` variants of this function. + the handler ID (always greater than 0 for successful connections) @@ -12166,6 +15066,7 @@ When the @gobject is destroyed the signal handler will be automatically disconnected. Note that this is not currently threadsafe (ie: emitting a signal while @gobject is being destroyed in another thread is not safe). + the handler id. @@ -12194,11 +15095,55 @@ is not safe). + + Connects a #GCallback function to a signal for a particular object. + +The instance on which the signal is emitted and @data will be swapped when +calling the handler. This is useful when calling pre-existing functions to +operate purely on the @data, rather than the @instance: swapping the +parameters avoids the need to write a wrapper function. + +For example, this allows the shorter code: +|[<!-- language="C" --> +g_signal_connect_swapped (button, "clicked", + (GCallback) gtk_widget_hide, other_widget); +]| + +Rather than the cumbersome: +|[<!-- language="C" --> +static void +button_clicked_cb (GtkButton *button, GtkWidget *other_widget) +{ + gtk_widget_hide (other_widget); +} + +... + +g_signal_connect (button, "clicked", + (GCallback) button_clicked_cb, other_widget); +]| + + + + the instance to connect to. + + + a string of the form "signal-name::detail". + + + the #GCallback to connect. + + + data to pass to @c_handler calls. + + + Emits a signal. Note that g_signal_emit() resets the return value to the default if no handlers are connected, in contrast to g_signal_emitv(). + @@ -12228,6 +15173,7 @@ if no handlers are connected, in contrast to g_signal_emitv(). Note that g_signal_emit_by_name() resets the return value to the default if no handlers are connected, in contrast to g_signal_emitv(). + @@ -12253,6 +15199,7 @@ if no handlers are connected, in contrast to g_signal_emitv(). Note that g_signal_emit_valist() resets the return value to the default if no handlers are connected, in contrast to g_signal_emitv(). + @@ -12283,6 +15230,7 @@ if no handlers are connected, in contrast to g_signal_emitv(). Note that g_signal_emitv() doesn't change @return_value if no handlers are connected, in contrast to g_signal_emit() and g_signal_emit_valist(). + @@ -12291,7 +15239,7 @@ connected, in contrast to g_signal_emit() and g_signal_emit_valist(). argument list for the signal emission. The first element in the array is a #GValue for the instance the signal is being emitted on. The rest are any arguments to be passed to the signal. - + @@ -12303,7 +15251,7 @@ connected, in contrast to g_signal_emit() and g_signal_emit_valist(). the detail - + Location to store the return value of the signal emission. This must be provided if the specified signal returns a value, but may be ignored otherwise. @@ -12313,6 +15261,7 @@ specified signal returns a value, but may be ignored otherwise. Returns the invocation hint of the innermost signal emission of instance. + the invocation hint of the innermost signal emission. @@ -12333,6 +15282,7 @@ blocked before to become active again. The @handler_id has to be a valid signal handler id, connected to a signal of @instance. + @@ -12354,6 +15304,7 @@ connected to. The @handler_id becomes invalid and may be reused. The @handler_id has to be a valid signal handler id, connected to a signal of @instance. + @@ -12374,6 +15325,7 @@ The criteria mask is passed as an OR-ed combination of #GSignalMatchType flags, and the criteria values are passed as arguments. The match @mask has to be non-0 for successful matches. If no handler was found, 0 is returned. + A valid non-0 signal handler id for a successful match. @@ -12412,6 +15364,7 @@ If no handler was found, 0 is returned. Returns whether @handler_id is the ID of a handler connected to @instance. + whether @handler_id identifies a handler connected to @instance. @@ -12441,6 +15394,7 @@ proceeded yet). The @handler_id has to be a valid id of a signal handler that is connected to a signal of @instance and is currently blocked. + @@ -12455,6 +15409,21 @@ connected to a signal of @instance and is currently blocked. + + Blocks all handlers on an instance that match @func and @data. + + + + The instance to block handlers from. + + + The C closure callback of the handlers (useless for non-C closures). + + + The closure data of the handlers' closures. + + + Blocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of #GSignalMatchType @@ -12463,6 +15432,7 @@ Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of blocked handlers otherwise. + The number of handlers that matched. @@ -12503,6 +15473,7 @@ otherwise. Destroy all signal handlers of a type instance. This function is an implementation detail of the #GObject dispose implementation, and should not be used outside of the type system. + @@ -12513,6 +15484,33 @@ and should not be used outside of the type system. + + Disconnects all handlers on an instance that match @data. + + + + The instance to remove handlers from + + + the closure data of the handlers' closures + + + + + Disconnects all handlers on an instance that match @func and @data. + + + + The instance to remove handlers from. + + + The C closure callback of the handlers (useless for non-C closures). + + + The closure data of the handlers' closures. + + + Disconnects all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed @@ -12522,6 +15520,7 @@ passed as arguments. Passing at least one of the %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of disconnected handlers otherwise. + The number of handlers that matched. @@ -12558,6 +15557,21 @@ disconnected handlers otherwise. + + Unblocks all handlers on an instance that match @func and @data. + + + + The instance to unblock handlers from. + + + The C closure callback of the handlers (useless for non-C closures). + + + The closure data of the handlers' closures. + + + Unblocks all handlers on an instance that match a certain selection criteria. The criteria mask is passed as an OR-ed combination of @@ -12567,6 +15581,7 @@ or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. If no handlers were found, 0 is returned, the number of unblocked handlers otherwise. The match criteria should not apply to any handlers that are not currently blocked. + The number of handlers that matched. @@ -12620,6 +15635,7 @@ One example of when you might use this is when the arguments to the signal are difficult to compute. A class implementor may opt to not emit the signal if no one is attached anyway, thus saving the cost of building the arguments. + %TRUE if a handler is connected to the signal, %FALSE otherwise. @@ -12648,6 +15664,7 @@ of building the arguments. Lists the signals by id that a certain instance or interface type created. Further information about the signals can be acquired through g_signal_query(). + Newly allocated array of signal IDs. @@ -12672,7 +15689,12 @@ somewhat faster than using the name each time. Also tries the ancestors of the given type. +The type class passed as @itype must already have been instantiated (for +example, using g_type_class_ref()) for this function to work, as signals are +always installed during class initialization. + See g_signal_new() for details on allowed signal names. + the signal's identifying number, or 0 if no signal was found. @@ -12692,6 +15714,7 @@ See g_signal_new() for details on allowed signal names. Given the signal's identifier, finds its name. Two different signals may have the same name, if they have differing types. + the signal name, or %NULL if the signal number was invalid. @@ -12707,19 +15730,28 @@ Two different signals may have the same name, if they have differing types.Creates a new signal. (This is usually done in the class initializer.) A signal name consists of segments consisting of ASCII letters and -digits, separated by either the '-' or '_' character. The first +digits, separated by either the `-` or `_` character. The first character of a signal name must be a letter. Names which violate these -rules lead to undefined behaviour of the GSignal system. +rules lead to undefined behaviour. These are the same rules as for property +naming (see g_param_spec_internal()). When registering a signal and looking up a signal, either separator can -be used, but they cannot be mixed. +be used, but they cannot be mixed. Using `-` is considerably more efficient. +Using `_` is discouraged. If 0 is used for @class_offset subclasses cannot override the class handler in their class_init method by doing super_class->signal_handler = my_signal_handler. Instead they will have to use g_signal_override_class_handler(). -If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as -the marshaller for this signal. +If @c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as +the marshaller for this signal. In some simple cases, g_signal_new() +will use a more optimized c_marshaller and va_marshaller for the signal +instead of g_cclosure_marshal_generic(). + +If @c_marshaller is non-%NULL, you need to also specify a va_marshaller +using g_signal_set_va_marshaller() or the generic va_marshaller will +be used. + the signal id @@ -12778,7 +15810,7 @@ the marshaller for this signal. Creates a new signal. (This is usually done in the class initializer.) This is a variant of g_signal_new() that takes a C callback instead -off a class offset for the signal's class handler. This function +of a class offset for the signal's class handler. This function doesn't need a function pointer exposed in the class structure of an object definition, instead the function pointer is passed directly and can be overriden by derived classes with @@ -12791,6 +15823,7 @@ See g_signal_new() for information about signal names. If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as the marshaller for this signal. + the signal id @@ -12852,6 +15885,7 @@ See g_signal_new() for details on allowed signal names. If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as the marshaller for this signal. + the signal id @@ -12911,6 +15945,7 @@ See g_signal_new() for details on allowed signal names. If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as the marshaller for this signal. + the signal id @@ -12976,6 +16011,7 @@ from the type to which the signal belongs. See g_signal_chain_from_overridden() and g_signal_chain_from_overridden_handler() for how to chain up to the parent class closure from inside the overridden one. + @@ -13004,6 +16040,7 @@ type to which the signal belongs. See g_signal_chain_from_overridden() and g_signal_chain_from_overridden_handler() for how to chain up to the parent class closure from inside the overridden one. + @@ -13026,6 +16063,7 @@ parent class closure from inside the overridden one. Internal function to parse a signal name into its @signal_id and @detail quark. + Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values. @@ -13060,6 +16098,7 @@ structure to hold signal-specific information. If an invalid signal id is passed in, the @signal_id member of the #GSignalQuery is 0. All members filled into the #GSignalQuery structure should be considered constant and have to be left untouched. + @@ -13077,6 +16116,7 @@ be considered constant and have to be left untouched. Deletes an emission hook. + @@ -13097,6 +16137,7 @@ be considered constant and have to be left untouched. specialised form of the marshaller that can often be used for the common case of a single connected signal handler and avoids the overhead of #GValue. Its use is optional. + @@ -13123,6 +16164,7 @@ This will prevent the default method from running, if the signal was flag). Prints a warning if used on a signal which isn't being emitted. + @@ -13146,6 +16188,7 @@ Prints a warning if used on a signal which isn't being emitted. This is just like g_signal_stop_emission() except it will look up the signal id for you. + @@ -13164,8 +16207,9 @@ signal id for you. Creates a new closure which invokes the function found at the offset @struct_offset in the class structure of the interface or classed type identified by @itype. - - a new #GCClosure + + + a floating reference to a new #GCClosure @@ -13186,6 +16230,7 @@ identified by @itype. If the source is not one of the standard GLib types, the @closure_callback and @closure_marshal fields of the #GSourceFuncs structure must have been filled in with pointers to appropriate functions. + @@ -13211,6 +16256,7 @@ If the source is not one of the standard GLib types, the @closure_callback and @closure_marshal fields of the #GSourceFuncs structure must have been filled in with pointers to appropriate functions. + @@ -13226,6 +16272,7 @@ functions. #GValue. The main purpose of this function is to describe #GValue contents for debugging output, the way in which the contents are described may change between different GLib versions. + Newly allocated string. @@ -13245,6 +16292,7 @@ until one of them returns %TRUE. The functions have to check the class id passed in to figure whether they actually want to cache the class of this type, since all classes are routed through the same #GTypeClassCacheFunc chain. + @@ -13270,12 +16318,13 @@ This function should be called in the type's get_type() function after the type is registered. The private structure can be retrieved using the G_TYPE_CLASS_GET_PRIVATE() macro. + - GType of an classed type + GType of a classed type @@ -13285,6 +16334,7 @@ G_TYPE_CLASS_GET_PRIVATE() macro. + @@ -13307,6 +16357,7 @@ that depends on the interfaces of a class. For instance, the implementation of #GObject uses this facility to check that an object implements all of the properties that are defined on its interfaces. + @@ -13323,9 +16374,10 @@ interfaces. - Adds the dynamic @interface_type to @instantiable_type. The information + Adds @interface_type to the dynamic @instantiable_type. The information contained in the #GTypePlugin structure pointed to by @plugin is used to manage the relationship. + @@ -13345,9 +16397,10 @@ is used to manage the relationship. - Adds the static @interface_type to @instantiable_type. + Adds @interface_type to the static @instantiable_type. The information contained in the #GInterfaceInfo structure pointed to by @info is used to manage the relationship. + @@ -13368,6 +16421,7 @@ pointed to by @info is used to manage the relationship. + @@ -13381,6 +16435,7 @@ pointed to by @info is used to manage the relationship. + @@ -13396,6 +16451,7 @@ pointed to by @info is used to manage the relationship. Private helper function to aid implementation of the G_TYPE_CHECK_INSTANCE() macro. + %TRUE if @instance is valid, %FALSE otherwise @@ -13408,6 +16464,7 @@ G_TYPE_CHECK_INSTANCE() macro. + @@ -13421,6 +16478,7 @@ G_TYPE_CHECK_INSTANCE() macro. + @@ -13434,6 +16492,7 @@ G_TYPE_CHECK_INSTANCE() macro. + @@ -13447,6 +16506,7 @@ G_TYPE_CHECK_INSTANCE() macro. + @@ -13457,22 +16517,24 @@ G_TYPE_CHECK_INSTANCE() macro. + - + + - + @@ -13482,6 +16544,7 @@ G_TYPE_CHECK_INSTANCE() macro. Return a newly allocated and 0-terminated array of type IDs, listing the child types of @type. + Newly allocated and 0-terminated array of child types, free with g_free() @@ -13502,6 +16565,7 @@ the child types of @type. + @@ -13520,6 +16584,7 @@ except that the classes reference count isn't incremented. As a consequence, this function may return %NULL if the class of the type passed in does not currently exist (hasn't been referenced before). + the #GTypeClass structure for the given type ID or %NULL if the class does not @@ -13536,6 +16601,7 @@ referenced before). A more efficient version of g_type_class_peek() which works only for static types. + the #GTypeClass structure for the given type ID or %NULL if the class does not @@ -13553,6 +16619,7 @@ static types. Increments the reference count of the class structure belonging to @type. This function will demand-create the class if it doesn't exist already. + the #GTypeClass structure for the given type ID @@ -13582,6 +16649,7 @@ with zeros. Note: Do not use this function, unless you're implementing a fundamental type. Also language bindings should not use this function, but g_object_new() instead. + an allocated and initialized instance, subject to further treatment by the fundamental type implementation @@ -13597,6 +16665,7 @@ function, but g_object_new() instead. If the interface type @g_type is currently in use, returns its default interface vtable. + the default vtable for the interface, or %NULL if the type is not currently @@ -13621,6 +16690,7 @@ the type (the @base_init and @class_init members of #GTypeInfo). Calling g_type_default_interface_ref() is useful when you want to make sure that signals and properties for an interface have been installed. + the default vtable for the interface; call g_type_default_interface_unref() @@ -13640,13 +16710,14 @@ interface default vtable @g_iface. If the type is dynamic, then when no one is using the interface and all references have been released, the finalize function for the interface's default vtable (the @class_finalize member of #GTypeInfo) will be called. + the default vtable - structure for a interface, as returned by g_type_default_interface_ref() + structure for an interface, as returned by g_type_default_interface_ref() @@ -13654,6 +16725,7 @@ vtable (the @class_finalize member of #GTypeInfo) will be called. Returns the length of the ancestry of the passed in type. This includes the type itself, so that e.g. a fundamental type has depth 1. + the depth of @type @@ -13678,6 +16750,7 @@ which _get_type() methods do on the first call). As a result, if you write a bare call to a _get_type() macro, it may get optimized out by the compiler. Using g_type_ensure() guarantees that the type's _get_type() method is called. + @@ -13694,6 +16767,7 @@ the type, if there is one. Like g_type_create_instance(), this function is reserved for implementors of fundamental types. + @@ -13705,17 +16779,18 @@ implementors of fundamental types. - Lookup the type ID from a given type name, returning 0 if no type + Look up the type ID from a given type name, returning 0 if no type has been registered under this name (this is the preferred method to find out by name whether a specific type has been registered yet). + corresponding type ID or 0 - type name to lookup + type name to look up @@ -13723,6 +16798,7 @@ yet). Internal function, used to extract the fundamental type ID portion. Use G_TYPE_FUNDAMENTAL() instead. + fundamental type ID @@ -13739,6 +16815,7 @@ Use G_TYPE_FUNDAMENTAL() instead. register a new fundamental type with g_type_register_fundamental(). The returned type ID represents the highest currently registered fundamental type identifier. + the next available fundamental type ID to be registered, or 0 if the type system ran out of fundamental type IDs @@ -13750,6 +16827,7 @@ fundamental type identifier. this is only available if GLib is built with debugging support and the instance_count debug flag is set (by setting the GOBJECT_DEBUG variable to include instance-count). + the number of instances allocated of the given type; if instance counts are not available, returns 0. @@ -13764,6 +16842,7 @@ variable to include instance-count). Returns the #GTypePlugin structure for @type. + the corresponding plugin if @type is a dynamic type, %NULL otherwise @@ -13783,6 +16862,7 @@ with g_type_set_qdata(). Note that this does not take subtyping into account; data attached to one type with g_type_set_qdata() cannot be retrieved from a subtype using g_type_get_qdata(). + the data, or %NULL if no data was found @@ -13804,6 +16884,7 @@ of registered types. Any time a type is registered this serial changes, which means you can cache information based on type lookups (such as g_type_from_name()) and know if the cache is still valid at a later time by comparing the current serial with the one at the type lookup. + An unsigned int, representing the state of type registrations @@ -13814,6 +16895,7 @@ time by comparing the current serial with the one at the type lookup. the type system is initialised automatically and this function does nothing. the type system is now initialised automatically + @@ -13826,6 +16908,7 @@ and this function does nothing. If you need to enable debugging features, use the GOBJECT_DEBUG environment variable. the type system is now initialised automatically + @@ -13843,6 +16926,7 @@ This means that any type implementing @interface_type must also implement @prerequisite_type. Prerequisites can be thought of as an alternative to interface derivation (which GType doesn't support). An interface can have at most one instantiatable prerequisite type. + @@ -13862,6 +16946,7 @@ at most one instantiatable prerequisite type. @interface_type which has been added to @instance_type, or %NULL if @interface_type has not been added to @instance_type or does not have a #GTypePlugin structure. See g_type_add_interface_dynamic(). + the #GTypePlugin for the dynamic interface @interface_type of @instance_type @@ -13881,6 +16966,7 @@ not have a #GTypePlugin structure. See g_type_add_interface_dynamic(). Returns the #GTypeInterface structure of an interface to which the passed in class conforms. + the #GTypeInterface structure of @iface_type if implemented by @instance_class, %NULL @@ -13900,6 +16986,7 @@ passed in class conforms. Returns the prerequisites of an interfaces type. + a newly-allocated zero-terminated array of #GType containing @@ -13923,6 +17010,7 @@ passed in class conforms. Return a newly allocated and 0-terminated array of type IDs, listing the interface types that @type conforms to. + Newly allocated and 0-terminated array of interface types, free with g_free() @@ -13946,6 +17034,7 @@ the interface types that @type conforms to. If @is_a_type is a derivable type, check whether @type is a descendant of @is_a_type. If @is_a_type is an interface, check whether @type conforms to it. + %TRUE if @type is a @is_a_type @@ -13968,6 +17057,7 @@ function (like all other GType API) cannot cope with invalid type IDs. %G_TYPE_INVALID may be passed to this function, as may be any other validly registered type ID, but randomized type IDs should not be passed in and will most likely lead to a crash. + static type name or %NULL @@ -13980,6 +17070,7 @@ not be passed in and will most likely lead to a crash. + @@ -13990,6 +17081,7 @@ not be passed in and will most likely lead to a crash. + @@ -14007,6 +17099,7 @@ derived directly from @root_type which is also a base class of @leaf_type. Given a root type and a leaf type, this function can be used to determine the types and order in which the leaf type is descended from the root type. + immediate child of @root_type and anchestor of @leaf_type @@ -14025,6 +17118,7 @@ descended from the root type. Return the direct parent type of the passed in type. If the passed in type has no parent, i.e. is a fundamental type, 0 is returned. + the parent type @@ -14038,6 +17132,7 @@ in type has no parent, i.e. is a fundamental type, 0 is returned. Get the corresponding quark of the type IDs name. + the type names quark or 0 @@ -14056,6 +17151,7 @@ type-specific information. If an invalid #GType is passed in, the @type member of the #GTypeQuery is 0. All members filled into the #GTypeQuery structure should be considered constant and have to be left untouched. + @@ -14077,6 +17173,7 @@ left untouched. #GTypePlugin structure pointed to by @plugin to manage the type and its instances (if not abstract). The value of @flags determines the nature (e.g. abstract or not) of the type. + the new type identifier or #G_TYPE_INVALID if registration failed @@ -14108,6 +17205,7 @@ The type system uses the information contained in the #GTypeInfo structure pointed to by @info and the #GTypeFundamentalInfo structure pointed to by @finfo to manage the type and its instances. The value of @flags determines additional characteristics of the fundamental type. + the predefined type identifier @@ -14141,6 +17239,7 @@ additional characteristics of the fundamental type. #GTypeInfo structure pointed to by @info to manage the type and its instances (if not abstract). The value of @flags determines the nature (e.g. abstract or not) of the type. + the new type identifier @@ -14169,6 +17268,7 @@ instances (if not abstract). The value of @flags determines the nature @parent_type. The value of @flags determines the nature (e.g. abstract or not) of the type. It works by filling a #GTypeInfo struct and calling g_type_register_static(). + the new type identifier @@ -14208,6 +17308,7 @@ struct and calling g_type_register_static(). Removes a previously installed #GTypeClassCacheFunc. The cache maintained by @cache_func has to be empty when calling g_type_remove_class_cache_func() to avoid leaks. + @@ -14225,6 +17326,7 @@ g_type_remove_class_cache_func() to avoid leaks. Removes an interface check function added with g_type_add_interface_check(). + @@ -14241,6 +17343,7 @@ g_type_add_interface_check(). Attaches arbitrary data to a type. + @@ -14260,6 +17363,7 @@ g_type_add_interface_check(). + @@ -14278,6 +17382,7 @@ g_type_add_interface_check(). Note that this function should only be used from source code that implements or has internal knowledge of the implementation of @type. + location of the #GTypeValueTable associated with @type or %NULL if there is no #GTypeValueTable associated with @type @@ -14294,6 +17399,7 @@ that implements or has internal knowledge of the implementation of Registers a value transformation function for use in g_value_transform(). A previously registered transformation function for @src_type and @dest_type will be replaced. + @@ -14316,6 +17422,7 @@ will be replaced. Returns whether a #GValue of type @src_type can be copied into a #GValue of type @dest_type. + %TRUE if g_value_copy() is possible with @src_type and @dest_type. @@ -14336,6 +17443,7 @@ a #GValue of type @dest_type. of type @src_type into values of type @dest_type. Note that for the types to be transformable, they must be compatible or a transformation function must be registered. + %TRUE if the transformation is possible, %FALSE otherwise. diff --git a/gir-files/Gio-2.0.gir b/gir-files/Gio-2.0.gir index b5da9c786..81002126f 100644 --- a/gir-files/Gio-2.0.gir +++ b/gir-files/Gio-2.0.gir @@ -18,6 +18,160 @@ and/or use gtk-doc annotations. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GAction represents a single named action. @@ -48,6 +202,7 @@ safety and for the state being enabled. Probably the only useful thing to do with a #GAction is to put it inside of a #GSimpleActionGroup. + Checks if @action_name is valid. @@ -56,13 +211,14 @@ plus '-' and '.'. The empty string is not a valid action name. It is an error to call this function with a non-utf8 @action_name. @action_name must not be %NULL. + %TRUE if @action_name is valid - an potential action name + a potential action name @@ -92,6 +248,7 @@ two sets of parens, for example: "app.action((1,2,3))". A string target can be specified this way as well: "app.action('target')". For strings, this third format must be used if * target value is empty or contains characters other than alphanumerics, '-' and '.'. + %TRUE if successful, else %FALSE with @error set @@ -122,6 +279,7 @@ and @target_value by that function. See that function for the types of strings that will be printed by this function. + a detailed format string @@ -145,6 +303,7 @@ the parameter type given at construction time). If the parameter type was %NULL then @parameter must also be %NULL. If the @parameter GVariant is floating, it is consumed. + @@ -170,6 +329,7 @@ its state or may change its state to something other than @value. See g_action_get_state_hint(). If the @value GVariant is floating, it is consumed. + @@ -189,6 +349,7 @@ If the @value GVariant is floating, it is consumed. An action must be enabled in order to be activated or in order to have its state changed from outside callers. + whether the action is enabled @@ -202,6 +363,7 @@ have its state changed from outside callers. Queries the name of @action. + the name of the action @@ -222,6 +384,7 @@ given to that function must be of the type returned by this function. In the case that this function returns %NULL, you must not give any #GVariant, but %NULL instead. + the parameter type @@ -242,6 +405,7 @@ given by g_action_get_state_type(). The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the current state of the action @@ -272,6 +436,7 @@ within the range may fail. The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the state range hint @@ -296,6 +461,7 @@ given as the state. All calls to g_action_change_state() must give a If the action is not stateful (e.g. created with g_simple_action_new()) then this function will return %NULL. In that case, g_action_get_state() will return %NULL and you must not call g_action_change_state(). + the state type, if the action is stateful @@ -315,6 +481,7 @@ the parameter type given at construction time). If the parameter type was %NULL then @parameter must also be %NULL. If the @parameter GVariant is floating, it is consumed. + @@ -340,6 +507,7 @@ its state or may change its state to something other than @value. See g_action_get_state_hint(). If the @value GVariant is floating, it is consumed. + @@ -359,6 +527,7 @@ If the @value GVariant is floating, it is consumed. An action must be enabled in order to be activated or in order to have its state changed from outside callers. + whether the action is enabled @@ -372,6 +541,7 @@ have its state changed from outside callers. Queries the name of @action. + the name of the action @@ -392,6 +562,7 @@ given to that function must be of the type returned by this function. In the case that this function returns %NULL, you must not give any #GVariant, but %NULL instead. + the parameter type @@ -412,6 +583,7 @@ given by g_action_get_state_type(). The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the current state of the action @@ -442,6 +614,7 @@ within the range may fail. The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the state range hint @@ -466,6 +639,7 @@ given as the state. All calls to g_action_change_state() must give a If the action is not stateful (e.g. created with g_simple_action_new()) then this function will return %NULL. In that case, g_action_get_state() will return %NULL and you must not call g_action_change_state(). + the state type, if the action is stateful @@ -516,12 +690,14 @@ after @name are optional. Additional optional fields may be added in the future. See g_action_map_add_action_entries() for an example. + the name of the action + @@ -554,6 +730,7 @@ See g_action_map_add_action_entries() for an example. + @@ -571,7 +748,7 @@ See g_action_map_add_action_entries() for an example. - + @@ -622,10 +799,12 @@ the virtual functions g_action_group_list_actions() and g_action_group_query_action(). The other virtual functions should not be implemented - their "wrappers" are actually implemented with calls to g_action_group_query_action(). + Emits the #GActionGroup::action-added signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -644,6 +823,7 @@ This function should only be called by #GActionGroup implementations. Emits the #GActionGroup::action-enabled-changed signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -666,6 +846,7 @@ This function should only be called by #GActionGroup implementations. Emits the #GActionGroup::action-removed signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -684,6 +865,7 @@ This function should only be called by #GActionGroup implementations. Emits the #GActionGroup::action-state-changed signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -709,6 +891,7 @@ If the action is expecting a parameter, then the correct type of parameter must be given as @parameter. If the action is expecting no parameters then @parameter must be %NULL. See g_action_group_get_action_parameter_type(). + @@ -739,6 +922,7 @@ its state or may change its state to something other than @value. See g_action_group_get_action_state_hint(). If the @value GVariant is floating, it is consumed. + @@ -762,6 +946,7 @@ If the @value GVariant is floating, it is consumed. An action must be enabled in order to be activated or in order to have its state changed from outside callers. + whether or not the action is currently enabled @@ -791,6 +976,7 @@ In the case that this function returns %NULL, you must not give any The parameter type of a particular action will never change but it is possible for an action to be removed and for a new action to be added with the same name but a different parameter type. + the parameter type @@ -815,6 +1001,7 @@ given by g_action_group_get_action_state_type(). The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the current state of the action @@ -849,6 +1036,7 @@ within the range may fail. The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the state range hint @@ -881,6 +1069,7 @@ and you must not call g_action_group_change_action_state(). The state type of a particular action will never change but it is possible for an action to be removed and for a new action to be added with the same name but a different state type. + the state type, if the action is stateful @@ -898,6 +1087,7 @@ with the same name but a different state type. Checks if the named action exists within @action_group. + whether the named action exists @@ -918,6 +1108,7 @@ with the same name but a different state type. The caller is responsible for freeing the list with g_strfreev() when it is no longer required. + a %NULL-terminated array of the names of the actions in the group @@ -960,6 +1151,7 @@ If the action exists, %TRUE is returned and any of the requested fields (as indicated by having a non-%NULL reference passed in) are filled. If the action doesn't exist, %FALSE is returned and the fields may or may not have been modified. + %TRUE if the action exists, else %FALSE @@ -999,6 +1191,7 @@ fields may or may not have been modified. Emits the #GActionGroup::action-added signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -1017,6 +1210,7 @@ This function should only be called by #GActionGroup implementations. Emits the #GActionGroup::action-enabled-changed signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -1039,6 +1233,7 @@ This function should only be called by #GActionGroup implementations. Emits the #GActionGroup::action-removed signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -1057,6 +1252,7 @@ This function should only be called by #GActionGroup implementations. Emits the #GActionGroup::action-state-changed signal on @action_group. This function should only be called by #GActionGroup implementations. + @@ -1082,6 +1278,7 @@ If the action is expecting a parameter, then the correct type of parameter must be given as @parameter. If the action is expecting no parameters then @parameter must be %NULL. See g_action_group_get_action_parameter_type(). + @@ -1112,6 +1309,7 @@ its state or may change its state to something other than @value. See g_action_group_get_action_state_hint(). If the @value GVariant is floating, it is consumed. + @@ -1135,6 +1333,7 @@ If the @value GVariant is floating, it is consumed. An action must be enabled in order to be activated or in order to have its state changed from outside callers. + whether or not the action is currently enabled @@ -1164,6 +1363,7 @@ In the case that this function returns %NULL, you must not give any The parameter type of a particular action will never change but it is possible for an action to be removed and for a new action to be added with the same name but a different parameter type. + the parameter type @@ -1188,6 +1388,7 @@ given by g_action_group_get_action_state_type(). The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the current state of the action @@ -1222,6 +1423,7 @@ within the range may fail. The return value (if non-%NULL) should be freed with g_variant_unref() when it is no longer required. + the state range hint @@ -1254,6 +1456,7 @@ and you must not call g_action_group_change_action_state(). The state type of a particular action will never change but it is possible for an action to be removed and for a new action to be added with the same name but a different state type. + the state type, if the action is stateful @@ -1271,6 +1474,7 @@ with the same name but a different state type. Checks if the named action exists within @action_group. + whether the named action exists @@ -1291,6 +1495,7 @@ with the same name but a different state type. The caller is responsible for freeing the list with g_strfreev() when it is no longer required. + a %NULL-terminated array of the names of the actions in the group @@ -1333,6 +1538,7 @@ If the action exists, %TRUE is returned and any of the requested fields (as indicated by having a non-%NULL reference passed in) are filled. If the action doesn't exist, %FALSE is returned and the fields may or may not have been modified. + %TRUE if the action exists, else %FALSE @@ -1431,11 +1637,13 @@ is still visible and can be queried from the signal handler. The virtual function table for #GActionGroup. + + whether the named action exists @@ -1454,6 +1662,7 @@ is still visible and can be queried from the signal handler. + a %NULL-terminated array of the names of the actions in the group @@ -1471,6 +1680,7 @@ actions in the group + whether or not the action is currently enabled @@ -1489,6 +1699,7 @@ actions in the group + the parameter type @@ -1507,6 +1718,7 @@ actions in the group + the state type, if the action is stateful @@ -1525,6 +1737,7 @@ actions in the group + the state range hint @@ -1543,6 +1756,7 @@ actions in the group + the current state of the action @@ -1561,6 +1775,7 @@ actions in the group + @@ -1582,6 +1797,7 @@ actions in the group + @@ -1603,6 +1819,7 @@ actions in the group + @@ -1620,6 +1837,7 @@ actions in the group + @@ -1637,6 +1855,7 @@ actions in the group + @@ -1658,6 +1877,7 @@ actions in the group + @@ -1679,6 +1899,7 @@ actions in the group + %TRUE if the action exists, else %FALSE @@ -1718,11 +1939,13 @@ actions in the group The virtual function table for #GAction. + + the name of the action @@ -1737,6 +1960,7 @@ actions in the group + the parameter type @@ -1751,6 +1975,7 @@ actions in the group + the state type, if the action is stateful @@ -1765,6 +1990,7 @@ actions in the group + the state range hint @@ -1779,6 +2005,7 @@ actions in the group + whether the action is enabled @@ -1793,6 +2020,7 @@ actions in the group + the current state of the action @@ -1807,6 +2035,7 @@ actions in the group + @@ -1824,6 +2053,7 @@ actions in the group + @@ -1840,7 +2070,7 @@ actions in the group - + The GActionMap interface is implemented by #GActionGroup implementations that operate by containing a number of named #GAction instances, such as #GSimpleActionGroup. @@ -1850,6 +2080,7 @@ names of actions from various action groups to unique, prefixed names (e.g. by prepending "app." or "win."). This is the motivation for the 'Map' part of the interface name. + Adds an action to the @action_map. @@ -1857,6 +2088,7 @@ If the action map already contains an action with the same name as @action then the old action is dropped from the action map. The action map takes its own reference on @action. + @@ -1875,6 +2107,7 @@ The action map takes its own reference on @action. Looks up the action with the name @action_name in @action_map. If no such action exists, returns %NULL. + a #GAction, or %NULL @@ -1894,6 +2127,7 @@ If no such action exists, returns %NULL. Removes the named action from the action map. If no action of this name is in the map then nothing happens. + @@ -1915,6 +2149,7 @@ If the action map already contains an action with the same name as @action then the old action is dropped from the action map. The action map takes its own reference on @action. + @@ -1967,6 +2202,7 @@ create_action_group (void) return G_ACTION_GROUP (group); } ]| + @@ -1978,7 +2214,7 @@ create_action_group (void) a pointer to the first item in an array of #GActionEntry structs - + @@ -1996,6 +2232,7 @@ create_action_group (void) Looks up the action with the name @action_name in @action_map. If no such action exists, returns %NULL. + a #GAction, or %NULL @@ -2015,6 +2252,7 @@ If no such action exists, returns %NULL. Removes the named action from the action map. If no action of this name is in the map then nothing happens. + @@ -2032,11 +2270,13 @@ If no action of this name is in the map then nothing happens. The virtual function table for #GActionMap. + + a #GAction, or %NULL @@ -2055,6 +2295,7 @@ If no action of this name is in the map then nothing happens. + @@ -2072,6 +2313,7 @@ If no action of this name is in the map then nothing happens. + @@ -2095,7 +2337,7 @@ applications installed on the system. As of GLib 2.20, URIs will always be converted to POSIX paths (using g_file_get_path()) when using g_app_info_launch() even if the application requested an URI and not a POSIX path. For example -for an desktop-file based application with Exec key `totem +for a desktop-file based application with Exec key `totem %U` and a single URI, `sftp://foo/file.avi`, then `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26 @@ -2137,6 +2379,7 @@ application. It should be noted that it's generally not safe for applications to rely on the format of a particular URIs. Different launcher applications (e.g. file managers) may have different ideas of what a given URI means. + Creates a new #GAppInfo from the given information. @@ -2145,6 +2388,7 @@ Note that for @commandline, the quoting rules of the Exec key of the are applied. For example, if the @commandline contains percent-encoded URIs, the percent-character must be doubled in order to prevent it from being swallowed by Exec key unquoting. See the specification for exact quoting rules. + new #GAppInfo for given command. @@ -2152,7 +2396,7 @@ being swallowed by Exec key unquoting. See the specification for exact quoting r the commandline to use - + the application name, or %NULL to use @commandline @@ -2173,6 +2417,7 @@ For desktop files, this includes applications that have of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show(). The returned list does not include applications which have the `Hidden` key set. + a newly allocated #GList of references to #GAppInfos. @@ -2185,6 +2430,7 @@ the `Hidden` key set. including the recommended and fallback #GAppInfos. See g_app_info_get_recommended_for_type() and g_app_info_get_fallback_for_type(). + #GList of #GAppInfos for given @content_type or %NULL on error. @@ -2201,6 +2447,7 @@ g_app_info_get_fallback_for_type(). Gets the default #GAppInfo for a given content type. + #GAppInfo for given @content_type or %NULL on error. @@ -2223,6 +2470,7 @@ g_app_info_get_fallback_for_type(). the given URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip". + #GAppInfo for given @uri_scheme or %NULL on error. @@ -2238,6 +2486,7 @@ of the URI, up to but not including the ':', e.g. "http", Gets a list of fallback #GAppInfos for a given content type, i.e. those applications which claim to support the given content type by MIME type subclassing and not directly. + #GList of #GAppInfos for given @content_type or %NULL on error. @@ -2259,6 +2508,7 @@ and not by MIME type subclassing. Note that the first application of the list is the last used one, i.e. the last one for which g_app_info_set_as_last_used_for_type() has been called. + #GList of #GAppInfos for given @content_type or %NULL on error. @@ -2277,7 +2527,12 @@ called. Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if -required. +required. + +The D-Bus–activated applications don't have to be started if your application +terminates too soon after this function. To prevent this, use +g_app_info_launch_default_for_uri_async() instead. + %TRUE on success, %FALSE on error. @@ -2287,7 +2542,7 @@ required. the uri to show - + an optional #GAppLaunchContext @@ -2299,7 +2554,12 @@ required. This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser -dialog to the user. +dialog to the user. + +This is also useful if you want to be sure that the D-Bus–activated +applications are really started before termination and if you are interested +in receiving error information from their activation. + @@ -2308,14 +2568,16 @@ dialog to the user. the uri to show - + + an optional #GAppLaunchContext + a #GCancellable - a #GASyncReadyCallback to call when the request is done + a #GAsyncReadyCallback to call when the request is done @@ -2326,6 +2588,7 @@ dialog to the user. Finishes an asynchronous launch-default-for-uri operation. + %TRUE if the launch was successful, %FALSE if @error is set @@ -2343,6 +2606,7 @@ g_app_info_set_as_default_for_type(), g_app_info_set_as_default_for_extension(), g_app_info_add_supports_type() or g_app_info_remove_supports_type(). + @@ -2356,6 +2620,7 @@ g_app_info_remove_supports_type(). Adds a content type to the application information to indicate the application is capable of opening files with the given content type. + %TRUE on success, %FALSE on error. @@ -2374,6 +2639,7 @@ application is capable of opening files with the given content type. Obtains the information whether the #GAppInfo can be deleted. See g_app_info_delete(). + %TRUE if @appinfo can be deleted @@ -2387,6 +2653,7 @@ See g_app_info_delete(). Checks if a supported content type can be removed from an application. + %TRUE if it is possible to remove supported content types from a given @appinfo, %FALSE if not. @@ -2405,6 +2672,7 @@ See g_app_info_delete(). On some platforms, there may be a difference between user-defined #GAppInfos which can be deleted, and system-wide ones which cannot. See g_app_info_can_delete(). + %TRUE if @appinfo has been deleted @@ -2418,6 +2686,7 @@ See g_app_info_can_delete(). Creates a duplicate of a #GAppInfo. + a duplicate of @appinfo. @@ -2432,9 +2701,10 @@ See g_app_info_can_delete(). Checks if two #GAppInfos are equal. -Note that the check <em>may not</em> compare each individual field, and -only does an identity check. In case detecting changes in the contents -is needed, program code must additionally compare relevant fields. +Note that the check <emphasis>may not</emphasis> compare each individual +field, and only does an identity check. In case detecting changes in the +contents is needed, program code must additionally compare relevant fields. + %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. @@ -2451,6 +2721,7 @@ is needed, program code must additionally compare relevant fields. + @@ -2462,6 +2733,7 @@ is needed, program code must additionally compare relevant fields. Gets a human-readable description of an installed application. + a string containing a description of the application @appinfo, or %NULL if none. @@ -2477,6 +2749,7 @@ application @appinfo, or %NULL if none. Gets the display name of the application. The display name is often more descriptive to the user than the name itself. + the display name of the application for @appinfo, or the name if no display name is available. @@ -2490,6 +2763,7 @@ no display name is available. + @@ -2501,6 +2775,7 @@ no display name is available. Gets the icon for the application. + the default #GIcon for @appinfo or %NULL if there is no default icon. @@ -2521,6 +2796,7 @@ desktop file id from the xdg menu specification. Note that the returned ID may be %NULL, depending on how the @appinfo has been constructed. + a string containing the application's ID. @@ -2534,6 +2810,7 @@ the @appinfo has been constructed. Gets the installed name of the application. + the name of the application for @appinfo. @@ -2552,10 +2829,11 @@ will return %NULL. This function does not take in consideration associations added with g_app_info_add_supports_type(), but only those exported directly by the application. + a list of content types. - + @@ -2568,7 +2846,7 @@ the application. Launches the application. Passes @files to the launched application -as arguments, using the optional @launch_context to get information +as arguments, using the optional @context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly. @@ -2593,7 +2871,8 @@ environment variable with the path of the launched desktop file and process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`, should it be inherited by further processes. The `DISPLAY` and `DESKTOP_STARTUP_ID` environment variables are also set, based -on information provided in @launch_context. +on information provided in @context. + %TRUE on successful launch, %FALSE otherwise. @@ -2609,7 +2888,7 @@ on information provided in @launch_context. - + a #GAppLaunchContext or %NULL @@ -2617,7 +2896,7 @@ on information provided in @launch_context. Launches the application. This passes the @uris to the launched application -as arguments, using the optional @launch_context to get information +as arguments, using the optional @context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly. @@ -2626,6 +2905,7 @@ To launch the application without arguments pass a %NULL @uris list. Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this. + %TRUE on successful launch, %FALSE otherwise. @@ -2641,14 +2921,73 @@ no way to detect this. - + a #GAppLaunchContext or %NULL + + Async version of g_app_info_launch_uris(). + +The @callback is invoked immediately after the application launch, but it +waits for activation in case of D-Bus–activated applications and also provides +extended error information for sandboxed applications, see notes for +g_app_info_launch_default_for_uri_async(). + + + + + + + a #GAppInfo + + + + a #GList containing URIs to launch. + + + + + + a #GAppLaunchContext or %NULL + + + + a #GCancellable + + + + a #GAsyncReadyCallback to call when the request is done + + + + data to pass to @callback + + + + + + Finishes a g_app_info_launch_uris_async() operation. + + + %TRUE on successful launch, %FALSE otherwise. + + + + + a #GAppInfo + + + + a #GAsyncResult + + + + Removes a supported type from an application, if possible. + %TRUE on success, %FALSE on error. @@ -2666,6 +3005,7 @@ no way to detect this. Sets the application as the default handler for the given file extension. + %TRUE on success, %FALSE on error. @@ -2678,12 +3018,13 @@ no way to detect this. a string containing the file extension (without the dot). - + Sets the application as the default handler for a given type. + %TRUE on success, %FALSE on error. @@ -2704,6 +3045,7 @@ no way to detect this. This will make the application appear as first in the list returned by g_app_info_get_recommended_for_type(), regardless of the default application for that content type. + %TRUE on success, %FALSE on error. @@ -2722,6 +3064,7 @@ application for that content type. Checks if the application info should be shown in menus that list available applications. + %TRUE if the @appinfo should be shown, %FALSE otherwise. @@ -2735,6 +3078,7 @@ list available applications. Checks if the application accepts files as arguments. + %TRUE if the @appinfo supports files. @@ -2748,6 +3092,7 @@ list available applications. Checks if the application supports reading files and directories from URIs. + %TRUE if the @appinfo supports URIs. @@ -2762,6 +3107,7 @@ list available applications. Adds a content type to the application information to indicate the application is capable of opening files with the given content type. + %TRUE on success, %FALSE on error. @@ -2780,6 +3126,7 @@ application is capable of opening files with the given content type. Obtains the information whether the #GAppInfo can be deleted. See g_app_info_delete(). + %TRUE if @appinfo can be deleted @@ -2793,6 +3140,7 @@ See g_app_info_delete(). Checks if a supported content type can be removed from an application. + %TRUE if it is possible to remove supported content types from a given @appinfo, %FALSE if not. @@ -2811,6 +3159,7 @@ See g_app_info_delete(). On some platforms, there may be a difference between user-defined #GAppInfos which can be deleted, and system-wide ones which cannot. See g_app_info_can_delete(). + %TRUE if @appinfo has been deleted @@ -2824,6 +3173,7 @@ See g_app_info_can_delete(). Creates a duplicate of a #GAppInfo. + a duplicate of @appinfo. @@ -2838,9 +3188,10 @@ See g_app_info_can_delete(). Checks if two #GAppInfos are equal. -Note that the check <em>may not</em> compare each individual field, and -only does an identity check. In case detecting changes in the contents -is needed, program code must additionally compare relevant fields. +Note that the check <emphasis>may not</emphasis> compare each individual +field, and only does an identity check. In case detecting changes in the +contents is needed, program code must additionally compare relevant fields. + %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. @@ -2859,10 +3210,11 @@ is needed, program code must additionally compare relevant fields. Gets the commandline with which the application will be started. + a string containing the @appinfo's commandline, or %NULL if this information is not available - + @@ -2873,6 +3225,7 @@ started. Gets a human-readable description of an installed application. + a string containing a description of the application @appinfo, or %NULL if none. @@ -2888,6 +3241,7 @@ application @appinfo, or %NULL if none. Gets the display name of the application. The display name is often more descriptive to the user than the name itself. + the display name of the application for @appinfo, or the name if no display name is available. @@ -2902,10 +3256,11 @@ no display name is available. Gets the executable's name for the installed application. + a string containing the @appinfo's application binaries name - + @@ -2916,6 +3271,7 @@ binaries name Gets the icon for the application. + the default #GIcon for @appinfo or %NULL if there is no default icon. @@ -2936,6 +3292,7 @@ desktop file id from the xdg menu specification. Note that the returned ID may be %NULL, depending on how the @appinfo has been constructed. + a string containing the application's ID. @@ -2949,6 +3306,7 @@ the @appinfo has been constructed. Gets the installed name of the application. + the name of the application for @appinfo. @@ -2967,10 +3325,11 @@ will return %NULL. This function does not take in consideration associations added with g_app_info_add_supports_type(), but only those exported directly by the application. + a list of content types. - + @@ -2983,7 +3342,7 @@ the application. Launches the application. Passes @files to the launched application -as arguments, using the optional @launch_context to get information +as arguments, using the optional @context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly. @@ -3008,7 +3367,8 @@ environment variable with the path of the launched desktop file and process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`, should it be inherited by further processes. The `DISPLAY` and `DESKTOP_STARTUP_ID` environment variables are also set, based -on information provided in @launch_context. +on information provided in @context. + %TRUE on successful launch, %FALSE otherwise. @@ -3024,7 +3384,7 @@ on information provided in @launch_context. - + a #GAppLaunchContext or %NULL @@ -3032,7 +3392,7 @@ on information provided in @launch_context. Launches the application. This passes the @uris to the launched application -as arguments, using the optional @launch_context to get information +as arguments, using the optional @context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly. @@ -3041,6 +3401,7 @@ To launch the application without arguments pass a %NULL @uris list. Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this. + %TRUE on successful launch, %FALSE otherwise. @@ -3056,14 +3417,73 @@ no way to detect this. - + a #GAppLaunchContext or %NULL + + Async version of g_app_info_launch_uris(). + +The @callback is invoked immediately after the application launch, but it +waits for activation in case of D-Bus–activated applications and also provides +extended error information for sandboxed applications, see notes for +g_app_info_launch_default_for_uri_async(). + + + + + + + a #GAppInfo + + + + a #GList containing URIs to launch. + + + + + + a #GAppLaunchContext or %NULL + + + + a #GCancellable + + + + a #GAsyncReadyCallback to call when the request is done + + + + data to pass to @callback + + + + + + Finishes a g_app_info_launch_uris_async() operation. + + + %TRUE on successful launch, %FALSE otherwise. + + + + + a #GAppInfo + + + + a #GAsyncResult + + + + Removes a supported type from an application, if possible. + %TRUE on success, %FALSE on error. @@ -3081,6 +3501,7 @@ no way to detect this. Sets the application as the default handler for the given file extension. + %TRUE on success, %FALSE on error. @@ -3093,12 +3514,13 @@ no way to detect this. a string containing the file extension (without the dot). - + Sets the application as the default handler for a given type. + %TRUE on success, %FALSE on error. @@ -3119,6 +3541,7 @@ no way to detect this. This will make the application appear as first in the list returned by g_app_info_get_recommended_for_type(), regardless of the default application for that content type. + %TRUE on success, %FALSE on error. @@ -3137,6 +3560,7 @@ application for that content type. Checks if the application info should be shown in menus that list available applications. + %TRUE if the @appinfo should be shown, %FALSE otherwise. @@ -3150,6 +3574,7 @@ list available applications. Checks if the application accepts files as arguments. + %TRUE if the @appinfo supports files. @@ -3163,6 +3588,7 @@ list available applications. Checks if the application supports reading files and directories from URIs. + %TRUE if the @appinfo supports URIs. @@ -3192,12 +3618,14 @@ list available applications. Application Information interface, for operating system portability. + The parent interface. + a duplicate of @appinfo. @@ -3212,6 +3640,7 @@ list available applications. + %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. @@ -3230,6 +3659,7 @@ list available applications. + a string containing the application's ID. @@ -3244,6 +3674,7 @@ list available applications. + the name of the application for @appinfo. @@ -3258,6 +3689,7 @@ list available applications. + a string containing a description of the application @appinfo, or %NULL if none. @@ -3273,6 +3705,7 @@ application @appinfo, or %NULL if none. + @@ -3285,6 +3718,7 @@ application @appinfo, or %NULL if none. + the default #GIcon for @appinfo or %NULL if there is no default icon. @@ -3300,6 +3734,7 @@ if there is no default icon. + %TRUE on successful launch, %FALSE otherwise. @@ -3315,7 +3750,7 @@ if there is no default icon. - + a #GAppLaunchContext or %NULL @@ -3324,6 +3759,7 @@ if there is no default icon. + %TRUE if the @appinfo supports URIs. @@ -3338,6 +3774,7 @@ if there is no default icon. + %TRUE if the @appinfo supports files. @@ -3352,6 +3789,7 @@ if there is no default icon. + %TRUE on successful launch, %FALSE otherwise. @@ -3367,7 +3805,7 @@ if there is no default icon. - + a #GAppLaunchContext or %NULL @@ -3376,6 +3814,7 @@ if there is no default icon. + %TRUE if the @appinfo should be shown, %FALSE otherwise. @@ -3390,6 +3829,7 @@ if there is no default icon. + %TRUE on success, %FALSE on error. @@ -3408,6 +3848,7 @@ if there is no default icon. + %TRUE on success, %FALSE on error. @@ -3420,13 +3861,14 @@ if there is no default icon. a string containing the file extension (without the dot). - + + %TRUE on success, %FALSE on error. @@ -3445,6 +3887,7 @@ if there is no default icon. + %TRUE if it is possible to remove supported content types from a given @appinfo, %FALSE if not. @@ -3460,6 +3903,7 @@ if there is no default icon. + %TRUE on success, %FALSE on error. @@ -3478,6 +3922,7 @@ if there is no default icon. + %TRUE if @appinfo can be deleted @@ -3492,6 +3937,7 @@ if there is no default icon. + %TRUE if @appinfo has been deleted @@ -3506,6 +3952,7 @@ if there is no default icon. + @@ -3518,6 +3965,7 @@ if there is no default icon. + the display name of the application for @appinfo, or the name if no display name is available. @@ -3533,6 +3981,7 @@ no display name is available. + %TRUE on success, %FALSE on error. @@ -3551,10 +4000,11 @@ no display name is available. + a list of content types. - + @@ -3566,6 +4016,61 @@ no display name is available. + + + + + + + + + a #GAppInfo + + + + a #GList containing URIs to launch. + + + + + + a #GAppLaunchContext or %NULL + + + + a #GCancellable + + + + a #GAsyncReadyCallback to call when the request is done + + + + data to pass to @callback + + + + + + + + + + %TRUE on successful launch, %FALSE otherwise. + + + + + a #GAppInfo + + + + a #GAsyncResult + + + + + #GAppInfoMonitor is a very simple object used for monitoring the app @@ -3595,6 +4100,7 @@ applications (as reported by g_app_info_get_all()) may have changed. You must only call g_object_unref() on the return value from under the same main context as you created it. + a reference to a #GAppInfoMonitor @@ -3612,9 +4118,11 @@ or removed applications). Integrating the launch with the launching application. This is used to handle for instance startup notification and launching the new application on the same screen as the launching window. + Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as #GdkAppLaunchContext. + a #GAppLaunchContext. @@ -3624,6 +4132,7 @@ instead you instantiate a subclass of this, such as #GdkAppLaunchContext. Gets the display string for the @context. This is used to ensure new applications are started on the same display as the launching application, by setting the `DISPLAY` environment variable. + a display string for the display. @@ -3650,7 +4159,8 @@ application, by setting the `DISPLAY` environment variable. `DESKTOP_STARTUP_ID` for the launched operation, if supported. Startup notification IDs are defined in the -[FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"). +[FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt). + a startup notification ID for the application, or %NULL if not supported. @@ -3676,6 +4186,7 @@ Startup notification IDs are defined in the Called when an application has failed to launch, so that it can cancel the application startup notification started in g_app_launch_context_get_startup_notify_id(). + @@ -3691,6 +4202,7 @@ the application startup notification started in g_app_launch_context_get_startup + @@ -3710,6 +4222,7 @@ the application startup notification started in g_app_launch_context_get_startup Gets the display string for the @context. This is used to ensure new applications are started on the same display as the launching application, by setting the `DISPLAY` environment variable. + a display string for the display. @@ -3736,11 +4249,12 @@ application, by setting the `DISPLAY` environment variable. the child process when @context is used to launch an application. This is a %NULL-terminated array of strings, where each string has the form `KEY=VALUE`. + - the - child's environment + + the child's environment - + @@ -3755,7 +4269,8 @@ the form `KEY=VALUE`. `DESKTOP_STARTUP_ID` for the launched operation, if supported. Startup notification IDs are defined in the -[FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"). +[FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt). + a startup notification ID for the application, or %NULL if not supported. @@ -3781,6 +4296,7 @@ Startup notification IDs are defined in the Called when an application has failed to launch, so that it can cancel the application startup notification started in g_app_launch_context_get_startup_notify_id(). + @@ -3798,6 +4314,7 @@ the application startup notification started in g_app_launch_context_get_startup Arranges for @variable to be set to @value in the child's environment when @context is used to launch an application. + @@ -3808,17 +4325,18 @@ environment when @context is used to launch an application. the environment variable to set - + the value for to set the variable to. - + Arranges for @variable to be unset in the child's environment when @context is used to launch an application. + @@ -3829,7 +4347,7 @@ when @context is used to launch an application. the environment variable to remove - + @@ -3875,11 +4393,13 @@ platform-specific data about this launch. On UNIX, at least the + + a display string for the display. @@ -3904,6 +4424,7 @@ platform-specific data about this launch. On UNIX, at least the + a startup notification ID for the application, or %NULL if not supported. @@ -3929,6 +4450,7 @@ platform-specific data about this launch. On UNIX, at least the + @@ -3946,6 +4468,7 @@ platform-specific data about this launch. On UNIX, at least the + @@ -3964,6 +4487,7 @@ platform-specific data about this launch. On UNIX, at least the + @@ -3971,6 +4495,7 @@ platform-specific data about this launch. On UNIX, at least the + @@ -3978,6 +4503,7 @@ platform-specific data about this launch. On UNIX, at least the + @@ -3985,6 +4511,7 @@ platform-specific data about this launch. On UNIX, at least the + @@ -3992,6 +4519,7 @@ platform-specific data about this launch. On UNIX, at least the + A #GApplication is the foundation of an application. It wraps some @@ -4032,10 +4560,11 @@ is not the primary instance then a signal is sent to the primary instance and g_application_run() promptly returns. See the code examples below. -If used, the expected form of an application identifier is very close -to that of of a -[D-Bus bus name](http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface). -Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator". +If used, the expected form of an application identifier is the same as +that of of a +[D-Bus well-known bus name](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus). +Examples include: `com.example.MyApp`, `org.example.internal_apps.Calculator`, +`org._7_zip.Archiver`. For details on valid application identifiers, see g_application_id_is_valid(). On Linux, the application identifier is claimed as a well-known bus name @@ -4074,7 +4603,7 @@ The #GApplication::startup signal lets you handle the application initialization for all of these in a single place. Regardless of which of these entry points is used to start the -application, GApplication passes some "platform data from the +application, GApplication passes some ‘platform data’ from the launching instance to the primary instance, in the form of a #GVariant dictionary mapping strings to variants. To use platform data, override the @before_emit or @after_emit virtual functions @@ -4107,6 +4636,7 @@ For an example of using actions with GApplication, see For an example of using extra D-Bus hooks with GApplication, see [gapplication-example-dbushooks.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-dbushooks.c). + @@ -4117,6 +4647,7 @@ g_application_id_is_valid(). If no application ID is given then some features of #GApplication (most notably application uniqueness) will be disabled. + a new #GApplication instance @@ -4140,6 +4671,7 @@ the default when it is created. You can exercise more control over this by using g_application_set_default(). If there is no default application then %NULL is returned. + the default application for this process, or %NULL @@ -4151,22 +4683,47 @@ If there is no default application then %NULL is returned. A valid ID is required for calls to g_application_new() and g_application_set_application_id(). +Application identifiers follow the same format as +[D-Bus well-known bus names](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus). For convenience, the restrictions on application identifiers are reproduced here: -- Application identifiers must contain only the ASCII characters - "[A-Z][a-z][0-9]_-." and must not begin with a digit. +- Application identifiers are composed of 1 or more elements separated by a + period (`.`) character. All elements must contain at least one character. -- Application identifiers must contain at least one '.' (period) - character (and thus at least two elements). +- Each element must only contain the ASCII characters `[A-Z][a-z][0-9]_-`, + with `-` discouraged in new application identifiers. Each element must not + begin with a digit. -- Application identifiers must not begin or end with a '.' (period) - character. +- Application identifiers must contain at least one `.` (period) character + (and thus at least two elements). -- Application identifiers must not contain consecutive '.' (period) - characters. +- Application identifiers must not begin with a `.` (period) character. -- Application identifiers must not exceed 255 characters. +- Application identifiers must not exceed 255 characters. + +Note that the hyphen (`-`) character is allowed in application identifiers, +but is problematic or not allowed in various specifications and APIs that +refer to D-Bus, such as +[Flatpak application IDs](http://docs.flatpak.org/en/latest/introduction.html#identifiers), +the +[`DBusActivatable` interface in the Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus), +and the convention that an application's "main" interface and object path +resemble its application identifier and bus name. To avoid situations that +require special-case handling, it is recommended that new application +identifiers consistently replace hyphens with underscores. + +Like D-Bus interface names, application identifiers should start with the +reversed DNS domain name of the author of the interface (in lower-case), and +it is conventional for the rest of the application identifier to consist of +words run together, with initial capital letters. + +As with D-Bus interface names, if the author's DNS domain name contains +hyphen/minus characters they should be replaced by underscores, and if it +contains leading digits they should be escaped by prepending an underscore. +For example, if the owner of 7-zip.org used an application identifier for an +archiving application, it might be named `org._7_zip.Archiver`. + %TRUE if @application_id is valid @@ -4185,6 +4742,7 @@ In essence, this results in the #GApplication::activate signal being emitted in the primary instance. The application must be registered before calling this function. + @@ -4196,6 +4754,7 @@ The application must be registered before calling this function. + @@ -4209,6 +4768,7 @@ The application must be registered before calling this function. + @@ -4222,6 +4782,7 @@ The application must be registered before calling this function. + @@ -4235,6 +4796,7 @@ The application must be registered before calling this function. + @@ -4248,6 +4810,7 @@ The application must be registered before calling this function. + @@ -4264,6 +4827,7 @@ The application must be registered before calling this function. + @@ -4280,6 +4844,7 @@ The application must be registered before calling this function. + @@ -4303,6 +4868,7 @@ variable which can used to set the exit status that is returned from g_application_run(). See g_application_run() for more details on #GApplication startup. + %TRUE if the commandline has been completely handled @@ -4324,6 +4890,17 @@ See g_application_run() for more details on #GApplication startup. + + + + + + + + + + + Opens the given files. @@ -4339,6 +4916,7 @@ for this functionality, you should use "". The application must be registered before calling this function and it must have the %G_APPLICATION_HANDLES_OPEN flag set. + @@ -4364,6 +4942,7 @@ and it must have the %G_APPLICATION_HANDLES_OPEN flag set. + @@ -4374,6 +4953,7 @@ and it must have the %G_APPLICATION_HANDLES_OPEN flag set. + @@ -4384,6 +4964,7 @@ and it must have the %G_APPLICATION_HANDLES_OPEN flag set. + @@ -4394,6 +4975,7 @@ and it must have the %G_APPLICATION_HANDLES_OPEN flag set. + @@ -4410,6 +4992,7 @@ In essence, this results in the #GApplication::activate signal being emitted in the primary instance. The application must be registered before calling this function. + @@ -4434,6 +5017,7 @@ be sent to the primary instance. See g_application_add_main_option_entries() for more details. See #GOptionEntry for more documentation of the arguments. + @@ -4516,14 +5100,15 @@ consumed, they will no longer be visible to the default handling It is important to use the proper GVariant format when retrieving the options with g_variant_dict_lookup(): -- for %G_OPTION_ARG_NONE, use b -- for %G_OPTION_ARG_STRING, use &s -- for %G_OPTION_ARG_INT, use i -- for %G_OPTION_ARG_INT64, use x -- for %G_OPTION_ARG_DOUBLE, use d -- for %G_OPTION_ARG_FILENAME, use ^ay -- for %G_OPTION_ARG_STRING_ARRAY, use &as -- for %G_OPTION_ARG_FILENAME_ARRAY, use ^aay +- for %G_OPTION_ARG_NONE, use `b` +- for %G_OPTION_ARG_STRING, use `&s` +- for %G_OPTION_ARG_INT, use `i` +- for %G_OPTION_ARG_INT64, use `x` +- for %G_OPTION_ARG_DOUBLE, use `d` +- for %G_OPTION_ARG_FILENAME, use `^&ay` +- for %G_OPTION_ARG_STRING_ARRAY, use `^a&s` +- for %G_OPTION_ARG_FILENAME_ARRAY, use `^a&ay` + @@ -4535,7 +5120,7 @@ the options with g_variant_dict_lookup(): a %NULL-terminated list of #GOptionEntrys - + @@ -4567,6 +5152,7 @@ Calling this function will cause the options in the supplied option group to be parsed, but it does not cause you to be "opted in" to the new functionality whereby unrecognised options are rejected even if %G_APPLICATION_HANDLES_COMMAND_LINE was given. + @@ -4588,6 +5174,7 @@ new functionality whereby unrecognised options are rejected even if The binding holds a reference to @application while it is active, but not to @object. Instead, the binding is destroyed when @object is finalized. + @@ -4608,6 +5195,7 @@ finalized. Gets the unique identifier for @application. + the identifier for @application, owned by @application @@ -4633,6 +5221,7 @@ normally be in use but we were unable to connect to the bus. This function must not be called before the application has been registered. See g_application_get_is_registered(). + a #GDBusConnection, or %NULL @@ -4659,6 +5248,7 @@ normally be in use but we were unable to connect to the bus. This function must not be called before the application has been registered. See g_application_get_is_registered(). + the object path, or %NULL @@ -4674,6 +5264,7 @@ registered. See g_application_get_is_registered(). Gets the flags for @application. See #GApplicationFlags. + the flags for @application @@ -4690,6 +5281,7 @@ See #GApplicationFlags. This is the amount of time (in milliseconds) after the last call to g_application_release() before the application stops running. + the timeout, in milliseconds @@ -4704,6 +5296,7 @@ g_application_release() before the application stops running. Gets the application's current busy state, as set through g_application_mark_busy() or g_application_bind_busy_property(). + %TRUE if @application is currenty marked as busy @@ -4720,6 +5313,7 @@ g_application_mark_busy() or g_application_bind_busy_property(). An application is registered if g_application_register() has been successfully called. + %TRUE if @application is registered @@ -4742,6 +5336,7 @@ performed by the primary instance. The value of this property cannot be accessed before g_application_register() has been called. See g_application_get_is_registered(). + %TRUE if @application is remote @@ -4757,6 +5352,7 @@ g_application_get_is_registered(). Gets the resource base path of @application. See g_application_set_resource_base_path() for more information. + the base resource path, if one is set @@ -4776,6 +5372,7 @@ continue to run. For example, g_application_hold() is called by GTK+ when a toplevel window is on the screen. To cancel the hold, call g_application_release(). + @@ -4797,6 +5394,7 @@ use that information to indicate the state to the user (e.g. with a spinner). To cancel the busy indication, use g_application_unmark_busy(). + @@ -4822,6 +5420,7 @@ for this functionality, you should use "". The application must be registered before calling this function and it must have the %G_APPLICATION_HANDLES_OPEN flag set. + @@ -4853,9 +5452,14 @@ Upon return to the mainloop, g_application_run() will return, calling only the 'shutdown' function before doing so. The hold count is ignored. +Take care if your code has called g_application_hold() on the application and +is therefore still expecting it to exist. +(Note that you may have called g_application_hold() indirectly, for example +through gtk_application_add_window().) The result of calling g_application_run() again after it returns is unspecified. + @@ -4897,6 +5501,7 @@ is set appropriately. Note: the return value of this function is not an indicator that this instance is or is not the primary instance of the application. See g_application_get_is_remote() for that. + %TRUE if registration succeeded @@ -4919,6 +5524,7 @@ When the use count reaches zero, the application will stop running. Never call this function except to cancel the effect of a previous call to g_application_hold(). + @@ -5005,6 +5611,7 @@ approach is suitable for use by most graphical applications but should not be used from applications like editors that need precise control over when processes invoked via the commandline will exit and what their exit status will be. + the exit status @@ -5019,9 +5626,10 @@ what their exit status will be. - the argv from main(), or %NULL + + the argv from main(), or %NULL - + @@ -5053,6 +5661,7 @@ notifications without an id. If @notification is no longer relevant, it can be withdrawn with g_application_withdraw_notification(). + @@ -5079,6 +5688,7 @@ mix use of this API with use of #GActionMap on the same @application or things will go very badly wrong. This function is known to introduce buggy behaviour (ie: signals not emitted on changes to the action group), so you should really use #GActionMap instead. + @@ -5101,6 +5711,7 @@ been registered. If non-%NULL, the application id must be valid. See g_application_id_is_valid(). + @@ -5122,6 +5733,7 @@ by g_application_get_default(). This function does not take its own reference on @application. If @application is destroyed then the default application will revert back to %NULL. + @@ -5139,6 +5751,7 @@ The flags can only be modified if @application has not yet been registered. See #GApplicationFlags. + @@ -5162,6 +5775,7 @@ g_application_release() before the application stops running. This call has no side effects of its own. The value set here is only used for next time g_application_release() drops the use count to zero. Any timeouts currently in progress are not impacted. + @@ -5176,6 +5790,69 @@ zero. Any timeouts currently in progress are not impacted. + + Adds a description to the @application option context. + +See g_option_context_set_description() for more information. + + + + + + + the #GApplication + + + + a string to be shown in `--help` output + after the list of options, or %NULL + + + + + + Sets the parameter string to be used by the commandline handling of @application. + +This function registers the argument to be passed to g_option_context_new() +when the internal #GOptionContext of @application is created. + +See g_option_context_new() for more information about @parameter_string. + + + + + + + the #GApplication + + + + a string which is displayed + in the first line of `--help` output, after the usage summary `programname [OPTION...]`. + + + + + + Adds a summary to the @application option context. + +See g_option_context_set_summary() for more information. + + + + + + + the #GApplication + + + + a string to be shown in `--help` output + before the list of options, or %NULL + + + + Sets (or unsets) the base resource path of @application. @@ -5210,6 +5887,7 @@ a sub-class of #GApplication you should either set the this function during the instance initialization. Alternatively, you can call this function in the #GApplicationClass.startup virtual function, before chaining up to the parent implementation. + @@ -5228,6 +5906,7 @@ before chaining up to the parent implementation. Destroys a binding between @property and the busy state of @application that was previously created with g_application_bind_busy_property(). + @@ -5254,6 +5933,7 @@ to other processes. This function must only be called to cancel the effect of a previous call to g_application_mark_busy(). + @@ -5278,6 +5958,7 @@ the sent notification. Note that notifications are dismissed when the user clicks on one of the buttons in a notification or triggers its default action, so there is no need to explicitly withdraw the notification in that case. + @@ -5404,6 +6085,17 @@ the default option processing continue. + + The ::name-lost signal is emitted only on the registered primary instance +when a new instance has taken over. This can only happen if the application +is using the %G_APPLICATION_ALLOW_REPLACEMENT flag. + +The default handler for this signal calls g_application_quit(). + + %TRUE if the signal has been handled + + + The ::open signal is emitted on the primary instance when there are files to open. See g_application_open() for more information. @@ -5444,11 +6136,13 @@ after registration. See g_application_register(). Virtual function table for #GApplication. + + @@ -5461,6 +6155,7 @@ after registration. See g_application_register(). + @@ -5474,6 +6169,7 @@ after registration. See g_application_register(). + @@ -5501,6 +6197,7 @@ after registration. See g_application_register(). + @@ -5516,6 +6213,7 @@ after registration. See g_application_register(). + %TRUE if the commandline has been completely handled @@ -5540,6 +6238,7 @@ after registration. See g_application_register(). + @@ -5555,6 +6254,7 @@ after registration. See g_application_register(). + @@ -5570,6 +6270,7 @@ after registration. See g_application_register(). + @@ -5585,6 +6286,7 @@ after registration. See g_application_register(). + @@ -5597,6 +6299,7 @@ after registration. See g_application_register(). + @@ -5609,6 +6312,7 @@ after registration. See g_application_register(). + @@ -5621,6 +6325,7 @@ after registration. See g_application_register(). + @@ -5639,6 +6344,7 @@ after registration. See g_application_register(). + @@ -5657,6 +6363,7 @@ after registration. See g_application_register(). + @@ -5670,8 +6377,21 @@ after registration. See g_application_register(). + + + + + + + + + + + + + - + @@ -5831,6 +6551,7 @@ hold the application until you are done with the commandline. The complete example can be found here: [gapplication-example-cmdline3.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline3.c) + Gets the stdin of the invoking process. @@ -5842,6 +6563,7 @@ If stdin is not available then %NULL will be returned. In the future, support may be expanded to other platforms. You must only call this function once per commandline invocation. + a #GInputStream for stdin @@ -5854,6 +6576,7 @@ You must only call this function once per commandline invocation. + @@ -5867,6 +6590,7 @@ You must only call this function once per commandline invocation. + @@ -5886,6 +6610,7 @@ of the invocation of @cmdline. This differs from g_file_new_for_commandline_arg() in that it resolves relative pathnames using the current working directory of the invoking process rather than the local process. + a new #GFile @@ -5897,7 +6622,7 @@ the invoking process rather than the local process. an argument from @cmdline - + @@ -5913,11 +6638,12 @@ use g_option_context_parse_strv(). The return value is %NULL-terminated and should be freed using g_strfreev(). + - the string array -containing the arguments (the argv) + + the string array containing the arguments (the argv) - + @@ -5940,9 +6666,10 @@ directory, so this may be %NULL. The return value should not be modified or freed and is valid for as long as @cmdline exists. + the current directory, or %NULL - + @@ -5967,11 +6694,12 @@ long as @cmdline exists. See g_application_command_line_getenv() if you are only interested in the value of a single environment variable. + - the environment -strings, or %NULL if they were not sent - - + + the environment strings, or %NULL if they were not sent + + @@ -5984,6 +6712,7 @@ strings, or %NULL if they were not sent Gets the exit status of @cmdline. See g_application_command_line_set_exit_status() for more information. + the exit status @@ -5997,6 +6726,7 @@ g_application_command_line_set_exit_status() for more information. Determines if @cmdline represents a remote invocation. + %TRUE if the invocation was remote @@ -6018,6 +6748,7 @@ modified from your GApplication::handle-local-options handler. If no options were sent then an empty dictionary is returned so that you don't need to check for %NULL. + a #GVariantDict with the options @@ -6038,6 +6769,7 @@ information like the current working directory and the startup notification ID. For local invocation, it will be %NULL. + the platform data, or %NULL @@ -6060,6 +6792,7 @@ If stdin is not available then %NULL will be returned. In the future, support may be expanded to other platforms. You must only call this function once per commandline invocation. + a #GInputStream for stdin @@ -6083,6 +6816,7 @@ to invocation messages from other applications). The return value should not be modified or freed and is valid for as long as @cmdline exists. + the value of the variable, or %NULL if unset or unsent @@ -6094,7 +6828,7 @@ long as @cmdline exists. the environment variable to get - + @@ -6105,6 +6839,7 @@ invoking process. If @cmdline is a local invocation then this is exactly equivalent to g_print(). If @cmdline is remote then this is equivalent to calling g_print() in the invoking process. + @@ -6130,6 +6865,7 @@ invoking process. If @cmdline is a local invocation then this is exactly equivalent to g_printerr(). If @cmdline is remote then this is equivalent to calling g_printerr() in the invoking process. + @@ -6170,6 +6906,7 @@ increased to a non-zero value) then the application is considered to have been 'successful' in a certain sense, and the exit status is always zero. If the application use count is zero, though, the exit status of the local #GApplicationCommandLine is used. + @@ -6206,11 +6943,13 @@ status of the local #GApplicationCommandLine is used. The #GApplicationCommandLineClass-struct contains private data only. + + @@ -6226,6 +6965,7 @@ contains private data only. + @@ -6241,6 +6981,7 @@ contains private data only. + a #GInputStream for stdin @@ -6254,12 +6995,13 @@ contains private data only. - + + Flags used to define the behaviour of a #GApplication. @@ -6311,8 +7053,18 @@ contains private data only. application ID from the command line with `--gapplication-app-id`. Since: 2.48 + + Allow another instance to take over + the bus name. Since: 2.60 + + + Take over from another instance. This flag is + usually set by passing `--gapplication-replace` on the commandline. + Since: 2.60 + + #GAskPasswordFlags are used to request specific information from the @@ -6333,6 +7085,9 @@ situation. operation supports anonymous users. + + operation takes TCRYPT parameters (Since: 2.58) + This is the asynchronous version of #GInitable; it behaves the same @@ -6433,6 +7188,7 @@ foo_async_initable_iface_init (gpointer g_iface, iface->init_finish = foo_init_finish; } ]| + Helper function for constructing #GAsyncInitable object. This is similar to g_object_new() but also initializes the object asynchronously. @@ -6440,6 +7196,7 @@ similar to g_object_new() but also initializes the object asynchronously. When the initialization is finished, @callback will be called. You can then call g_async_initable_new_finish() to get the new object and check for any errors. + @@ -6485,6 +7242,7 @@ asynchronously. When the initialization is finished, @callback will be called. You can then call g_async_initable_new_finish() to get the new object and check for any errors. + @@ -6530,6 +7288,7 @@ then call g_async_initable_new_finish() to get the new object and check for any errors. Use g_object_new_with_properties() and g_async_initable_init_async() instead. See #GParameter for more information. + @@ -6602,6 +7361,7 @@ implementation of this method will run the g_initable_init() function in a thread, so if you want to support asynchronous initialization via threads, just implement the #GAsyncInitable interface without overriding any interface methods. + @@ -6631,6 +7391,7 @@ any interface methods. Finishes asynchronous initialization and returns the result. See g_async_initable_init_async(). + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. @@ -6684,6 +7445,7 @@ implementation of this method will run the g_initable_init() function in a thread, so if you want to support asynchronous initialization via threads, just implement the #GAsyncInitable interface without overriding any interface methods. + @@ -6713,6 +7475,7 @@ any interface methods. Finishes asynchronous initialization and returns the result. See g_async_initable_init_async(). + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. @@ -6732,6 +7495,7 @@ will return %FALSE and set @error appropriately if present. Finishes the async construction for the various g_async_initable_new calls, returning the created object or %NULL on error. + a newly created #GObject, or %NULL on error. Free with g_object_unref(). @@ -6752,12 +7516,14 @@ calls, returning the created object or %NULL on error. Provides an interface for asynchronous initializing object such that initialization may fail. + The parent interface. + @@ -6787,6 +7553,7 @@ initialization may fail. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. @@ -6807,12 +7574,19 @@ will return %FALSE and set @error appropriately if present. Type definition for a function that will be called back when an asynchronous -operation within GIO has been completed. +operation within GIO has been completed. #GAsyncReadyCallback +callbacks from #GTask are guaranteed to be invoked in a later +iteration of the +[thread-default main context][g-main-context-push-thread-default] +where the #GTask was created. All other users of +#GAsyncReadyCallback must likewise call it asynchronously in a +later iteration of the main context. + - + the object the asynchronous operation was started with. @@ -6833,13 +7607,16 @@ Asynchronous operations are broken up into two separate operations which are chained together by a #GAsyncReadyCallback. To begin an asynchronous operation, provide a #GAsyncReadyCallback to the asynchronous function. This callback will be triggered when the -operation has completed, and will be passed a #GAsyncResult instance -filled with the details of the operation's success or failure, the -object the asynchronous function was started for and any error codes -returned. The asynchronous callback function is then expected to call -the corresponding "_finish()" function, passing the object the -function was called for, the #GAsyncResult instance, and (optionally) -an @error to grab any error conditions that may have occurred. +operation has completed, and must be run in a later iteration of +the [thread-default main context][g-main-context-push-thread-default] +from where the operation was initiated. It will be passed a +#GAsyncResult instance filled with the details of the operation's +success or failure, the object the asynchronous function was +started for and any error codes returned. The asynchronous callback +function is then expected to call the corresponding "_finish()" +function, passing the object the function was called for, the +#GAsyncResult instance, and (optionally) an @error to grab any +error conditions that may have occurred. The "_finish()" function for an operation takes the generic result (of type #GAsyncResult) and returns the specific result that the @@ -6908,11 +7685,13 @@ I/O scheduling. Priorities are integers, with lower numbers indicating higher priority. It is recommended to choose priorities between %G_PRIORITY_LOW and %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT as a default. + Gets the source object from a #GAsyncResult. - - a new reference to the source object for the @res, - or %NULL if there is none. + + + a new reference to the source + object for the @res, or %NULL if there is none. @@ -6924,6 +7703,7 @@ as a default. Gets the user data from a #GAsyncResult. + the user data for @res. @@ -6938,6 +7718,7 @@ as a default. Checks if @res has the given @source_tag (generally a function pointer indicating the function @res was created by). + %TRUE if @res has the indicated @source_tag, %FALSE if not. @@ -6956,9 +7737,10 @@ pointer indicating the function @res was created by). Gets the source object from a #GAsyncResult. - - a new reference to the source object for the @res, - or %NULL if there is none. + + + a new reference to the source + object for the @res, or %NULL if there is none. @@ -6970,6 +7752,7 @@ pointer indicating the function @res was created by). Gets the user data from a #GAsyncResult. + the user data for @res. @@ -6984,6 +7767,7 @@ pointer indicating the function @res was created by). Checks if @res has the given @source_tag (generally a function pointer indicating the function @res was created by). + %TRUE if @res has the indicated @source_tag, %FALSE if not. @@ -7011,6 +7795,7 @@ error returns themselves rather than calling into the virtual method. This should not be used in new code; #GAsyncResult errors that are set by virtual methods should also be extracted by virtual methods, to enable subclasses to chain up correctly. + %TRUE if @error is has been filled in with an error from @res, %FALSE if not. @@ -7026,12 +7811,14 @@ to enable subclasses to chain up correctly. Interface definition for #GAsyncResult. + The parent interface. + the user data for @res. @@ -7046,9 +7833,10 @@ to enable subclasses to chain up correctly. - - a new reference to the source object for the @res, - or %NULL if there is none. + + + a new reference to the source + object for the @res, or %NULL if there is none. @@ -7061,6 +7849,7 @@ to enable subclasses to chain up correctly. + %TRUE if @res has the indicated @source_tag, %FALSE if not. @@ -7079,6 +7868,55 @@ to enable subclasses to chain up correctly. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Buffered input stream implements #GFilterInputStream and provides for buffered reads. @@ -7094,10 +7932,12 @@ g_buffered_input_stream_get_buffer_size(). To change the size of a buffered input stream's buffer, use g_buffered_input_stream_set_buffer_size(). Note that the buffer's size cannot be reduced below the size of the data within the buffer. + Creates a new #GInputStream from the given @base_stream, with a buffer set to the default size (4 kilobytes). + a #GInputStream for the given @base_stream. @@ -7112,6 +7952,7 @@ a buffer set to the default size (4 kilobytes). Creates a new #GBufferedInputStream from the given @base_stream, with a buffer set to @size. + a #GInputStream. @@ -7152,6 +7993,7 @@ On error -1 is returned and @error is set accordingly. For the asynchronous, non-blocking, version of this function, see g_buffered_input_stream_fill_async(). + the number of bytes read into @stream's buffer, up to @count, or -1 on error. @@ -7179,6 +8021,7 @@ version of this function, see g_buffered_input_stream_fill(). If @count is -1 then the attempted read size is equal to the number of bytes that are required to fill the buffer. + @@ -7211,8 +8054,9 @@ of bytes that are required to fill the buffer. Finishes an asynchronous read. + - a #gssize of the read stream, or %-1 on an error. + a #gssize of the read stream, or `-1` on an error. @@ -7251,6 +8095,7 @@ On error -1 is returned and @error is set accordingly. For the asynchronous, non-blocking, version of this function, see g_buffered_input_stream_fill_async(). + the number of bytes read into @stream's buffer, up to @count, or -1 on error. @@ -7278,6 +8123,7 @@ version of this function, see g_buffered_input_stream_fill(). If @count is -1 then the attempted read size is equal to the number of bytes that are required to fill the buffer. + @@ -7310,8 +8156,9 @@ of bytes that are required to fill the buffer. Finishes an asynchronous read. + - a #gssize of the read stream, or %-1 on an error. + a #gssize of the read stream, or `-1` on an error. @@ -7327,6 +8174,7 @@ of bytes that are required to fill the buffer. Gets the size of the available data within the stream. + size of the available stream. @@ -7340,6 +8188,7 @@ of bytes that are required to fill the buffer. Gets the size of the input buffer. + the current buffer size. @@ -7354,6 +8203,7 @@ of bytes that are required to fill the buffer. Peeks in the buffer, copying data of size @count into @buffer, offset @offset bytes. + a #gsize of the number of bytes peeked, or -1 on error. @@ -7384,6 +8234,7 @@ offset @offset bytes. Returns the buffer with the currently available bytes. The returned buffer must not be modified and will become invalid when reading from the stream or filling the buffer. + read-only buffer @@ -7416,6 +8267,7 @@ operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. + the byte read from the @stream, or -1 on end of stream or error. @@ -7435,6 +8287,7 @@ On error -1 is returned and @error is set accordingly. Sets the size of the internal buffer of @stream to @size, or to the size of the contents of the buffer. The buffer can never be resized smaller than its current contents. + @@ -7460,11 +8313,13 @@ smaller than its current contents. + + the number of bytes read into @stream's buffer, up to @count, or -1 on error. @@ -7488,6 +8343,7 @@ smaller than its current contents. + @@ -7521,8 +8377,9 @@ smaller than its current contents. + - a #gssize of the read stream, or %-1 on an error. + a #gssize of the read stream, or `-1` on an error. @@ -7539,6 +8396,7 @@ smaller than its current contents. + @@ -7546,6 +8404,7 @@ smaller than its current contents. + @@ -7553,6 +8412,7 @@ smaller than its current contents. + @@ -7560,6 +8420,7 @@ smaller than its current contents. + @@ -7567,6 +8428,7 @@ smaller than its current contents. + @@ -7574,6 +8436,7 @@ smaller than its current contents. + Buffered output stream implements #GFilterOutputStream and provides @@ -7590,9 +8453,11 @@ g_buffered_output_stream_get_buffer_size(). To change the size of a buffered output stream's buffer, use g_buffered_output_stream_set_buffer_size(). Note that the buffer's size cannot be reduced below the size of the data within the buffer. + Creates a new buffered output stream for a base stream. + a #GOutputStream for the given @base_stream. @@ -7606,6 +8471,7 @@ size cannot be reduced below the size of the data within the buffer. Creates a new buffered output stream with a given buffer size. + a #GOutputStream with an internal buffer set to @size. @@ -7623,6 +8489,7 @@ size cannot be reduced below the size of the data within the buffer. Checks if the buffer automatically grows as data is added. + %TRUE if the @stream's buffer automatically grows, %FALSE otherwise. @@ -7637,6 +8504,7 @@ size cannot be reduced below the size of the data within the buffer. Gets the size of the buffer in the @stream. + the current size of the buffer. @@ -7653,6 +8521,7 @@ size cannot be reduced below the size of the data within the buffer. If @auto_grow is true, then each write will just make the buffer larger, and you must manually flush the buffer to actually write out the data to the underlying stream. + @@ -7669,6 +8538,7 @@ the data to the underlying stream. Sets the size of the internal buffer to @size. + @@ -7697,11 +8567,13 @@ the data to the underlying stream. + + @@ -7709,6 +8581,7 @@ the data to the underlying stream. + @@ -7716,9 +8589,11 @@ the data to the underlying stream. + Invoked when a connection to a message bus has been obtained. + @@ -7739,6 +8614,7 @@ the data to the underlying stream. Invoked when the name is acquired. + @@ -7758,7 +8634,8 @@ the data to the underlying stream. - Invoked when the name being watched is known to have to have a owner. + Invoked when the name being watched is known to have to have an owner. + @@ -7783,6 +8660,7 @@ the data to the underlying stream. Invoked when the name is lost or @connection has been closed. + @@ -7820,11 +8698,12 @@ return an error from g_bus_own_name() rather than entering the waiting queue for - Invoked when the name being watched is known not to have to have a owner. + Invoked when the name being watched is known not to have to have an owner. -This is also invoked when the #GDBusConection on which the watch was +This is also invoked when the #GDBusConnection on which the watch was established has been closed. In that case, @connection will be %NULL. + @@ -7870,13 +8749,14 @@ name. The login session message bus. - + #GBytesIcon specifies an image held in memory in a common format (usually png) to be used as icon. Creates a new icon for a bytes. + a #GIcon for the given @bytes, or %NULL on error. @@ -7891,6 +8771,7 @@ png) to be used as icon. Gets the #GBytes associated with the given @icon. + a #GBytes, or %NULL. @@ -7907,10 +8788,130 @@ png) to be used as icon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GCancellable is a thread-safe operation cancellation stack used throughout GIO to allow for cancellation of synchronous and asynchronous operations. + Creates a new #GCancellable object. @@ -7920,6 +8921,7 @@ and pass it to the operations. One #GCancellable can be used in multiple consecutive operations or in multiple concurrent operations. + a #GCancellable. @@ -7927,6 +8929,7 @@ operations or in multiple concurrent operations. Gets the top cancellable from the stack. + a #GCancellable from the top of the stack, or %NULL if the stack is empty. @@ -7934,6 +8937,7 @@ of the stack, or %NULL if the stack is empty. + @@ -7960,6 +8964,7 @@ operation causes it to complete asynchronously. That is, if you cancel the operation from the same thread in which it is running, then the operation's #GAsyncReadyCallback will not be invoked until the application returns to the main loop. + @@ -7989,6 +8994,7 @@ Since GLib 2.40, the lock protecting @cancellable is not held when @callback is invoked. This lifts a restriction in place for earlier GLib versions which now makes it easier to write cleanup code that unconditionally invokes e.g. g_cancellable_cancel(). + The id of the signal handler or 0 if @cancellable has already been cancelled. @@ -8026,8 +9032,9 @@ same time as the cancellable operation is finished and the signal handler is removed. See #GCancellable::cancelled for details on how to use this. -If @cancellable is %NULL or @handler_id is %0 this function does +If @cancellable is %NULL or @handler_id is `0` this function does nothing. + @@ -8037,7 +9044,7 @@ nothing. - Handler id of the handler to be disconnected, or %0. + Handler id of the handler to be disconnected, or `0`. @@ -8056,8 +9063,9 @@ g_cancellable_release_fd() to free up resources allocated for the returned file descriptor. See also g_cancellable_make_pollfd(). + - A valid file descriptor. %-1 if the file descriptor + A valid file descriptor. `-1` if the file descriptor is not supported, or on errors. @@ -8070,6 +9078,7 @@ is not supported, or on errors. Checks if a cancellable job has been cancelled. + %TRUE if @cancellable is cancelled, FALSE if called with %NULL or if item is not cancelled. @@ -8101,6 +9110,7 @@ these cases is to ignore the @cancellable. You are not supposed to read from the fd yourself, just check for readable status. Reading to unset the readable status is done with g_cancellable_reset(). + %TRUE if @pollfd was successfully initialized, %FALSE on failure to prepare the cancellable. @@ -8120,6 +9130,7 @@ with g_cancellable_reset(). Pops @cancellable off the cancellable stack (verifying that @cancellable is on the top of the stack). + @@ -8139,6 +9150,7 @@ code that does not allow you to pass down the cancellable object. This is typically called automatically by e.g. #GFile operations, so you rarely have to call this yourself. + @@ -8159,6 +9171,7 @@ when the @cancellable is finalized. However, the @cancellable will block scarce file descriptors until it is finalized if this function is not called. This can cause the application to run out of file descriptors when many #GCancellables are used at the same time. + @@ -8181,6 +9194,7 @@ as this function might tempt you to do. The recommended practice is to drop the reference to a cancellable after cancelling it, and let it die with the outstanding async operations. You should create a fresh cancellable for further async operations. + @@ -8194,6 +9208,7 @@ create a fresh cancellable for further async operations. If the @cancellable is cancelled, sets the error to notify that the operation was cancelled. + %TRUE if @cancellable was cancelled, %FALSE if it was not @@ -8205,7 +9220,7 @@ that the operation was cancelled. - + Creates a source that triggers if @cancellable is cancelled and calls its callback of type #GCancellableSourceFunc. This is primarily useful for attaching to another (non-cancellable) source @@ -8215,6 +9230,7 @@ For convenience, you can call this with a %NULL #GCancellable, in which case the source will never trigger. The new #GSource will hold a reference to the #GCancellable. + the new #GSource. @@ -8290,11 +9306,13 @@ cancellable signal should not do something that can block. + + @@ -8307,6 +9325,7 @@ cancellable signal should not do something that can block. + @@ -8314,6 +9333,7 @@ cancellable signal should not do something that can block. + @@ -8321,6 +9341,7 @@ cancellable signal should not do something that can block. + @@ -8328,6 +9349,7 @@ cancellable signal should not do something that can block. + @@ -8335,6 +9357,7 @@ cancellable signal should not do something that can block. + @@ -8342,10 +9365,12 @@ cancellable signal should not do something that can block. + This is the function type of the callback used for the #GSource returned by g_cancellable_source_new(). + it should return %FALSE if the source should be removed. @@ -8364,10 +9389,12 @@ returned by g_cancellable_source_new(). #GCharsetConverter is an implementation of #GConverter based on GIConv. + Creates a new #GCharsetConverter. + a new #GCharsetConverter or %NULL on error. @@ -8385,6 +9412,7 @@ GIConv. Gets the number of fallbacks that @converter has applied so far. + the number of fallbacks that @converter has applied @@ -8398,6 +9426,7 @@ GIConv. Gets the #GCharsetConverter:use-fallback property. + %TRUE if fallbacks are used by @converter @@ -8411,6 +9440,7 @@ GIConv. Sets the #GCharsetConverter:use-fallback property. + @@ -8436,6 +9466,7 @@ GIConv. + @@ -8448,6 +9479,7 @@ stateful and may fail at any place. Some example conversions are: character set conversion, compression, decompression and regular expression replace. + This is the main operation used when converting data. It is to be called multiple times in a loop, and each time it will do some work, i.e. @@ -8531,6 +9563,7 @@ Flushing is not always possible (like if a charset converter flushes at a partial multibyte sequence). Converters are supposed to try to produce as much output as possible and then return an error (typically %G_IO_ERROR_PARTIAL_INPUT). + a #GConverterResult, %G_CONVERTER_ERROR on error. @@ -8580,6 +9613,7 @@ to produce as much output as possible and then return an error Resets all internal state in the converter, making it behave as if it was just created. If the converter has any internal state that would produce output then that output is lost. + @@ -8673,6 +9707,7 @@ Flushing is not always possible (like if a charset converter flushes at a partial multibyte sequence). Converters are supposed to try to produce as much output as possible and then return an error (typically %G_IO_ERROR_PARTIAL_INPUT). + a #GConverterResult, %G_CONVERTER_ERROR on error. @@ -8722,6 +9757,7 @@ to produce as much output as possible and then return an error Resets all internal state in the converter, making it behave as if it was just created. If the converter has any internal state that would produce output then that output is lost. + @@ -8749,12 +9785,14 @@ state that would produce output then that output is lost. Provides an interface for converting data from one type to another type. The conversion can be stateful and may fail at any place. + The parent interface. + a #GConverterResult, %G_CONVERTER_ERROR on error. @@ -8803,6 +9841,7 @@ and may fail at any place. + @@ -8821,9 +9860,11 @@ conversion of data of various types during reading. As of GLib 2.34, #GConverterInputStream implements #GPollableInputStream. + Creates a new converter input stream for the @base_stream. + a new #GInputStream. @@ -8841,6 +9882,7 @@ As of GLib 2.34, #GConverterInputStream implements Gets the #GConverter that is used by @converter_stream. + the converter of the converter input stream @@ -8863,11 +9905,13 @@ As of GLib 2.34, #GConverterInputStream implements + + @@ -8875,6 +9919,7 @@ As of GLib 2.34, #GConverterInputStream implements + @@ -8882,6 +9927,7 @@ As of GLib 2.34, #GConverterInputStream implements + @@ -8889,6 +9935,7 @@ As of GLib 2.34, #GConverterInputStream implements + @@ -8896,6 +9943,7 @@ As of GLib 2.34, #GConverterInputStream implements + @@ -8903,6 +9951,7 @@ As of GLib 2.34, #GConverterInputStream implements + Converter output stream implements #GOutputStream and allows @@ -8910,9 +9959,11 @@ conversion of data of various types during reading. As of GLib 2.34, #GConverterOutputStream implements #GPollableOutputStream. + Creates a new converter output stream for the @base_stream. + a new #GOutputStream. @@ -8930,6 +9981,7 @@ As of GLib 2.34, #GConverterOutputStream implements Gets the #GConverter that is used by @converter_stream. + the converter of the converter output stream @@ -8952,11 +10004,13 @@ As of GLib 2.34, #GConverterOutputStream implements + + @@ -8964,6 +10018,7 @@ As of GLib 2.34, #GConverterOutputStream implements + @@ -8971,6 +10026,7 @@ As of GLib 2.34, #GConverterOutputStream implements + @@ -8978,6 +10034,7 @@ As of GLib 2.34, #GConverterOutputStream implements + @@ -8985,6 +10042,7 @@ As of GLib 2.34, #GConverterOutputStream implements + @@ -8992,6 +10050,7 @@ As of GLib 2.34, #GConverterOutputStream implements + Results returned from g_converter_convert(). @@ -9039,9 +10098,11 @@ This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED. On Solaris (including OpenSolaris and its derivatives), the native credential type is a ucred_t. This corresponds to %G_CREDENTIALS_TYPE_SOLARIS_UCRED. + Creates a new #GCredentials object with credentials matching the the current process. + A #GCredentials. Free with g_object_unref(). @@ -9051,9 +10112,10 @@ the current process. Gets a pointer to native credentials of type @native_type from @credentials. -It is a programming error (which will cause an warning to be +It is a programming error (which will cause a warning to be logged) to use this method if there is no #GCredentials support for the OS or if @native_type isn't supported by the OS. + The pointer to native credentials or %NULL if the operation there is no #GCredentials support for the OS or if @@ -9079,6 +10141,7 @@ method is only available on UNIX platforms. This operation can fail if #GCredentials is not supported on the OS or if the native credentials type does not contain information about the UNIX process ID. + The UNIX process ID, or -1 if @error is set. @@ -9097,6 +10160,7 @@ method is only available on UNIX platforms. This operation can fail if #GCredentials is not supported on the OS or if the native credentials type does not contain information about the UNIX user. + The UNIX user identifier or -1 if @error is set. @@ -9113,6 +10177,7 @@ about the UNIX user. This operation can fail if #GCredentials is not supported on the the OS. + %TRUE if @credentials and @other_credentials has the same user, %FALSE otherwise or if @error is set. @@ -9133,9 +10198,10 @@ user, %FALSE otherwise or if @error is set. Copies the native credentials of type @native_type from @native into @credentials. -It is a programming error (which will cause an warning to be +It is a programming error (which will cause a warning to be logged) to use this method if there is no #GCredentials support for the OS or if @native_type isn't supported by the OS. + @@ -9162,6 +10228,7 @@ This operation can fail if #GCredentials is not supported on the OS or if the native credentials type does not contain information about the UNIX user. It can also fail if the OS does not allow the use of "spoofed" credentials. + %TRUE if @uid was set, %FALSE if error is set. @@ -9181,6 +10248,7 @@ use of "spoofed" credentials. Creates a human-readable textual representation of @credentials that can be used in logging and debug messages. The format of the returned string may change in future GLib release. + A string that should be freed with g_free(). @@ -9195,6 +10263,7 @@ returned string may change in future GLib release. Class structure for #GCredentials. + Enumeration describing different kinds of native credential types. @@ -9217,6 +10286,293 @@ returned string may change in future GLib release. The native credentials type is a struct unpcbid. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GDBusActionGroup is an implementation of the #GActionGroup interface that can be used as a proxy for an action group @@ -9237,6 +10593,7 @@ This call is non-blocking. The returned action group may or may not already be filled in. The correct thing to do is connect the signals for the action group to monitor for changes and then to call g_action_group_list_actions() to get the initial list. + a #GDBusActionGroup @@ -9246,8 +10603,9 @@ g_action_group_list_actions() to get the initial list. A #GDBusConnection - - the bus name which exports the action group + + the bus name which exports the action + group or %NULL if @connection is not a message bus connection @@ -9259,6 +10617,7 @@ g_action_group_list_actions() to get the initial list. Information about an annotation. + The reference count or -1 if statically allocated. @@ -9280,6 +10639,7 @@ g_action_group_list_actions() to get the initial list. If @info is statically allocated does nothing. Otherwise increases the reference count. + The same @info. @@ -9295,6 +10655,7 @@ the reference count. If @info is statically allocated, does nothing. Otherwise decreases the reference count of @info. When its reference count drops to 0, the memory used is freed. + @@ -9309,6 +10670,7 @@ the memory used is freed. Looks up the value of an annotation. The cost of this function is O(n) in number of annotations. + The value or %NULL if not found. Do not free, it is owned by @annotations. @@ -9329,6 +10691,7 @@ The cost of this function is O(n) in number of annotations. Information about an argument for a method or a signal. + The reference count or -1 if statically allocated. @@ -9350,6 +10713,7 @@ The cost of this function is O(n) in number of annotations. If @info is statically allocated does nothing. Otherwise increases the reference count. + The same @info. @@ -9365,6 +10729,7 @@ the reference count. If @info is statically allocated, does nothing. Otherwise decreases the reference count of @info. When its reference count drops to 0, the memory used is freed. + @@ -9383,11 +10748,37 @@ peers. Simply instantiate a #GDBusAuthObserver and connect to the signals you are interested in. Note that new signals may be added in the future -## Controlling Authentication # {#auth-observer} +## Controlling Authentication Mechanisms -For example, if you only want to allow D-Bus connections from -processes owned by the same uid as the server, you would use a -signal handler like the following: +By default, a #GDBusServer or server-side #GDBusConnection will allow +any authentication mechanism to be used. If you only +want to allow D-Bus connections with the `EXTERNAL` mechanism, +which makes use of credentials passing and is the recommended +mechanism for modern Unix platforms such as Linux and the BSD family, +you would use a signal handler like this: + +|[<!-- language="C" --> +static gboolean +on_allow_mechanism (GDBusAuthObserver *observer, + const gchar *mechanism, + gpointer user_data) +{ + if (g_strcmp0 (mechanism, "EXTERNAL") == 0) + { + return TRUE; + } + + return FALSE; +} +]| + +## Controlling Authorization # {#auth-observer} + +By default, a #GDBusServer or server-side #GDBusConnection will accept +connections from any successfully authenticated user (but not from +anonymous connections using the `ANONYMOUS` mechanism). If you only +want to allow D-Bus connections from processes owned by the same uid +as the server, you would use a signal handler like the following: |[<!-- language="C" --> static gboolean @@ -9413,6 +10804,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer, ]| Creates a new #GDBusAuthObserver object. + A #GDBusAuthObserver. Free with g_object_unref(). @@ -9420,6 +10812,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer, Emits the #GDBusAuthObserver::allow-mechanism signal on @observer. + %TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not. @@ -9437,6 +10830,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer, Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer. + %TRUE if the peer is authorized, %FALSE if not. @@ -9517,7 +10911,7 @@ supports exchanging UNIX file descriptors with the remote peer. The #GDBusConnection type is used for D-Bus connections to remote peers such as a message buses. It is a low-level API that offers a lot of flexibility. For instance, it lets you establish a connection -over any transport that can by represented as an #GIOStream. +over any transport that can by represented as a #GIOStream. This class is rarely used directly in D-Bus clients. If you are writing a D-Bus client, it is often easier to use the g_bus_own_name(), @@ -9557,7 +10951,7 @@ Here is an example for exporting a subtree: ## An example for file descriptor passing # {#gdbus-unix-fd-client} Here is an example for passing UNIX file descriptors: -[gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-unix-fd-client.c) +[gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-unix-fd-client.c) ## An example for exporting a GObject # {#gdbus-export} @@ -9567,6 +10961,7 @@ Here is an example for exporting a #GObject: Finishes an operation started with g_dbus_connection_new(). + a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). @@ -9582,6 +10977,7 @@ Here is an example for exporting a #GObject: Finishes an operation started with g_dbus_connection_new_for_address(). + a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). @@ -9612,6 +11008,7 @@ g_dbus_connection_new_for_address() for the asynchronous version. If @observer is not %NULL it may be used to control the authentication process. + a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). @@ -9652,6 +11049,7 @@ authentication process. This is a synchronous failable constructor. See g_dbus_connection_new() for the asynchronous version. + a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). @@ -9662,7 +11060,7 @@ g_dbus_connection_new() for the asynchronous version. - the GUID to use if a authenticating as a server or %NULL + the GUID to use if authenticating as a server or %NULL @@ -9697,9 +11095,10 @@ When the operation is finished, @callback will be invoked. You can then call g_dbus_connection_new_finish() to get the result of the operation. -This is a asynchronous failable constructor. See +This is an asynchronous failable constructor. See g_dbus_connection_new_sync() for the synchronous version. + @@ -9709,7 +11108,7 @@ version. - the GUID to use if a authenticating as a server or %NULL + the GUID to use if authenticating as a server or %NULL @@ -9747,15 +11146,16 @@ server. In particular, @flags cannot contain the %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. When the operation is finished, @callback will be invoked. You can -then call g_dbus_connection_new_finish() to get the result of the -operation. +then call g_dbus_connection_new_for_address_finish() to get the result of +the operation. If @observer is not %NULL it may be used to control the authentication process. -This is a asynchronous failable constructor. See +This is an asynchronous failable constructor. See g_dbus_connection_new_for_address_sync() for the synchronous version. + @@ -9805,7 +11205,7 @@ If a filter consumes an incoming message the message is not dispatched anywhere else - not even the standard dispatch machinery (that API such as g_dbus_connection_signal_subscribe() and g_dbus_connection_send_message_with_reply() relies on) will see the -message. Similary, if a filter consumes an outgoing message, the +message. Similarly, if a filter consumes an outgoing message, the message will not be sent to the other peer. If @user_data_free_func is non-%NULL, it will be called (in the @@ -9814,6 +11214,7 @@ method from) at some point after @user_data is no longer needed. (It is not guaranteed to be called synchronously when the filter is removed, and may be called after @connection has been destroyed.) + a filter identifier that can be used with g_dbus_connection_remove_filter() @@ -9852,7 +11253,9 @@ not compatible with the D-Bus protocol, the operation fails with If @reply_type is non-%NULL then the reply will be checked for having this type and an error will be raised if it does not match. Said another way, if you give a @reply_type -then any non-%NULL return value will be of this type. +then any non-%NULL return value will be of this type. Unless it’s +%G_VARIANT_TYPE_UNIT, the @reply_type will be a tuple containing one or more +values. If the @parameters #GVariant is floating, it is consumed. This allows convenient 'inline' use of g_variant_new(), e.g.: @@ -9883,6 +11286,7 @@ function. If @callback is %NULL then the D-Bus method call message will be sent with the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. + @@ -9914,7 +11318,8 @@ the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. - the expected type of the reply, or %NULL + the expected type of the reply (which will be a + tuple), or %NULL @@ -9944,6 +11349,7 @@ the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. Finishes an operation started with g_dbus_connection_call(). + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -9997,6 +11403,7 @@ This allows convenient 'inline' use of g_variant_new(), e.g.: The calling thread is blocked until a reply is received. See g_dbus_connection_call() for the asynchronous version of this method. + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -10052,6 +11459,7 @@ this method. Like g_dbus_connection_call() but also takes a #GUnixFDList object. This method is only available on UNIX. + @@ -10117,6 +11525,7 @@ This method is only available on UNIX. Finishes an operation started with g_dbus_connection_call_with_unix_fd_list(). + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -10142,6 +11551,7 @@ This method is only available on UNIX. Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects. This method is only available on UNIX. + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -10226,6 +11636,7 @@ of the thread you are calling this method from. You can then call g_dbus_connection_close_finish() to get the result of the operation. See g_dbus_connection_close_sync() for the synchronous version. + @@ -10251,6 +11662,7 @@ version. Finishes an operation started with g_dbus_connection_close(). + %TRUE if the operation succeeded, %FALSE if @error is set @@ -10268,10 +11680,11 @@ version. - Synchronously closees @connection. The calling thread is blocked + Synchronously closes @connection. The calling thread is blocked until this is done. See g_dbus_connection_close() for the asynchronous version of this method and more details about what it does. + %TRUE if the operation succeeded, %FALSE if @error is set @@ -10292,7 +11705,10 @@ does. If the parameters GVariant is floating, it is consumed. -This can only fail if @parameters is not compatible with the D-Bus protocol. +This can only fail if @parameters is not compatible with the D-Bus protocol +(%G_IO_ERROR_INVALID_ARGUMENT), or if @connection has been closed +(%G_IO_ERROR_CLOSED). + %TRUE unless @error is set @@ -10348,6 +11764,7 @@ Since incoming action activations and state change requests are rather likely to cause changes on the action group, this effectively limits a given action group to being exported from only one main context. + the ID of the export (never zero), or 0 in case of failure @@ -10380,6 +11797,7 @@ returned (with @error set accordingly). You can unexport the menu model using g_dbus_connection_unexport_menu_model() with the return value of this function. + the ID of the export (never zero), or 0 in case of failure @@ -10414,6 +11832,7 @@ of the thread you are calling this method from. You can then call g_dbus_connection_flush_finish() to get the result of the operation. See g_dbus_connection_flush_sync() for the synchronous version. + @@ -10439,6 +11858,7 @@ version. Finishes an operation started with g_dbus_connection_flush(). + %TRUE if the operation succeeded, %FALSE if @error is set @@ -10460,6 +11880,7 @@ version. until this is done. See g_dbus_connection_flush() for the asynchronous version of this method and more details about what it does. + %TRUE if the operation succeeded, %FALSE if @error is set @@ -10477,6 +11898,7 @@ does. Gets the capabilities negotiated with the remote peer + zero or more flags from the #GDBusCapabilityFlags enumeration @@ -10492,6 +11914,7 @@ does. Gets whether the process is terminated when @connection is closed by the remote peer. See #GDBusConnection:exit-on-close for more details. + whether the process is terminated when @connection is closed by the remote peer @@ -10504,9 +11927,24 @@ closed by the remote peer. See + + Gets the flags used to construct this connection + + + zero or more flags from the #GDBusConnectionFlags enumeration + + + + + a #GDBusConnection + + + + The GUID of the peer performing the role of server when authenticating. See #GDBusConnection:guid for more details. + The GUID. Do not free this string, it is owned by @connection. @@ -10525,6 +11963,7 @@ the current thread. This includes messages sent via both low-level API such as g_dbus_connection_send_message() as well as high-level API such as g_dbus_connection_emit_signal(), g_dbus_connection_call() or g_dbus_proxy_call(). + the last used serial or zero when no message has been sent within the current thread @@ -10547,6 +11986,7 @@ authentication process. In a message bus setup, the message bus is always the server and each application is a client. So this method will always return %NULL for message bus clients. + a #GCredentials or %NULL if not available. Do not free this object, it is owned by @connection. @@ -10565,6 +12005,7 @@ each application is a client. So this method will always return While the #GDBusConnection is active, it will interact with this stream from a worker thread, so it is not safe to interact with the stream directly. + the stream used for IO @@ -10580,7 +12021,8 @@ the stream directly. Gets the unique name of @connection as assigned by the message bus. This can also be used to figure out if @connection is a message bus connection. - + + the unique name or %NULL if @connection is not a message bus connection. Do not free this string, it is owned by @connection. @@ -10595,6 +12037,7 @@ message bus connection. Gets whether @connection is closed. + %TRUE if the connection is closed, %FALSE otherwise @@ -10645,6 +12088,7 @@ reference count is -1, see g_dbus_interface_info_ref()) for as long as the object is exported. Also note that @vtable will be copied. See this [server][gdbus-server] for an example of how to use this method. + 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object() @@ -10680,6 +12124,7 @@ See this [server][gdbus-server] for an example of how to use this method. Version of g_dbus_connection_register_object() using closures instead of a #GDBusInterfaceVTable for easier binding in other languages. + 0 if @error is set, otherwise a registration id (never 0) that can be used with g_dbus_connection_unregister_object() . @@ -10747,6 +12192,7 @@ registration. See this [server][gdbus-subtree-server] for an example of how to use this method. + 0 if @error is set, otherwise a subtree registration id (never 0) that can be used with g_dbus_connection_unregister_subtree() . @@ -10789,6 +12235,7 @@ after calling g_dbus_connection_remove_filter(), so you cannot just free data that the filter might be using. Instead, you should pass a #GDestroyNotify to g_dbus_connection_add_filter(), which will be called when it is guaranteed that the data is no longer needed. + @@ -10823,6 +12270,7 @@ UNIX file descriptors. Note that @message must be unlocked, unless @flags contain the %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. + %TRUE if the message was well-formed and queued for transmission, %FALSE if @error is set @@ -10876,6 +12324,7 @@ Note that @message must be unlocked, unless @flags contain the See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for an example of how to use this low-level API to send and receive UNIX file descriptors. + @@ -10928,6 +12377,7 @@ g_dbus_message_to_gerror() to transcode this to a #GError. See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for an example of how to use this low-level API to send and receive UNIX file descriptors. + a locked #GDBusMessage or %NULL if @error is set @@ -10973,6 +12423,7 @@ UNIX file descriptors. Note that @message must be unlocked, unless @flags contain the %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. + a locked #GDBusMessage that is the reply to @message or %NULL if @error is set @@ -11013,11 +12464,12 @@ closed by the remote peer. See #GDBusConnection:exit-on-close for more details. Note that this function should be used with care. Most modern UNIX -desktops tie the notion of a user session the session bus, and expect -all of a users applications to quit when their bus connection goes away. +desktops tie the notion of a user session with the session bus, and expect +all of a user's applications to quit when their bus connection goes away. If you are setting @exit_on_close to %FALSE for the shared session bus connection, you should make sure that your application exits when the user session ends. + @@ -11059,7 +12511,31 @@ thread-default main context of the thread you are calling this method from) at some point after @user_data is no longer needed. (It is not guaranteed to be called synchronously when the signal is unsubscribed from, and may be called after @connection -has been destroyed.) +has been destroyed.) + +As @callback is potentially invoked in a different thread from where it’s +emitted, it’s possible for this to happen after +g_dbus_connection_signal_unsubscribe() has been called in another thread. +Due to this, @user_data should have a strong reference which is freed with +@user_data_free_func, rather than pointing to data whose lifecycle is tied +to the signal subscription. For example, if a #GObject is used to store the +subscription ID from g_dbus_connection_signal_subscribe(), a strong reference +to that #GObject must be passed to @user_data, and g_object_unref() passed to +@user_data_free_func. You are responsible for breaking the resulting +reference count cycle by explicitly unsubscribing from the signal when +dropping the last external reference to the #GObject. Alternatively, a weak +reference may be used. + +It is guaranteed that if you unsubscribe from a signal using +g_dbus_connection_signal_unsubscribe() from the same thread which made the +corresponding g_dbus_connection_signal_subscribe() call, @callback will not +be invoked after g_dbus_connection_signal_unsubscribe() returns. + +The returned subscription identifier is an opaque value which is guaranteed +to never be zero. + +This function can never fail. + a subscription identifier that can be used with g_dbus_connection_signal_unsubscribe() @@ -11115,7 +12591,16 @@ has been destroyed.) - Unsubscribes from signals. + Unsubscribes from signals. + +Note that there may still be D-Bus traffic to process (relating to this +signal subscription) in the current thread-default #GMainContext after this +function has returned. You should continue to iterate the #GMainContext +until the #GDestroyNotify function passed to +g_dbus_connection_signal_subscribe() is called, in order to avoid memory +leaks through callbacks queued on the #GMainContext after it’s stopped being +iterated. + @@ -11136,6 +12621,7 @@ has been destroyed.) %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method starts processing messages. Does nothing on if @connection wasn't created with this flag or if the method has already been called. + @@ -11153,6 +12639,7 @@ g_dbus_connection_export_action_group(). It is an error to call this function with an ID that wasn't returned from g_dbus_connection_export_action_group() or to call it with the same ID more than once. + @@ -11174,6 +12661,7 @@ g_dbus_connection_export_menu_model(). It is an error to call this function with an ID that wasn't returned from g_dbus_connection_export_menu_model() or to call it with the same ID more than once. + @@ -11190,6 +12678,7 @@ same ID more than once. Unregisters an object. + %TRUE if the object was unregistered, %FALSE otherwise @@ -11208,6 +12697,7 @@ same ID more than once. Unregisters a subtree. + %TRUE if the subtree was unregistered, %FALSE otherwise @@ -11251,7 +12741,7 @@ Note that #GDBusConnection objects returned by g_bus_get_finish() and g_bus_get_sync() will (usually) have this property set to %TRUE. - + Flags from the #GDBusConnectionFlags enumeration. @@ -11504,6 +12994,7 @@ on the wire back to a #GError using g_dbus_error_new_for_dbus_error(). This function is typically only used in object mappings to put a #GError on the wire. Regular applications should not use it. + A D-Bus error name (never %NULL). Free with g_free(). @@ -11522,6 +13013,7 @@ This function is guaranteed to return a D-Bus error name for all #GErrors returned from functions handling remote method calls (e.g. g_dbus_connection_call_finish()) unless g_dbus_error_strip_remote_error() has been used on @error. + an allocated string or %NULL if the D-Bus error name could not be found. Free with g_free(). @@ -11537,6 +13029,7 @@ g_dbus_error_strip_remote_error() has been used on @error. Checks if @error represents an error received via D-Bus from a remote peer. If so, use g_dbus_error_get_remote_error() to get the name of the error. + %TRUE if @error represents an error from a remote peer, %FALSE otherwise. @@ -11576,6 +13069,7 @@ returned #GError using the g_dbus_error_get_remote_error() function This function is typically only used in object mappings to prepare #GError instances for applications. Regular applications should not use it. + An allocated #GError. Free with g_error_free(). @@ -11602,6 +13096,7 @@ it. This is typically done in the routine that returns the #GQuark for an error domain. + %TRUE if the association was created, %FALSE if it already exists. @@ -11609,7 +13104,7 @@ exists. - A #GQuark for a error domain. + A #GQuark for an error domain. @@ -11624,6 +13119,7 @@ exists. Helper function for associating a #GError error domain with D-Bus error names. + @@ -11638,7 +13134,9 @@ exists. A pointer to @num_entries #GDBusErrorEntry struct items. - + + + Number of items to register. @@ -11650,6 +13148,7 @@ exists. Does nothing if @error is %NULL. Otherwise sets *@error to a new #GError created with g_dbus_error_new_for_dbus_error() with @dbus_error_message prepend with @format (unless %NULL). + @@ -11678,6 +13177,7 @@ with @dbus_error_message prepend with @format (unless %NULL). Like g_dbus_error_set_dbus_error() but intended for language bindings. + @@ -11711,6 +13211,7 @@ message field in @error will correspond exactly to what was received on the wire. This is typically used when presenting errors to the end user. + %TRUE if information was stripped, %FALSE otherwise. @@ -11724,13 +13225,14 @@ This is typically used when presenting errors to the end user. Destroys an association previously set up with g_dbus_error_register_error(). + %TRUE if the association was destroyed, %FALSE if it wasn't found. - A #GQuark for a error domain. + A #GQuark for an error domain. @@ -11746,6 +13248,7 @@ This is typically used when presenting errors to the end user. Struct used in g_dbus_error_register_error_domain(). + An error code. @@ -11759,8 +13262,10 @@ This is typically used when presenting errors to the end user. The #GDBusInterface type is the base type for D-Bus interfaces both on the service side (see #GDBusInterfaceSkeleton) and client side (see #GDBusProxy). + Gets the #GDBusObject that @interface_ belongs to, if any. + A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). @@ -11776,6 +13281,7 @@ reference should be freed with g_object_unref(). Gets D-Bus introspection information for the D-Bus interface implemented by @interface_. + A #GDBusInterfaceInfo. Do not free. @@ -11793,6 +13299,7 @@ implemented by @interface_. It is not safe to use the returned object if @interface_ or the returned object is being used from other threads. See g_dbus_interface_dup_object() for a thread-safe alternative. + A #GDBusObject or %NULL. The returned reference belongs to @interface_ and should not be freed. @@ -11809,6 +13316,7 @@ g_dbus_interface_dup_object() for a thread-safe alternative. Sets the #GDBusObject for @interface_ to @object. Note that @interface_ will hold a weak reference to @object. + @@ -11825,6 +13333,7 @@ Note that @interface_ will hold a weak reference to @object. Gets the #GDBusObject that @interface_ belongs to, if any. + A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). @@ -11840,6 +13349,7 @@ reference should be freed with g_object_unref(). Gets D-Bus introspection information for the D-Bus interface implemented by @interface_. + A #GDBusInterfaceInfo. Do not free. @@ -11857,6 +13367,7 @@ implemented by @interface_. It is not safe to use the returned object if @interface_ or the returned object is being used from other threads. See g_dbus_interface_dup_object() for a thread-safe alternative. + A #GDBusObject or %NULL. The returned reference belongs to @interface_ and should not be freed. @@ -11873,6 +13384,7 @@ g_dbus_interface_dup_object() for a thread-safe alternative. Sets the #GDBusObject for @interface_ to @object. Note that @interface_ will hold a weak reference to @object. + @@ -11890,6 +13402,7 @@ Note that @interface_ will hold a weak reference to @object. The type of the @get_property function in #GDBusInterfaceVTable. + A #GVariant with the value for @property_name or %NULL if @error is set. If the returned #GVariant is floating, it is @@ -11929,12 +13442,14 @@ Note that @interface_ will hold a weak reference to @object. Base type for D-Bus interfaces. + The parent interface. + A #GDBusInterfaceInfo. Do not free. @@ -11949,6 +13464,7 @@ Note that @interface_ will hold a weak reference to @object. + A #GDBusObject or %NULL. The returned reference belongs to @interface_ and should not be freed. @@ -11964,6 +13480,7 @@ Note that @interface_ will hold a weak reference to @object. + @@ -11981,6 +13498,7 @@ Note that @interface_ will hold a weak reference to @object. + A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref(). @@ -11997,6 +13515,7 @@ reference should be freed with g_object_unref(). Information about a D-Bus interface. + The reference count or -1 if statically allocated. @@ -12040,6 +13559,7 @@ used and its use count is increased. Note that @info cannot be modified until g_dbus_interface_info_cache_release() is called. + @@ -12054,6 +13574,7 @@ g_dbus_interface_info_cache_release() is called. Decrements the usage count for the cache for @info built by g_dbus_interface_info_cache_build() (if any) and frees the resources used by the cache if the usage count drops to zero. + @@ -12071,6 +13592,7 @@ This function is typically used for generating introspection XML documents at run-time for handling the `org.freedesktop.DBus.Introspectable.Introspect` method. + @@ -12094,6 +13616,7 @@ method. The cost of this function is O(n) in number of methods unless g_dbus_interface_info_cache_build() has been used on @info. + A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info. @@ -12114,6 +13637,7 @@ g_dbus_interface_info_cache_build() has been used on @info. The cost of this function is O(n) in number of properties unless g_dbus_interface_info_cache_build() has been used on @info. + A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info. @@ -12134,6 +13658,7 @@ g_dbus_interface_info_cache_build() has been used on @info. The cost of this function is O(n) in number of signals unless g_dbus_interface_info_cache_build() has been used on @info. + A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info. @@ -12152,6 +13677,7 @@ g_dbus_interface_info_cache_build() has been used on @info. If @info is statically allocated does nothing. Otherwise increases the reference count. + The same @info. @@ -12167,6 +13693,7 @@ the reference count. If @info is statically allocated, does nothing. Otherwise decreases the reference count of @info. When its reference count drops to 0, the memory used is freed. + @@ -12180,6 +13707,7 @@ the memory used is freed. The type of the @method_call function in #GDBusInterfaceVTable. + @@ -12220,6 +13748,7 @@ the memory used is freed. The type of the @set_property function in #GDBusInterfaceVTable. + %TRUE if the property was set to @value, %FALSE if @error is set. @@ -12261,6 +13790,7 @@ the memory used is freed. Abstract base class for D-Bus interfaces on the service side. + If @interface_ has outstanding changes, request for these changes to be @@ -12268,9 +13798,10 @@ emitted immediately. For example, an exported D-Bus interface may queue up property changes and emit the -`org.freedesktop.DBus.Properties::PropertiesChanged` +`org.freedesktop.DBus.Properties.PropertiesChanged` signal later (e.g. in an idle handler). This technique is useful for collapsing multiple property changes into one. + @@ -12282,6 +13813,7 @@ for collapsing multiple property changes into one. + @@ -12297,6 +13829,7 @@ for collapsing multiple property changes into one. Gets D-Bus introspection information for the D-Bus interface implemented by @interface_. + A #GDBusInterfaceInfo (never %NULL). Do not free. @@ -12310,6 +13843,7 @@ implemented by @interface_. Gets all D-Bus properties for @interface_. + A #GVariant of type ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. @@ -12327,6 +13861,7 @@ Free with g_variant_unref(). Gets the interface vtable for the D-Bus interface implemented by @interface_. The returned function pointers should expect @interface_ itself to be passed as @user_data. + A #GDBusInterfaceVTable (never %NULL). @@ -12346,6 +13881,7 @@ onto multiple connections however the @object_path provided must be the same for all connections. Use g_dbus_interface_skeleton_unexport() to unexport the object. + %TRUE if the interface was exported on @connection, otherwise %FALSE with @error set. @@ -12372,9 +13908,10 @@ emitted immediately. For example, an exported D-Bus interface may queue up property changes and emit the -`org.freedesktop.DBus.Properties::PropertiesChanged` +`org.freedesktop.DBus.Properties.PropertiesChanged` signal later (e.g. in an idle handler). This technique is useful for collapsing multiple property changes into one. + @@ -12387,6 +13924,7 @@ for collapsing multiple property changes into one. Gets the first connection that @interface_ is exported on, if any. + A #GDBusConnection or %NULL if @interface_ is not exported anywhere. Do not free, the object belongs to @interface_. @@ -12401,6 +13939,7 @@ not exported anywhere. Do not free, the object belongs to @interface_. Gets a list of the connections that @interface_ is exported on. + A list of all the connections that @interface_ is exported on. The returned @@ -12420,6 +13959,7 @@ not exported anywhere. Do not free, the object belongs to @interface_. Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior of @interface_ + One or more flags from the #GDBusInterfaceSkeletonFlags enumeration. @@ -12434,6 +13974,7 @@ of @interface_ Gets D-Bus introspection information for the D-Bus interface implemented by @interface_. + A #GDBusInterfaceInfo (never %NULL). Do not free. @@ -12447,6 +13988,7 @@ implemented by @interface_. Gets the object path that @interface_ is exported on, if any. + A string owned by @interface_ or %NULL if @interface_ is not exported anywhere. Do not free, the string belongs to @interface_. @@ -12461,6 +14003,7 @@ anywhere. Do not free, the string belongs to @interface_. Gets all D-Bus properties for @interface_. + A #GVariant of type ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. @@ -12478,6 +14021,7 @@ Free with g_variant_unref(). Gets the interface vtable for the D-Bus interface implemented by @interface_. The returned function pointers should expect @interface_ itself to be passed as @user_data. + A #GDBusInterfaceVTable (never %NULL). @@ -12491,6 +14035,7 @@ itself to be passed as @user_data. Checks if @interface_ is exported on @connection. + %TRUE if @interface_ is exported on @connection, %FALSE otherwise. @@ -12508,6 +14053,7 @@ itself to be passed as @user_data. Sets flags describing what the behavior of @skeleton should be. + @@ -12527,6 +14073,7 @@ itself to be passed as @user_data. To unexport @interface_ from only a single connection, use g_dbus_interface_skeleton_unexport_from_connection() + @@ -12542,6 +14089,7 @@ g_dbus_interface_skeleton_unexport_from_connection() To stop exporting on all connections the interface is exported on, use g_dbus_interface_skeleton_unexport(). + @@ -12614,12 +14162,14 @@ to was exported in. Class structure for #GDBusInterfaceSkeleton. + The parent class. + A #GDBusInterfaceInfo (never %NULL). Do not free. @@ -12634,6 +14184,7 @@ to was exported in. + A #GDBusInterfaceVTable (never %NULL). @@ -12648,6 +14199,7 @@ to was exported in. + A #GVariant of type ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. @@ -12664,6 +14216,7 @@ Free with g_variant_unref(). + @@ -12676,12 +14229,13 @@ Free with g_variant_unref(). - + + @@ -12696,7 +14250,7 @@ Free with g_variant_unref(). - + @@ -12714,6 +14268,7 @@ Free with g_variant_unref(). + Virtual table for handling properties and method calls for a D-Bus @@ -12757,6 +14312,7 @@ If you have writable properties specified in your interface info, you must ensure that you either provide a non-%NULL @set_property() function or provide an implementation of the `Set` call. If implementing the call, you must return the value of type %G_VARIANT_TYPE_UNIT. + Function for handling incoming method calls. @@ -12770,7 +14326,7 @@ the call, you must return the value of type %G_VARIANT_TYPE_UNIT. - + @@ -12788,6 +14344,7 @@ All signals on the menu model (and any linked models) are reported with respect to this context. All calls on the returned menu model (and linked models) must also originate from this same context, with the thread default main context unchanged. + a #GDBusMenuModel object. Free with g_object_unref(). @@ -12798,8 +14355,9 @@ the thread default main context unchanged. a #GDBusConnection - - the bus name which exports the menu model + + the bus name which exports the menu model + or %NULL if @connection is not a message bus connection @@ -12814,6 +14372,7 @@ the thread default main context unchanged. on a #GDBusConnection. Creates a new empty #GDBusMessage. + A #GDBusMessage. Free with g_object_unref(). @@ -12822,7 +14381,11 @@ on a #GDBusConnection. Creates a new #GDBusMessage from the data stored at @blob. The byte order that the message was in can be retrieved using -g_dbus_message_get_byte_order(). +g_dbus_message_get_byte_order(). + +If the @blob cannot be parsed, contains invalid fields, or contains invalid +headers, %G_IO_ERROR_INVALID_ARGUMENT will be returned. + A new #GDBusMessage or %NULL if @error is set. Free with g_object_unref(). @@ -12830,7 +14393,7 @@ g_object_unref(). - A blob represent a binary D-Bus message. + A blob representing a binary D-Bus message. @@ -12847,6 +14410,7 @@ g_object_unref(). Creates a new #GDBusMessage for a method call. + A #GDBusMessage. Free with g_object_unref(). @@ -12872,6 +14436,7 @@ g_object_unref(). Creates a new #GDBusMessage for a signal emission. + A #GDBusMessage. Free with g_object_unref(). @@ -12894,6 +14459,7 @@ g_object_unref(). Utility function to calculate how many bytes are needed to completely deserialize the D-Bus message stored at @blob. + Number of bytes needed or -1 if @error is set (e.g. if @blob contains invalid data or not enough data is available to @@ -12902,7 +14468,7 @@ determine the size). - A blob represent a binary D-Bus message. + A blob representing a binary D-Bus message. @@ -12920,6 +14486,7 @@ to not be locked. This operation can fail if e.g. @message contains file descriptors and the per-process or system-wide open files limit is reached. + A new #GDBusMessage or %NULL if @error is set. Free with g_object_unref(). @@ -12934,6 +14501,7 @@ and the per-process or system-wide open files limit is reached. Convenience to get the first item in the body of @message. + The string item or %NULL if the first item in the body of @message is not a string. @@ -12948,6 +14516,7 @@ and the per-process or system-wide open files limit is reached. Gets the body of a message. + A #GVariant or %NULL if the body is empty. Do not free, it is owned by @message. @@ -12962,6 +14531,7 @@ empty. Do not free, it is owned by @message. Gets the byte order of @message. + The byte order. @@ -12975,6 +14545,7 @@ empty. Do not free, it is owned by @message. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. + The value. @@ -12988,6 +14559,7 @@ empty. Do not free, it is owned by @message. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. + The value. @@ -13001,6 +14573,7 @@ empty. Do not free, it is owned by @message. Gets the flags for @message. + Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together). @@ -13013,8 +14586,12 @@ empty. Do not free, it is owned by @message. - Gets a header field on @message. - + Gets a header field on @message. + +The caller is responsible for checking the type of the returned #GVariant +matches what is expected. + + A #GVariant with the value if the header was found, %NULL otherwise. Do not free, it is owned by @message. @@ -13032,6 +14609,7 @@ otherwise. Do not free, it is owned by @message. Gets an array of all header fields on @message that are set. + An array of header fields terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element @@ -13049,6 +14627,7 @@ is a #guchar. Free with g_free(). Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. + The value. @@ -13064,6 +14643,7 @@ is a #guchar. Free with g_free(). Checks whether @message is locked. To monitor changes to this value, conncet to the #GObject::notify signal to listen for changes on the #GDBusMessage:locked property. + %TRUE if @message is locked, %FALSE otherwise. @@ -13077,6 +14657,7 @@ on the #GDBusMessage:locked property. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. + The value. @@ -13090,6 +14671,7 @@ on the #GDBusMessage:locked property. Gets the type of @message. + A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration). @@ -13103,6 +14685,7 @@ on the #GDBusMessage:locked property. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. + The value. @@ -13116,6 +14699,7 @@ on the #GDBusMessage:locked property. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. + The value. @@ -13129,6 +14713,7 @@ on the #GDBusMessage:locked property. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. + The value. @@ -13142,6 +14727,7 @@ on the #GDBusMessage:locked property. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. + The value. @@ -13155,6 +14741,7 @@ on the #GDBusMessage:locked property. Gets the serial for @message. + A #guint32. @@ -13168,6 +14755,7 @@ on the #GDBusMessage:locked property. Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. + The value. @@ -13183,6 +14771,7 @@ on the #GDBusMessage:locked property. Gets the UNIX file descriptors associated with @message, if any. This method is only available on UNIX. + A #GUnixFDList or %NULL if no file descriptors are associated. Do not free, this object is owned by @message. @@ -13197,6 +14786,7 @@ associated. Do not free, this object is owned by @message. If @message is locked, does nothing. Otherwise locks the message. + @@ -13209,6 +14799,7 @@ associated. Do not free, this object is owned by @message. Creates a new #GDBusMessage that is an error reply to @method_call_message. + A #GDBusMessage. Free with g_object_unref(). @@ -13235,6 +14826,7 @@ create a reply message to. Creates a new #GDBusMessage that is an error reply to @method_call_message. + A #GDBusMessage. Free with g_object_unref(). @@ -13257,6 +14849,7 @@ create a reply message to. Like g_dbus_message_new_method_error() but intended for language bindings. + A #GDBusMessage. Free with g_object_unref(). @@ -13283,6 +14876,7 @@ create a reply message to. Creates a new #GDBusMessage that is a reply to @method_call_message. + #GDBusMessage. Free with g_object_unref(). @@ -13328,6 +14922,7 @@ Body: () UNIX File Descriptors: fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635 ]| + A string that should be freed with g_free(). @@ -13349,6 +14944,7 @@ UNIX File Descriptors: type string of @body (or cleared if @body is %NULL). If @body is floating, @message assumes ownership of @body. + @@ -13365,6 +14961,7 @@ If @body is floating, @message assumes ownership of @body. Sets the byte order of @message. + @@ -13381,6 +14978,7 @@ If @body is floating, @message assumes ownership of @body. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. + @@ -13397,6 +14995,7 @@ If @body is floating, @message assumes ownership of @body. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. + @@ -13413,6 +15012,7 @@ If @body is floating, @message assumes ownership of @body. Sets the flags to set on @message. + @@ -13432,6 +15032,7 @@ enumeration bitwise ORed together). Sets a header field on @message. If @value is floating, @message assumes ownership of @value. + @@ -13452,6 +15053,7 @@ If @value is floating, @message assumes ownership of @value. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. + @@ -13468,6 +15070,7 @@ If @value is floating, @message assumes ownership of @value. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. + @@ -13484,6 +15087,7 @@ If @value is floating, @message assumes ownership of @value. Sets @message to be of @type. + @@ -13500,6 +15104,7 @@ If @value is floating, @message assumes ownership of @value. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. + @@ -13516,6 +15121,7 @@ If @value is floating, @message assumes ownership of @value. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. + @@ -13532,6 +15138,7 @@ If @value is floating, @message assumes ownership of @value. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. + @@ -13548,6 +15155,7 @@ If @value is floating, @message assumes ownership of @value. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. + @@ -13564,6 +15172,7 @@ If @value is floating, @message assumes ownership of @value. Sets the serial for @message. + @@ -13580,6 +15189,7 @@ If @value is floating, @message assumes ownership of @value. Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. + @@ -13601,6 +15211,7 @@ field is set to the number of fds in @fd_list (or cleared if @fd_list is %NULL). This method is only available on UNIX. + @@ -13618,6 +15229,7 @@ This method is only available on UNIX. Serializes @message to a blob. The byte order returned by g_dbus_message_get_byte_order() will be used. + A pointer to a valid binary D-Bus message of @out_size bytes generated by @message @@ -13649,6 +15261,7 @@ Otherwise this method encodes the error in @message as a #GError using g_dbus_error_set_dbus_error() using the information in the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as well as the first string item in @message's body. + %TRUE if @error was set, %FALSE otherwise. @@ -13686,7 +15299,7 @@ passive_filter (GDBusConnection *connection gboolean incoming, gpointer user_data) { - /<!-- -->* inspect @message *<!-- -->/ + // inspect @message return message; } ]| @@ -13719,10 +15332,10 @@ modifying_filter (GDBusConnection *connection error = NULL; copy = g_dbus_message_copy (message, &error); - /<!-- -->* handle @error being is set *<!-- -->/ + // handle @error being set g_object_unref (message); - /<!-- -->* modify @copy *<!-- -->/ + // modify @copy return copy; } @@ -13733,6 +15346,7 @@ descriptors, not compatible with @connection), then a warning is logged to standard error. Applications can check this ahead of time using g_dbus_message_to_blob() passing a #GDBusCapabilityFlags value obtained from @connection. + A #GDBusMessage that will be freed with g_object_unref() or %NULL to drop the message. Passive filter @@ -13830,6 +15444,7 @@ authorization. Since 2.46. Information about a method on an D-Bus interface. + The reference count or -1 if statically allocated. @@ -13859,6 +15474,7 @@ authorization. Since 2.46. If @info is statically allocated does nothing. Otherwise increases the reference count. + The same @info. @@ -13874,6 +15490,7 @@ the reference count. If @info is statically allocated, does nothing. Otherwise decreases the reference count of @info. When its reference count drops to 0, the memory used is freed. + @@ -13895,6 +15512,7 @@ it as an argument to the handle_method_call() function in a #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object(). Gets the #GDBusConnection the method was invoked on. + A #GDBusConnection. Do not free, it is owned by @invocation. @@ -13913,6 +15531,7 @@ If this method call is a property Get, Set or GetAll call that has been redirected to the method call handler then "org.freedesktop.DBus.Properties" will be returned. See #GDBusInterfaceVTable for more information. + A string. Do not free, it is owned by @invocation. @@ -13933,6 +15552,7 @@ descriptor passing, that cannot be properly expressed in the See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for an example of how to use this low-level API to send and receive UNIX file descriptors. + #GDBusMessage. Do not free, it is owned by @invocation. @@ -13951,6 +15571,7 @@ If this method invocation is a property Get, Set or GetAll call that has been redirected to the method call handler then %NULL will be returned. See g_dbus_method_invocation_get_property_info() and #GDBusInterfaceVTable for more information. + A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation. @@ -13964,6 +15585,7 @@ returned. See g_dbus_method_invocation_get_property_info() and Gets the name of the method that was invoked. + A string. Do not free, it is owned by @invocation. @@ -13977,6 +15599,7 @@ returned. See g_dbus_method_invocation_get_property_info() and Gets the object path the method was invoked on. + A string. Do not free, it is owned by @invocation. @@ -13991,6 +15614,7 @@ returned. See g_dbus_method_invocation_get_property_info() and Gets the parameters of the method invocation. If there are no input parameters then this will return a GVariant with 0 children rather than NULL. + A #GVariant tuple. Do not unref this because it is owned by @invocation. @@ -14014,6 +15638,7 @@ property_set() vtable pointers being unset. See #GDBusInterfaceVTable for more information. If the call was GetAll, %NULL will be returned. + a #GDBusPropertyInfo or %NULL @@ -14027,6 +15652,7 @@ If the call was GetAll, %NULL will be returned. Gets the bus name that invoked the method. + A string. Do not free, it is owned by @invocation. @@ -14040,6 +15666,7 @@ If the call was GetAll, %NULL will be returned. Gets the @user_data #gpointer passed to g_dbus_connection_register_object(). + A #gpointer. @@ -14057,6 +15684,7 @@ If the call was GetAll, %NULL will be returned. This method will take ownership of @invocation. See #GDBusInterfaceVTable for more information about the ownership of @invocation. + @@ -14096,6 +15724,7 @@ This method will take ownership of @invocation. See Since 2.48, if the method call requested for a reply not to be sent then this call will free @invocation but otherwise do nothing (as per the recommendations of the D-Bus specification). + @@ -14128,6 +15757,7 @@ the recommendations of the D-Bus specification). This method will take ownership of @invocation. See #GDBusInterfaceVTable for more information about the ownership of @invocation. + @@ -14157,6 +15787,7 @@ language bindings. This method will take ownership of @invocation. See #GDBusInterfaceVTable for more information about the ownership of @invocation. + @@ -14190,6 +15821,7 @@ instead of the error domain, error code and message. This method will take ownership of @invocation. See #GDBusInterfaceVTable for more information about the ownership of @invocation. + @@ -14226,7 +15858,7 @@ else g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", result_string)); -/<!-- -->* Do not free @invocation here; returning a value does that *<!-- -->/ +// Do not free @invocation here; returning a value does that ]| This method will take ownership of @invocation. See @@ -14237,6 +15869,7 @@ Since 2.48, if the method call requested for a reply not to be sent then this call will sink @parameters and free @invocation, but otherwise do nothing (as per the recommendations of the D-Bus specification). + @@ -14259,6 +15892,7 @@ This method is only available on UNIX. This method will take ownership of @invocation. See #GDBusInterfaceVTable for more information about the ownership of @invocation. + @@ -14284,6 +15918,7 @@ of @error so the caller does not need to free it. This method will take ownership of @invocation. See #GDBusInterfaceVTable for more information about the ownership of @invocation. + @@ -14301,6 +15936,7 @@ This method will take ownership of @invocation. See Information about nodes in a remote object hierarchy. + The reference count or -1 if statically allocated. @@ -14336,6 +15972,7 @@ The introspection XML must contain exactly one top-level Note that this routine is using a [GMarkup][glib-Simple-XML-Subset-Parser.description]-based parser that only accepts a subset of valid XML documents. + A #GDBusNodeInfo structure or %NULL if @error is set. Free with g_dbus_node_info_unref(). @@ -14353,6 +15990,7 @@ with g_dbus_node_info_unref(). This function is typically used for generating introspection XML documents at run-time for handling the `org.freedesktop.DBus.Introspectable.Introspect` method. + @@ -14375,6 +16013,7 @@ handling the `org.freedesktop.DBus.Introspectable.Introspect` method. Looks up information about an interface. The cost of this function is O(n) in number of interfaces. + A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info. @@ -14393,6 +16032,7 @@ The cost of this function is O(n) in number of interfaces. If @info is statically allocated does nothing. Otherwise increases the reference count. + The same @info. @@ -14408,6 +16048,7 @@ the reference count. If @info is statically allocated, does nothing. Otherwise decreases the reference count of @info. When its reference count drops to 0, the memory used is freed. + @@ -14424,9 +16065,11 @@ the memory used is freed. the service side (see #GDBusObjectSkeleton) and the client side (see #GDBusObjectProxy). It is essentially just a container of interfaces. + Gets the D-Bus interface with name @interface_name associated with @object, if any. + %NULL if not found, otherwise a #GDBusInterface that must be freed with g_object_unref(). @@ -14445,6 +16088,7 @@ interfaces. Gets the D-Bus interfaces associated with @object. + A list of #GDBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed @@ -14462,6 +16106,7 @@ interfaces. Gets the object path for @object. + A string owned by @object. Do not free. @@ -14474,6 +16119,7 @@ interfaces. + @@ -14487,6 +16133,7 @@ interfaces. + @@ -14502,6 +16149,7 @@ interfaces. Gets the D-Bus interface with name @interface_name associated with @object, if any. + %NULL if not found, otherwise a #GDBusInterface that must be freed with g_object_unref(). @@ -14520,6 +16168,7 @@ interfaces. Gets the D-Bus interfaces associated with @object. + A list of #GDBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed @@ -14537,6 +16186,7 @@ interfaces. Gets the object path for @object. + A string owned by @object. Do not free. @@ -14575,12 +16225,14 @@ interfaces. Base object type for D-Bus objects. + The parent interface. + A string owned by @object. Do not free. @@ -14595,6 +16247,7 @@ interfaces. + A list of #GDBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed @@ -14613,6 +16266,7 @@ interfaces. + %NULL if not found, otherwise a #GDBusInterface that must be freed with g_object_unref(). @@ -14632,6 +16286,7 @@ interfaces. + @@ -14647,6 +16302,7 @@ interfaces. + @@ -14669,9 +16325,11 @@ interface. See #GDBusObjectManagerClient for the client-side implementation and #GDBusObjectManagerServer for the service-side implementation. + Gets the interface proxy for @interface_name at @object_path, if any. + A #GDBusInterface instance or %NULL. Free with g_object_unref(). @@ -14683,17 +16341,18 @@ any. - Object path to lookup. + Object path to look up. - D-Bus interface name to lookup. + D-Bus interface name to look up. Gets the #GDBusObjectProxy at @object_path, if any. + A #GDBusObject or %NULL. Free with g_object_unref(). @@ -14705,13 +16364,14 @@ any. - Object path to lookup. + Object path to look up. Gets the object path that @manager is for. + A string owned by @manager. Do not free. @@ -14725,6 +16385,7 @@ any. Gets all #GDBusObject objects known to @manager. + A list of #GDBusObject objects. The returned list should be freed with @@ -14742,6 +16403,7 @@ any. + @@ -14758,6 +16420,7 @@ any. + @@ -14774,6 +16437,7 @@ any. + @@ -14787,6 +16451,7 @@ any. + @@ -14802,6 +16467,7 @@ any. Gets the interface proxy for @interface_name at @object_path, if any. + A #GDBusInterface instance or %NULL. Free with g_object_unref(). @@ -14813,17 +16479,18 @@ any. - Object path to lookup. + Object path to look up. - D-Bus interface name to lookup. + D-Bus interface name to look up. Gets the #GDBusObjectProxy at @object_path, if any. + A #GDBusObject or %NULL. Free with g_object_unref(). @@ -14835,13 +16502,14 @@ any. - Object path to lookup. + Object path to look up. Gets the object path that @manager is for. + A string owned by @manager. Do not free. @@ -14855,6 +16523,7 @@ any. Gets all #GDBusObject objects known to @manager. + A list of #GDBusObject objects. The returned list should be freed with @@ -15010,11 +16679,13 @@ in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects originating from the #GDBusObjectManagerClient object will be created in the same context and, consequently, will deliver signals in the same main loop. + Finishes an operation started with g_dbus_object_manager_client_new(). + A #GDBusObjectManagerClient object or %NULL if @error is set. Free @@ -15030,6 +16701,7 @@ same main loop. Finishes an operation started with g_dbus_object_manager_client_new_for_bus(). + A #GDBusObjectManagerClient object or %NULL if @error is set. Free @@ -15050,6 +16722,7 @@ of a #GDBusConnection. This is a synchronous failable constructor - the calling thread is blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus() for the asynchronous version. + A #GDBusObjectManagerClient object or %NULL if @error is set. Free @@ -15097,6 +16770,7 @@ for the asynchronous version. This is a synchronous failable constructor - the calling thread is blocked until a reply is received. See g_dbus_object_manager_client_new() for the asynchronous version. + A #GDBusObjectManagerClient object or %NULL if @error is set. Free @@ -15147,6 +16821,7 @@ ready, @callback will be invoked in the of the thread you are calling this method from. You can then call g_dbus_object_manager_client_new_finish() to get the result. See g_dbus_object_manager_client_new_sync() for the synchronous version. + @@ -15203,6 +16878,7 @@ ready, @callback will be invoked in the of the thread you are calling this method from. You can then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. + @@ -15250,6 +16926,7 @@ g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. + @@ -15272,6 +16949,7 @@ g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. + @@ -15298,6 +16976,7 @@ g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. Gets the #GDBusConnection used by @manager. + A #GDBusConnection object. Do not free, the object belongs to @manager. @@ -15312,6 +16991,7 @@ g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. Gets the flags that @manager was constructed with. + Zero of more flags from the #GDBusObjectManagerClientFlags enumeration. @@ -15327,6 +17007,7 @@ enumeration. Gets the name that @manager is for, or %NULL if not a message bus connection. + A unique or well-known name. Do not free, the string belongs to @manager. @@ -15344,6 +17025,7 @@ belongs to @manager. no-one currently owns that name. You can connect to the #GObject::notify signal to track changes to the #GDBusObjectManagerClient:name-owner property. + The name owner or %NULL if no name owner exists. Free with g_free(). @@ -15429,11 +17111,12 @@ that @manager was constructed in. - A #GVariant containing the properties that changed. + A #GVariant containing the properties that changed (type: `a{sv}`). - A %NULL terminated array of properties that was invalidated. + A %NULL terminated + array of properties that were invalidated. @@ -15478,12 +17161,14 @@ that @manager was constructed in. Class structure for #GDBusObjectManagerClient. + The parent class. + @@ -15511,6 +17196,7 @@ that @manager was constructed in. + @@ -15534,7 +17220,7 @@ that @manager was constructed in. - + @@ -15552,15 +17238,18 @@ that @manager was constructed in. + Base type for D-Bus object managers. + The parent interface. + A string owned by @manager. Do not free. @@ -15575,6 +17264,7 @@ that @manager was constructed in. + A list of #GDBusObject objects. The returned list should be freed with @@ -15594,6 +17284,7 @@ that @manager was constructed in. + A #GDBusObject or %NULL. Free with g_object_unref(). @@ -15605,7 +17296,7 @@ that @manager was constructed in. - Object path to lookup. + Object path to look up. @@ -15613,6 +17304,7 @@ that @manager was constructed in. + A #GDBusInterface instance or %NULL. Free with g_object_unref(). @@ -15624,11 +17316,11 @@ that @manager was constructed in. - Object path to lookup. + Object path to look up. - D-Bus interface name to lookup. + D-Bus interface name to look up. @@ -15636,6 +17328,7 @@ that @manager was constructed in. + @@ -15651,6 +17344,7 @@ that @manager was constructed in. + @@ -15666,6 +17360,7 @@ that @manager was constructed in. + @@ -15684,6 +17379,7 @@ that @manager was constructed in. + @@ -15724,6 +17420,7 @@ See #GDBusObjectManagerClient for the client-side code that is intended to be used with #GDBusObjectManagerServer or any D-Bus object implementing the org.freedesktop.DBus.ObjectManager interface. + Creates a new #GDBusObjectManagerServer object. @@ -15733,6 +17430,7 @@ use g_dbus_object_manager_server_set_connection(). Normally you want to export all of your objects before doing so to avoid [InterfacesAdded](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) signals being emitted. + A #GDBusObjectManagerServer object. Free with g_object_unref(). @@ -15755,6 +17453,7 @@ object path for @manager. Note that @manager will take a reference on @object for as long as it is exported. + @@ -15774,6 +17473,7 @@ it is exported. the form _N (with N being a natural number) to @object's object path if an object with the given path already exists. As such, the #GDBusObjectProxy:g-object-path property of @object may be modified. + @@ -15790,6 +17490,7 @@ if an object with the given path already exists. As such, the Gets the #GDBusConnection used by @manager. + A #GDBusConnection object or %NULL if @manager isn't exported on a connection. The returned object should @@ -15805,6 +17506,7 @@ if an object with the given path already exists. As such, the Returns whether @object is currently exported on @manager. + %TRUE if @object is exported @@ -15823,6 +17525,7 @@ if an object with the given path already exists. As such, the Exports all objects managed by @manager on @connection. If @connection is %NULL, stops exporting objects. + @@ -15843,6 +17546,7 @@ does nothing. Note that @object_path must be in the hierarchy rooted by the object path for @manager. + %TRUE if object at @object_path was removed, %FALSE otherwise. @@ -15875,27 +17579,31 @@ object path for @manager. Class structure for #GDBusObjectManagerServer. + The parent class. - + + A #GDBusObjectProxy is an object used to represent a remote object with one or more D-Bus interfaces. Normally, you don't instantiate a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient is used to obtain it. + Creates a new #GDBusObjectProxy for the given connection and object path. + a new #GDBusObjectProxy @@ -15913,6 +17621,7 @@ object path. Gets the connection that @proxy is for. + A #GDBusConnection. Do not free, the object is owned by @proxy. @@ -15942,17 +17651,19 @@ object path. Class structure for #GDBusObjectProxy. + The parent class. - + + A #GDBusObjectSkeleton instance is essentially a group of D-Bus @@ -15960,9 +17671,11 @@ interfaces. The set of exported interfaces on the object may be dynamic and change at runtime. This type is intended to be used with #GDBusObjectManager. + Creates a new #GDBusObjectSkeleton. + A #GDBusObjectSkeleton. Free with g_object_unref(). @@ -15975,6 +17688,7 @@ This type is intended to be used with #GDBusObjectManager. + @@ -15998,6 +17712,7 @@ interface name, it is removed before @interface_ is added. Note that @object takes its own reference on @interface_ and holds it until removed. + @@ -16016,6 +17731,7 @@ it until removed. This method simply calls g_dbus_interface_skeleton_flush() on all interfaces belonging to @object. See that method for when flushing is useful. + @@ -16028,6 +17744,7 @@ is useful. Removes @interface_ from @object. + @@ -16047,6 +17764,7 @@ is useful. If no D-Bus interface of the given interface exists, this function does nothing. + @@ -16063,6 +17781,7 @@ does nothing. Sets the object path for @object. + @@ -16114,12 +17833,14 @@ The default class handler just returns %TRUE. Class structure for #GDBusObjectSkeleton. + The parent class. + @@ -16137,15 +17858,17 @@ The default class handler just returns %TRUE. - + + Information about a D-Bus property on a D-Bus interface. + The reference count or -1 if statically allocated. @@ -16171,6 +17894,7 @@ The default class handler just returns %TRUE. If @info is statically allocated does nothing. Otherwise increases the reference count. + The same @info. @@ -16186,6 +17910,7 @@ the reference count. If @info is statically allocated, does nothing. Otherwise decreases the reference count of @info. When its reference count drops to 0, the memory used is freed. + @@ -16215,14 +17940,13 @@ interface on a remote object. A #GDBusProxy can be constructed for both well-known and unique names. By default, #GDBusProxy will cache all properties (and listen to -changes) of the remote object, and proxy all signals that gets +changes) of the remote object, and proxy all signals that get emitted. This behaviour can be changed by passing suitable #GDBusProxyFlags when the proxy is created. If the proxy is for a well-known name, the property cache is flushed when the name owner vanishes and reloaded when a name owner appears. -If a #GDBusProxy is used for a well-known name, the owner of the -name is tracked and can be read from +The unique name owner of the proxy's name is tracked and can be read from #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to get notified of changes. Additionally, only signals and property changes emitted from the current name owner are considered and @@ -16248,13 +17972,16 @@ of the thread where the instance was constructed. An example using a proxy for a well-known name can be found in [gdbus-example-watch-proxy.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-watch-proxy.c) + Finishes creating a #GDBusProxy. + - A #GDBusProxy or %NULL if @error is set. Free with g_object_unref(). + A #GDBusProxy or %NULL if @error is set. + Free with g_object_unref(). @@ -16266,8 +17993,10 @@ An example using a proxy for a well-known name can be found in Finishes creating a #GDBusProxy. + - A #GDBusProxy or %NULL if @error is set. Free with g_object_unref(). + A #GDBusProxy or %NULL if @error is set. + Free with g_object_unref(). @@ -16281,8 +18010,10 @@ An example using a proxy for a well-known name can be found in Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + - A #GDBusProxy or %NULL if error is set. Free with g_object_unref(). + A #GDBusProxy or %NULL if error is set. + Free with g_object_unref(). @@ -16327,6 +18058,10 @@ If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up match rules for signals. Connect to the #GDBusProxy::g-signal signal to handle signals from the remote object. +If both %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES and +%G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS are set, this constructor is +guaranteed to return immediately without blocking. + If @name is a well-known name and the %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION flags aren't set and no name owner currently exists, the message bus @@ -16336,8 +18071,10 @@ This is a synchronous failable constructor. See g_dbus_proxy_new() and g_dbus_proxy_new_finish() for the asynchronous version. #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + - A #GDBusProxy or %NULL if error is set. Free with g_object_unref(). + A #GDBusProxy or %NULL if error is set. + Free with g_object_unref(). @@ -16383,6 +18120,10 @@ If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up match rules for signals. Connect to the #GDBusProxy::g-signal signal to handle signals from the remote object. +If both %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES and +%G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS are set, this constructor is +guaranteed to complete immediately without blocking. + If @name is a well-known name and the %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION flags aren't set and no name owner currently exists, the message bus @@ -16395,6 +18136,7 @@ g_dbus_proxy_new_finish() to get the result. See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + @@ -16441,6 +18183,7 @@ See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection. #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. + @@ -16484,6 +18227,7 @@ See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. + @@ -16500,6 +18244,7 @@ See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. + @@ -16561,6 +18306,7 @@ version of this method. If @callback is %NULL then the D-Bus method call message will be sent with the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. + @@ -16603,6 +18349,7 @@ care about the result of the method invocation. Finishes an operation started with g_dbus_proxy_call(). + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -16654,6 +18401,7 @@ method. If @proxy has an expected interface (see #GDBusProxy:g-interface-info) and @method_name is referenced by it, then the return value is checked against the return type. + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -16692,6 +18440,7 @@ return values. Free with g_variant_unref(). Like g_dbus_proxy_call() but also takes a #GUnixFDList object. This method is only available on UNIX. + @@ -16738,6 +18487,7 @@ care about the result of the method invocation. Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list(). + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -16762,6 +18512,7 @@ return values. Free with g_variant_unref(). Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects. This method is only available on UNIX. + %NULL if @error is set. Otherwise a #GVariant tuple with return values. Free with g_variant_unref(). @@ -16811,10 +18562,11 @@ blocking IO. If @proxy has an expected interface (see #GDBusProxy:g-interface-info) and @property_name is referenced by it, then @value is checked against the type of the property. - - A reference to the #GVariant instance that holds the value -for @property_name or %NULL if the value is not in the cache. The -returned reference must be freed with g_variant_unref(). + + + A reference to the #GVariant instance + that holds the value for @property_name or %NULL if the value is not in + the cache. The returned reference must be freed with g_variant_unref(). @@ -16830,8 +18582,10 @@ returned reference must be freed with g_variant_unref(). Gets the names of all cached properties on @proxy. - - A %NULL-terminated array of strings or %NULL if + + + A + %NULL-terminated array of strings or %NULL if @proxy has no cached properties. Free the returned array with g_strfreev(). @@ -16847,6 +18601,7 @@ returned reference must be freed with g_variant_unref(). Gets the connection @proxy is for. + A #GDBusConnection owned by @proxy. Do not free. @@ -16864,6 +18619,7 @@ passed as @timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. See the #GDBusProxy:g-default-timeout property for more details. + Timeout to use for @proxy. @@ -16877,6 +18633,7 @@ See the #GDBusProxy:g-default-timeout property for more details. Gets the flags that @proxy was constructed with. + Flags from the #GDBusProxyFlags enumeration. @@ -16892,9 +18649,10 @@ See the #GDBusProxy:g-default-timeout property for more details. Returns the #GDBusInterfaceInfo, if any, specifying the interface that @proxy conforms to. See the #GDBusProxy:g-interface-info property for more details. - - A #GDBusInterfaceInfo or %NULL. Do not unref the returned -object, it is owned by @proxy. + + + A #GDBusInterfaceInfo or %NULL. + Do not unref the returned object, it is owned by @proxy. @@ -16906,6 +18664,7 @@ object, it is owned by @proxy. Gets the D-Bus interface name @proxy is for. + A string owned by @proxy. Do not free. @@ -16919,6 +18678,7 @@ object, it is owned by @proxy. Gets the name that @proxy was constructed for. + A string owned by @proxy. Do not free. @@ -16935,8 +18695,10 @@ object, it is owned by @proxy. no-one currently owns that name. You may connect to the #GObject::notify signal to track changes to the #GDBusProxy:g-name-owner property. - - The name owner or %NULL if no name owner exists. Free with g_free(). + + + The name owner or %NULL if no name + owner exists. Free with g_free(). @@ -16948,6 +18710,7 @@ no-one currently owns that name. You may connect to the Gets the object path @proxy is for. + A string owned by @proxy. Do not free. @@ -16993,6 +18756,7 @@ transmitting the same (long) array every time the property changes, it is more efficient to only transmit the delta using e.g. signals `ChatroomParticipantJoined(String name)` and `ChatroomParticipantParted(String name)`. + @@ -17017,6 +18781,7 @@ passed as @timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. See the #GDBusProxy:g-default-timeout property for more details. + @@ -17035,6 +18800,7 @@ See the #GDBusProxy:g-default-timeout property for more details. Ensure that interactions with @proxy conform to the given interface. See the #GDBusProxy:g-interface-info property for more details. + @@ -17044,7 +18810,8 @@ details. - Minimum interface this proxy conforms to or %NULL to unset. + Minimum interface this proxy conforms to + or %NULL to unset. @@ -17144,7 +18911,7 @@ This signal corresponds to the - A #GVariant containing the properties that changed + A #GVariant containing the properties that changed (type: `a{sv}`) @@ -17178,11 +18945,13 @@ This signal corresponds to the Class structure for #GDBusProxy. + + @@ -17201,6 +18970,7 @@ This signal corresponds to the + @@ -17221,7 +18991,7 @@ This signal corresponds to the - + @@ -17253,6 +19023,7 @@ and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified. + Function signature for a function used to determine the #GType to @@ -17262,6 +19033,7 @@ object proxy (if @interface_name is %NULL). This function is called in the [thread-default main loop][g-main-context-push-thread-default] that @manager was constructed in. + A #GType to use for the remote object. The returned type must be a #GDBusProxy or #GDBusObjectProxy -derived @@ -17309,7 +19081,12 @@ To just export an object on a well-known name on a message bus, such as the session or system bus, you should instead use g_bus_own_name(). An example of peer-to-peer communication with G-DBus can be found -in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c). +in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c). + +Note that a minimal #GDBusServer will accept connections from any +peer. In many use-cases it will be necessary to add a #GDBusAuthObserver +that only accepts connections that have successfully authenticated +as the same user that is running the #GDBusServer. Creates a new D-Bus server that listens on the first address in @@ -17318,6 +19095,10 @@ in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus Once constructed, you can use g_dbus_server_get_client_address() to get a D-Bus address string that clients can use to connect. +To have control over the available authentication mechanisms and +the users that are authorized to connect, it is strongly recommended +to provide a non-%NULL #GDBusAuthObserver. + Connect to the #GDBusServer::new-connection signal to handle incoming connections. @@ -17326,8 +19107,9 @@ g_dbus_server_start(). #GDBusServer is used in this [example][gdbus-peer-to-peer]. -This is a synchronous failable constructor. See -g_dbus_server_new() for the asynchronous version. +This is a synchronous failable constructor. There is currently no +asynchronous version. + A #GDBusServer or %NULL if @error is set. Free with g_object_unref(). @@ -17360,6 +19142,7 @@ g_object_unref(). Gets a [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses) string that can be used by clients to connect to @server. + A D-Bus address string. Do not free, the string is owned by @server. @@ -17374,6 +19157,7 @@ by @server. Gets the flags for @server. + A set of flags from the #GDBusServerFlags enumeration. @@ -17387,6 +19171,7 @@ by @server. Gets the GUID for @server. + A D-Bus GUID. Do not free this string, it is owned by @server. @@ -17400,6 +19185,7 @@ by @server. Gets whether @server is active. + %TRUE if server is active, %FALSE otherwise. @@ -17413,6 +19199,7 @@ by @server. Starts @server. + @@ -17425,6 +19212,7 @@ by @server. Stops @server. + @@ -17511,6 +19299,7 @@ authentication method. Signature for callback function used in g_dbus_connection_signal_subscribe(). + @@ -17567,6 +19356,7 @@ or one of the paths is a subpath of the other. Information about a signal on a D-Bus interface. + The reference count or -1 if statically allocated. @@ -17590,6 +19380,7 @@ or one of the paths is a subpath of the other. If @info is statically allocated does nothing. Otherwise increases the reference count. + The same @info. @@ -17605,6 +19396,7 @@ the reference count. If @info is statically allocated, does nothing. Otherwise decreases the reference count of @info. When its reference count drops to 0, the memory used is freed. + @@ -17621,6 +19413,7 @@ the memory used is freed. Subtrees are flat. @node, if non-%NULL, is always exactly one segment of the object path (ie: it never contains a slash). + A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods. @@ -17647,7 +19440,7 @@ segment of the object path (ie: it never contains a slash). - Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL). + Return location for user data to pass to functions in the returned #GDBusInterfaceVTable. @@ -17668,6 +19461,7 @@ Hierarchies are not supported; the items that you return should not contain the '/' character. The return value will be freed with g_strfreev(). + A newly allocated array of strings for node names that are children of @object_path. @@ -17723,6 +19517,7 @@ The difference between returning %NULL and an array containing zero items is that the standard DBus interfaces will returned to the remote introspector in the empty array case, but not in the %NULL case. + A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL. @@ -17752,6 +19547,7 @@ case. Virtual table for handling subtrees registered with g_dbus_connection_register_subtree(). + Function for enumerating child nodes. @@ -17765,22 +19561,123 @@ case. - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extension point for default handler to URI association. See [Extending GIO][extending-gio]. + The #GDesktopAppInfoLookup interface is deprecated and + unused by GIO. + + + + + + + + + + + + + + + + + + + + + + + + The string used to obtain a Unix device path with g_drive_get_identifier(). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Data input stream implements #GInputStream and includes functions for reading structured data directly from a binary input stream. + Creates a new data input stream for the @base_stream. + a new #GDataInputStream. @@ -17794,6 +19691,7 @@ reading structured data directly from a binary input stream. Gets the byte order for the data input stream. + the @stream's current #GDataStreamByteOrder. @@ -17807,6 +19705,7 @@ reading structured data directly from a binary input stream. Gets the current newline type for the @stream. + #GDataStreamNewlineType for the given @stream. @@ -17820,8 +19719,9 @@ reading structured data directly from a binary input stream. Reads an unsigned 8-bit/1-byte value from @stream. + - an unsigned 8-bit/1-byte value read from the @stream or %0 + an unsigned 8-bit/1-byte value read from the @stream or `0` if an error occurred. @@ -17841,8 +19741,9 @@ if an error occurred. In order to get the correct byte order for this read operation, see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + - a signed 16-bit/2-byte value read from @stream or %0 if + a signed 16-bit/2-byte value read from @stream or `0` if an error occurred. @@ -17866,8 +19767,9 @@ see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order( If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + - a signed 32-bit/4-byte value read from the @stream or %0 if + a signed 32-bit/4-byte value read from the @stream or `0` if an error occurred. @@ -17891,8 +19793,9 @@ see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order( If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + - a signed 64-bit/8-byte value read from @stream or %0 if + a signed 64-bit/8-byte value read from @stream or `0` if an error occurred. @@ -17915,6 +19818,7 @@ be UTF-8, and may in fact have embedded NUL characters. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a NUL terminated byte array with the line that was read in @@ -17948,6 +19852,7 @@ an error to have two outstanding calls to this function. When the operation is finished, @callback will be called. You can then call g_data_input_stream_read_line_finish() to get the result of the operation. + @@ -17979,6 +19884,7 @@ the result of the operation. g_data_input_stream_read_line_async(). Note the warning about string encoding in g_data_input_stream_read_line() applies here as well. + a NUL-terminated byte array with the line that was read in @@ -18008,6 +19914,7 @@ well. Finish an asynchronous call started by g_data_input_stream_read_line_async(). + a string with the line that was read in (without the newlines). Set @length to a #gsize to @@ -18038,6 +19945,7 @@ g_data_input_stream_read_line_async(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a NUL terminated UTF-8 string with the line that was read in (without the newlines). Set @@ -18068,8 +19976,9 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. In order to get the correct byte order for this read operation, see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). + - an unsigned 16-bit/2-byte value read from the @stream or %0 if + an unsigned 16-bit/2-byte value read from the @stream or `0` if an error occurred. @@ -18093,8 +20002,9 @@ see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order( If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + - an unsigned 32-bit/4-byte value read from the @stream or %0 if + an unsigned 32-bit/4-byte value read from the @stream or `0` if an error occurred. @@ -18118,8 +20028,9 @@ see g_data_input_stream_get_byte_order(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + - an unsigned 64-bit/8-byte read from @stream or %0 if + an unsigned 64-bit/8-byte read from @stream or `0` if an error occurred. @@ -18134,7 +20045,7 @@ an error occurred. - + Reads a string from the data input stream, up to the first occurrence of any of the stop characters. @@ -18146,6 +20057,9 @@ inconsistent with g_data_input_stream_read_until_async(). Both functions will be marked as deprecated in a future release. Use g_data_input_stream_read_upto() instead, but note that that function does not consume the stop character. + Use g_data_input_stream_read_upto() instead, which has more + consistent behaviour regarding the stop character. + a string with the data that was read before encountering any of the stop characters. Set @length to @@ -18172,7 +20086,7 @@ does not consume the stop character. - + The asynchronous version of g_data_input_stream_read_until(). It is an error to have two outstanding calls to this function. @@ -18188,6 +20102,9 @@ Don't use this function in new code. Its functionality is inconsistent with g_data_input_stream_read_until(). Both functions will be marked as deprecated in a future release. Use g_data_input_stream_read_upto_async() instead. + Use g_data_input_stream_read_upto_async() instead, which + has more consistent behaviour regarding the stop character. + @@ -18218,9 +20135,12 @@ g_data_input_stream_read_upto_async() instead. - + Finish an asynchronous call started by g_data_input_stream_read_until_async(). + Use g_data_input_stream_read_upto_finish() instead, which + has more consistent behaviour regarding the stop character. + a string with the data that was read before encountering any of the stop characters. Set @length to @@ -18253,7 +20173,10 @@ g_data_input_stream_read_byte() to get it before calling g_data_input_stream_read_upto() again. Note that @stop_chars may contain '\0' if @stop_chars_len is -specified. +specified. + +The returned string will always be nul-terminated on success. + a string with the data that was read before encountering any of the stop characters. Set @length to @@ -18300,6 +20223,7 @@ specified. When the operation is finished, @callback will be called. You can then call g_data_input_stream_read_upto_finish() to get the result of the operation. + @@ -18341,7 +20265,10 @@ g_data_input_stream_read_upto_async(). Note that this function does not consume the stop character. You have to use g_data_input_stream_read_byte() to get it before calling -g_data_input_stream_read_upto_async() again. +g_data_input_stream_read_upto_async() again. + +The returned string will always be nul-terminated on success. + a string with the data that was read before encountering any of the stop characters. Set @length to @@ -18367,6 +20294,7 @@ g_data_input_stream_read_upto_async() again. This function sets the byte order for the given @stream. All subsequent reads from the @stream will be read in the given @order. + @@ -18387,6 +20315,7 @@ reads from the @stream will be read in the given @order. Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read chunk ends in "CR" we must read an additional byte to know if this is "CR" or "CR LF", and this might block if there is no more data available. + @@ -18415,11 +20344,13 @@ chunk ends in "CR" we must read an additional byte to know if this is "CR" or + + @@ -18427,6 +20358,7 @@ chunk ends in "CR" we must read an additional byte to know if this is "CR" or + @@ -18434,6 +20366,7 @@ chunk ends in "CR" we must read an additional byte to know if this is "CR" or + @@ -18441,6 +20374,7 @@ chunk ends in "CR" we must read an additional byte to know if this is "CR" or + @@ -18448,6 +20382,7 @@ chunk ends in "CR" we must read an additional byte to know if this is "CR" or + @@ -18455,13 +20390,16 @@ chunk ends in "CR" we must read an additional byte to know if this is "CR" or + Data output stream implements #GOutputStream and includes functions for writing data directly to an output stream. + Creates a new data output stream for @base_stream. + #GDataOutputStream. @@ -18475,6 +20413,7 @@ writing data directly to an output stream. Gets the byte order for the stream. + the #GDataStreamByteOrder for the @stream. @@ -18488,6 +20427,7 @@ writing data directly to an output stream. Puts a byte into the output stream. + %TRUE if @data was successfully added to the @stream. @@ -18509,6 +20449,7 @@ writing data directly to an output stream. Puts a signed 16-bit integer into the output stream. + %TRUE if @data was successfully added to the @stream. @@ -18530,6 +20471,7 @@ writing data directly to an output stream. Puts a signed 32-bit integer into the output stream. + %TRUE if @data was successfully added to the @stream. @@ -18551,6 +20493,7 @@ writing data directly to an output stream. Puts a signed 64-bit integer into the stream. + %TRUE if @data was successfully added to the @stream. @@ -18572,6 +20515,7 @@ writing data directly to an output stream. Puts a string into the output stream. + %TRUE if @string was successfully added to the @stream. @@ -18593,6 +20537,7 @@ writing data directly to an output stream. Puts an unsigned 16-bit integer into the output stream. + %TRUE if @data was successfully added to the @stream. @@ -18614,6 +20559,7 @@ writing data directly to an output stream. Puts an unsigned 32-bit integer into the stream. + %TRUE if @data was successfully added to the @stream. @@ -18635,6 +20581,7 @@ writing data directly to an output stream. Puts an unsigned 64-bit integer into the stream. + %TRUE if @data was successfully added to the @stream. @@ -18656,6 +20603,7 @@ writing data directly to an output stream. Sets the byte order of the data output stream to @order. + @@ -18683,11 +20631,13 @@ multi-byte entities (such as integers) to the stream. + + @@ -18695,6 +20645,7 @@ multi-byte entities (such as integers) to the stream. + @@ -18702,6 +20653,7 @@ multi-byte entities (such as integers) to the stream. + @@ -18709,6 +20661,7 @@ multi-byte entities (such as integers) to the stream. + @@ -18716,6 +20669,7 @@ multi-byte entities (such as integers) to the stream. + @@ -18723,6 +20677,7 @@ multi-byte entities (such as integers) to the stream. + #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources @@ -18800,6 +20755,7 @@ received in each I/O operation. Like most other APIs in GLib, #GDatagramBased is not inherently thread safe. To use a #GDatagramBased concurrently from multiple threads, you must implement your own locking. + Checks on the readiness of @datagram_based to perform operations. The operations specified in @condition are checked for and masked against the @@ -18837,6 +20793,7 @@ conditions will always be set in the output if they are true. Apart from these flags, the output is guaranteed to be masked by @condition. This call never blocks. + the #GIOCondition mask of the current state @@ -18859,6 +20816,7 @@ This call never blocks. If @cancellable is cancelled before the condition is met, or if @timeout is reached before the condition is met, then %FALSE is returned and @error is set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). + %TRUE if the condition was met, %FALSE otherwise @@ -18898,6 +20856,7 @@ cause the source to trigger, reporting the current condition (which is likely 0 unless cancellation happened at the same time as a condition change). You can check for this in the callback using g_cancellable_is_cancelled(). + a newly allocated #GSource @@ -18968,6 +20927,7 @@ be returned if zero messages could be received; otherwise the number of messages successfully received before the error will be returned. If @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. + number of messages received, or -1 on error. Note that the number of messages received may be smaller than @num_messages if @timeout is @@ -19048,6 +21008,7 @@ On error -1 is returned and @error is set accordingly. An error will only be returned if zero messages could be sent; otherwise the number of messages successfully sent before the error will be returned. If @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. + number of messages sent, or -1 on error. Note that the number of messages sent may be smaller than @num_messages if @timeout is zero @@ -19122,6 +21083,7 @@ conditions will always be set in the output if they are true. Apart from these flags, the output is guaranteed to be masked by @condition. This call never blocks. + the #GIOCondition mask of the current state @@ -19144,6 +21106,7 @@ This call never blocks. If @cancellable is cancelled before the condition is met, or if @timeout is reached before the condition is met, then %FALSE is returned and @error is set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). + %TRUE if the condition was met, %FALSE otherwise @@ -19183,6 +21146,7 @@ cause the source to trigger, reporting the current condition (which is likely 0 unless cancellation happened at the same time as a condition change). You can check for this in the callback using g_cancellable_is_cancelled(). + a newly allocated #GSource @@ -19253,6 +21217,7 @@ be returned if zero messages could be received; otherwise the number of messages successfully received before the error will be returned. If @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. + number of messages received, or -1 on error. Note that the number of messages received may be smaller than @num_messages if @timeout is @@ -19333,6 +21298,7 @@ On error -1 is returned and @error is set accordingly. An error will only be returned if zero messages could be sent; otherwise the number of messages successfully sent before the error will be returned. If @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. + number of messages sent, or -1 on error. Note that the number of messages sent may be smaller than @num_messages if @timeout is zero @@ -19377,12 +21343,14 @@ following the Berkeley sockets API. The interface methods are thin wrappers around the corresponding virtual methods, and no pre-processing of inputs is implemented — so implementations of this API must handle all functionality documented in the interface methods. + The parent interface. + number of messages received, or -1 on error. Note that the number of messages received may be smaller than @num_messages if @timeout is @@ -19424,6 +21392,7 @@ documented in the interface methods. + number of messages sent, or -1 on error. Note that the number of messages sent may be smaller than @num_messages if @timeout is zero @@ -19464,6 +21433,7 @@ documented in the interface methods. + a newly allocated #GSource @@ -19486,6 +21456,7 @@ documented in the interface methods. + the #GIOCondition mask of the current state @@ -19504,6 +21475,7 @@ documented in the interface methods. + %TRUE if the condition was met, %FALSE otherwise @@ -19533,6 +21505,7 @@ documented in the interface methods. This is the function type of the callback used for the #GSource returned by g_datagram_based_create_source(). + %G_SOURCE_REMOVE if the source should be removed, %G_SOURCE_CONTINUE otherwise @@ -19560,6 +21533,7 @@ desktop files. Note that `<gio/gdesktopappinfo.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + Creates a new #GDesktopAppInfo based on a desktop file id. @@ -19573,8 +21547,10 @@ prefix-to-subdirectory mapping that is described in the [Menu Spec](http://standards.freedesktop.org/menu-spec/latest/) (i.e. a desktop id of kde-foo.desktop will match `/usr/share/applications/kde/foo.desktop`). - - a new #GDesktopAppInfo, or %NULL if no desktop file with that id + + + a new #GDesktopAppInfo, or %NULL if no desktop + file with that id exists. @@ -19586,7 +21562,8 @@ prefix-to-subdirectory mapping that is described in the Creates a new #GDesktopAppInfo. - + + a new #GDesktopAppInfo or %NULL on error. @@ -19594,13 +21571,14 @@ prefix-to-subdirectory mapping that is described in the the path of a desktop file, in the GLib filename encoding - + Creates a new #GDesktopAppInfo. - + + a new #GDesktopAppInfo or %NULL on error. @@ -19616,6 +21594,7 @@ prefix-to-subdirectory mapping that is described in the An application implements an interface if that interface is listed in the Implements= line of the desktop file of the application. + a list of #GDesktopAppInfo objects. @@ -19639,6 +21618,7 @@ outer list is sorted by score so that the first strv contains the best-matching applications, and so on. The algorithm for determining matches is undefined and may change at any time. + a list of strvs. Free each item with g_strfreev() and free the outer @@ -19666,6 +21646,7 @@ desktop entry fields. Should be called only once; subsequent calls are ignored. do not use this API. Since 2.42 the value of the `XDG_CURRENT_DESKTOP` environment variable will be used. + @@ -19682,6 +21663,7 @@ action" specified by @action_name. This corresponds to the "Name" key within the keyfile group for the action. + the locale-specific action name @@ -19702,6 +21684,7 @@ action. Looks up a boolean value in the keyfile backing @info. The @key is looked up in the "Desktop Entry" group. + the boolean value, or %FALSE if the key is not found @@ -19720,6 +21703,7 @@ The @key is looked up in the "Desktop Entry" group. Gets the categories from the desktop file. + The unparsed Categories key from the desktop file; i.e. no attempt is made to split it by ';' or validate it. @@ -19736,10 +21720,11 @@ The @key is looked up in the "Desktop Entry" group. When @info was created from a known filename, return it. In some situations such as the #GDesktopAppInfo returned from g_desktop_app_info_new_from_keyfile(), this function will return %NULL. + The full path to the file for @info, or %NULL if not known. - + @@ -19750,6 +21735,7 @@ g_desktop_app_info_new_from_keyfile(), this function will return %NULL. Gets the generic name from the destkop file. + The value of the GenericName key @@ -19764,6 +21750,7 @@ g_desktop_app_info_new_from_keyfile(), this function will return %NULL. A desktop file is hidden if the Hidden key in it is set to True. + %TRUE if hidden, %FALSE otherwise. @@ -19777,6 +21764,7 @@ set to True. Gets the keywords from the desktop file. + The value of the Keywords key @@ -19790,10 +21778,33 @@ set to True. + + Looks up a localized string value in the keyfile backing @info +translated to the current locale. + +The @key is looked up in the "Desktop Entry" group. + + + a newly allocated string, or %NULL if the key + is not found + + + + + a #GDesktopAppInfo + + + + the key to look up + + + + Gets the value of the NoDisplay key, which helps determine if the application info should be shown in menus. See #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show(). + The value of the NoDisplay key @@ -19817,6 +21828,7 @@ but this is not recommended. Note that g_app_info_should_show() for @info will include this check (with %NULL for @desktop_env) as well as additional checks. + %TRUE if the @info should be shown in @desktop_env according to the `OnlyShowIn` and `NotShowIn` keys, %FALSE @@ -19838,6 +21850,7 @@ otherwise. Retrieves the StartupWMClass field from @info. This represents the WM_CLASS property of the main window of the application, if launched through @info. + the startup WM class, or %NULL if none is set in the desktop file. @@ -19854,6 +21867,7 @@ in the desktop file. Looks up a string value in the keyfile backing @info. The @key is looked up in the "Desktop Entry" group. + a newly allocated string, or %NULL if the key is not found @@ -19870,9 +21884,38 @@ The @key is looked up in the "Desktop Entry" group. + + Looks up a string list value in the keyfile backing @info. + +The @key is looked up in the "Desktop Entry" group. + + + + a %NULL-terminated string array or %NULL if the specified + key cannot be found. The array should be freed with g_strfreev(). + + + + + + + a #GDesktopAppInfo + + + + the key to look up + + + + return location for the number of returned strings, or %NULL + + + + Returns whether @key exists in the "Desktop Entry" group of the keyfile backing @info. + %TRUE if the @key exists @@ -19904,6 +21947,7 @@ actions, as per the desktop file specification. As with g_app_info_launch() there is no way to detect failures that occur while using this function. + @@ -19929,15 +21973,17 @@ but is intended primarily for operating system components that launch applications. Ordinary applications should use g_app_info_launch_uris(). -If the application is launched via traditional UNIX fork()/exec() -then @spawn_flags, @user_setup and @user_setup_data are used for the -call to g_spawn_async(). Additionally, @pid_callback (with -@pid_callback_data) will be called to inform about the PID of the -created process. +If the application is launched via GSpawn, then @spawn_flags, @user_setup +and @user_setup_data are used for the call to g_spawn_async(). +Additionally, @pid_callback (with @pid_callback_data) will be called to +inform about the PID of the created process. See g_spawn_async_with_pipes() +for information on certain parameter conditions that can enable an +optimized posix_spawn() codepath to be used. If application launching occurs via some other mechanism (eg: D-Bus activation) then @spawn_flags, @user_setup, @user_setup_data, @pid_callback and @pid_callback_data are ignored. + %TRUE on successful launch, %FALSE otherwise. @@ -19961,7 +22007,7 @@ activation) then @spawn_flags, @user_setup, @user_setup_data, #GSpawnFlags, used for each process - + a #GSpawnChildSetupFunc, used once for each process. @@ -19980,15 +22026,78 @@ activation) then @spawn_flags, @user_setup, @user_setup_data, + + Equivalent to g_desktop_app_info_launch_uris_as_manager() but allows +you to pass in file descriptors for the stdin, stdout and stderr streams +of the launched process. + +If application launching occurs via some non-spawn mechanism (e.g. D-Bus +activation) then @stdin_fd, @stdout_fd and @stderr_fd are ignored. + + + %TRUE on successful launch, %FALSE otherwise. + + + + + a #GDesktopAppInfo + + + + List of URIs + + + + + + a #GAppLaunchContext + + + + #GSpawnFlags, used for each process + + + + a #GSpawnChildSetupFunc, used once + for each process. + + + + User data for @user_setup + + + + Callback for child processes + + + + User data for @callback + + + + file descriptor to use for child's stdin, or -1 + + + + file descriptor to use for child's stdout, or -1 + + + + file descriptor to use for child's stderr, or -1 + + + + Returns the list of "additional application actions" supported on the desktop file, as per the desktop file specification. As per the specification, this is the list of actions that are explicitly listed in the "Actions" key of the [Desktop Entry] group. + a list of strings, always non-%NULL - + @@ -20005,23 +22114,29 @@ explicitly listed in the "Actions" key of the [Desktop Entry] group. + - + #GDesktopAppInfoLookup is an opaque data structure and can only be accessed using the following functions. - + The #GDesktopAppInfoLookup interface is deprecated and + unused by GIO. + + Gets the default application for launching applications -using this URI scheme for a particular GDesktopAppInfoLookup +using this URI scheme for a particular #GDesktopAppInfoLookup implementation. -The GDesktopAppInfoLookup interface and this function is used +The #GDesktopAppInfoLookup interface and this function is used to implement g_app_info_get_default_for_uri_scheme() backends in a GIO module. There is no reason for applications to use it directly. Applications should use g_app_info_get_default_for_uri_scheme(). - The #GDesktopAppInfoLookup interface is deprecated and unused by gio. + The #GDesktopAppInfoLookup interface is deprecated and + unused by GIO. + #GAppInfo for given @uri_scheme or %NULL on error. @@ -20037,16 +22152,18 @@ directly. Applications should use g_app_info_get_default_for_uri_scheme(). - + Gets the default application for launching applications -using this URI scheme for a particular GDesktopAppInfoLookup +using this URI scheme for a particular #GDesktopAppInfoLookup implementation. -The GDesktopAppInfoLookup interface and this function is used +The #GDesktopAppInfoLookup interface and this function is used to implement g_app_info_get_default_for_uri_scheme() backends in a GIO module. There is no reason for applications to use it directly. Applications should use g_app_info_get_default_for_uri_scheme(). - The #GDesktopAppInfoLookup interface is deprecated and unused by gio. + The #GDesktopAppInfoLookup interface is deprecated and + unused by GIO. + #GAppInfo for given @uri_scheme or %NULL on error. @@ -20066,11 +22183,13 @@ directly. Applications should use g_app_info_get_default_for_uri_scheme(). Interface that is used by backends to associate default handlers with URI schemes. + + #GAppInfo for given @uri_scheme or %NULL on error. @@ -20092,6 +22211,7 @@ handlers with URI schemes. During invocation, g_desktop_app_info_launch_uris_as_manager() may create one or more child processes. This callback is invoked once for each, providing the process ID. + @@ -20137,8 +22257,10 @@ file manager, use g_drive_get_start_stop_type(). For porting from GnomeVFS note that there is no equivalent of #GDrive in that API. + Checks if a drive can be ejected. + %TRUE if the @drive can be ejected, %FALSE otherwise. @@ -20152,6 +22274,7 @@ For porting from GnomeVFS note that there is no equivalent of Checks if a drive can be polled for media changes. + %TRUE if the @drive can be polled for media changes, %FALSE otherwise. @@ -20166,6 +22289,7 @@ For porting from GnomeVFS note that there is no equivalent of Checks if a drive can be started. + %TRUE if the @drive can be started, %FALSE otherwise. @@ -20179,6 +22303,7 @@ For porting from GnomeVFS note that there is no equivalent of Checks if a drive can be started degraded. + %TRUE if the @drive can be started degraded, %FALSE otherwise. @@ -20192,6 +22317,7 @@ For porting from GnomeVFS note that there is no equivalent of Checks if a drive can be stopped. + %TRUE if the @drive can be stopped, %FALSE otherwise. @@ -20204,6 +22330,7 @@ For porting from GnomeVFS note that there is no equivalent of + @@ -20214,6 +22341,7 @@ For porting from GnomeVFS note that there is no equivalent of + @@ -20230,6 +22358,7 @@ When the operation is finished, @callback will be called. You can then call g_drive_eject_finish() to obtain the result of the operation. Use g_drive_eject_with_operation() instead. + @@ -20257,6 +22386,7 @@ result of the operation. + @@ -20269,6 +22399,7 @@ result of the operation. Finishes ejecting a drive. Use g_drive_eject_with_operation_finish() instead. + %TRUE if the drive has been ejected successfully, %FALSE otherwise. @@ -20289,6 +22420,7 @@ result of the operation. Ejects a drive. This is an asynchronous operation, and is finished by calling g_drive_eject_with_operation_finish() with the @drive and #GAsyncResult data returned in the @callback. + @@ -20323,6 +22455,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a drive. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the drive was successfully ejected. %FALSE otherwise. @@ -20342,6 +22475,7 @@ and #GAsyncResult data returned in the @callback. Gets the kinds of identifiers that @drive has. Use g_drive_get_identifier() to obtain the identifiers themselves. + a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() @@ -20359,6 +22493,7 @@ themselves. Gets the icon for @drive. + #GIcon for the @drive. Free the returned object with g_object_unref(). @@ -20372,10 +22507,13 @@ themselves. - Gets the identifier of the given kind for @drive. - + Gets the identifier of the given kind for @drive. The only +identifier currently available is +#G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. + + a newly allocated string containing the - requested identfier, or %NULL if the #GDrive + requested identifier, or %NULL if the #GDrive doesn't have this kind of identifier. @@ -20392,6 +22530,7 @@ themselves. Gets the name of @drive. + a string containing @drive's name. The returned string should be freed when no longer needed. @@ -20406,7 +22545,8 @@ themselves. Gets the sort key for @drive, if any. - + + Sorting key for @drive or %NULL if no such key is available. @@ -20419,6 +22559,7 @@ themselves. Gets a hint about how a drive can be started/stopped. + A value from the #GDriveStartStopType enumeration. @@ -20432,6 +22573,7 @@ themselves. Gets the icon for @drive. + symbolic #GIcon for the @drive. Free the returned object with g_object_unref(). @@ -20449,6 +22591,7 @@ themselves. The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + #GList containing any #GVolume objects on the given @drive. @@ -20466,6 +22609,7 @@ its elements have been unreffed with g_object_unref(). Checks if the @drive has media. Note that the OS may not be polling the drive for media changes; see g_drive_is_media_check_automatic() for more details. + %TRUE if @drive has media, %FALSE otherwise. @@ -20479,6 +22623,7 @@ for more details. Check if @drive has any mountable volumes. + %TRUE if the @drive contains volumes, %FALSE otherwise. @@ -20492,6 +22637,7 @@ for more details. Checks if @drive is capabable of automatically detecting media changes. + %TRUE if the @drive is capabable of automatically detecting media changes, %FALSE otherwise. @@ -20506,6 +22652,7 @@ for more details. Checks if the @drive supports removable media. + %TRUE if @drive supports removable media, %FALSE otherwise. @@ -20520,6 +22667,7 @@ for more details. Checks if the #GDrive and/or its media is considered removable by the user. See g_drive_is_media_removable(). + %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. @@ -20537,6 +22685,7 @@ See g_drive_is_media_removable(). When the operation is finished, @callback will be called. You can then call g_drive_poll_for_media_finish() to obtain the result of the operation. + @@ -20561,6 +22710,7 @@ result of the operation. Finishes an operation started with g_drive_poll_for_media() on a drive. + %TRUE if the drive has been poll_for_mediaed successfully, %FALSE otherwise. @@ -20583,6 +22733,7 @@ result of the operation. When the operation is finished, @callback will be called. You can then call g_drive_start_finish() to obtain the result of the operation. + @@ -20616,6 +22767,7 @@ result of the operation. Finishes starting a drive. + %TRUE if the drive has been started successfully, %FALSE otherwise. @@ -20638,6 +22790,7 @@ result of the operation. When the operation is finished, @callback will be called. You can then call g_drive_stop_finish() to obtain the result of the operation. + @@ -20670,6 +22823,7 @@ result of the operation. + @@ -20681,6 +22835,7 @@ result of the operation. Finishes stopping a drive. + %TRUE if the drive has been stopped successfully, %FALSE otherwise. @@ -20699,6 +22854,7 @@ result of the operation. Checks if a drive can be ejected. + %TRUE if the @drive can be ejected, %FALSE otherwise. @@ -20712,6 +22868,7 @@ result of the operation. Checks if a drive can be polled for media changes. + %TRUE if the @drive can be polled for media changes, %FALSE otherwise. @@ -20726,6 +22883,7 @@ result of the operation. Checks if a drive can be started. + %TRUE if the @drive can be started, %FALSE otherwise. @@ -20739,6 +22897,7 @@ result of the operation. Checks if a drive can be started degraded. + %TRUE if the @drive can be started degraded, %FALSE otherwise. @@ -20752,6 +22911,7 @@ result of the operation. Checks if a drive can be stopped. + %TRUE if the @drive can be stopped, %FALSE otherwise. @@ -20770,6 +22930,7 @@ When the operation is finished, @callback will be called. You can then call g_drive_eject_finish() to obtain the result of the operation. Use g_drive_eject_with_operation() instead. + @@ -20799,6 +22960,7 @@ result of the operation. Finishes ejecting a drive. Use g_drive_eject_with_operation_finish() instead. + %TRUE if the drive has been ejected successfully, %FALSE otherwise. @@ -20819,6 +22981,7 @@ result of the operation. Ejects a drive. This is an asynchronous operation, and is finished by calling g_drive_eject_with_operation_finish() with the @drive and #GAsyncResult data returned in the @callback. + @@ -20853,6 +23016,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a drive. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the drive was successfully ejected. %FALSE otherwise. @@ -20872,6 +23036,7 @@ and #GAsyncResult data returned in the @callback. Gets the kinds of identifiers that @drive has. Use g_drive_get_identifier() to obtain the identifiers themselves. + a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() @@ -20889,6 +23054,7 @@ themselves. Gets the icon for @drive. + #GIcon for the @drive. Free the returned object with g_object_unref(). @@ -20902,10 +23068,13 @@ themselves. - Gets the identifier of the given kind for @drive. - + Gets the identifier of the given kind for @drive. The only +identifier currently available is +#G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. + + a newly allocated string containing the - requested identfier, or %NULL if the #GDrive + requested identifier, or %NULL if the #GDrive doesn't have this kind of identifier. @@ -20922,6 +23091,7 @@ themselves. Gets the name of @drive. + a string containing @drive's name. The returned string should be freed when no longer needed. @@ -20936,7 +23106,8 @@ themselves. Gets the sort key for @drive, if any. - + + Sorting key for @drive or %NULL if no such key is available. @@ -20949,6 +23120,7 @@ themselves. Gets a hint about how a drive can be started/stopped. + A value from the #GDriveStartStopType enumeration. @@ -20962,6 +23134,7 @@ themselves. Gets the icon for @drive. + symbolic #GIcon for the @drive. Free the returned object with g_object_unref(). @@ -20979,6 +23152,7 @@ themselves. The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + #GList containing any #GVolume objects on the given @drive. @@ -20996,6 +23170,7 @@ its elements have been unreffed with g_object_unref(). Checks if the @drive has media. Note that the OS may not be polling the drive for media changes; see g_drive_is_media_check_automatic() for more details. + %TRUE if @drive has media, %FALSE otherwise. @@ -21009,6 +23184,7 @@ for more details. Check if @drive has any mountable volumes. + %TRUE if the @drive contains volumes, %FALSE otherwise. @@ -21022,6 +23198,7 @@ for more details. Checks if @drive is capabable of automatically detecting media changes. + %TRUE if the @drive is capabable of automatically detecting media changes, %FALSE otherwise. @@ -21036,6 +23213,7 @@ for more details. Checks if the @drive supports removable media. + %TRUE if @drive supports removable media, %FALSE otherwise. @@ -21050,6 +23228,7 @@ for more details. Checks if the #GDrive and/or its media is considered removable by the user. See g_drive_is_media_removable(). + %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. @@ -21067,6 +23246,7 @@ See g_drive_is_media_removable(). When the operation is finished, @callback will be called. You can then call g_drive_poll_for_media_finish() to obtain the result of the operation. + @@ -21091,6 +23271,7 @@ result of the operation. Finishes an operation started with g_drive_poll_for_media() on a drive. + %TRUE if the drive has been poll_for_mediaed successfully, %FALSE otherwise. @@ -21113,6 +23294,7 @@ result of the operation. When the operation is finished, @callback will be called. You can then call g_drive_start_finish() to obtain the result of the operation. + @@ -21146,6 +23328,7 @@ result of the operation. Finishes starting a drive. + %TRUE if the drive has been started successfully, %FALSE otherwise. @@ -21168,6 +23351,7 @@ result of the operation. When the operation is finished, @callback will be called. You can then call g_drive_stop_finish() to obtain the result of the operation. + @@ -21201,6 +23385,7 @@ result of the operation. Finishes stopping a drive. + %TRUE if the drive has been stopped successfully, %FALSE otherwise. @@ -21249,12 +23434,14 @@ been pressed. Interface for creating #GDrive implementations. + The parent interface. + @@ -21267,6 +23454,7 @@ been pressed. + @@ -21279,6 +23467,7 @@ been pressed. + @@ -21291,6 +23480,7 @@ been pressed. + a string containing @drive's name. The returned string should be freed when no longer needed. @@ -21306,6 +23496,7 @@ been pressed. + #GIcon for the @drive. Free the returned object with g_object_unref(). @@ -21321,6 +23512,7 @@ been pressed. + %TRUE if the @drive contains volumes, %FALSE otherwise. @@ -21335,6 +23527,7 @@ been pressed. + #GList containing any #GVolume objects on the given @drive. @@ -21351,6 +23544,7 @@ been pressed. + %TRUE if @drive supports removable media, %FALSE otherwise. @@ -21365,6 +23559,7 @@ been pressed. + %TRUE if @drive has media, %FALSE otherwise. @@ -21379,6 +23574,7 @@ been pressed. + %TRUE if the @drive is capabable of automatically detecting media changes, %FALSE otherwise. @@ -21394,6 +23590,7 @@ been pressed. + %TRUE if the @drive can be ejected, %FALSE otherwise. @@ -21408,6 +23605,7 @@ been pressed. + %TRUE if the @drive can be polled for media changes, %FALSE otherwise. @@ -21423,6 +23621,7 @@ been pressed. + @@ -21452,6 +23651,7 @@ been pressed. + %TRUE if the drive has been ejected successfully, %FALSE otherwise. @@ -21471,6 +23671,7 @@ been pressed. + @@ -21496,6 +23697,7 @@ been pressed. + %TRUE if the drive has been poll_for_mediaed successfully, %FALSE otherwise. @@ -21515,9 +23717,10 @@ been pressed. - + + a newly allocated string containing the - requested identfier, or %NULL if the #GDrive + requested identifier, or %NULL if the #GDrive doesn't have this kind of identifier. @@ -21535,6 +23738,7 @@ been pressed. + a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() @@ -21553,6 +23757,7 @@ been pressed. + A value from the #GDriveStartStopType enumeration. @@ -21567,6 +23772,7 @@ been pressed. + %TRUE if the @drive can be started, %FALSE otherwise. @@ -21581,6 +23787,7 @@ been pressed. + %TRUE if the @drive can be started degraded, %FALSE otherwise. @@ -21595,6 +23802,7 @@ been pressed. + @@ -21629,6 +23837,7 @@ been pressed. + %TRUE if the drive has been started successfully, %FALSE otherwise. @@ -21648,6 +23857,7 @@ been pressed. + %TRUE if the @drive can be stopped, %FALSE otherwise. @@ -21662,6 +23872,7 @@ been pressed. + @@ -21696,6 +23907,7 @@ been pressed. + %TRUE if the drive has been stopped successfully, %FALSE otherwise. @@ -21715,6 +23927,7 @@ been pressed. + @@ -21727,6 +23940,7 @@ been pressed. + @@ -21761,6 +23975,7 @@ been pressed. + %TRUE if the drive was successfully ejected. %FALSE otherwise. @@ -21779,7 +23994,8 @@ been pressed. - + + Sorting key for @drive or %NULL if no such key is available. @@ -21793,6 +24009,7 @@ been pressed. + symbolic #GIcon for the @drive. Free the returned object with g_object_unref(). @@ -21808,6 +24025,7 @@ been pressed. + %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. @@ -21856,11 +24074,13 @@ been pressed. #GDtlsClientConnection is the client-side subclass of #GDtlsConnection, representing a client-side DTLS connection. + Creates a new #GDtlsClientConnection wrapping @base_socket which is assumed to communicate with the server identified by @server_identity. + the new #GDtlsClientConnection, or %NULL on error @@ -21885,13 +24105,14 @@ Otherwise, it will be %NULL. Each item in the list is a #GByteArray which contains the complete subject DN of the certificate authority. + the list of CA DNs. You should unref each element with g_byte_array_unref() and then the free the list with g_list_free(). - + @@ -21904,6 +24125,7 @@ the free the list with g_list_free(). Gets @conn's expected server identity + a #GSocketConnectable describing the expected server identity, or %NULL if the expected identity is not @@ -21919,6 +24141,7 @@ known. Gets @conn's validation flags + the validation flags @@ -21935,6 +24158,7 @@ known. servers on virtual hosts which certificate to present, and also to let @conn know what name to look for in the certificate when performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. + @@ -21953,6 +24177,7 @@ performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. Sets @conn's validation flags, to override the default set of checks performed when validating a server certificate. By default, %G_TLS_CERTIFICATE_VALIDATE_ALL is used. + @@ -22006,6 +24231,7 @@ overrides the default via #GDtlsConnection::accept-certificate. vtable for a #GDtlsClientConnection implementation. + The parent interface. @@ -22031,8 +24257,10 @@ on their base #GDatagramBased if it is a #GSocket — it is up to the calle do that if they wish. If they do not, and g_socket_close() is called on the base socket, the #GDtlsConnection will not raise a %G_IO_ERROR_NOT_CONNECTED error on further I/O. + + @@ -22048,29 +24276,54 @@ error on further I/O. + + Gets the name of the application-layer protocol negotiated during +the handshake. + +If the peer did not use the ALPN extension, or did not advertise a +protocol that matched one of @conn's protocols, or the TLS backend +does not support ALPN, then this will be %NULL. See +g_dtls_connection_set_advertised_protocols(). + + + the negotiated protocol, or %NULL + + + + + a #GDtlsConnection + + + + Attempts a TLS handshake on @conn. On the client side, it is never necessary to call this method; although the connection needs to perform a handshake after -connecting (or after sending a "STARTTLS"-type command) and may -need to rehandshake later if the server requests it, -#GDtlsConnection will handle this for you automatically when you try -to send or receive data on the connection. However, you can call -g_dtls_connection_handshake() manually if you want to know for sure -whether the initial handshake succeeded or failed (as opposed to -just immediately trying to write to @conn, in which -case if it fails, it may not be possible to tell if it failed -before or after completing the handshake). +connecting, #GDtlsConnection will handle this for you automatically +when you try to send or receive data on the connection. You can call +g_dtls_connection_handshake() manually if you want to know whether +the initial handshake succeeded or failed (as opposed to just +immediately trying to use @conn to read or write, in which case, +if it fails, it may not be possible to tell if it failed before +or after completing the handshake), but beware that servers may reject +client authentication after the handshake has completed, so a +successful handshake does not indicate the connection will be usable. Likewise, on the server side, although a handshake is necessary at the beginning of the communication, you do not need to call this function explicitly unless you want clearer error reporting. -However, you may call g_dtls_connection_handshake() later on to -renegotiate parameters (encryption methods, etc) with the client. + +Previously, calling g_dtls_connection_handshake() after the initial +handshake would trigger a rehandshake; however, this usage was +deprecated in GLib 2.60 because rehandshaking was removed from the +TLS protocol in TLS 1.3. Since GLib 2.64, calling this function after +the initial handshake will no longer do anything. #GDtlsConnection::accept_certificate may be emitted during the handshake. + success or failure @@ -22089,6 +24342,7 @@ handshake. Asynchronously performs a TLS handshake on @conn. See g_dtls_connection_handshake() for more information. + @@ -22118,6 +24372,7 @@ g_dtls_connection_handshake() for more information. Finish an asynchronous TLS handshake operation. See g_dtls_connection_handshake() for more information. + %TRUE on success, %FALSE on failure, in which case @error will be set. @@ -22134,6 +24389,35 @@ case @error will be set. + + Sets the list of application-layer protocols to advertise that the +caller is willing to speak on this connection. The +Application-Layer Protocol Negotiation (ALPN) extension will be +used to negotiate a compatible protocol with the peer; use +g_dtls_connection_get_negotiated_protocol() to find the negotiated +protocol after the handshake. Specifying %NULL for the the value +of @protocols will disable ALPN negotiation. + +See [IANA TLS ALPN Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) +for a list of registered protocol IDs. + + + + + + + a #GDtlsConnection + + + + a %NULL-terminated + array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL + + + + + + Shut down part or all of a DTLS connection. @@ -22151,6 +24435,7 @@ is equivalent to calling g_dtls_connection_close(). If @cancellable is cancelled, the #GDtlsConnection may be left partially-closed and any pending untransmitted data may be lost. Call g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. + %TRUE on success, %FALSE otherwise @@ -22177,6 +24462,7 @@ g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. Asynchronously shut down part or all of the DTLS connection. See g_dtls_connection_shutdown() for more information. + @@ -22214,6 +24500,7 @@ g_dtls_connection_shutdown() for more information. Finish an asynchronous TLS shutdown operation. See g_dtls_connection_shutdown() for more information. + %TRUE on success, %FALSE on failure, in which case @error will be set @@ -22250,6 +24537,7 @@ released as early as possible. If @cancellable is cancelled, the #GDtlsConnection may be left partially-closed and any pending untransmitted data may be lost. Call g_dtls_connection_close() again to complete closing the #GDtlsConnection. + %TRUE on success, %FALSE otherwise @@ -22268,6 +24556,7 @@ g_dtls_connection_close() again to complete closing the #GDtlsConnection. Asynchronously close the DTLS connection. See g_dtls_connection_close() for more information. + @@ -22297,6 +24586,7 @@ more information. Finish an asynchronous TLS close operation. See g_dtls_connection_close() for more information. + %TRUE on success, %FALSE on failure, in which case @error will be set @@ -22316,6 +24606,7 @@ case @error will be set Used by #GDtlsConnection implementations to emit the #GDtlsConnection::accept-certificate signal. + %TRUE if one of the signal handlers has returned %TRUE to accept @peer_cert @@ -22339,6 +24630,7 @@ case @error will be set Gets @conn's certificate, as set by g_dtls_connection_set_certificate(). + @conn's certificate, or %NULL @@ -22353,6 +24645,7 @@ g_dtls_connection_set_certificate(). Gets the certificate database that @conn uses to verify peer certificates. See g_dtls_connection_set_database(). + the certificate database that @conn uses or %NULL @@ -22368,6 +24661,7 @@ peer certificates. See g_dtls_connection_set_database(). Get the object that will be used to interact with the user. It will be used for things like prompting the user for passwords. If %NULL is returned, then no user interaction will occur for this connection. + The interaction object. @@ -22379,10 +24673,31 @@ no user interaction will occur for this connection. + + Gets the name of the application-layer protocol negotiated during +the handshake. + +If the peer did not use the ALPN extension, or did not advertise a +protocol that matched one of @conn's protocols, or the TLS backend +does not support ALPN, then this will be %NULL. See +g_dtls_connection_set_advertised_protocols(). + + + the negotiated protocol, or %NULL + + + + + a #GDtlsConnection + + + + Gets @conn's peer's certificate after the handshake has completed. (It is not set during the emission of #GDtlsConnection::accept-certificate.) + @conn's peer's certificate, or %NULL @@ -22398,6 +24713,7 @@ no user interaction will occur for this connection. Gets the errors associated with validating @conn's peer's certificate, after the handshake has completed. (It is not set during the emission of #GDtlsConnection::accept-certificate.) + @conn's peer's certificate errors @@ -22409,11 +24725,15 @@ during the emission of #GDtlsConnection::accept-certificate.) - + Gets @conn rehandshaking mode. See g_dtls_connection_set_rehandshake_mode() for details. + Changing the rehandshake mode is no longer + required for compatibility. Also, rehandshaking has been removed + from the TLS protocol in TLS 1.3. + - @conn's rehandshaking mode + %G_TLS_REHANDSHAKE_SAFELY @@ -22427,6 +24747,7 @@ g_dtls_connection_set_rehandshake_mode() for details. Tests whether or not @conn expects a proper TLS close notification when the connection is closed. See g_dtls_connection_set_require_close_notify() for details. + %TRUE if @conn requires a proper TLS close notification. @@ -22443,24 +24764,29 @@ g_dtls_connection_set_require_close_notify() for details. On the client side, it is never necessary to call this method; although the connection needs to perform a handshake after -connecting (or after sending a "STARTTLS"-type command) and may -need to rehandshake later if the server requests it, -#GDtlsConnection will handle this for you automatically when you try -to send or receive data on the connection. However, you can call -g_dtls_connection_handshake() manually if you want to know for sure -whether the initial handshake succeeded or failed (as opposed to -just immediately trying to write to @conn, in which -case if it fails, it may not be possible to tell if it failed -before or after completing the handshake). +connecting, #GDtlsConnection will handle this for you automatically +when you try to send or receive data on the connection. You can call +g_dtls_connection_handshake() manually if you want to know whether +the initial handshake succeeded or failed (as opposed to just +immediately trying to use @conn to read or write, in which case, +if it fails, it may not be possible to tell if it failed before +or after completing the handshake), but beware that servers may reject +client authentication after the handshake has completed, so a +successful handshake does not indicate the connection will be usable. Likewise, on the server side, although a handshake is necessary at the beginning of the communication, you do not need to call this function explicitly unless you want clearer error reporting. -However, you may call g_dtls_connection_handshake() later on to -renegotiate parameters (encryption methods, etc) with the client. + +Previously, calling g_dtls_connection_handshake() after the initial +handshake would trigger a rehandshake; however, this usage was +deprecated in GLib 2.60 because rehandshaking was removed from the +TLS protocol in TLS 1.3. Since GLib 2.64, calling this function after +the initial handshake will no longer do anything. #GDtlsConnection::accept_certificate may be emitted during the handshake. + success or failure @@ -22479,6 +24805,7 @@ handshake. Asynchronously performs a TLS handshake on @conn. See g_dtls_connection_handshake() for more information. + @@ -22508,6 +24835,7 @@ g_dtls_connection_handshake() for more information. Finish an asynchronous TLS handshake operation. See g_dtls_connection_handshake() for more information. + %TRUE on success, %FALSE on failure, in which case @error will be set. @@ -22524,6 +24852,35 @@ case @error will be set. + + Sets the list of application-layer protocols to advertise that the +caller is willing to speak on this connection. The +Application-Layer Protocol Negotiation (ALPN) extension will be +used to negotiate a compatible protocol with the peer; use +g_dtls_connection_get_negotiated_protocol() to find the negotiated +protocol after the handshake. Specifying %NULL for the the value +of @protocols will disable ALPN negotiation. + +See [IANA TLS ALPN Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) +for a list of registered protocol IDs. + + + + + + + a #GDtlsConnection + + + + a %NULL-terminated + array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL + + + + + + This sets the certificate that @conn will present to its peer during the TLS handshake. For a #GDtlsServerConnection, it is @@ -22543,6 +24900,7 @@ or without a certificate; in that case, if you don't provide a certificate, you can tell that the server requested one by the fact that g_dtls_client_connection_get_accepted_cas() will return non-%NULL.) + @@ -22560,12 +24918,13 @@ non-%NULL.) Sets the certificate database that is used to verify peer certificates. This is set to the default database by default. See -g_dtls_backend_get_default_database(). If set to %NULL, then +g_tls_backend_get_default_database(). If set to %NULL, then peer certificate validation will always set the %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning #GDtlsConnection::accept-certificate will always be emitted on client-side connections, unless that bit is not set in #GDtlsClientConnection:validation-flags). + @@ -22587,6 +24946,7 @@ for things like prompting the user for passwords. The @interaction argument will normally be a derived subclass of #GTlsInteraction. %NULL can also be provided if no user interaction should occur for this connection. + @@ -22601,27 +24961,15 @@ should occur for this connection. - - Sets how @conn behaves with respect to rehandshaking requests. - -%G_TLS_REHANDSHAKE_NEVER means that it will never agree to -rehandshake after the initial handshake is complete. (For a client, -this means it will refuse rehandshake requests from the server, and -for a server, this means it will close the connection with an error -if the client attempts to rehandshake.) - -%G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a -rehandshake only if the other end of the connection supports the -TLS `renegotiation_info` extension. This is the default behavior, -but means that rehandshaking will not work against older -implementations that do not support that extension. - -%G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow -rehandshaking even without the `renegotiation_info` extension. On -the server side in particular, this is not recommended, since it -leaves the server open to certain attacks. However, this mode is -necessary if you need to allow renegotiation with older client -software. + + Since GLib 2.64, changing the rehandshake mode is no longer supported +and will have no effect. With TLS 1.3, rehandshaking has been removed from +the TLS protocol, replaced by separate post-handshake authentication and +rekey operations. + Changing the rehandshake mode is no longer + required for compatibility. Also, rehandshaking has been removed + from the TLS protocol in TLS 1.3. + @@ -22662,6 +25010,7 @@ connection; when the application calls g_dtls_connection_close_async() on setting of this property. If you explicitly want to do an unclean close, you can close @conn's #GDtlsConnection:base-socket rather than closing @conn itself. + @@ -22693,6 +25042,7 @@ is equivalent to calling g_dtls_connection_close(). If @cancellable is cancelled, the #GDtlsConnection may be left partially-closed and any pending untransmitted data may be lost. Call g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. + %TRUE on success, %FALSE otherwise @@ -22719,6 +25069,7 @@ g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. Asynchronously shut down part or all of the DTLS connection. See g_dtls_connection_shutdown() for more information. + @@ -22756,6 +25107,7 @@ g_dtls_connection_shutdown() for more information. Finish an asynchronous TLS shutdown operation. See g_dtls_connection_shutdown() for more information. + %TRUE on success, %FALSE on failure, in which case @error will be set @@ -22772,6 +25124,14 @@ case @error will be set + + The list of application-layer protocols that the connection +advertises that it is willing to speak. See +g_dtls_connection_set_advertised_protocols(). + + + + The #GDatagramBased that the connection wraps. Note that this may be any implementation of #GDatagramBased, not just a #GSocket. @@ -22785,7 +25145,7 @@ g_dtls_connection_set_certificate(). The certificate database to use when verifying this TLS connection. If no certificate database is set, then the default database will be -used. See g_dtls_backend_get_default_database(). +used. See g_tls_backend_get_default_database(). @@ -22794,6 +25154,11 @@ database need to interact with the user. This will be used to prompt the user for passwords where necessary. + + The application-layer protocol negotiated during the TLS +handshake. See g_dtls_connection_get_negotiated_protocol(). + + The connection's peer's certificate, after the TLS handshake has completed and the certificate has been accepted. Note in @@ -22813,9 +25178,10 @@ it may not be if #GDtlsClientConnection:validation-flags is not behavior. - + The rehandshaking mode. See g_dtls_connection_set_rehandshake_mode(). + The rehandshake mode is ignored. @@ -22849,8 +25215,8 @@ the user before returning from the signal handler. If you want to let the user decide whether or not to accept the certificate, you would have to return %FALSE from the signal handler on the first attempt, and then after the connection attempt returns a -%G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if -the user decides to accept the certificate, remember that fact, +%G_TLS_ERROR_BAD_CERTIFICATE, you can interact with the user, and +if the user decides to accept the certificate, remember that fact, create a new connection, and return %TRUE from the signal handler the next time. @@ -22878,12 +25244,14 @@ no one else overrides it. Virtual method table for a #GDtlsConnection implementation. + The parent interface. + @@ -22902,6 +25270,7 @@ no one else overrides it. + success or failure @@ -22920,6 +25289,7 @@ no one else overrides it. + @@ -22949,6 +25319,7 @@ no one else overrides it. + %TRUE on success, %FALSE on failure, in which case @error will be set. @@ -22968,6 +25339,7 @@ case @error will be set. + %TRUE on success, %FALSE otherwise @@ -22994,6 +25366,7 @@ case @error will be set. + @@ -23031,6 +25404,7 @@ case @error will be set. + %TRUE on success, %FALSE on failure, in which case @error will be set @@ -23048,14 +25422,52 @@ case @error will be set + + + + + + + + + a #GDtlsConnection + + + + a %NULL-terminated + array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL + + + + + + + + + + + + the negotiated protocol, or %NULL + + + + + a #GDtlsConnection + + + + + #GDtlsServerConnection is the server-side subclass of #GDtlsConnection, representing a server-side DTLS connection. + Creates a new #GDtlsServerConnection wrapping @base_socket. + the new #GDtlsServerConnection, or %NULL on error @@ -23081,11 +25493,54 @@ rehandshake with a different mode from the initial handshake. vtable for a #GDtlsServerConnection implementation. + The parent interface. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GEmblem is an implementation of #GIcon that supports having an emblem, which is an icon with additional properties. @@ -23093,9 +25548,11 @@ It can than be added to a #GEmblemedIcon. Currently, only metainformation about the emblem's origin is supported. More may be added in the future. + Creates a new emblem for @icon. + a new #GEmblem. @@ -23109,6 +25566,7 @@ supported. More may be added in the future. Creates a new emblem for @icon. + a new #GEmblem. @@ -23126,6 +25584,7 @@ supported. More may be added in the future. Gives back the icon from @emblem. + a #GIcon. The returned object belongs to the emblem and should not be modified or freed. @@ -23140,6 +25599,7 @@ supported. More may be added in the future. Gets the origin of the emblem. + the origin of the emblem @@ -23159,6 +25619,7 @@ supported. More may be added in the future. + GEmblemOrigin is used to add information about the origin of the emblem @@ -23183,9 +25644,11 @@ icon is ensured via g_emblemed_icon_add_emblem(). Note that #GEmblemedIcon allows no control over the position of the emblems. See also #GEmblem for more information. + Creates a new emblemed icon for @icon with the emblem @emblem. + a new #GIcon @@ -23203,6 +25666,7 @@ of the emblems. See also #GEmblem for more information. Adds @emblem to the #GList of #GEmblems. + @@ -23219,6 +25683,7 @@ of the emblems. See also #GEmblem for more information. Removes all the emblems from @icon. + @@ -23231,6 +25696,7 @@ of the emblems. See also #GEmblem for more information. Gets the list of emblems for the @icon. + a #GList of #GEmblems that is owned by @emblemed @@ -23247,6 +25713,7 @@ of the emblems. See also #GEmblem for more information. Gets the main icon for @emblemed. + a #GIcon that is owned by @emblemed @@ -23269,34 +25736,68 @@ of the emblems. See also #GEmblem for more information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A key in the "access" namespace for checking deletion privileges. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be %TRUE if the user is able to delete the file. + A key in the "access" namespace for getting execution privileges. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be %TRUE if the user is able to execute the file. + A key in the "access" namespace for getting read privileges. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be %TRUE if the user is able to read the file. + A key in the "access" namespace for checking renaming privileges. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be %TRUE if the user is able to rename the file. + @@ -23304,12 +25805,14 @@ This attribute will be %TRUE if the user is able to rename the file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be %TRUE if the user is able to move the file to the trash. + A key in the "access" namespace for getting write privileges. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. This attribute will be %TRUE if the user is able to write to the file. + @@ -23317,6 +25820,17 @@ This attribute will be %TRUE if the user is able to write to the file. is set. This attribute is %TRUE if the archive flag is set. This attribute is only available for DOS file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + A key in the "dos" namespace for checking if the file is a NTFS mount point +(a volume mount or a junction point). +This attribute is %TRUE if file is a reparse point of type +[IO_REPARSE_TAG_MOUNT_POINT](https://msdn.microsoft.com/en-us/library/dd541667.aspx). +This attribute is only available for DOS file systems. +Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + @@ -23324,47 +25838,64 @@ is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. is set. This attribute is %TRUE if the backup flag is set. This attribute is only available for DOS file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + + + + + A key in the "dos" namespace for getting the file NTFS reparse tag. +This value is 0 for files that are not reparse points. +See the [Reparse Tags](https://msdn.microsoft.com/en-us/library/dd541667.aspx) +page for possible reparse tag values. Corresponding #GFileAttributeType +is %G_FILE_ATTRIBUTE_TYPE_UINT32. + A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "filesystem" namespace for getting the number of bytes of free space left on the file system. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + A key in the "filesystem" namespace for checking if the file system is read only. Is set to %TRUE if the file system is read only. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "filesystem" namespace for checking if the file system is remote. Is set to %TRUE if the file system is remote. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + A key in the "filesystem" namespace for getting the file system's type. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "filesystem" namespace for getting the number of bytes of used on the file system. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + @@ -23372,12 +25903,14 @@ file system. Corresponding #GFileAttributeType is application whether it should preview (e.g. thumbnail) files on the file system. The value for this key contain a #GFilesystemPreviewType. + A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + @@ -23385,6 +25918,7 @@ GVFS backend in use. Corresponding #GFileAttributeType is Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. An example use would be during listing files, to avoid recursive directory scanning. + @@ -23393,85 +25927,101 @@ Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. An example use would be during drag and drop to see if the source and target are on the same filesystem (default to move) or not (default to copy). + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started degraded. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for getting the HAL UDI for the mountable file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is automatically polled for media. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "mountable" namespace for getting the #GDriveStartStopType. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + A key in the "mountable" namespace for getting the unix device. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + A key in the "mountable" namespace for getting the unix device file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "owner" namespace for getting the file owner's group. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "owner" namespace for getting the user name of the file's owner. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "owner" namespace for getting the real name of the user that owns the file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + @@ -23480,12 +26030,14 @@ used to get preview of the file. For example, it may be a low resolution thumbnail without metadata. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a #GIcon. + A key in the "recent" namespace for getting time, when the metadata for the file in `recent:///` was last changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT64. + @@ -23493,6 +26045,7 @@ file in `recent:///` was last changed. Corresponding #GFileAttributeType is context. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only available if GLib has been built with SELinux support. + @@ -23501,12 +26054,14 @@ that is consumed by the file (in bytes). This will generally be larger than the file size (due to block size overhead) but can occasionally be smaller (for example, for sparse files). Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + A key in the "standard" namespace for getting the content type of the file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. The value for this key should contain a valid content type. + @@ -23518,6 +26073,7 @@ might have a different encoding. If the filename is not a valid string in the encoding selected for the filesystem it is in then the copy name will not be set. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + @@ -23529,6 +26085,7 @@ for a file in the trash. This is useful for instance as the window title when displaying a directory or for a bookmarks menu. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + @@ -23536,6 +26093,7 @@ Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. A display name is guaranteed to be in UTF8 and can thus be displayed in the UI. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + @@ -23546,6 +26104,7 @@ might contain information you don't want in the new filename (such as "(invalid unicode)" if the filename was in an invalid encoding). Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + @@ -23554,34 +26113,41 @@ The fast content type isn't as reliable as the regular one, as it only uses the filename to guess it, but it is faster to calculate than the regular content type. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "standard" namespace for getting the icon for the file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a #GIcon. + A key in the "standard" namespace for checking if a file is a backup file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "standard" namespace for checking if a file is hidden. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "standard" namespace for checking if the file is a symlink. Typically the actual type is something else, if we followed the symlink to get the type. +On Windows NTFS mountpoints are considered to be symlinks as well. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "standard" namespace for checking if a file is virtual. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + @@ -23591,6 +26157,7 @@ indicate that the URI is not persistent. Applications should look at #G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + @@ -23600,11 +26167,13 @@ and can thus not be generally displayed as is. Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user interface. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + A key in the "standard" namespace for getting the file's size (in bytes). Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + @@ -23614,36 +26183,42 @@ An example use would be in file managers, which would use this key to set the order files are displayed. Files with smaller sort order should be sorted first, and files without sort order as if sort order was zero. + A key in the "standard" namespace for getting the symbolic icon for the file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value for this key should contain a #GIcon. + A key in the "standard" namespace for getting the symlink target, if the file is a symlink. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + A key in the "standard" namespace for getting the target URI for the file, in the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "standard" namespace for storing file types. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. The value for this key should contain a #GFileType. + A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute is %TRUE if thumbnailing failed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + @@ -23655,12 +26230,14 @@ If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE, it indicates that thumbnailing may be attempted again and may succeed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "thumbnail" namespace for getting the path to the thumbnail image. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + @@ -23668,6 +26245,7 @@ image. Corresponding #GFileAttributeType is accessed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was last accessed, in seconds since the UNIX epoch. + @@ -23675,6 +26253,7 @@ file was last accessed, in seconds since the UNIX epoch. the file was last accessed. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23684,6 +26263,7 @@ and contains the time since the file was last changed, in seconds since the UNIX epoch. This corresponds to the traditional UNIX ctime. + @@ -23691,6 +26271,7 @@ This corresponds to the traditional UNIX ctime. the file was last changed. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23700,6 +26281,7 @@ and contains the time since the file was created, in seconds since the UNIX epoch. This corresponds to the NTFS ctime. + @@ -23707,6 +26289,7 @@ This corresponds to the NTFS ctime. the file was created. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23714,6 +26297,7 @@ the file was created. This should be used in conjunction with modified. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was modified, in seconds since the UNIX epoch. + @@ -23721,6 +26305,7 @@ file was modified, in seconds since the UNIX epoch. the file was last modified. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23728,12 +26313,14 @@ the file was last modified. This should be used in conjunction with items in `trash:///`, will return the date and time when the file was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. + A key in the "trash" namespace. When requested against `trash:///` returns the number of (toplevel) items in the trash folder. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23741,18 +26328,21 @@ Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. items in `trash:///`, will return the original path to the file before it was trashed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. + A key in the "unix" namespace for getting the number of blocks allocated for the file. This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + A key in the "unix" namespace for getting the block size for the file system. This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23760,32 +26350,40 @@ Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. file is located on (see stat() documentation). This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + A key in the "unix" namespace for getting the group ID for the file. This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + A key in the "unix" namespace for getting the inode of the file. This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. + A key in the "unix" namespace for checking if the file represents a UNIX mount point. This attribute is %TRUE if the file is a UNIX mount -point. This attribute is only available for UNIX file systems. +point. Since 2.58, `/` is considered to be a mount point. +This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. + A key in the "unix" namespace for getting the mode of the file -(e.g. whether the file is a regular file, symlink, etc). See lstat() -documentation. This attribute is only available for UNIX file systems. +(e.g. whether the file is a regular file, symlink, etc). See the +documentation for `lstat()`: this attribute is equivalent to the `st_mode` +member of `struct stat`, and includes both the file type and permissions. +This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23793,6 +26391,7 @@ Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. for a file. See lstat() documentation. This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + @@ -23800,14 +26399,226 @@ for UNIX file systems. Corresponding #GFileAttributeType is (if it is a special file). See lstat() documentation. This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + A key in the "unix" namespace for getting the user ID for the file. This attribute is only available for UNIX file systems. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GFile is a high level abstraction for manipulating files on a virtual file system. #GFiles are lightweight, immutable objects @@ -23822,6 +26633,7 @@ To construct a #GFile, you can use: - g_file_new_for_commandline_arg() for a command line argument. - g_file_new_tmp() to create a temporary file from a template. - g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name(). +- g_file_new_build_filename() to create a file from path elements. One way to think of a #GFile is as an abstraction of a pathname. For normal files the system pathname is what is stored internally, but as @@ -23889,6 +26701,29 @@ has been modified from the version on the file system. See the HTTP 1.1 [specification](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) for HTTP Etag headers, which are a very similar concept. + + + Constructs a #GFile from a series of elements using the correct +separator for filenames. + +Using this function is equivalent to calling g_build_filename(), +followed by g_file_new_for_path() on the result. + + + a new #GFile + + + + + the first element in the path + + + + remaining elements in path, terminated by %NULL + + + + Creates a #GFile with the given argument from the command line. The value of @arg can be either a URI, an absolute path or a @@ -23904,6 +26739,7 @@ the commandline. #GApplication also uses UTF-8 but g_application_command_line_create_file_for_arg() may be more useful for you there. It is also always possible to use this function with #GOptionContext arguments of type %G_OPTION_ARG_FILENAME. + a new #GFile. Free the returned object with g_object_unref(). @@ -23912,7 +26748,7 @@ for you there. It is also always possible to use this function with a command line string - + @@ -23928,6 +26764,7 @@ This is useful if the commandline argument was given in a context other than the invocation of the current process. See also g_application_command_line_create_file_for_arg(). + a new #GFile @@ -23935,11 +26772,11 @@ See also g_application_command_line_create_file_for_arg(). a command line string - + the current working directory of the commandline - + @@ -23947,6 +26784,7 @@ See also g_application_command_line_create_file_for_arg(). Constructs a #GFile for a given path. This operation never fails, but the returned object might not support any I/O operation if @path is malformed. + a new #GFile for the given @path. Free the returned object with g_object_unref(). @@ -23956,7 +26794,7 @@ operation if @path is malformed. a string containing a relative or absolute path. The string must be encoded in the glib filename encoding. - + @@ -23965,6 +26803,7 @@ operation if @path is malformed. fails, but the returned object might not support any I/O operation if @uri is malformed or if the uri type is not supported. + a new #GFile for the given @uri. Free the returned object with g_object_unref(). @@ -23988,6 +26827,7 @@ directory components. If it is %NULL, a default template is used. Unlike the other #GFile constructors, this will return %NULL if a temporary file could not be created. + a new #GFile. Free the returned object with g_object_unref(). @@ -23997,7 +26837,7 @@ a temporary file could not be created. Template for the file name, as in g_file_open_tmp(), or %NULL for a default template - + on return, a #GFileIOStream for the created file @@ -24010,6 +26850,7 @@ a temporary file could not be created. given by g_file_get_parse_name()). This operation never fails, but the returned object might not support any I/O operation if the @parse_name cannot be parsed. + a new #GFile. @@ -24039,6 +26880,7 @@ Some file systems don't allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileOutputStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -24069,6 +26911,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_append_to_finish() to get the result of the operation. + @@ -24104,6 +26947,7 @@ of the operation. Finishes an asynchronous file append operation started with g_file_append_to_async(). + a valid #GFileOutputStream or %NULL on error. @@ -24162,6 +27006,7 @@ If the source is a directory and the target does not exist, or If you are interested in copying the #GFile object itself (not the on-disk file), see g_file_dup(). + %TRUE on success, %FALSE otherwise. @@ -24206,6 +27051,7 @@ run in. When the operation is finished, @callback will be called. You can then call g_file_copy_finish() to get the result of the operation. + @@ -24252,6 +27098,7 @@ g_file_copy_finish() to get the result of the operation. Finishes copying the file started with g_file_copy_async(). + a %TRUE on success, %FALSE on error. @@ -24287,6 +27134,7 @@ allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileOutputStream for the newly created file, or %NULL on error. @@ -24319,6 +27167,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_create_finish() to get the result of the operation. + @@ -24354,6 +27203,7 @@ of the operation. Finishes an asynchronous file create operation started with g_file_create_async(). + a #GFileOutputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -24394,6 +27244,7 @@ kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. + a #GFileIOStream for the newly created file, or %NULL on error. @@ -24426,6 +27277,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_create_readwrite_finish() to get the result of the operation. + @@ -24461,6 +27313,7 @@ the result of the operation. Finishes an asynchronous file create operation started with g_file_create_readwrite_async(). + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -24484,6 +27337,7 @@ deleted if it is empty. This has the same semantics as g_unlink(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the file was deleted. %FALSE otherwise. @@ -24504,6 +27358,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Asynchronously delete a file. If the @file is a directory, it will only be deleted if it is empty. This has the same semantics as g_unlink(). + @@ -24534,6 +27389,7 @@ g_unlink(). Finishes deleting a file started with g_file_delete_async(). + %TRUE if the file was deleted. %FALSE otherwise. @@ -24554,7 +27410,13 @@ g_unlink(). the actual file or directory represented by the #GFile; see g_file_copy() if attempting to copy a file. +g_file_dup() is useful when a second handle is needed to the same underlying +file, for use in a separate thread (#GFile is not thread-safe). For use +within the same thread, use g_object_ref() to increment the existing object’s +reference count. + This call does no blocking I/O. + a new #GFile that is a duplicate of the given #GFile. @@ -24577,6 +27439,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Use g_file_eject_mountable_with_operation() instead. + @@ -24610,6 +27473,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. g_file_eject_mountable(). Use g_file_eject_mountable_with_operation_finish() instead. + %TRUE if the @file was ejected successfully. %FALSE otherwise. @@ -24635,6 +27499,7 @@ g_file_eject_mountable_with_operation_finish(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + @@ -24671,6 +27536,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous eject operation started by g_file_eject_mountable_with_operation(). + %TRUE if the @file was ejected successfully. %FALSE otherwise. @@ -24711,6 +27577,7 @@ returned. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY error will be returned. Other errors are possible too. + A #GFileEnumerator if successful, %NULL on error. Free the returned object with g_object_unref(). @@ -24747,6 +27614,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_enumerate_children_finish() to get the result of the operation. + @@ -24786,6 +27654,7 @@ the operation. Finishes an async enumerate children operation. See g_file_enumerate_children_async(). + a #GFileEnumerator or %NULL if an error occurred. @@ -24811,6 +27680,7 @@ file on the filesystem due to various forms of filename aliasing. This call does no blocking I/O. + %TRUE if @file1 and @file2 are equal. @@ -24829,13 +27699,14 @@ This call does no blocking I/O. Gets a #GMount for the #GFile. -If the #GFileIface for @file does not have a mount (e.g. -possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND -and %NULL will be returned. +#GMount is returned only for user interesting locations, see +#GVolumeMonitor. If the #GFileIface for @file does not have a #mount, +@error will be set to %G_IO_ERROR_NOT_FOUND and %NULL #will be returned. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GMount where the @file is located or %NULL on error. @@ -24863,6 +27734,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_find_enclosing_mount_finish() to get the result of the operation. + @@ -24894,6 +27766,7 @@ get the result of the operation. Finishes an asynchronous find mount request. See g_file_find_enclosing_mount_async(). + #GMount for given @file or %NULL on error. Free the returned object with g_object_unref(). @@ -24911,6 +27784,7 @@ See g_file_find_enclosing_mount_async(). + @@ -24929,6 +27803,7 @@ user interface, for instance when you select a directory and type a filename in the file selector. This call does no blocking I/O. + a #GFile to the specified child, or %NULL if the display name couldn't be converted. @@ -24952,6 +27827,7 @@ If the @file represents the root directory of the file system, then %NULL will be returned. This call does no blocking I/O. + a #GFile structure to the parent of the given #GFile or %NULL if there is no parent. Free @@ -24980,6 +27856,7 @@ to UTF-8 the pathname is used, otherwise the IRI is used (a form of URI that allows UTF-8 characters unescaped). This call does no blocking I/O. + a string containing the #GFile's parse name. The returned string should be freed with g_free() @@ -24994,6 +27871,7 @@ This call does no blocking I/O. + @@ -25004,6 +27882,7 @@ This call does no blocking I/O. + @@ -25020,6 +27899,7 @@ This call does no blocking I/O. Gets the URI for the @file. This call does no blocking I/O. + a string containing the #GFile's URI. The returned string should be freed with g_free() @@ -25042,6 +27922,7 @@ URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] Common schemes include "file", "http", "ftp", etc. This call does no blocking I/O. + a string containing the URI scheme for the given #GFile. The returned string should be freed with g_free() @@ -25059,6 +27940,7 @@ This call does no blocking I/O. Checks to see if a #GFile has a given URI scheme. This call does no blocking I/O. + %TRUE if #GFile's backend supports the given URI scheme, %FALSE if URI scheme is %NULL, @@ -25080,6 +27962,7 @@ This call does no blocking I/O. Creates a hash value for a #GFile. This call does no blocking I/O. + 0 if @file is not a valid #GFile, otherwise an integer that can be used as hash value for the #GFile. @@ -25097,7 +27980,7 @@ This call does no blocking I/O. Checks to see if a file is native to the platform. -A native file s one expressed in the platform-native filename format, +A native file is one expressed in the platform-native filename format, e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it might be on a locally mounted remote filesystem. @@ -25106,6 +27989,7 @@ filesystem via a userspace filesystem (FUSE), in these cases this call will return %FALSE, but g_file_get_path() will still return a native path. This call does no blocking I/O. + %TRUE if @file is native @@ -25132,6 +28016,7 @@ For a local #GFile the newly created directory will have the default If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on successful creation, %FALSE otherwise. @@ -25150,6 +28035,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Asynchronously creates a directory. + @@ -25181,6 +28067,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous directory creation, started with g_file_make_directory_async(). + %TRUE on successful directory creation, %FALSE otherwise. @@ -25203,6 +28090,7 @@ g_file_make_directory_async(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on the creation of a new symlink, %FALSE otherwise. @@ -25215,7 +28103,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. a string with the path for the target of the new symlink - + optional #GCancellable object, @@ -25233,7 +28121,7 @@ reports the number of directories and non-directory files encountered By default, errors are only reported against the toplevel file itself. Errors found while recursing are silently ignored, unless -%G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags. +%G_FILE_MEASURE_REPORT_ANY_ERROR is given in @flags. The returned size, @disk_usage, is in bytes and should be formatted with g_format_size() in order to get something reasonable for showing @@ -25243,6 +28131,7 @@ in a user interface. periodic progress updates while scanning. See the documentation for #GFileMeasureProgressCallback for information about when and how the callback will be invoked. + %TRUE if successful, with the out parameters set. %FALSE otherwise, with @error set. @@ -25288,6 +28177,7 @@ callback will be invoked. This is the asynchronous version of g_file_measure_disk_usage(). See there for more information. + @@ -25330,6 +28220,7 @@ there for more information. Collects the results from an earlier call to g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for more information. + %TRUE if successful, with the out parameters set. %FALSE otherwise, with @error set. @@ -25371,6 +28262,7 @@ It does not make sense for @flags to contain directories. It is not possible to monitor all the files in a directory for changes made via hard links; if you want to do this then you must register individual watches with g_file_monitor(). + a #GFileMonitor for the given @file, or %NULL on error. @@ -25408,6 +28300,7 @@ changes made through the filename contained in @file to be reported. Using this flag may result in an increase in resource usage, and may not have any effect depending on the #GFileMonitor backend and/or filesystem type. + a #GFileMonitor for the given @file, or %NULL on error. @@ -25441,6 +28334,7 @@ g_file_mount_enclosing_volume_finish(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + @@ -25476,6 +28370,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes a mount operation started by g_file_mount_enclosing_volume(). + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -25505,6 +28400,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation. + @@ -25543,6 +28439,7 @@ the result of the operation. Finish an asynchronous mount operation that was started with g_file_mount_mountable(). + a #GFile or %NULL on error. Free the returned object with g_object_unref(). @@ -25569,10 +28466,6 @@ inside the same filesystem), but the fallback code does not. If the flag #G_FILE_COPY_OVERWRITE is specified an already existing @destination file is overwritten. -If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks -will be copied as symlinks, otherwise the target of the -@source symlink will be copied. - If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. @@ -25597,6 +28490,7 @@ If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native move operation isn't available). + %TRUE on successful move, %FALSE otherwise. @@ -25648,6 +28542,7 @@ what kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. + #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -25673,6 +28568,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_open_readwrite_finish() to get the result of the operation. + @@ -25704,6 +28600,7 @@ the result of the operation. Finishes an asynchronous file read operation started with g_file_open_readwrite_async(). + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -25730,6 +28627,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation. + @@ -25758,6 +28656,7 @@ the result of the operation. Finish an asynchronous poll operation that was polled with g_file_poll_mountable(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -25789,8 +28688,9 @@ This call does no I/O, as it works purely on names. As such it can sometimes return %FALSE even if @file is inside a @prefix (from a filesystem point of view), because the prefix of @file is an alias of @prefix. + - %TRUE if the @files's parent, grandparent, etc is @prefix, + %TRUE if the @file's parent, grandparent, etc is @prefix, %FALSE otherwise. @@ -25831,6 +28731,7 @@ returned. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileInfo or %NULL if there was an error. Free the returned object with g_object_unref(). @@ -25864,6 +28765,7 @@ synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_query_info_finish() to get the result of the operation. + @@ -25899,6 +28801,7 @@ operation. Finishes an asynchronous filesystem info query. See g_file_query_filesystem_info_async(). + #GFileInfo for given @file or %NULL on error. @@ -25947,6 +28850,7 @@ about the symlink itself will be returned. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileInfo for the given @file, or %NULL on error. Free the returned object with g_object_unref(). @@ -25982,6 +28886,7 @@ version of this call. When the operation is finished, @callback will be called. You can then call g_file_query_info_finish() to get the result of the operation. + @@ -26021,6 +28926,7 @@ then call g_file_query_info_finish() to get the result of the operation. Finishes an asynchronous file info query. See g_file_query_info_async(). + #GFileInfo for given @file or %NULL on error. Free the returned object with @@ -26049,6 +28955,7 @@ specific file may not support a specific attribute. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GFileAttributeInfoList describing the settable attributes. When you are done with it, release it with @@ -26075,6 +28982,7 @@ attributes (in the "xattr" namespace). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GFileAttributeInfoList describing the writable namespaces. When you are done with it, release it with @@ -26102,6 +29010,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_read_finish() to get the result of the operation. + @@ -26133,6 +29042,7 @@ of the operation. Finishes an asynchronous file read operation started with g_file_read_async(). + a #GFileInputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -26161,6 +29071,7 @@ If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + #GFileInputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -26219,6 +29130,7 @@ file systems don't allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileOutputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -26259,6 +29171,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_replace_finish() to get the result of the operation. + @@ -26303,6 +29216,7 @@ of the operation. Finishes an asynchronous file replace operation started with g_file_replace_async(). + a #GFileOutputStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -26330,6 +29244,7 @@ same thing but returns an output stream only. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -26371,6 +29286,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_replace_readwrite_finish() to get the result of the operation. + @@ -26415,6 +29331,7 @@ the result of the operation. Finishes an asynchronous file replace operation started with g_file_replace_readwrite_async(). + a #GFileIOStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -26435,6 +29352,7 @@ g_file_replace_readwrite_async(). Resolves a relative path for @file to an absolute path. This call does no blocking I/O. + #GFile to the resolved path. %NULL if @relative_path is %NULL or if @file is invalid. @@ -26448,19 +29366,20 @@ This call does no blocking I/O. a given relative path string - + - Sets an attribute in the file with attribute name @attribute to @value. + Sets an attribute in the file with attribute name @attribute to @value_p. -Some attributes can be unset by setting @attribute to +Some attributes can be unset by setting @type to %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the attribute was set, %FALSE otherwise. @@ -26503,6 +29422,7 @@ which is the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_set_attributes_finish() to get the result of the operation. + @@ -26540,6 +29460,7 @@ the result of the operation. Finishes setting an attribute started in g_file_set_attributes_async(). + %TRUE if the attributes were set correctly, %FALSE otherwise. @@ -26572,6 +29493,7 @@ also detect further errors. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %FALSE if there was any error, %TRUE otherwise. @@ -26612,6 +29534,7 @@ On success the resulting converted filename is returned. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GFile specifying what @file was renamed to, or %NULL if there was an error. @@ -26643,6 +29566,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_set_display_name_finish() to get the result of the operation. + @@ -26678,6 +29602,7 @@ the result of the operation. Finishes setting a display name started with g_file_set_display_name_async(). + a #GFile or %NULL on error. Free the returned object with g_object_unref(). @@ -26706,6 +29631,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation. + @@ -26741,6 +29667,7 @@ the result of the operation. Finish an asynchronous start operation that was started with g_file_start_mountable(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -26767,6 +29694,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_stop_mountable_finish() to get the result of the operation. + @@ -26801,10 +29729,11 @@ the result of the operation. - Finishes an stop operation, see g_file_stop_mountable() for details. + Finishes a stop operation, see g_file_stop_mountable() for details. Finish an asynchronous stop operation that was started with g_file_stop_mountable(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -26830,6 +29759,7 @@ Not all file systems support trashing, so this call can return the If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on successful trash, %FALSE otherwise. @@ -26848,6 +29778,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Asynchronously sends @file to the Trash location, if possible. + @@ -26879,6 +29810,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous file trashing operation, started with g_file_trash_async(). + %TRUE on successful trash, %FALSE otherwise. @@ -26905,6 +29837,7 @@ When the operation is finished, @callback will be called. You can then call g_file_unmount_mountable_finish() to get the result of the operation. Use g_file_unmount_mountable_with_operation() instead. + @@ -26940,6 +29873,7 @@ Finish an asynchronous unmount operation that was started with g_file_unmount_mountable(). Use g_file_unmount_mountable_with_operation_finish() instead. + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -26966,6 +29900,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_unmount_mountable_finish() to get the result of the operation. + @@ -27005,6 +29940,7 @@ see g_file_unmount_mountable_with_operation() for details. Finish an asynchronous unmount operation that was started with g_file_unmount_mountable_with_operation(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -27039,6 +29975,7 @@ Some file systems don't allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileOutputStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -27069,6 +30006,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_append_to_finish() to get the result of the operation. + @@ -27104,6 +30042,7 @@ of the operation. Finishes an asynchronous file append operation started with g_file_append_to_async(). + a valid #GFileOutputStream or %NULL on error. @@ -27162,6 +30101,7 @@ If the source is a directory and the target does not exist, or If you are interested in copying the #GFile object itself (not the on-disk file), see g_file_dup(). + %TRUE on success, %FALSE otherwise. @@ -27206,6 +30146,7 @@ run in. When the operation is finished, @callback will be called. You can then call g_file_copy_finish() to get the result of the operation. + @@ -27259,6 +30200,7 @@ those that are copies in a normal file copy operation if #G_FILE_COPY_ALL_METADATA is specified in @flags, then all the metadata that is possible to copy is copied. This is useful when implementing move by copy + delete source. + %TRUE if the attributes were copied successfully, %FALSE otherwise. @@ -27286,6 +30228,7 @@ is useful when implementing move by copy + delete source. Finishes copying the file started with g_file_copy_async(). + a %TRUE on success, %FALSE on error. @@ -27321,6 +30264,7 @@ allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileOutputStream for the newly created file, or %NULL on error. @@ -27353,6 +30297,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_create_finish() to get the result of the operation. + @@ -27388,6 +30333,7 @@ of the operation. Finishes an asynchronous file create operation started with g_file_create_async(). + a #GFileOutputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -27428,6 +30374,7 @@ kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. + a #GFileIOStream for the newly created file, or %NULL on error. @@ -27460,6 +30407,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_create_readwrite_finish() to get the result of the operation. + @@ -27495,6 +30443,7 @@ the result of the operation. Finishes an asynchronous file create operation started with g_file_create_readwrite_async(). + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -27518,6 +30467,7 @@ deleted if it is empty. This has the same semantics as g_unlink(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the file was deleted. %FALSE otherwise. @@ -27538,6 +30488,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Asynchronously delete a file. If the @file is a directory, it will only be deleted if it is empty. This has the same semantics as g_unlink(). + @@ -27568,6 +30519,7 @@ g_unlink(). Finishes deleting a file started with g_file_delete_async(). + %TRUE if the file was deleted. %FALSE otherwise. @@ -27588,7 +30540,13 @@ g_unlink(). the actual file or directory represented by the #GFile; see g_file_copy() if attempting to copy a file. +g_file_dup() is useful when a second handle is needed to the same underlying +file, for use in a separate thread (#GFile is not thread-safe). For use +within the same thread, use g_object_ref() to increment the existing object’s +reference count. + This call does no blocking I/O. + a new #GFile that is a duplicate of the given #GFile. @@ -27611,6 +30569,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Use g_file_eject_mountable_with_operation() instead. + @@ -27644,6 +30603,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. g_file_eject_mountable(). Use g_file_eject_mountable_with_operation_finish() instead. + %TRUE if the @file was ejected successfully. %FALSE otherwise. @@ -27669,6 +30629,7 @@ g_file_eject_mountable_with_operation_finish(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + @@ -27705,6 +30666,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous eject operation started by g_file_eject_mountable_with_operation(). + %TRUE if the @file was ejected successfully. %FALSE otherwise. @@ -27745,6 +30707,7 @@ returned. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY error will be returned. Other errors are possible too. + A #GFileEnumerator if successful, %NULL on error. Free the returned object with g_object_unref(). @@ -27781,6 +30744,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_enumerate_children_finish() to get the result of the operation. + @@ -27820,6 +30784,7 @@ the operation. Finishes an async enumerate children operation. See g_file_enumerate_children_async(). + a #GFileEnumerator or %NULL if an error occurred. @@ -27845,6 +30810,7 @@ file on the filesystem due to various forms of filename aliasing. This call does no blocking I/O. + %TRUE if @file1 and @file2 are equal. @@ -27863,13 +30829,14 @@ This call does no blocking I/O. Gets a #GMount for the #GFile. -If the #GFileIface for @file does not have a mount (e.g. -possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND -and %NULL will be returned. +#GMount is returned only for user interesting locations, see +#GVolumeMonitor. If the #GFileIface for @file does not have a #mount, +@error will be set to %G_IO_ERROR_NOT_FOUND and %NULL #will be returned. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GMount where the @file is located or %NULL on error. @@ -27897,6 +30864,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_find_enclosing_mount_finish() to get the result of the operation. + @@ -27928,6 +30896,7 @@ get the result of the operation. Finishes an asynchronous find mount request. See g_file_find_enclosing_mount_async(). + #GMount for given @file or %NULL on error. Free the returned object with g_object_unref(). @@ -27958,6 +30927,7 @@ can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info(). This call does no blocking I/O. + string containing the #GFile's base name, or %NULL if given #GFile is invalid. The returned string @@ -27979,6 +30949,7 @@ you can still have a #GFile that points to it. You can use this for instance to create that file. This call does no blocking I/O. + a #GFile to a child specified by @name. Free the returned object with g_object_unref(). @@ -27991,7 +30962,7 @@ This call does no blocking I/O. string containing the child's basename - + @@ -28004,6 +30975,7 @@ user interface, for instance when you select a directory and type a filename in the file selector. This call does no blocking I/O. + a #GFile to the specified child, or %NULL if the display name couldn't be converted. @@ -28027,6 +30999,7 @@ If the @file represents the root directory of the file system, then %NULL will be returned. This call does no blocking I/O. + a #GFile structure to the parent of the given #GFile or %NULL if there is no parent. Free @@ -28055,6 +31028,7 @@ to UTF-8 the pathname is used, otherwise the IRI is used (a form of URI that allows UTF-8 characters unescaped). This call does no blocking I/O. + a string containing the #GFile's parse name. The returned string should be freed with g_free() @@ -28073,6 +31047,7 @@ This call does no blocking I/O. guaranteed to be an absolute, canonical path. It might contain symlinks. This call does no blocking I/O. + string containing the #GFile's path, or %NULL if no such path exists. The returned string should be freed @@ -28090,6 +31065,7 @@ This call does no blocking I/O. Gets the path for @descendant relative to @parent. This call does no blocking I/O. + string with the relative path from @descendant to @parent, or %NULL if @descendant doesn't have @parent as @@ -28112,6 +31088,7 @@ This call does no blocking I/O. Gets the URI for the @file. This call does no blocking I/O. + a string containing the #GFile's URI. The returned string should be freed with g_free() @@ -28134,6 +31111,7 @@ URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] Common schemes include "file", "http", "ftp", etc. This call does no blocking I/O. + a string containing the URI scheme for the given #GFile. The returned string should be freed with g_free() @@ -28153,6 +31131,7 @@ This call does no blocking I/O. If @parent is %NULL then this function returns %TRUE if @file has any parent at all. If @parent is non-%NULL then %TRUE is only returned if @file is an immediate child of @parent. + %TRUE if @file is an immediate child of @parent (or any parent in the case that @parent is %NULL). @@ -28184,8 +31163,9 @@ This call does no I/O, as it works purely on names. As such it can sometimes return %FALSE even if @file is inside a @prefix (from a filesystem point of view), because the prefix of @file is an alias of @prefix. + - %TRUE if the @files's parent, grandparent, etc is @prefix, + %TRUE if the @file's parent, grandparent, etc is @prefix, %FALSE otherwise. @@ -28204,6 +31184,7 @@ of @prefix. Checks to see if a #GFile has a given URI scheme. This call does no blocking I/O. + %TRUE if #GFile's backend supports the given URI scheme, %FALSE if URI scheme is %NULL, @@ -28225,6 +31206,7 @@ This call does no blocking I/O. Creates a hash value for a #GFile. This call does no blocking I/O. + 0 if @file is not a valid #GFile, otherwise an integer that can be used as hash value for the #GFile. @@ -28242,7 +31224,7 @@ This call does no blocking I/O. Checks to see if a file is native to the platform. -A native file s one expressed in the platform-native filename format, +A native file is one expressed in the platform-native filename format, e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, as it might be on a locally mounted remote filesystem. @@ -28251,6 +31233,7 @@ filesystem via a userspace filesystem (FUSE), in these cases this call will return %FALSE, but g_file_get_path() will still return a native path. This call does no blocking I/O. + %TRUE if @file is native @@ -28262,15 +31245,115 @@ This call does no blocking I/O. + + Loads the contents of @file and returns it as #GBytes. + +If @file is a resource:// based URI, the resulting bytes will reference the +embedded resource instead of a copy. Otherwise, this is equivalent to calling +g_file_load_contents() and g_bytes_new_take(). + +For resources, @etag_out will be set to %NULL. + +The data contained in the resulting #GBytes is always zero-terminated, but +this is not included in the #GBytes length. The resulting #GBytes should be +freed with g_bytes_unref() when no longer in use. + + + a #GBytes or %NULL and @error is set + + + + + a #GFile + + + + a #GCancellable or %NULL + + + + a location to place the current + entity tag for the file, or %NULL if the entity tag is not needed + + + + + + Asynchronously loads the contents of @file as #GBytes. + +If @file is a resource:// based URI, the resulting bytes will reference the +embedded resource instead of a copy. Otherwise, this is equivalent to calling +g_file_load_contents_async() and g_bytes_new_take(). + +@callback should call g_file_load_bytes_finish() to get the result of this +asynchronous operation. + +See g_file_load_bytes() for more information. + + + + + + + a #GFile + + + + a #GCancellable or %NULL + + + + a #GAsyncReadyCallback to call when the + request is satisfied + + + + the data to pass to callback function + + + + + + Completes an asynchronous request to g_file_load_bytes_async(). + +For resources, @etag_out will be set to %NULL. + +The data contained in the resulting #GBytes is always zero-terminated, but +this is not included in the #GBytes length. The resulting #GBytes should be +freed with g_bytes_unref() when no longer in use. + +See g_file_load_bytes() for more information. + + + a #GBytes or %NULL and @error is set + + + + + a #GFile + + + + a #GAsyncResult provided to the callback + + + + a location to place the current + entity tag for the file, or %NULL if the entity tag is not needed + + + + Loads the content of the file into memory. The data is always zero-terminated, but this is not included in the resultant @length. -The returned @content should be freed with g_free() when no longer +The returned @contents should be freed with g_free() when no longer needed. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the @file's contents were successfully loaded. %FALSE if there were errors. @@ -28317,6 +31400,7 @@ the @callback. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + @@ -28342,9 +31426,10 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous load of the @file's contents. The contents are placed in @contents, and @length is set to the -size of the @contents string. The @content should be freed with +size of the @contents string. The @contents should be freed with g_free() when no longer needed. If @etag_out is present, it will be set to the new entity tag for the @file. + %TRUE if the load was successful. If %FALSE and @error is present, it will be set appropriately. @@ -28389,6 +31474,7 @@ both the @read_more_callback and the @callback. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + @@ -28401,13 +31487,15 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. optional #GCancellable object, %NULL to ignore - - a #GFileReadMoreCallback to receive partial data + + a + #GFileReadMoreCallback to receive partial data and to specify whether further data should be read - a #GAsyncReadyCallback to call when the request is satisfied + a #GAsyncReadyCallback to call + when the request is satisfied @@ -28420,8 +31508,9 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous partial load operation that was started with g_file_load_partial_contents_async(). The data is always zero-terminated, but this is not included in the resultant @length. -The returned @content should be freed with g_free() when no longer +The returned @contents should be freed with g_free() when no longer needed. + %TRUE if the load was successful. If %FALSE and @error is present, it will be set appropriately. @@ -28469,6 +31558,7 @@ For a local #GFile the newly created directory will have the default If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on successful creation, %FALSE otherwise. @@ -28487,6 +31577,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Asynchronously creates a directory. + @@ -28518,6 +31609,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous directory creation, started with g_file_make_directory_async(). + %TRUE on successful directory creation, %FALSE otherwise. @@ -28547,6 +31639,7 @@ For a local #GFile the newly created directories will have the default If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if all directories have been successfully created, %FALSE otherwise. @@ -28571,6 +31664,7 @@ otherwise. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on the creation of a new symlink, %FALSE otherwise. @@ -28583,7 +31677,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. a string with the path for the target of the new symlink - + optional #GCancellable object, @@ -28601,7 +31695,7 @@ reports the number of directories and non-directory files encountered By default, errors are only reported against the toplevel file itself. Errors found while recursing are silently ignored, unless -%G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags. +%G_FILE_MEASURE_REPORT_ANY_ERROR is given in @flags. The returned size, @disk_usage, is in bytes and should be formatted with g_format_size() in order to get something reasonable for showing @@ -28611,6 +31705,7 @@ in a user interface. periodic progress updates while scanning. See the documentation for #GFileMeasureProgressCallback for information about when and how the callback will be invoked. + %TRUE if successful, with the out parameters set. %FALSE otherwise, with @error set. @@ -28656,6 +31751,7 @@ callback will be invoked. This is the asynchronous version of g_file_measure_disk_usage(). See there for more information. + @@ -28698,6 +31794,7 @@ there for more information. Collects the results from an earlier call to g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for more information. + %TRUE if successful, with the out parameters set. %FALSE otherwise, with @error set. @@ -28733,6 +31830,7 @@ depending on the type of the file. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GFileMonitor for the given @file, or %NULL on error. @@ -28768,6 +31866,7 @@ It does not make sense for @flags to contain directories. It is not possible to monitor all the files in a directory for changes made via hard links; if you want to do this then you must register individual watches with g_file_monitor(). + a #GFileMonitor for the given @file, or %NULL on error. @@ -28805,6 +31904,7 @@ changes made through the filename contained in @file to be reported. Using this flag may result in an increase in resource usage, and may not have any effect depending on the #GFileMonitor backend and/or filesystem type. + a #GFileMonitor for the given @file, or %NULL on error. @@ -28838,6 +31938,7 @@ g_file_mount_enclosing_volume_finish(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + @@ -28873,6 +31974,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes a mount operation started by g_file_mount_enclosing_volume(). + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -28902,6 +32004,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation. + @@ -28940,6 +32043,7 @@ the result of the operation. Finish an asynchronous mount operation that was started with g_file_mount_mountable(). + a #GFile or %NULL on error. Free the returned object with g_object_unref(). @@ -28966,10 +32070,6 @@ inside the same filesystem), but the fallback code does not. If the flag #G_FILE_COPY_OVERWRITE is specified an already existing @destination file is overwritten. -If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks -will be copied as symlinks, otherwise the target of the -@source symlink will be copied. - If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. @@ -28994,6 +32094,7 @@ If the source is a directory and the target does not exist, or #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native move operation isn't available). + %TRUE on successful move, %FALSE otherwise. @@ -29045,6 +32146,7 @@ what kind of filesystem the file is on. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. + #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -29070,6 +32172,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_open_readwrite_finish() to get the result of the operation. + @@ -29101,6 +32204,7 @@ the result of the operation. Finishes an asynchronous file read operation started with g_file_open_readwrite_async(). + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -29117,6 +32221,27 @@ g_file_open_readwrite_async(). + + Exactly like g_file_get_path(), but caches the result via +g_object_set_qdata_full(). This is useful for example in C +applications which mix `g_file_*` APIs with native ones. It +also avoids an extra duplicated string when possible, so will be +generally more efficient. + +This call does no blocking I/O. + + + string containing the #GFile's path, + or %NULL if no such path exists. The returned string is owned by @file. + + + + + input #GFile + + + + Polls a file of type #G_FILE_TYPE_MOUNTABLE. @@ -29127,6 +32252,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation. + @@ -29155,6 +32281,7 @@ the result of the operation. Finish an asynchronous poll operation that was polled with g_file_poll_mountable(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -29178,6 +32305,7 @@ application to handle the file specified by @file. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GAppInfo if the handle was found, %NULL if there were errors. @@ -29195,11 +32323,60 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + + Async version of g_file_query_default_handler(). + + + + + + + a #GFile to open + + + + the [I/O priority][io-priority] of the request + + + + optional #GCancellable object, %NULL to ignore + + + + a #GAsyncReadyCallback to call when the request is done + + + + data to pass to @callback + + + + + + Finishes a g_file_query_default_handler_async() operation. + + + a #GAppInfo if the handle was found, + %NULL if there were errors. + When you are done with it, release it with g_object_unref() + + + + + a #GFile to open + + + + a #GAsyncResult + + + + Utility function to check if a particular file exists. This is implemented using g_file_query_info() and as such does blocking I/O. -Note that in many cases it is racy to first check for file existence +Note that in many cases it is [racy to first check for file existence](https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use) and then execute something based on the outcome of that, because the file might have been created or removed in between the operations. The general approach to handling that is to not check, but just do the @@ -29218,6 +32395,7 @@ for instance to make a menu item sensitive/insensitive, so that you don't have to fool users that something is possible and then just show an error dialog. If you do this, you should make sure to also handle the errors that can happen due to races when you execute the operation. + %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled). @@ -29241,6 +32419,7 @@ implemented using g_file_query_info() and as such does blocking I/O. The primary use case of this method is to check if a file is a regular file, directory, or symlink. + The #GFileType of the file and #G_FILE_TYPE_UNKNOWN if the file does not exist @@ -29288,6 +32467,7 @@ returned. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileInfo or %NULL if there was an error. Free the returned object with g_object_unref(). @@ -29321,6 +32501,7 @@ synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_query_info_finish() to get the result of the operation. + @@ -29356,6 +32537,7 @@ operation. Finishes an asynchronous filesystem info query. See g_file_query_filesystem_info_async(). + #GFileInfo for given @file or %NULL on error. @@ -29404,6 +32586,7 @@ about the symlink itself will be returned. If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileInfo for the given @file, or %NULL on error. Free the returned object with g_object_unref(). @@ -29439,6 +32622,7 @@ version of this call. When the operation is finished, @callback will be called. You can then call g_file_query_info_finish() to get the result of the operation. + @@ -29478,6 +32662,7 @@ then call g_file_query_info_finish() to get the result of the operation. Finishes an asynchronous file info query. See g_file_query_info_async(). + #GFileInfo for given @file or %NULL on error. Free the returned object with @@ -29506,6 +32691,7 @@ specific file may not support a specific attribute. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GFileAttributeInfoList describing the settable attributes. When you are done with it, release it with @@ -29532,6 +32718,7 @@ attributes (in the "xattr" namespace). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GFileAttributeInfoList describing the writable namespaces. When you are done with it, release it with @@ -29562,6 +32749,7 @@ If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + #GFileInputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -29587,6 +32775,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_read_finish() to get the result of the operation. + @@ -29618,6 +32807,7 @@ of the operation. Finishes an asynchronous file read operation started with g_file_read_async(). + a #GFileInputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -29676,6 +32866,7 @@ file systems don't allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are possible too, and depend on what kind of filesystem the file is on. + a #GFileOutputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -29716,6 +32907,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_replace_finish() to get the result of the operation. + @@ -29774,6 +32966,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. The returned @new_etag can be used to verify that the file hasn't changed the next time it is saved over. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. @@ -29786,7 +32979,7 @@ changed the next time it is saved over. a string containing the new contents for @file - + @@ -29835,10 +33028,11 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If @make_backup is %TRUE, this function will attempt to make a backup of @file. -Note that no copy of @content will be made, so it must stay valid +Note that no copy of @contents will be made, so it must stay valid until @callback is called. See g_file_replace_contents_bytes_async() for a #GBytes version that will automatically hold a reference to the contents (without copying) for the duration of the call. + @@ -29849,7 +33043,7 @@ contents (without copying) for the duration of the call. string of contents to replace the file with - + @@ -29892,6 +33086,7 @@ content without waiting for the callback. When this operation has completed, @callback will be called with @user_user data, and the operation can be finalized with g_file_replace_contents_finish(). + @@ -29934,6 +33129,7 @@ g_file_replace_contents_finish(). Finishes an asynchronous replace of the given @file. See g_file_replace_contents_async(). Sets @new_etag to the new entity tag for the document, if present. + %TRUE on success, %FALSE on failure. @@ -29958,6 +33154,7 @@ tag for the document, if present. Finishes an asynchronous file replace operation started with g_file_replace_async(). + a #GFileOutputStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -29985,6 +33182,7 @@ same thing but returns an output stream only. Note that in many non-local file cases read and write streams are not supported, so make sure you really need to do read and write streaming, rather than just opening for reading or writing. + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -30026,6 +33224,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_replace_readwrite_finish() to get the result of the operation. + @@ -30070,6 +33269,7 @@ the result of the operation. Finishes an asynchronous file replace operation started with g_file_replace_readwrite_async(). + a #GFileIOStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -30090,6 +33290,7 @@ g_file_replace_readwrite_async(). Resolves a relative path for @file to an absolute path. This call does no blocking I/O. + #GFile to the resolved path. %NULL if @relative_path is %NULL or if @file is invalid. @@ -30103,19 +33304,20 @@ This call does no blocking I/O. a given relative path string - + - Sets an attribute in the file with attribute name @attribute to @value. + Sets an attribute in the file with attribute name @attribute to @value_p. -Some attributes can be unset by setting @attribute to +Some attributes can be unset by setting @type to %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the attribute was set, %FALSE otherwise. @@ -30157,6 +33359,7 @@ returning %FALSE. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. @@ -30193,6 +33396,7 @@ If @attribute is of a different type, this operation will fail. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. @@ -30229,6 +33433,7 @@ If @attribute is of a different type, this operation will fail. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the @attribute was successfully set, %FALSE otherwise. @@ -30264,6 +33469,7 @@ If @attribute is of a different type, this operation will fail. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the @attribute was successfully set, %FALSE otherwise. @@ -30299,6 +33505,7 @@ If @attribute is of a different type, this operation will fail. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. @@ -30335,6 +33542,7 @@ If @attribute is of a different type, this operation will fail. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if the @attribute was successfully set to @value in the @file, %FALSE otherwise. @@ -30373,6 +33581,7 @@ which is the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_set_attributes_finish() to get the result of the operation. + @@ -30410,6 +33619,7 @@ the result of the operation. Finishes setting an attribute started in g_file_set_attributes_async(). + %TRUE if the attributes were set correctly, %FALSE otherwise. @@ -30442,6 +33652,7 @@ also detect further errors. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %FALSE if there was any error, %TRUE otherwise. @@ -30482,6 +33693,7 @@ On success the resulting converted filename is returned. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GFile specifying what @file was renamed to, or %NULL if there was an error. @@ -30513,6 +33725,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_file_set_display_name_finish() to get the result of the operation. + @@ -30548,6 +33761,7 @@ the result of the operation. Finishes setting a display name started with g_file_set_display_name_async(). + a #GFile or %NULL on error. Free the returned object with g_object_unref(). @@ -30576,6 +33790,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_mount_mountable_finish() to get the result of the operation. + @@ -30611,6 +33826,7 @@ the result of the operation. Finish an asynchronous start operation that was started with g_file_start_mountable(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -30637,6 +33853,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_stop_mountable_finish() to get the result of the operation. + @@ -30671,10 +33888,11 @@ the result of the operation. - Finishes an stop operation, see g_file_stop_mountable() for details. + Finishes a stop operation, see g_file_stop_mountable() for details. Finish an asynchronous stop operation that was started with g_file_stop_mountable(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -30696,6 +33914,7 @@ with g_file_stop_mountable(). [thread-default contexts][g-main-context-push-thread-default-context]. If this returns %FALSE, you cannot perform asynchronous operations on @file in a thread that has a thread-default context. + Whether or not @file supports thread-default contexts. @@ -30716,6 +33935,7 @@ Not all file systems support trashing, so this call can return the If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on successful trash, %FALSE otherwise. @@ -30734,6 +33954,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Asynchronously sends @file to the Trash location, if possible. + @@ -30765,6 +33986,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Finishes an asynchronous file trashing operation, started with g_file_trash_async(). + %TRUE on successful trash, %FALSE otherwise. @@ -30791,6 +34013,7 @@ When the operation is finished, @callback will be called. You can then call g_file_unmount_mountable_finish() to get the result of the operation. Use g_file_unmount_mountable_with_operation() instead. + @@ -30826,6 +34049,7 @@ Finish an asynchronous unmount operation that was started with g_file_unmount_mountable(). Use g_file_unmount_mountable_with_operation_finish() instead. + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -30852,6 +34076,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished, @callback will be called. You can then call g_file_unmount_mountable_finish() to get the result of the operation. + @@ -30891,6 +34116,7 @@ see g_file_unmount_mountable_with_operation() for details. Finish an asynchronous unmount operation that was started with g_file_unmount_mountable_with_operation(). + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -30910,6 +34136,7 @@ with g_file_unmount_mountable_with_operation(). Information about a specific attribute. + the name of the attribute. @@ -30938,6 +34165,7 @@ with g_file_unmount_mountable_with_operation(). Acts as a lightweight registry for possible valid file attributes. The registry stores Key-Value pair formats as #GFileAttributeInfos. + an array of #GFileAttributeInfos. @@ -30948,6 +34176,7 @@ The registry stores Key-Value pair formats as #GFileAttributeInfos. Creates a new file attribute info list. + a #GFileAttributeInfoList. @@ -30956,6 +34185,7 @@ The registry stores Key-Value pair formats as #GFileAttributeInfos. Adds a new attribute with @name to the @list, setting its @type and @flags. + @@ -30980,6 +34210,7 @@ its @type and @flags. Makes a duplicate of a file attribute info list. + a copy of the given @list. @@ -30993,6 +34224,7 @@ its @type and @flags. Gets the file attribute with the name @name from @list. + a #GFileAttributeInfo for the @name, or %NULL if an attribute isn't found. @@ -31004,13 +34236,14 @@ attribute isn't found. - the name of the attribute to lookup. + the name of the attribute to look up. References a file attribute info list. + #GFileAttributeInfoList or %NULL on error. @@ -31025,6 +34258,7 @@ attribute isn't found. Removes a reference from the given @list. If the reference count falls to zero, the @list is deleted. + @@ -31038,6 +34272,7 @@ falls to zero, the @list is deleted. Determines if a string matches a file attribute. + Creates a new file attribute matcher, which matches attributes against a given string. #GFileAttributeMatchers are reference @@ -31045,7 +34280,7 @@ counted structures, and are created with a reference count of 1. If the number of references falls to 0, the #GFileAttributeMatcher is automatically destroyed. -The @attribute string should be formatted with specific keys separated +The @attributes string should be formatted with specific keys separated from namespaces with a double colon. Several "namespace::key" strings may be concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). The wildcard "*" may be used to match all keys and namespaces, or @@ -31058,6 +34293,7 @@ The wildcard "*" may be used to match all keys and namespaces, or standard namespace. - `"standard::type,unix::*"`: matches the type key in the standard namespace and all keys in the unix namespace. + a #GFileAttributeMatcher @@ -31076,6 +34312,7 @@ matcher was created with "standard::*" and @ns is "standard", or if matcher was using "*" and namespace is anything.) TODO: this is awkwardly worded. + %TRUE if the matcher matches all of the entries in the given @ns, %FALSE otherwise. @@ -31094,6 +34331,7 @@ in the given @ns, %FALSE otherwise. Gets the next matched attribute from a #GFileAttributeMatcher. + a string containing the next attribute or %NULL if no more attribute exist. @@ -31110,6 +34348,7 @@ no more attribute exist. Checks if an attribute will be matched by an attribute matcher. If the matcher was created with the "*" matching string, this function will always return %TRUE. + %TRUE if @attribute matches @matcher. %FALSE otherwise. @@ -31128,6 +34367,7 @@ will always return %TRUE. Checks if a attribute matcher only matches a given attribute. Always returns %FALSE if "*" was used when creating the matcher. + %TRUE if the matcher only matches @attribute. %FALSE otherwise. @@ -31145,6 +34385,7 @@ returns %FALSE if "*" was used when creating the matcher. References a file attribute matcher. + a #GFileAttributeMatcher. @@ -31165,6 +34406,7 @@ attribute when the @matcher matches the whole namespace - or remove a namespace or attribute when the matcher matches everything. This is a limitation of the current implementation, but may be fixed in the future. + A file attribute matcher matching all attributes of @matcher that are not matched by @subtract @@ -31186,6 +34428,7 @@ in the future. equal to the format passed to g_file_attribute_matcher_new(). The output however, might not be identical, as the matcher may decide to use a different order or omit needless parts. + a string describing the attributes the matcher matches against or %NULL if @matcher was %NULL. @@ -31201,6 +34444,7 @@ decide to use a different order or omit needless parts. Unreferences @matcher. If the reference count falls below 1, the @matcher is automatically freed. + @@ -31301,15 +34545,17 @@ the @matcher is automatically freed. be exactly like that. Since 2.20 - + #GFileDescriptorBased is implemented by streams (implementations of #GInputStream or #GOutputStream) that are based on file descriptors. Note that `<gio/gfiledescriptorbased.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + Gets the underlying file descriptor. + The file descriptor @@ -31323,6 +34569,7 @@ file when using it. Gets the underlying file descriptor. + The file descriptor @@ -31337,12 +34584,14 @@ file when using it. An interface for file descriptor based io objects. + The parent interface. + The file descriptor @@ -31383,6 +34632,7 @@ To close a #GFileEnumerator, use g_file_enumerator_close(), or its asynchronous version, g_file_enumerator_close_async(). Once a #GFileEnumerator is closed, no further actions may be performed on it, and it should be freed with g_object_unref(). + Asynchronously closes the file enumerator. @@ -31390,6 +34640,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in g_file_enumerator_close_finish(). + @@ -31427,6 +34678,7 @@ return %FALSE. If @cancellable was not %NULL, then the operation may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be returned. + %TRUE if the close operation has finished successfully. @@ -31443,6 +34695,7 @@ returned. + @@ -31467,6 +34720,7 @@ order of returned files. On error, returns %NULL and sets @error to the error. If the enumerator is at the end, %NULL will be returned and @error will be unset. + A #GFileInfo or %NULL on error or end of enumerator. Free the returned object with @@ -31504,6 +34758,7 @@ result in %G_IO_ERROR_PENDING errors. Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. + @@ -31536,6 +34791,7 @@ priority is %G_PRIORITY_DEFAULT. Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). + a #GList of #GFileInfos. You must free the list with g_list_free() and unref the infos with g_object_unref() when you're @@ -31562,6 +34818,7 @@ enumerator return %G_IO_ERROR_CLOSED on all calls. This will be automatically called when the last reference is dropped, but you might want to call this function to make sure resources are released as early as possible. + #TRUE on success or #FALSE on error. @@ -31584,6 +34841,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in g_file_enumerator_close_finish(). + @@ -31621,6 +34879,7 @@ return %FALSE. If @cancellable was not %NULL, then the operation may have been cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be returned. + %TRUE if the close operation has finished successfully. @@ -31647,6 +34906,7 @@ This is a convenience method that's equivalent to: GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr), name); ]| + a #GFile for the #GFileInfo passed it. @@ -31665,6 +34925,7 @@ This is a convenience method that's equivalent to: Get the #GFile container which is being enumerated. + the #GFile which is being enumerated. @@ -31678,6 +34939,7 @@ This is a convenience method that's equivalent to: Checks if the file enumerator has pending operations. + %TRUE if the @enumerator has pending operations. @@ -31691,6 +34953,7 @@ This is a convenience method that's equivalent to: Checks if the file enumerator has been closed. + %TRUE if the @enumerator is closed. @@ -31741,6 +35004,7 @@ while (TRUE) out: g_object_unref (direnum); // Note: frees the last @info ]| + @@ -31775,6 +35039,7 @@ order of returned files. On error, returns %NULL and sets @error to the error. If the enumerator is at the end, %NULL will be returned and @error will be unset. + A #GFileInfo or %NULL on error or end of enumerator. Free the returned object with @@ -31812,6 +35077,7 @@ result in %G_IO_ERROR_PENDING errors. Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. + @@ -31844,6 +35110,7 @@ priority is %G_PRIORITY_DEFAULT. Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). + a #GList of #GFileInfos. You must free the list with g_list_free() and unref the infos with g_object_unref() when you're @@ -31865,6 +35132,7 @@ priority is %G_PRIORITY_DEFAULT. Sets the file enumerator as having pending operations. + @@ -31890,11 +35158,13 @@ priority is %G_PRIORITY_DEFAULT. + + A #GFileInfo or %NULL on error or end of enumerator. Free the returned object with @@ -31915,6 +35185,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -31930,6 +35201,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -31963,6 +35235,7 @@ priority is %G_PRIORITY_DEFAULT. + a #GList of #GFileInfos. You must free the list with g_list_free() and unref the infos with g_object_unref() when you're @@ -31985,6 +35258,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32014,6 +35288,7 @@ priority is %G_PRIORITY_DEFAULT. + %TRUE if the close operation has finished successfully. @@ -32032,6 +35307,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32039,6 +35315,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32046,6 +35323,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32053,6 +35331,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32060,6 +35339,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32067,6 +35347,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32074,6 +35355,7 @@ priority is %G_PRIORITY_DEFAULT. + @@ -32081,8 +35363,9 @@ priority is %G_PRIORITY_DEFAULT. + - + GFileIOStream provides io streams that both read and write to the same file handle. @@ -32103,8 +35386,10 @@ stream, use g_seekable_truncate(). The default implementation of all the #GFileIOStream operations and the implementation of #GSeekable just call into the same operations on the output stream. + + @@ -32115,6 +35400,7 @@ on the output stream. + @@ -32128,6 +35414,7 @@ on the output stream. Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing. + the entity tag for the stream. @@ -32157,6 +35444,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will be returned. + a #GFileInfo for the @stream, or %NULL on error. @@ -32183,6 +35471,7 @@ finish the operation with g_file_io_stream_query_info_finish(). For the synchronous version of this function, see g_file_io_stream_query_info(). + @@ -32216,6 +35505,7 @@ g_file_io_stream_query_info(). Finalizes the asynchronous query started by g_file_io_stream_query_info_async(). + A #GFileInfo for the finished query. @@ -32232,6 +35522,7 @@ by g_file_io_stream_query_info_async(). + @@ -32251,6 +35542,7 @@ by g_file_io_stream_query_info_async(). + @@ -32261,6 +35553,7 @@ by g_file_io_stream_query_info_async(). + @@ -32280,6 +35573,7 @@ by g_file_io_stream_query_info_async(). Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing. + the entity tag for the stream. @@ -32309,6 +35603,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will be returned. + a #GFileInfo for the @stream, or %NULL on error. @@ -32335,6 +35630,7 @@ finish the operation with g_file_io_stream_query_info_finish(). For the synchronous version of this function, see g_file_io_stream_query_info(). + @@ -32368,6 +35664,7 @@ g_file_io_stream_query_info(). Finalizes the asynchronous query started by g_file_io_stream_query_info_async(). + A #GFileInfo for the finished query. @@ -32391,11 +35688,13 @@ by g_file_io_stream_query_info_async(). + + @@ -32408,6 +35707,7 @@ by g_file_io_stream_query_info_async(). + @@ -32420,6 +35720,7 @@ by g_file_io_stream_query_info_async(). + @@ -32441,6 +35742,7 @@ by g_file_io_stream_query_info_async(). + @@ -32453,6 +35755,7 @@ by g_file_io_stream_query_info_async(). + @@ -32471,6 +35774,7 @@ by g_file_io_stream_query_info_async(). + a #GFileInfo for the @stream, or %NULL on error. @@ -32493,6 +35797,7 @@ by g_file_io_stream_query_info_async(). + @@ -32526,6 +35831,7 @@ by g_file_io_stream_query_info_async(). + A #GFileInfo for the finished query. @@ -32544,6 +35850,7 @@ by g_file_io_stream_query_info_async(). + the entity tag for the stream. @@ -32558,6 +35865,7 @@ by g_file_io_stream_query_info_async(). + @@ -32565,6 +35873,7 @@ by g_file_io_stream_query_info_async(). + @@ -32572,6 +35881,7 @@ by g_file_io_stream_query_info_async(). + @@ -32579,6 +35889,7 @@ by g_file_io_stream_query_info_async(). + @@ -32586,6 +35897,7 @@ by g_file_io_stream_query_info_async(). + @@ -32593,14 +35905,17 @@ by g_file_io_stream_query_info_async(). + #GFileIcon specifies an icon by pointing to an image file to be used as icon. + Creates a new icon for a file. + a #GIcon for the given @file, or %NULL on error. @@ -32615,6 +35930,7 @@ to be used as icon. Gets the #GFile associated with the given @icon. + a #GFile, or %NULL. @@ -32632,15 +35948,18 @@ to be used as icon. + An interface for writing VFS file handles. + The parent interface. + a new #GFile that is a duplicate of the given #GFile. @@ -32656,6 +35975,7 @@ to be used as icon. + 0 if @file is not a valid #GFile, otherwise an integer that can be used as hash value for the #GFile. @@ -32673,6 +35993,7 @@ to be used as icon. + %TRUE if @file1 and @file2 are equal. @@ -32691,6 +36012,7 @@ to be used as icon. + %TRUE if @file is native @@ -32705,6 +36027,7 @@ to be used as icon. + %TRUE if #GFile's backend supports the given URI scheme, %FALSE if URI scheme is %NULL, @@ -32725,6 +36048,7 @@ to be used as icon. + a string containing the URI scheme for the given #GFile. The returned string should be freed with g_free() @@ -32741,6 +36065,7 @@ to be used as icon. + @@ -32753,6 +36078,7 @@ to be used as icon. + @@ -32765,6 +36091,7 @@ to be used as icon. + a string containing the #GFile's URI. The returned string should be freed with g_free() @@ -32781,6 +36108,7 @@ to be used as icon. + a string containing the #GFile's parse name. The returned string should be freed with g_free() @@ -32797,6 +36125,7 @@ to be used as icon. + a #GFile structure to the parent of the given #GFile or %NULL if there is no parent. Free @@ -32813,8 +36142,9 @@ to be used as icon. + - %TRUE if the @files's parent, grandparent, etc is @prefix, + %TRUE if the @file's parent, grandparent, etc is @prefix, %FALSE otherwise. @@ -32832,6 +36162,7 @@ to be used as icon. + @@ -32847,6 +36178,7 @@ to be used as icon. + #GFile to the resolved path. %NULL if @relative_path is %NULL or if @file is invalid. @@ -32860,13 +36192,14 @@ to be used as icon. a given relative path string - + + a #GFile to the specified child, or %NULL if the display name couldn't be converted. @@ -32887,6 +36220,7 @@ to be used as icon. + A #GFileEnumerator if successful, %NULL on error. Free the returned object with g_object_unref(). @@ -32915,6 +36249,7 @@ to be used as icon. + @@ -32954,6 +36289,7 @@ to be used as icon. + a #GFileEnumerator or %NULL if an error occurred. @@ -32974,6 +36310,7 @@ to be used as icon. + a #GFileInfo for the given @file, or %NULL on error. Free the returned object with g_object_unref(). @@ -33002,6 +36339,7 @@ to be used as icon. + @@ -33041,6 +36379,7 @@ to be used as icon. + #GFileInfo for given @file or %NULL on error. Free the returned object with @@ -33061,6 +36400,7 @@ to be used as icon. + a #GFileInfo or %NULL if there was an error. Free the returned object with g_object_unref(). @@ -33085,6 +36425,7 @@ to be used as icon. + @@ -33120,6 +36461,7 @@ to be used as icon. + #GFileInfo for given @file or %NULL on error. @@ -33140,6 +36482,7 @@ to be used as icon. + a #GMount where the @file is located or %NULL on error. @@ -33161,6 +36504,7 @@ to be used as icon. + @@ -33192,6 +36536,7 @@ to be used as icon. + #GMount for given @file or %NULL on error. Free the returned object with g_object_unref(). @@ -33211,6 +36556,7 @@ to be used as icon. + a #GFile specifying what @file was renamed to, or %NULL if there was an error. @@ -33236,6 +36582,7 @@ to be used as icon. + @@ -33271,6 +36618,7 @@ to be used as icon. + a #GFile or %NULL on error. Free the returned object with g_object_unref(). @@ -33290,6 +36638,7 @@ to be used as icon. + a #GFileAttributeInfoList describing the settable attributes. When you are done with it, release it with @@ -33311,6 +36660,7 @@ to be used as icon. + @@ -33318,6 +36668,7 @@ to be used as icon. + @@ -33325,6 +36676,7 @@ to be used as icon. + a #GFileAttributeInfoList describing the writable namespaces. When you are done with it, release it with @@ -33346,6 +36698,7 @@ to be used as icon. + @@ -33353,6 +36706,7 @@ to be used as icon. + @@ -33360,6 +36714,7 @@ to be used as icon. + %TRUE if the attribute was set, %FALSE otherwise. @@ -33396,6 +36751,7 @@ to be used as icon. + %FALSE if there was any error, %TRUE otherwise. @@ -33423,6 +36779,7 @@ to be used as icon. + @@ -33461,6 +36818,7 @@ to be used as icon. + %TRUE if the attributes were set correctly, %FALSE otherwise. @@ -33483,6 +36841,7 @@ to be used as icon. + #GFileInputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -33502,6 +36861,7 @@ to be used as icon. + @@ -33533,6 +36893,7 @@ to be used as icon. + a #GFileInputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -33552,6 +36913,7 @@ to be used as icon. + a #GFileOutputStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -33576,6 +36938,7 @@ to be used as icon. + @@ -33611,6 +36974,7 @@ to be used as icon. + a valid #GFileOutputStream or %NULL on error. @@ -33631,6 +36995,7 @@ to be used as icon. + a #GFileOutputStream for the newly created file, or %NULL on error. @@ -33656,6 +37021,7 @@ to be used as icon. + @@ -33691,6 +37057,7 @@ to be used as icon. + a #GFileOutputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -33710,6 +37077,7 @@ to be used as icon. + a #GFileOutputStream or %NULL on error. Free the returned object with g_object_unref(). @@ -33743,6 +37111,7 @@ to be used as icon. + @@ -33787,6 +37156,7 @@ to be used as icon. + a #GFileOutputStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -33806,6 +37176,7 @@ to be used as icon. + %TRUE if the file was deleted. %FALSE otherwise. @@ -33825,6 +37196,7 @@ to be used as icon. + @@ -33856,6 +37228,7 @@ to be used as icon. + %TRUE if the file was deleted. %FALSE otherwise. @@ -33874,6 +37247,7 @@ to be used as icon. + %TRUE on successful trash, %FALSE otherwise. @@ -33893,6 +37267,7 @@ to be used as icon. + @@ -33924,6 +37299,7 @@ to be used as icon. + %TRUE on successful trash, %FALSE otherwise. @@ -33942,6 +37318,7 @@ to be used as icon. + %TRUE on successful creation, %FALSE otherwise. @@ -33961,6 +37338,7 @@ to be used as icon. + @@ -33992,6 +37370,7 @@ to be used as icon. + %TRUE on successful directory creation, %FALSE otherwise. @@ -34010,6 +37389,7 @@ to be used as icon. + %TRUE on the creation of a new symlink, %FALSE otherwise. @@ -34022,7 +37402,7 @@ to be used as icon. a string with the path for the target of the new symlink - + optional #GCancellable object, @@ -34034,6 +37414,7 @@ to be used as icon. + @@ -34041,6 +37422,7 @@ to be used as icon. + @@ -34048,6 +37430,7 @@ to be used as icon. + %TRUE on success, %FALSE otherwise. @@ -34084,6 +37467,7 @@ to be used as icon. + @@ -34131,6 +37515,7 @@ to be used as icon. + a %TRUE on success, %FALSE on error. @@ -34149,6 +37534,7 @@ to be used as icon. + %TRUE on successful move, %FALSE otherwise. @@ -34186,6 +37572,7 @@ to be used as icon. + @@ -34193,6 +37580,7 @@ to be used as icon. + @@ -34200,6 +37588,7 @@ to be used as icon. + @@ -34236,6 +37625,7 @@ to be used as icon. + a #GFile or %NULL on error. Free the returned object with g_object_unref(). @@ -34255,6 +37645,7 @@ to be used as icon. + @@ -34286,6 +37677,7 @@ to be used as icon. + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -34305,6 +37697,7 @@ to be used as icon. + @@ -34336,6 +37729,7 @@ to be used as icon. + %TRUE if the @file was ejected successfully. %FALSE otherwise. @@ -34355,6 +37749,7 @@ to be used as icon. + @@ -34391,6 +37786,7 @@ to be used as icon. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -34411,6 +37807,7 @@ to be used as icon. + a #GFileMonitor for the given @file, or %NULL on error. @@ -34436,6 +37833,7 @@ to be used as icon. + a #GFileMonitor for the given @file, or %NULL on error. @@ -34461,6 +37859,7 @@ to be used as icon. + #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -34480,6 +37879,7 @@ to be used as icon. + @@ -34511,6 +37911,7 @@ to be used as icon. + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -34530,6 +37931,7 @@ to be used as icon. + a #GFileIOStream for the newly created file, or %NULL on error. @@ -34555,6 +37957,7 @@ to be used as icon. + @@ -34590,6 +37993,7 @@ to be used as icon. + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -34609,6 +38013,7 @@ to be used as icon. + a #GFileIOStream or %NULL on error. Free the returned object with g_object_unref(). @@ -34642,6 +38047,7 @@ to be used as icon. + @@ -34686,6 +38092,7 @@ to be used as icon. + a #GFileIOStream, or %NULL on error. Free the returned object with g_object_unref(). @@ -34705,6 +38112,7 @@ to be used as icon. + @@ -34738,6 +38146,7 @@ to be used as icon. + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -34757,6 +38166,7 @@ otherwise. + @@ -34793,6 +38203,7 @@ otherwise. + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -34816,6 +38227,7 @@ otherwise. + @@ -34852,6 +38264,7 @@ otherwise. + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -34871,6 +38284,7 @@ otherwise. + @@ -34907,6 +38321,7 @@ otherwise. + %TRUE if the @file was ejected successfully. %FALSE otherwise. @@ -34926,6 +38341,7 @@ otherwise. + @@ -34952,6 +38368,7 @@ otherwise. + %TRUE if the operation finished successfully. %FALSE otherwise. @@ -34971,6 +38388,7 @@ otherwise. + %TRUE if successful, with the out parameters set. %FALSE otherwise, with @error set. @@ -35014,6 +38432,7 @@ otherwise. + @@ -35055,6 +38474,7 @@ otherwise. + %TRUE if successful, with the out parameters set. %FALSE otherwise, with @error set. @@ -35110,8 +38530,10 @@ of a particular file at runtime. #GFileAttributeMatcher allows for searching through a #GFileInfo for attributes. + Creates a new file info structure. + a #GFileInfo. @@ -35119,6 +38541,7 @@ attributes. Clears the status information from @info. + @@ -35132,6 +38555,7 @@ attributes. First clears all of the [GFileAttribute][gio-GFileAttribute] of @dest_info, and then copies all of the file attributes from @src_info to @dest_info. + @@ -35148,6 +38572,7 @@ and then copies all of the file attributes from @src_info to @dest_info. Duplicates a file info structure. + a duplicate #GFileInfo of @other. @@ -35162,9 +38587,11 @@ and then copies all of the file attributes from @src_info to @dest_info. Gets the value of a attribute, formated as a string. This escapes things as needed to make the string valid -utf8. - - a UTF-8 string associated with the given @attribute. +UTF-8. + + + a UTF-8 string associated with the given @attribute, or + %NULL if the attribute wasn’t set. When you're done with the string it must be freed with g_free(). @@ -35182,6 +38609,7 @@ utf8. Gets the value of a boolean attribute. If the attribute does not contain a boolean value, %FALSE will be returned. + the boolean value contained within the attribute. @@ -35200,6 +38628,7 @@ contain a boolean value, %FALSE will be returned. Gets the value of a byte string attribute. If the attribute does not contain a byte string, %NULL will be returned. + the contents of the @attribute value as a byte string, or %NULL otherwise. @@ -35218,6 +38647,7 @@ not contain a byte string, %NULL will be returned. Gets the attribute type, value and status for an attribute key. + %TRUE if @info has an attribute named @attribute, %FALSE otherwise. @@ -35251,6 +38681,7 @@ not contain a byte string, %NULL will be returned. Gets a signed 32-bit integer contained within the attribute. If the attribute does not contain a signed 32-bit integer, or is invalid, 0 will be returned. + a signed 32-bit integer from the attribute. @@ -35268,8 +38699,9 @@ attribute does not contain a signed 32-bit integer, or is invalid, Gets a signed 64-bit integer contained within the attribute. If the -attribute does not contain an signed 64-bit integer, or is invalid, +attribute does not contain a signed 64-bit integer, or is invalid, 0 will be returned. + a signed 64-bit integer from the attribute. @@ -35288,6 +38720,7 @@ attribute does not contain an signed 64-bit integer, or is invalid, Gets the value of a #GObject attribute. If the attribute does not contain a #GObject, %NULL will be returned. + a #GObject associated with the given @attribute, or %NULL otherwise. @@ -35306,6 +38739,7 @@ not contain a #GObject, %NULL will be returned. Gets the attribute status for an attribute key. + a #GFileAttributeStatus for the given @attribute, or %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid. @@ -35325,6 +38759,7 @@ not contain a #GObject, %NULL will be returned. Gets the value of a string attribute. If the attribute does not contain a string, %NULL will be returned. + the contents of the @attribute value as a UTF-8 string, or %NULL otherwise. @@ -35344,6 +38779,7 @@ not contain a string, %NULL will be returned. Gets the value of a stringv attribute. If the attribute does not contain a stringv, %NULL will be returned. + the contents of the @attribute value as a stringv, or %NULL otherwise. Do not free. These returned strings are UTF-8. @@ -35364,6 +38800,7 @@ not contain a stringv, %NULL will be returned. Gets the attribute type for an attribute key. + a #GFileAttributeType for the given @attribute, or %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set. @@ -35384,6 +38821,7 @@ not contain a stringv, %NULL will be returned. Gets an unsigned 32-bit integer contained within the attribute. If the attribute does not contain an unsigned 32-bit integer, or is invalid, 0 will be returned. + an unsigned 32-bit integer from the attribute. @@ -35403,6 +38841,7 @@ attribute does not contain an unsigned 32-bit integer, or is invalid, Gets a unsigned 64-bit integer contained within the attribute. If the attribute does not contain an unsigned 64-bit integer, or is invalid, 0 will be returned. + a unsigned 64-bit integer from the attribute. @@ -35420,6 +38859,7 @@ attribute does not contain an unsigned 64-bit integer, or is invalid, Gets the file's content type. + a string containing the file's content type. @@ -35435,6 +38875,7 @@ attribute does not contain an unsigned 64-bit integer, or is invalid, Returns the #GDateTime representing the deletion date of the file, as available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. + a #GDateTime, or %NULL. @@ -35448,6 +38889,7 @@ G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. Gets a display name for a file. + a string containing the display name. @@ -35461,6 +38903,7 @@ G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. Gets the edit name for a file. + a string containing the edit name. @@ -35475,6 +38918,7 @@ G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. Gets the [entity tag][gfile-etag] for a given #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE. + a string containing the value of the "etag:value" attribute. @@ -35489,6 +38933,7 @@ G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. Gets a file's type (whether it is a regular file, symlink, etc). This is different from the file's content type, see g_file_info_get_content_type(). + a #GFileType for the given file. @@ -35502,6 +38947,7 @@ This is different from the file's content type, see g_file_info_get_content_type Gets the icon for a file. + #GIcon for the given @info. @@ -35515,6 +38961,7 @@ This is different from the file's content type, see g_file_info_get_content_type Checks if a file is a backup file. + %TRUE if file is a backup file, %FALSE otherwise. @@ -35528,6 +38975,7 @@ This is different from the file's content type, see g_file_info_get_content_type Checks if a file is hidden. + %TRUE if the file is a hidden file, %FALSE otherwise. @@ -35541,6 +38989,7 @@ This is different from the file's content type, see g_file_info_get_content_type Checks if a file is a symlink. + %TRUE if the given @info is a symlink. @@ -35552,9 +39001,31 @@ This is different from the file's content type, see g_file_info_get_content_type - + + Gets the modification time of the current @info and returns it as a +#GDateTime. + +This requires the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute. If +%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided, the resulting #GDateTime +will have microsecond precision. + + + modification time, or %NULL if unknown + + + + + a #GFileInfo. + + + + + Gets the modification time of the current @info and sets it in @result. + Use g_file_info_get_modification_date_time() instead, as + #GTimeVal is deprecated due to the year 2038 problem. + @@ -35571,9 +39042,10 @@ in @result. Gets the name for a file. + a string containing the file name. - + @@ -35584,6 +39056,7 @@ in @result. Gets the file's size. + a #goffset containing the file's size. @@ -35598,6 +39071,7 @@ in @result. Gets the value of the sort_order attribute from the #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. + a #gint32 containing the value of the "standard::sort_order" attribute. @@ -35611,6 +39085,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. Gets the symbolic icon for a file. + #GIcon for the given @info. @@ -35624,6 +39099,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. Gets the symlink target for a given #GFileInfo. + a string containing the symlink target. @@ -35637,8 +39113,9 @@ See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. Checks if a file info structure has an attribute named @attribute. + - %TRUE if @Ginfo has an attribute named @attribute, + %TRUE if @info has an attribute named @attribute, %FALSE otherwise. @@ -35656,8 +39133,9 @@ See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. Checks if a file info structure has an attribute in the specified @name_space. + - %TRUE if @Ginfo has an attribute in @name_space, + %TRUE if @info has an attribute in @name_space, %FALSE otherwise. @@ -35674,6 +39152,7 @@ specified @name_space. Lists the file info structure's attributes. + a null-terminated array of strings of all of the possible attribute @@ -35696,6 +39175,7 @@ types for the given @name_space, or %NULL on error. Removes all cases of @attribute from @info if it exists. + @@ -35712,7 +39192,8 @@ types for the given @name_space, or %NULL on error. Sets the @attribute to contain the given value, if possible. To unset the -attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type. +attribute, use %G_FILE_ATTRIBUTE_TYPE_INVALID for @type. + @@ -35738,6 +39219,7 @@ attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type. Sets the @attribute to contain the given @attr_value, if possible. + @@ -35759,6 +39241,7 @@ if possible. Sets the @attribute to contain the given @attr_value, if possible. + @@ -35780,6 +39263,7 @@ if possible. Sets the @attribute to contain the given @attr_value, if possible. + @@ -35801,6 +39285,7 @@ if possible. Sets the @attribute to contain the given @attr_value, if possible. + @@ -35821,6 +39306,7 @@ if possible. Sets @mask on @info to match specific attribute types. + @@ -35838,6 +39324,7 @@ if possible. Sets the @attribute to contain the given @attr_value, if possible. + @@ -35863,6 +39350,7 @@ or similar functions. The attribute must exist in @info for this to work. Otherwise %FALSE is returned and @info is unchanged. + %TRUE if the status was changed, %FALSE if the key was not set. @@ -35885,6 +39373,7 @@ is returned and @info is unchanged. Sets the @attribute to contain the given @attr_value, if possible. + @@ -35908,6 +39397,7 @@ if possible. if possible. Sinze: 2.22 + @@ -35921,8 +39411,9 @@ Sinze: 2.22 - a %NULL terminated array of UTF-8 strings. - + a %NULL + terminated array of UTF-8 strings. + @@ -35931,6 +39422,7 @@ Sinze: 2.22 Sets the @attribute to contain the given @attr_value, if possible. + @@ -35952,6 +39444,7 @@ if possible. Sets the @attribute to contain the given @attr_value, if possible. + @@ -35973,6 +39466,7 @@ if possible. Sets the content type attribute for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. + @@ -35990,6 +39484,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. Sets the display name for the current #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. + @@ -36007,6 +39502,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. Sets the edit name for the current file. See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME. + @@ -36024,6 +39520,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME. Sets the file type in a #GFileInfo to @type. See %G_FILE_ATTRIBUTE_STANDARD_TYPE. + @@ -36041,6 +39538,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_TYPE. Sets the icon for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_ICON. + @@ -36058,6 +39556,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_ICON. Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden. See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. + @@ -36075,6 +39574,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink. See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. + @@ -36089,9 +39589,32 @@ See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. - - Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file -info to the given time value. + + Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED and +%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info to the +given date/time value. + + + + + + + a #GFileInfo. + + + + a #GDateTime. + + + + + + Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED and +%G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info to the +given time value. + Use g_file_info_set_modification_date_time() instead, as + #GTimeVal is deprecated due to the year 2038 problem. + @@ -36109,6 +39632,7 @@ info to the given time value. Sets the name attribute for the current #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_NAME. + @@ -36119,13 +39643,14 @@ See %G_FILE_ATTRIBUTE_STANDARD_NAME. a string containing a name. - + Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info to the given size. + @@ -36143,6 +39668,7 @@ to the given size. Sets the sort order attribute in the file info structure. See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. + @@ -36160,6 +39686,7 @@ to the given size. Sets the symbolic icon for a given #GFileInfo. See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON. + @@ -36177,6 +39704,7 @@ See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON. Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info to the given symlink target. + @@ -36194,6 +39722,7 @@ to the given symlink target. Unsets a mask set by g_file_info_set_attribute_mask(), if one is set. + @@ -36206,6 +39735,7 @@ is set. + GFileInputStream provides input streams that take their @@ -36217,8 +39747,10 @@ filesystem of the file allows it. To find the position of a file input stream, use g_seekable_tell(). To find out if a file input stream supports seeking, use g_seekable_can_seek(). To position a file input stream, use g_seekable_seek(). + + @@ -36234,6 +39766,7 @@ while querying the stream. For the asynchronous (non-blocking) version of this function, see g_file_input_stream_query_info_async(). While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with %G_IO_ERROR_PENDING. + a #GFileInfo, or %NULL on error. @@ -36265,6 +39798,7 @@ see g_file_input_stream_query_info(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36297,6 +39831,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set Finishes an asynchronous info query operation. + #GFileInfo. @@ -36313,6 +39848,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36332,6 +39868,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36347,6 +39884,7 @@ while querying the stream. For the asynchronous (non-blocking) version of this function, see g_file_input_stream_query_info_async(). While the stream is blocked, the stream will set the pending flag internally, and any other operations on the stream will fail with %G_IO_ERROR_PENDING. + a #GFileInfo, or %NULL on error. @@ -36378,6 +39916,7 @@ see g_file_input_stream_query_info(). If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36410,6 +39949,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set Finishes an asynchronous info query operation. + #GFileInfo. @@ -36433,11 +39973,13 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + + @@ -36450,6 +39992,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36462,6 +40005,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36483,6 +40027,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + a #GFileInfo, or %NULL on error. @@ -36505,6 +40050,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36538,6 +40084,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + #GFileInfo. @@ -36556,6 +40103,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36563,6 +40111,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36570,6 +40119,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36577,6 +40127,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36584,6 +40135,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + @@ -36591,6 +40143,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be set + Flags that can be used with g_file_measure_disk_usage(). @@ -36634,13 +40187,14 @@ default main context of the calling thread (ie: the same way that the final async result would be reported). @current_size is in the same units as requested by the operation (see -%G_FILE_DISK_USAGE_APPARENT_SIZE). +%G_FILE_MEASURE_APPARENT_SIZE). The frequency of the updates is implementation defined, but is ideally about once every 200ms. The last progress callback may or may not be equal to the final result. Always check the async result to get the final value. + @@ -36682,8 +40236,10 @@ of the thread that the monitor was created in (though if the global default main context is blocked, this may cause notifications to be blocked even if the thread-default context is still running). + Cancels a file monitor. + always %TRUE @@ -36696,6 +40252,7 @@ context is still running). + @@ -36716,6 +40273,7 @@ context is still running). Cancels a file monitor. + always %TRUE @@ -36735,6 +40293,7 @@ implementations only. Implementations are responsible to call this method from the [thread-default main context][g-main-context-push-thread-default] of the thread that the monitor was created in. + @@ -36759,6 +40318,7 @@ thread that the monitor was created in. Returns whether the monitor is canceled. + %TRUE if monitor is canceled. %FALSE otherwise. @@ -36773,6 +40333,7 @@ thread that the monitor was created in. Sets the rate limit to which the @monitor will report consecutive change events to the same file. + @@ -36849,11 +40410,13 @@ In all the other cases, @other_file will be set to #NULL. + + @@ -36875,6 +40438,7 @@ In all the other cases, @other_file will be set to #NULL. + always %TRUE @@ -36889,6 +40453,7 @@ In all the other cases, @other_file will be set to #NULL. + @@ -36896,6 +40461,7 @@ In all the other cases, @other_file will be set to #NULL. + @@ -36903,6 +40469,7 @@ In all the other cases, @other_file will be set to #NULL. + @@ -36910,6 +40477,7 @@ In all the other cases, @other_file will be set to #NULL. + @@ -36917,6 +40485,7 @@ In all the other cases, @other_file will be set to #NULL. + @@ -36994,6 +40563,7 @@ In all the other cases, @other_file will be set to #NULL. + GFileOutputStream provides output streams that write their @@ -37010,8 +40580,10 @@ g_seekable_can_seek().To position a file output stream, use g_seekable_seek(). To find out if a file output stream supports truncating, use g_seekable_can_truncate(). To truncate a file output stream, use g_seekable_truncate(). + + @@ -37022,6 +40594,7 @@ stream, use g_seekable_truncate(). + @@ -37035,6 +40608,7 @@ stream, use g_seekable_truncate(). Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing. + the entity tag for the stream. @@ -37064,6 +40638,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will be returned. + a #GFileInfo for the @stream, or %NULL on error. @@ -37090,6 +40665,7 @@ finish the operation with g_file_output_stream_query_info_finish(). For the synchronous version of this function, see g_file_output_stream_query_info(). + @@ -37123,6 +40699,7 @@ g_file_output_stream_query_info(). Finalizes the asynchronous query started by g_file_output_stream_query_info_async(). + A #GFileInfo for the finished query. @@ -37139,6 +40716,7 @@ by g_file_output_stream_query_info_async(). + @@ -37158,6 +40736,7 @@ by g_file_output_stream_query_info_async(). + @@ -37168,6 +40747,7 @@ by g_file_output_stream_query_info_async(). + @@ -37187,6 +40767,7 @@ by g_file_output_stream_query_info_async(). Gets the entity tag for the file when it has been written. This must be called after the stream has been written and closed, as the etag can change while writing. + the entity tag for the stream. @@ -37216,6 +40797,7 @@ If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will be returned. + a #GFileInfo for the @stream, or %NULL on error. @@ -37242,6 +40824,7 @@ finish the operation with g_file_output_stream_query_info_finish(). For the synchronous version of this function, see g_file_output_stream_query_info(). + @@ -37275,6 +40858,7 @@ g_file_output_stream_query_info(). Finalizes the asynchronous query started by g_file_output_stream_query_info_async(). + A #GFileInfo for the finished query. @@ -37298,11 +40882,13 @@ by g_file_output_stream_query_info_async(). + + @@ -37315,6 +40901,7 @@ by g_file_output_stream_query_info_async(). + @@ -37327,6 +40914,7 @@ by g_file_output_stream_query_info_async(). + @@ -37348,6 +40936,7 @@ by g_file_output_stream_query_info_async(). + @@ -37360,6 +40949,7 @@ by g_file_output_stream_query_info_async(). + @@ -37378,6 +40968,7 @@ by g_file_output_stream_query_info_async(). + a #GFileInfo for the @stream, or %NULL on error. @@ -37400,6 +40991,7 @@ by g_file_output_stream_query_info_async(). + @@ -37433,6 +41025,7 @@ by g_file_output_stream_query_info_async(). + A #GFileInfo for the finished query. @@ -37451,6 +41044,7 @@ by g_file_output_stream_query_info_async(). + the entity tag for the stream. @@ -37465,6 +41059,7 @@ by g_file_output_stream_query_info_async(). + @@ -37472,6 +41067,7 @@ by g_file_output_stream_query_info_async(). + @@ -37479,6 +41075,7 @@ by g_file_output_stream_query_info_async(). + @@ -37486,6 +41083,7 @@ by g_file_output_stream_query_info_async(). + @@ -37493,6 +41091,7 @@ by g_file_output_stream_query_info_async(). + @@ -37500,11 +41099,13 @@ by g_file_output_stream_query_info_async(). + When doing file operations that may take a while, such as moving a file or copying a file, a progress callback is used to pass how far along that operation is to the application. + @@ -37537,6 +41138,7 @@ far along that operation is to the application. it may become necessary to determine if any more data from the file should be loaded. A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data should be read, or %FALSE otherwise. + %TRUE if more data should be read back. %FALSE otherwise. @@ -37550,14 +41152,23 @@ should be read, or %FALSE otherwise. the size of the data currently read. - + data passed to the callback. - Indicates the file's on-disk type. + Indicates the file's on-disk type. + +On Windows systems a file will never have %G_FILE_TYPE_SYMBOLIC_LINK type; +use #GFileInfo and %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK to determine +whether a file is a symlink or not. This is due to the fact that NTFS does +not have a single filesystem object type for symbolic links - it has +files that symlink to files, and directories that symlink to directories. +#GFileType enumeration cannot precisely represent this important distinction, +which is why all Windows symlinks will continue to be reported as +%G_FILE_TYPE_REGULAR or %G_FILE_TYPE_DIRECTORY. File's type is unknown. @@ -37586,14 +41197,17 @@ should be read, or %FALSE otherwise. Completes partial file and directory names given a partial string by looking in the file system for clues. Can return a list of possible completion strings for widget implementations. + Creates a new filename completer. + a #GFilenameCompleter. + @@ -37605,6 +41219,7 @@ completion strings for widget implementations. Obtains a completion for @initial_text from @completer. + a completed string, or %NULL if no completion exists. This string is not owned by GIO, so remember to g_free() it @@ -37624,6 +41239,7 @@ completion strings for widget implementations. Gets an array of completion strings for a given initial text. + array of strings with possible completions for @initial_text. This array must be freed by g_strfreev() when finished. @@ -37645,6 +41261,7 @@ This array must be freed by g_strfreev() when finished. If @dirs_only is %TRUE, @completer will only complete directory names, and not file names. + @@ -37667,11 +41284,13 @@ complete directory names, and not file names. + + @@ -37684,6 +41303,7 @@ complete directory names, and not file names. + @@ -37691,6 +41311,7 @@ complete directory names, and not file names. + @@ -37698,6 +41319,7 @@ complete directory names, and not file names. + @@ -37723,8 +41345,10 @@ previewed in a file manager. Returned as the value of the key kind of filtering operation on a base stream. Typical examples of filtering operations are character set conversion, compression and byte order flipping. + Gets the base stream for the filter stream. + a #GInputStream. @@ -37739,6 +41363,7 @@ and byte order flipping. Returns whether the base stream will be closed when @stream is closed. + %TRUE if the base stream will be closed. @@ -37752,6 +41377,7 @@ closed. Sets whether the base stream will be closed when @stream is closed. + @@ -37780,11 +41406,13 @@ closed. + + @@ -37792,6 +41420,7 @@ closed. + @@ -37799,6 +41428,7 @@ closed. + @@ -37810,8 +41440,10 @@ closed. kind of filtering operation on a base stream. Typical examples of filtering operations are character set conversion, compression and byte order flipping. + Gets the base stream for the filter stream. + a #GOutputStream. @@ -37826,6 +41458,7 @@ and byte order flipping. Returns whether the base stream will be closed when @stream is closed. + %TRUE if the base stream will be closed. @@ -37839,6 +41472,7 @@ closed. Sets whether the base stream will be closed when @stream is closed. + @@ -37867,11 +41501,13 @@ closed. + + @@ -37879,6 +41515,7 @@ closed. + @@ -37886,12 +41523,125 @@ closed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Error codes returned by GIO functions. @@ -37907,7 +41657,10 @@ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED)) } ]| but should instead treat all unrecognized error codes the same as -#G_IO_ERROR_FAILED. +#G_IO_ERROR_FAILED. + +See also #GPollableReturn for a cheaper way of returning +%G_IO_ERROR_WOULD_BLOCK to callers without allocating a #GError. Generic error condition for when an operation fails and no more specific #GIOErrorEnum value is defined. @@ -38069,11 +41822,13 @@ but should instead treat all unrecognized error codes the same as #GIOExtension is an opaque data structure and can only be accessed using the following functions. + Gets the name under which @extension was registered. Note that the same type may be registered as extension for multiple extension points, under different names. + the name of @extension. @@ -38087,6 +41842,7 @@ for multiple extension points, under different names. Gets the priority with which @extension was registered. + the priority of @extension @@ -38100,6 +41856,7 @@ for multiple extension points, under different names. Gets the type associated with @extension. + the type of @extension @@ -38114,6 +41871,7 @@ for multiple extension points, under different names. Gets a reference to the class for the type that is associated with @extension. + the #GTypeClass for the type of @extension @@ -38129,8 +41887,10 @@ associated with @extension. #GIOExtensionPoint is an opaque data structure and can only be accessed using the following functions. + Finds a #GIOExtension for an extension point by name. + the #GIOExtension for @extension_point that has the given name, or %NULL if there is no extension with that name @@ -38150,6 +41910,7 @@ using the following functions. Gets a list of all extensions that implement this extension point. The list is sorted by priority, beginning with the highest priority. + a #GList of #GIOExtensions. The list is owned by GIO and should not be @@ -38167,6 +41928,7 @@ The list is sorted by priority, beginning with the highest priority. Gets the required type for @extension_point. + the #GType that all implementations must have, or #G_TYPE_INVALID if the extension point has no required type @@ -38182,6 +41944,7 @@ The list is sorted by priority, beginning with the highest priority. Sets the required type for @extension_point to @type. All implementations must henceforth have this type. + @@ -38202,6 +41965,7 @@ All implementations must henceforth have this type. If @type has already been registered as an extension for this extension point, the existing #GIOExtension object is returned. + a #GIOExtension object for #GType @@ -38227,6 +41991,7 @@ extension point, the existing #GIOExtension object is returned. Looks up an existing extension point. + the #GIOExtensionPoint, or %NULL if there is no registered extension point with the given name. @@ -38241,6 +42006,7 @@ extension point, the existing #GIOExtension object is returned. Registers an extension point. + the new #GIOExtensionPoint. This object is owned by GIO and should not be freed. @@ -38258,10 +42024,12 @@ extension point, the existing #GIOExtension object is returned. Provides an interface and default functions for loading and unloading modules. This is used internally to make GIO extensible, but can also be used by others to implement module loading. + Creates a new GIOModule that will load the specific shared library when in use. + a #GIOModule from given @filename, or %NULL on error. @@ -38270,7 +42038,7 @@ or %NULL on error. filename of the shared library module. - + @@ -38297,7 +42065,16 @@ points actually implemented must be returned by g_io_module_query() When installing a module that implements g_io_module_query() you must run gio-querymodules in order to build the cache files required for -lazy loading. +lazy loading. + +Since 2.56, this function should be named `g_io_<modulename>_query`, where +`modulename` is the plugin’s filename with the `lib` or `libgio` prefix and +everything after the first dot removed, and with `-` replaced with `_` +throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. +Using the new symbol names avoids name clashes when building modules +statically. The old symbol names continue to be supported, but cannot be used +for static builds. + A %NULL-terminated array of strings, listing the supported extension points of the module. The array @@ -38312,7 +42089,16 @@ lazy loading. This function is run after the module has been loaded into GIO, to initialize the module. Typically, this function will call -g_io_extension_point_implement(). +g_io_extension_point_implement(). + +Since 2.56, this function should be named `g_io_<modulename>_load`, where +`modulename` is the plugin’s filename with the `lib` or `libgio` prefix and +everything after the first dot removed, and with `-` replaced with `_` +throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. +Using the new symbol names avoids name clashes when building modules +statically. The old symbol names continue to be supported, but cannot be used +for static builds. + @@ -38327,7 +42113,16 @@ g_io_extension_point_implement(). Required API for GIO modules to implement. This function is run when the module is being unloaded from GIO, -to finalize the module. +to finalize the module. + +Since 2.56, this function should be named `g_io_<modulename>_unload`, where +`modulename` is the plugin’s filename with the `lib` or `libgio` prefix and +everything after the first dot removed, and with `-` replaced with `_` +throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`. +Using the new symbol names avoids name clashes when building modules +statically. The old symbol names continue to be supported, but cannot be used +for static builds. + @@ -38340,6 +42135,7 @@ to finalize the module. + Represents a scope for loading IO modules. A scope can be used for blocking @@ -38347,10 +42143,12 @@ duplicate modules, or blocking a module you don't want to load. The scope can be used with g_io_modules_load_all_in_directory_with_scope() or g_io_modules_scan_all_in_directory_with_scope(). + Block modules with the given @basename from being loaded when this scope is used with g_io_modules_scan_all_in_directory_with_scope() or g_io_modules_load_all_in_directory_with_scope(). + @@ -38367,6 +42165,7 @@ or g_io_modules_load_all_in_directory_with_scope(). Free a module scope. + @@ -38384,6 +42183,7 @@ blocking duplicate modules, or blocking a module you don't want to load. Specify the %G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules which have the same base name as a module that has already been seen in this scope. + the new module scope @@ -38409,11 +42209,13 @@ in this scope. Opaque class for defining and scheduling IO jobs. + Used from an I/O job to send a callback to be run in the thread that the job was started from, waiting for the result (and thus blocking the I/O job). Use g_main_context_invoke(). + The return value of @func @@ -38448,6 +42250,7 @@ on to this function you have to ensure that it is not freed before @func is called, either by passing %NULL as @notify to g_io_scheduler_push_job() or by using refcounting for @user_data. Use g_main_context_invoke(). + @@ -38476,6 +42279,7 @@ g_io_scheduler_push_job() or by using refcounting for @user_data. Long-running jobs should periodically check the @cancellable to see if they have been cancelled. + %TRUE if this function should be called again to complete the job, %FALSE if the job is complete (or cancelled) @@ -38496,7 +42300,7 @@ to see if they have been cancelled. - + GIOStream represents an object that has both read and write streams. Generally the two streams act as separate input and output streams, but they share some common resources and state. For instance, for @@ -38543,8 +42347,10 @@ application code may only run operations on the base (wrapped) stream when the wrapper stream is idle. Note that the semantics of such operations may not be well-defined due to the state the wrapper stream leaves the base stream in (though they are guaranteed not to crash). + Finishes an asynchronous io stream splice operation. + %TRUE on success, %FALSE otherwise. @@ -38567,6 +42373,7 @@ For behaviour details see g_io_stream_close(). The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -38595,6 +42402,7 @@ classes. However, if you override one you must override all. Closes a stream. + %TRUE if stream was successfully closed, %FALSE otherwise. @@ -38611,6 +42419,7 @@ classes. However, if you override one you must override all. + @@ -38626,6 +42435,7 @@ classes. However, if you override one you must override all. Gets the input stream for this object. This is used for reading. + a #GInputStream, owned by the #GIOStream. Do not free. @@ -38641,6 +42451,7 @@ Do not free. Gets the output stream for this object. This is used for writing. + a #GOutputStream, owned by the #GIOStream. Do not free. @@ -38655,6 +42466,7 @@ Do not free. Clears the pending flag on @stream. + @@ -38699,6 +42511,7 @@ can use a faster close that doesn't block to e.g. check errors. The default implementation of this method just calls close on the individual input/output streams. + %TRUE on success, %FALSE on failure @@ -38725,6 +42538,7 @@ For behaviour details see g_io_stream_close(). The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -38753,6 +42567,7 @@ classes. However, if you override one you must override all. Closes a stream. + %TRUE if stream was successfully closed, %FALSE otherwise. @@ -38771,6 +42586,7 @@ classes. However, if you override one you must override all. Gets the input stream for this object. This is used for reading. + a #GInputStream, owned by the #GIOStream. Do not free. @@ -38786,6 +42602,7 @@ Do not free. Gets the output stream for this object. This is used for writing. + a #GOutputStream, owned by the #GIOStream. Do not free. @@ -38800,6 +42617,7 @@ Do not free. Checks if a stream has pending actions. + %TRUE if @stream has pending actions. @@ -38813,6 +42631,7 @@ Do not free. Checks if a stream is closed. + %TRUE if the stream is closed. @@ -38828,6 +42647,7 @@ Do not free. Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return %FALSE and set @error. + %TRUE if pending was previously unset and is now set. @@ -38847,6 +42667,7 @@ already set or @stream is closed, it will return %FALSE and set When the operation is finished @callback will be called. You can then call g_io_stream_splice_finish() to get the result of the operation. + @@ -38898,13 +42719,16 @@ result of the operation. + + + a #GInputStream, owned by the #GIOStream. Do not free. @@ -38920,6 +42744,7 @@ Do not free. + a #GOutputStream, owned by the #GIOStream. Do not free. @@ -38935,6 +42760,7 @@ Do not free. + @@ -38950,6 +42776,7 @@ Do not free. + @@ -38979,6 +42806,7 @@ Do not free. + %TRUE if stream was successfully closed, %FALSE otherwise. @@ -38997,6 +42825,7 @@ Do not free. + @@ -39004,6 +42833,7 @@ Do not free. + @@ -39011,6 +42841,7 @@ Do not free. + @@ -39018,6 +42849,7 @@ Do not free. + @@ -39025,6 +42857,7 @@ Do not free. + @@ -39032,6 +42865,7 @@ Do not free. + @@ -39039,6 +42873,7 @@ Do not free. + @@ -39046,6 +42881,7 @@ Do not free. + @@ -39053,6 +42889,7 @@ Do not free. + @@ -39060,6 +42897,7 @@ Do not free. + @@ -39067,6 +42905,7 @@ Do not free. + GIOStreamSpliceFlags determine how streams should be spliced. @@ -39086,6 +42925,1658 @@ Do not free. before calling the callback. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GIcon is a very minimal interface for icons. It provides functions for checking the equality of two icons, hashing of icons and @@ -39115,8 +44606,10 @@ implements #GLoadableIcon. Additionally, you must provide an implementation of g_icon_serialize() that gives a result that is understood by g_icon_deserialize(), yielding one of the built-in icon types. + Deserializes a #GIcon previously serialized using g_icon_serialize(). + a #GIcon, or %NULL when deserialization fails. @@ -39130,6 +44623,7 @@ types. Gets a hash for an icon. + a #guint containing a hash for the @icon, suitable for use in a #GHashTable or similar data structure. @@ -39149,6 +44643,7 @@ use in a #GHashTable or similar data structure. If your application or library provides one or more #GIcon implementations you need to ensure that each #GType is registered with the type system prior to calling g_icon_new_for_string(). + An object implementing the #GIcon interface or %NULL if @error is set. @@ -39163,6 +44658,7 @@ with the type system prior to calling g_icon_new_for_string(). Checks if two icons are equal. + %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. @@ -39180,6 +44676,7 @@ with the type system prior to calling g_icon_new_for_string(). Gets a hash for an icon. + a #guint containing a hash for the @icon, suitable for use in a #GHashTable or similar data structure. @@ -39198,6 +44695,7 @@ back by calling g_icon_deserialize() on the returned value. As serialization will avoid using raw icon data when possible, it only makes sense to transfer the #GVariant between processes on the same machine, (as opposed to over the network), and within the same file system namespace. + a #GVariant, or %NULL when serialization fails. @@ -39224,8 +44722,9 @@ in the following two cases native, the returned string is the result of g_file_get_uri() (such as `sftp://path/to/my%20icon.png`). -- If @icon is a #GThemedIcon with exactly one name, the encoding is - simply the name (such as `network-server`). +- If @icon is a #GThemedIcon with exactly one name and no fallbacks, + the encoding is simply the name (such as `network-server`). + An allocated NUL-terminated UTF8 string or %NULL if @icon can't be serialized. Use g_free() to free. @@ -39248,6 +44747,7 @@ in the following two cases Checks if two icons are equal. + %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. @@ -39269,6 +44769,7 @@ back by calling g_icon_deserialize() on the returned value. As serialization will avoid using raw icon data when possible, it only makes sense to transfer the #GVariant between processes on the same machine, (as opposed to over the network), and within the same file system namespace. + a #GVariant, or %NULL when serialization fails. @@ -39295,8 +44796,9 @@ in the following two cases native, the returned string is the result of g_file_get_uri() (such as `sftp://path/to/my%20icon.png`). -- If @icon is a #GThemedIcon with exactly one name, the encoding is - simply the name (such as `network-server`). +- If @icon is a #GThemedIcon with exactly one name and no fallbacks, + the encoding is simply the name (such as `network-server`). + An allocated NUL-terminated UTF8 string or %NULL if @icon can't be serialized. Use g_free() to free. @@ -39314,12 +44816,14 @@ in the following two cases GIconIface is used to implement GIcon types for various different systems. See #GThemedIcon and #GLoadableIcon for examples of how to implement this interface. + The parent interface. + a #guint containing a hash for the @icon, suitable for use in a #GHashTable or similar data structure. @@ -39335,6 +44839,7 @@ use in a #GHashTable or similar data structure. + %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. @@ -39353,6 +44858,7 @@ use in a #GHashTable or similar data structure. + An allocated NUL-terminated UTF8 string or %NULL if @icon can't be serialized. Use g_free() to free. @@ -39376,6 +44882,7 @@ use in a #GHashTable or similar data structure. + @@ -39394,6 +44901,7 @@ use in a #GHashTable or similar data structure. + a #GVariant, or %NULL when serialization fails. @@ -39418,9 +44926,11 @@ g_resolver_lookup_by_address_async() to look up the hostname for a To actually connect to a remote host, you will need a #GInetSocketAddress (which includes a #GInetAddress as well as a port number). + Creates a #GInetAddress for the "any" address (unassigned/"don't care") for @family. + a new #GInetAddress corresponding to the "any" address for @family. @@ -39438,6 +44948,7 @@ for @family. Creates a new #GInetAddress from the given @family and @bytes. @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for %G_SOCKET_FAMILY_IPV6. + a new #GInetAddress corresponding to @family and @bytes. Free the returned object with g_object_unref(). @@ -39446,7 +44957,7 @@ for @family. raw address data - + @@ -39458,6 +44969,7 @@ for @family. Parses @string as an IP address and creates a new #GInetAddress. + a new #GInetAddress corresponding to @string, or %NULL if @string could not be parsed. @@ -39473,6 +44985,7 @@ for @family. Creates a #GInetAddress for the loopback address for @family. + a new #GInetAddress corresponding to the loopback address for @family. @@ -39488,6 +45001,7 @@ for @family. Gets the raw binary address data from @address. + a pointer to an internal array of the bytes in @address, which should not be modified, stored, or freed. The size of this @@ -39503,6 +45017,7 @@ array can be gotten with g_inet_address_get_native_size(). Converts @address to string form. + a representation of @address as a string, which should be freed after use. @@ -39517,6 +45032,7 @@ freed after use. Checks if two #GInetAddress instances are equal, e.g. the same address. + %TRUE if @address and @other_address are equal, %FALSE otherwise. @@ -39534,6 +45050,7 @@ freed after use. Gets @address's family + @address's family @@ -39547,6 +45064,7 @@ freed after use. Tests whether @address is the "any" address for its family. + %TRUE if @address is the "any" address for its family. @@ -39562,6 +45080,7 @@ freed after use. Tests whether @address is a link-local address (that is, if it identifies a host on a local network that is not connected to the Internet). + %TRUE if @address is a link-local address. @@ -39575,6 +45094,7 @@ Internet). Tests whether @address is the loopback address for its family. + %TRUE if @address is the loopback address for its family. @@ -39588,6 +45108,7 @@ Internet). Tests whether @address is a global multicast address. + %TRUE if @address is a global multicast address. @@ -39601,6 +45122,7 @@ Internet). Tests whether @address is a link-local multicast address. + %TRUE if @address is a link-local multicast address. @@ -39614,6 +45136,7 @@ Internet). Tests whether @address is a node-local multicast address. + %TRUE if @address is a node-local multicast address. @@ -39627,6 +45150,7 @@ Internet). Tests whether @address is an organization-local multicast address. + %TRUE if @address is an organization-local multicast address. @@ -39640,6 +45164,7 @@ Internet). Tests whether @address is a site-local multicast address. + %TRUE if @address is a site-local multicast address. @@ -39653,6 +45178,7 @@ Internet). Tests whether @address is a multicast address. + %TRUE if @address is a multicast address. @@ -39669,6 +45195,7 @@ Internet). (that is, the address identifies a host on a local network that can not be reached directly from the Internet, but which may have outgoing Internet connectivity via a NAT or firewall). + %TRUE if @address is a site-local address. @@ -39683,6 +45210,7 @@ outgoing Internet connectivity via a NAT or firewall). Gets the size of the native raw binary address for @address. This is the size of the data that you get from g_inet_address_to_bytes(). + the number of bytes used for the native version of @address. @@ -39696,6 +45224,7 @@ is the size of the data that you get from g_inet_address_to_bytes(). Gets the raw binary address data from @address. + a pointer to an internal array of the bytes in @address, which should not be modified, stored, or freed. The size of this @@ -39711,6 +45240,7 @@ array can be gotten with g_inet_address_get_native_size(). Converts @address to string form. + a representation of @address as a string, which should be freed after use. @@ -39787,11 +45317,13 @@ See g_inet_address_get_is_loopback(). + + a representation of @address as a string, which should be freed after use. @@ -39807,6 +45339,7 @@ freed after use. + a pointer to an internal array of the bytes in @address, which should not be modified, stored, or freed. The size of this @@ -39827,10 +45360,12 @@ array can be gotten with g_inet_address_get_native_size(). described by a base address and a length indicating how many bits of the base address are relevant for matching purposes. These are often given in string form. Eg, "10.0.0.0/8", or "fe80::/10". + Creates a new #GInetAddressMask representing all addresses whose first @length bits match @addr. + a new #GInetAddressMask, or %NULL on error @@ -39851,6 +45386,7 @@ first @length bits match @addr. creates a new #GInetAddressMask. The length, if present, is delimited by a "/". If it is not present, then the length is assumed to be the full length of the address. + a new #GInetAddressMask corresponding to @string, or %NULL on error. @@ -39865,6 +45401,7 @@ on error. Tests if @mask and @mask2 are the same mask. + whether @mask and @mask2 are the same mask @@ -39882,6 +45419,7 @@ on error. Gets @mask's base address + @mask's base address @@ -39895,6 +45433,7 @@ on error. Gets the #GSocketFamily of @mask's address + the #GSocketFamily of @mask's address @@ -39908,6 +45447,7 @@ on error. Gets @mask's length + @mask's length @@ -39921,6 +45461,7 @@ on error. Tests if @address falls within the range described by @mask. + whether @address falls within the range described by @mask. @@ -39939,6 +45480,7 @@ on error. Converts @mask back to its corresponding string form. + a string corresponding to @mask. @@ -39967,20 +45509,25 @@ on error. + + + An IPv4 or IPv6 socket address; that is, the combination of a #GInetAddress and a port number. + Creates a new #GInetSocketAddress for @address and @port. + a new #GInetSocketAddress @@ -40001,6 +45548,7 @@ on error. If @address is an IPv6 address, it can also contain a scope ID (separated from the address by a `%`). + a new #GInetSocketAddress, or %NULL if @address cannot be parsed. @@ -40019,6 +45567,7 @@ parsed. Gets @address's #GInetAddress. + the #GInetAddress for @address, which must be g_object_ref()'d if it will be stored @@ -40034,6 +45583,7 @@ g_object_ref()'d if it will be stored Gets the `sin6_flowinfo` field from @address, which must be an IPv6 address. + the flowinfo field @@ -40047,6 +45597,7 @@ which must be an IPv6 address. Gets @address's port. + the port for @address @@ -40061,6 +45612,7 @@ which must be an IPv6 address. Gets the `sin6_scope_id` field from @address, which must be an IPv6 address. + the scope id field @@ -40093,11 +45645,13 @@ which must be an IPv6 address. + + #GInitable is implemented by objects that can fail during @@ -40124,10 +45678,12 @@ For bindings in languages where the native constructor supports exceptions the binding could check for objects implemention %GInitable during normal construction and automatically initialize them, throwing an exception on failure. + Helper function for constructing #GInitable object. This is similar to g_object_new() but also initializes the object and returns %NULL, setting an error on failure. + a newly allocated #GObject, or %NULL on error @@ -40163,6 +45719,7 @@ and returns %NULL, setting an error on failure. Helper function for constructing #GInitable object. This is similar to g_object_new_valist() but also initializes the object and returns %NULL, setting an error on failure. + a newly allocated #GObject, or %NULL on error @@ -40194,6 +45751,7 @@ similar to g_object_newv() but also initializes the object and returns %NULL, setting an error on failure. Use g_object_new_with_properties() and g_initable_init() instead. See #GParameter for more information. + a newly allocated #GObject, or %NULL on error @@ -40259,6 +45817,7 @@ it is designed to be used via the singleton pattern, with a In this pattern, a caller would expect to be able to call g_initable_init() on the result of g_object_new(), regardless of whether it is in fact a new instance. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. @@ -40314,6 +45873,7 @@ it is designed to be used via the singleton pattern, with a In this pattern, a caller would expect to be able to call g_initable_init() on the result of g_object_new(), regardless of whether it is in fact a new instance. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. @@ -40334,12 +45894,14 @@ instance. Provides an interface for initializing object such that initialization may fail. + The parent interface. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present. @@ -40378,6 +45940,7 @@ this array, which may be zero. Flags relevant to this message will be returned in @flags. For example, `MSG_EOR` or `MSG_TRUNC`. + return location for a #GSocketAddress, or %NULL @@ -40429,6 +45992,7 @@ See the documentation for #GIOStream for details of thread safety of streaming APIs. All of these functions have async variants too. + Requests an asynchronous closes of the stream, releasing resources related to it. When the operation is finished @callback will be called. @@ -40440,6 +46004,7 @@ For behaviour details see g_input_stream_close(). The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -40468,6 +46033,7 @@ override one you must override all. Finishes closing a stream asynchronously, started from g_input_stream_close_async(). + %TRUE if the stream was closed successfully. @@ -40484,6 +46050,7 @@ override one you must override all. + @@ -40520,6 +46087,7 @@ priority is %G_PRIORITY_DEFAULT. The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -40528,14 +46096,14 @@ override one you must override all. A #GInputStream. - - a buffer to - read data into (which should be at least count bytes long). + + + a buffer to read data into (which should be at least count bytes long). - + the number of bytes that will be read from the stream @@ -40560,6 +46128,7 @@ of the request. Finishes an asynchronous stream read operation. + number of bytes read in, or -1 on error, or 0 on end of file. @@ -40576,6 +46145,7 @@ of the request. + @@ -40609,6 +46179,7 @@ triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. + Number of bytes skipped, or -1 on error @@ -40652,6 +46223,7 @@ Default priority is %G_PRIORITY_DEFAULT. The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one, you must override all. + @@ -40684,8 +46256,9 @@ However, if you override one, you must override all. Finishes a stream skip operation. + - the size of the bytes skipped, or %-1 on error. + the size of the bytes skipped, or `-1` on error. @@ -40701,6 +46274,7 @@ However, if you override one, you must override all. Clears the pending flag on @stream. + @@ -40735,6 +46309,7 @@ triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Cancelling a close will still leave the stream closed, but some streams can use a faster close that doesn't block to e.g. check errors. + %TRUE on success, %FALSE on failure @@ -40761,6 +46336,7 @@ For behaviour details see g_input_stream_close(). The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -40789,6 +46365,7 @@ override one you must override all. Finishes closing a stream asynchronously, started from g_input_stream_close_async(). + %TRUE if the stream was closed successfully. @@ -40806,6 +46383,7 @@ override one you must override all. Checks if an input stream has pending actions. + %TRUE if @stream has pending actions. @@ -40819,6 +46397,7 @@ override one you must override all. Checks if an input stream is closed. + %TRUE if the stream is closed. @@ -40852,6 +46431,7 @@ operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. + Number of bytes read, or -1 on error, or 0 on end of file. @@ -40861,14 +46441,14 @@ On error -1 is returned and @error is set accordingly. a #GInputStream. - - a buffer to - read data into (which should be at least count bytes long). + + + a buffer to read data into (which should be at least count bytes long). - + the number of bytes that will be read from the stream @@ -40898,6 +46478,7 @@ use #GError, if this function returns %FALSE (and sets @error) then read before the error was encountered. This functionality is only available from C. If you need it from another language then you must write your own loop around g_input_stream_read(). + %TRUE on success, %FALSE if there was an error @@ -40907,14 +46488,14 @@ write your own loop around g_input_stream_read(). a #GInputStream. - - a buffer to - read data into (which should be at least count bytes long). + + + a buffer to read data into (which should be at least count bytes long). - + the number of bytes that will be read from the stream @@ -40939,6 +46520,7 @@ Call g_input_stream_read_all_finish() to collect the result. Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. + @@ -40947,14 +46529,14 @@ priority. Default priority is %G_PRIORITY_DEFAULT. A #GInputStream - - a buffer to - read data into (which should be at least count bytes long) + + + a buffer to read data into (which should be at least count bytes long) - + the number of bytes that will be read from the stream @@ -40986,6 +46568,7 @@ use #GError, if this function returns %FALSE (and sets @error) then read before the error was encountered. This functionality is only available from C. If you need it from another language then you must write your own loop around g_input_stream_read_async(). + %TRUE on success, %FALSE if there was an error @@ -41029,6 +46612,7 @@ priority is %G_PRIORITY_DEFAULT. The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -41037,14 +46621,14 @@ override one you must override all. A #GInputStream. - - a buffer to - read data into (which should be at least count bytes long). + + + a buffer to read data into (which should be at least count bytes long). - + the number of bytes that will be read from the stream @@ -41091,6 +46675,7 @@ operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error %NULL is returned and @error is set accordingly. + a new #GBytes, or %NULL on error @@ -41132,6 +46717,7 @@ many bytes as requested. Zero is returned on end of file (or if Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT. + @@ -41164,6 +46750,7 @@ priority. Default priority is %G_PRIORITY_DEFAULT. Finishes an asynchronous stream read-into-#GBytes operation. + the newly-allocated #GBytes, or %NULL on error @@ -41181,6 +46768,7 @@ priority. Default priority is %G_PRIORITY_DEFAULT. Finishes an asynchronous stream read operation. + number of bytes read in, or -1 on error, or 0 on end of file. @@ -41200,6 +46788,7 @@ priority. Default priority is %G_PRIORITY_DEFAULT. Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return %FALSE and set @error. + %TRUE if pending was previously unset and is now set. @@ -41226,6 +46815,7 @@ triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. + Number of bytes skipped, or -1 on error @@ -41269,6 +46859,7 @@ Default priority is %G_PRIORITY_DEFAULT. The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one, you must override all. + @@ -41301,8 +46892,9 @@ However, if you override one, you must override all. Finishes a stream skip operation. + - the size of the bytes skipped, or %-1 on error. + the size of the bytes skipped, or `-1` on error. @@ -41324,11 +46916,13 @@ However, if you override one, you must override all. + + @@ -41350,6 +46944,7 @@ However, if you override one, you must override all. + Number of bytes skipped, or -1 on error @@ -41372,6 +46967,7 @@ However, if you override one, you must override all. + @@ -41387,6 +46983,7 @@ However, if you override one, you must override all. + @@ -41395,14 +46992,14 @@ However, if you override one, you must override all. A #GInputStream. - - a buffer to - read data into (which should be at least count bytes long). + + + a buffer to read data into (which should be at least count bytes long). - + the number of bytes that will be read from the stream @@ -41428,6 +47025,7 @@ of the request. + number of bytes read in, or -1 on error, or 0 on end of file. @@ -41446,6 +47044,7 @@ of the request. + @@ -41479,8 +47078,9 @@ of the request. + - the size of the bytes skipped, or %-1 on error. + the size of the bytes skipped, or `-1` on error. @@ -41497,6 +47097,7 @@ of the request. + @@ -41526,6 +47127,7 @@ of the request. + %TRUE if the stream was closed successfully. @@ -41544,6 +47146,7 @@ of the request. + @@ -41551,6 +47154,7 @@ of the request. + @@ -41558,6 +47162,7 @@ of the request. + @@ -41565,6 +47170,7 @@ of the request. + @@ -41572,6 +47178,7 @@ of the request. + @@ -41579,12 +47186,14 @@ of the request. + Structure used for scatter/gather data input. You generally pass in an array of #GInputVectors and the operation will store the read data starting in the first buffer, switching to the next as needed. + Pointer to a buffer where data will be written. @@ -41594,6 +47203,20 @@ first buffer, switching to the next as needed. + + + + + + + + + + + + + + #GListModel is an interface that represents a mutable list of #GObjects. Its main intention is as a model for various widgets in @@ -41642,15 +47265,25 @@ thread in which it is appropriate to use it depends on the particular implementation, but typically it will be from the thread that owns the [thread-default main context][g-main-context-push-thread-default] in effect at the time that the model was created. - - - + + + Get the item at @position. If @position is greater than the number of +items in @list, %NULL is returned. + +%NULL is never returned for an index that is smaller than the length +of the list. See g_list_model_get_n_items(). + + + the object at @position. + + a #GListModel + the position of the item to fetch @@ -41662,6 +47295,7 @@ implementation of that interface. The item type of a #GListModel can not change during the life of the model. + the #GType of the items contained in @list. @@ -41679,6 +47313,7 @@ model. Depending on the model implementation, calling this function may be less efficient than iterating the list with increasing values for @position until g_list_model_get_item() returns %NULL. + the number of items in @list. @@ -41696,9 +47331,10 @@ items in @list, %NULL is returned. %NULL is never returned for an index that is smaller than the length of the list. See g_list_model_get_n_items(). + the item at @position. - + @@ -41718,6 +47354,7 @@ implementation of that interface. The item type of a #GListModel can not change during the life of the model. + the #GType of the items contained in @list. @@ -41735,6 +47372,7 @@ model. Depending on the model implementation, calling this function may be less efficient than iterating the list with increasing values for @position until g_list_model_get_item() returns %NULL. + the number of items in @list. @@ -41752,6 +47390,7 @@ items in @list, %NULL is returned. %NULL is never returned for an index that is smaller than the length of the list. See g_list_model_get_n_items(). + the object at @position. @@ -41788,6 +47427,7 @@ Stated another way: in general, it is assumed that code making a series of accesses to the model via the API, without returning to the mainloop, and without calling other code, will continue to view the same contents of the model. + @@ -41811,9 +47451,12 @@ same contents of the model. - This signal is emitted whenever items were added or removed to -@list. At @position, @removed items were removed and @added items -were added in their place. + This signal is emitted whenever items were added to or removed +from @list. At @position, @removed items were removed and @added +items were added in their place. + +Note: If @removed != @added, the positions of all later items +in the model change. @@ -41835,12 +47478,14 @@ were added in their place. The virtual function table for #GListModel. + parent #GTypeInterface + the #GType of the items contained in @list. @@ -41855,6 +47500,7 @@ were added in their place. + the number of items in @list. @@ -41869,14 +47515,18 @@ were added in their place. - - + + + the object at @position. + + a #GListModel + the position of the item to fetch @@ -41889,10 +47539,12 @@ items in memory. It provides insertions, deletions, and lookups in logarithmic time with a fast path for the common case of iterating the list linearly. + Creates a new #GListStore with items of type @item_type. @item_type must be a subclass of #GObject. + a new #GListStore @@ -41911,6 +47563,7 @@ This function takes a ref on @item. Use g_list_store_splice() to append multiple items at the same time efficiently. + @@ -41925,6 +47578,64 @@ efficiently. + + Looks up the given @item in the list store by looping over the items until +the first occurrence of @item. If @item was not found, then @position will +not be set, and this method will return %FALSE. + +If you need to compare the two items with a custom comparison function, use +g_list_store_find_with_equal_func() with a custom #GEqualFunc instead. + + + Whether @store contains @item. If it was found, @position will be +set to the position where @item occurred for the first time. + + + + + a #GListStore + + + + an item + + + + the first position of @item, if it was found. + + + + + + Looks up the given @item in the list store by looping over the items and +comparing them with @compare_func until the first occurrence of @item which +matches. If @item was not found, then @position will not be set, and this +method will return %FALSE. + + + Whether @store contains @item. If it was found, @position will be +set to the position where @item occurred for the first time. + + + + + a #GListStore + + + + an item + + + + A custom equality check function + + + + the first position of @item, if it was found. + + + + Inserts @item into @store at @position. @item must be of type #GListStore:item-type or derived from it. @position must be smaller @@ -41934,6 +47645,7 @@ This function takes a ref on @item. Use g_list_store_splice() to insert multiple items at the same time efficiently. + @@ -41961,6 +47673,7 @@ result is undefined. Usually you would approach this by only ever inserting items by way of this function. This function takes a ref on @item. + the position at which @item was inserted @@ -41990,6 +47703,7 @@ smaller than the current length of the list. Use g_list_store_splice() to remove multiple items at the same time efficiently. + @@ -42006,6 +47720,7 @@ efficiently. Removes all items from @store. + @@ -42018,6 +47733,7 @@ efficiently. Sort the items in @store according to @compare_func. + @@ -42050,6 +47766,7 @@ This function takes a ref on each item in @additions. The parameters @position and @n_removals must be correct (ie: @position + @n_removals must be less than or equal to the length of the list at the time this function is called). + @@ -42085,6 +47802,7 @@ subclasses of #GObject. + @@ -42092,10 +47810,12 @@ subclasses of #GObject. Extends the #GIcon interface and adds the ability to load icons from streams. + Loads a loadable icon. For the asynchronous version of this function, see g_loadable_icon_load_async(). + a #GInputStream to read the icon from. @@ -42125,6 +47845,7 @@ ignore. Loads an icon asynchronously. To finish this function, see g_loadable_icon_load_finish(). For the synchronous, blocking version of this function, see g_loadable_icon_load(). + @@ -42154,6 +47875,7 @@ version of this function, see g_loadable_icon_load(). Finishes an asynchronous icon load started in g_loadable_icon_load_async(). + a #GInputStream to read the icon from. @@ -42177,6 +47899,7 @@ version of this function, see g_loadable_icon_load(). Loads a loadable icon. For the asynchronous version of this function, see g_loadable_icon_load_async(). + a #GInputStream to read the icon from. @@ -42206,6 +47929,7 @@ ignore. Loads an icon asynchronously. To finish this function, see g_loadable_icon_load_finish(). For the synchronous, blocking version of this function, see g_loadable_icon_load(). + @@ -42235,6 +47959,7 @@ version of this function, see g_loadable_icon_load(). Finishes an asynchronous icon load started in g_loadable_icon_load_async(). + a #GInputStream to read the icon from. @@ -42258,12 +47983,14 @@ version of this function, see g_loadable_icon_load(). Interface for icons that can be loaded as a stream. + The parent interface. + a #GInputStream to read the icon from. @@ -42292,6 +48019,7 @@ ignore. + @@ -42322,6 +48050,7 @@ ignore. + a #GInputStream to read the icon from. @@ -42344,6 +48073,75 @@ ignore. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extension point for memory usage monitoring functionality. +See [Extending GIO][extending-gio]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The menu item attribute which holds the action name of the item. Action names are namespaced with an identifier for the action group in which the @@ -42351,11 +48149,13 @@ action resides. For example, "win." for window-specific actions and "app." for application-wide actions. See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute(). + The menu item attribute that holds the namespace for all action names in menus that are linked from this item. + @@ -42366,10 +48166,33 @@ The icon is stored in the format returned by g_icon_serialize(). This attribute is intended only to represent 'noun' icons such as favicons for a webpage, or application icons. It should not be used for 'verbs' (ie: stock icons). + + + + + + + + + + + + + + + + + + + + + + The menu item attribute which holds the label of the item. + @@ -42377,32 +48200,121 @@ for 'verbs' (ie: stock icons). will be activated. See also g_menu_item_set_action_and_target() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The name of the link that associates a menu item with a section. The linked menu will usually be shown in place of the menu item, using the item's label as a header. See also g_menu_item_set_link(). + The name of the link that associates a menu item with a submenu. See also g_menu_item_set_link(). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GMemoryInputStream is a class for using arbitrary memory chunks as input for GIO streaming input operations. As of GLib 2.34, #GMemoryInputStream implements #GPollableInputStream. + Creates a new empty #GMemoryInputStream. + a new #GInputStream @@ -42410,6 +48322,7 @@ As of GLib 2.34, #GMemoryInputStream implements Creates a new #GMemoryInputStream with data from the given @bytes. + new #GInputStream read from @bytes @@ -42423,6 +48336,7 @@ As of GLib 2.34, #GMemoryInputStream implements Creates a new #GMemoryInputStream with data in memory of a given size. + new #GInputStream read from @data of @len bytes. @@ -42446,6 +48360,7 @@ As of GLib 2.34, #GMemoryInputStream implements Appends @bytes to data that can be read from the input stream. + @@ -42462,6 +48377,7 @@ As of GLib 2.34, #GMemoryInputStream implements Appends @data to data that can be read from the input stream + @@ -42494,11 +48410,13 @@ As of GLib 2.34, #GMemoryInputStream implements + + @@ -42506,6 +48424,7 @@ As of GLib 2.34, #GMemoryInputStream implements + @@ -42513,6 +48432,7 @@ As of GLib 2.34, #GMemoryInputStream implements + @@ -42520,6 +48440,7 @@ As of GLib 2.34, #GMemoryInputStream implements + @@ -42527,6 +48448,7 @@ As of GLib 2.34, #GMemoryInputStream implements + @@ -42534,13 +48456,143 @@ As of GLib 2.34, #GMemoryInputStream implements + + + #GMemoryMonitor will monitor system memory and suggest to the application +when to free memory so as to leave more room for other applications. +It is implemented on Linux using the [Low Memory Monitor](https://gitlab.freedesktop.org/hadess/low-memory-monitor/) +([API documentation](https://hadess.pages.freedesktop.org/low-memory-monitor/)). + +There is also an implementation for use inside Flatpak sandboxes. + +Possible actions to take when the signal is received are: +- Free caches +- Save files that haven't been looked at in a while to disk, ready to be reopened when needed +- Run a garbage collection cycle +- Try and compress fragmented allocations +- Exit on idle if the process has no reason to stay around + +See #GMemoryMonitorWarningLevel for details on the various warning levels. + +|[<!-- language="C" --> +static void +warning_cb (GMemoryMonitor *m, GMemoryMonitorWarningLevel level) +{ + g_debug ("Warning level: %d", level); + if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW) + drop_caches (); +} + +static GMemoryMonitor * +monitor_low_memory (void) +{ + GMemoryMonitor *m; + m = g_memory_monitor_dup_default (); + g_signal_connect (G_OBJECT (m), "low-memory-warning", + G_CALLBACK (warning_cb), NULL); + return m; +} +]| + +Don't forget to disconnect the #GMemoryMonitor::low-memory-warning +signal, and unref the #GMemoryMonitor itself when exiting. + + + + Gets a reference to the default #GMemoryMonitor for the system. + + + a new reference to the default #GMemoryMonitor + + + + + + + + + + + + + + + + + + + Emitted when the system is running low on free memory. The signal +handler should then take the appropriate action depending on the +warning level. See the #GMemoryMonitorWarningLevel documentation for +details. + + + + + + the #GMemoryMonitorWarningLevel warning level + + + + + + + The virtual function table for #GMemoryMonitor. + + + The parent interface. + + + + + + + + + + + + + + + + + + + + + Memory availability warning levels. + +Note that because new values might be added, it is recommended that applications check +#GMemoryMonitorWarningLevel as ranges, for example: +|[<!-- language="C" --> +if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW) + drop_caches (); +]| + + Memory on the device is low, processes + should free up unneeded resources (for example, in-memory caches) so they can + be used elsewhere. + + + Same as @G_MEMORY_MONITOR_WARNING_LEVEL_LOW + but the device has even less free memory, so processes should try harder to free + up unneeded resources. If your process does not need to stay running, it is a + good time for it to quit. + + + The system will soon start terminating + processes to reclaim memory, including background processes. + + #GMemoryOutputStream is a class for using arbitrary memory chunks as output for GIO streaming output operations. As of GLib 2.34, #GMemoryOutputStream trivially implements #GPollableOutputStream: it always polls as ready. + @@ -42585,6 +48637,7 @@ stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); data = malloc (200); stream3 = g_memory_output_stream_new (data, 200, NULL, free); ]| + A newly created #GMemoryOutputStream object. @@ -42613,6 +48666,7 @@ stream3 = g_memory_output_stream_new (data, 200, NULL, free); Creates a new #GMemoryOutputStream, using g_realloc() and g_free() for memory allocation. + @@ -42622,6 +48676,7 @@ for memory allocation. Note that the returned pointer may become invalid on the next write or truncate operation on the stream. + pointer to the stream's data, or %NULL if the data has been stolen @@ -42637,6 +48692,7 @@ write or truncate operation on the stream. Returns the number of bytes from the start up to including the last byte written in the stream that has not been truncated away. + the number of bytes written to the stream @@ -42664,6 +48720,7 @@ stream and further writes will return %G_IO_ERROR_NO_SPACE. In any case, if you want the number of bytes currently written to the stream, use g_memory_output_stream_get_data_size(). + the number of bytes allocated for the data buffer @@ -42678,6 +48735,7 @@ stream, use g_memory_output_stream_get_data_size(). Returns data from the @ostream as a #GBytes. @ostream must be closed before calling this function. + the stream's data @@ -42696,6 +48754,7 @@ freed using the free function set in @ostream's #GMemoryOutputStream:destroy-function property. @ostream must be closed before calling this function. + the stream's data, or %NULL if it has previously been stolen @@ -42736,11 +48795,13 @@ freed using the free function set in @ostream's + + @@ -42748,6 +48809,7 @@ freed using the free function set in @ostream's + @@ -42755,6 +48817,7 @@ freed using the free function set in @ostream's + @@ -42762,6 +48825,7 @@ freed using the free function set in @ostream's + @@ -42769,6 +48833,7 @@ freed using the free function set in @ostream's + @@ -42776,6 +48841,7 @@ freed using the free function set in @ostream's + #GMenu is a simple implementation of #GMenuModel. @@ -42790,6 +48856,7 @@ g_menu_insert_submenu(). Creates a new #GMenu. The new menu has no items. + a new #GMenu @@ -42799,6 +48866,7 @@ The new menu has no items. Convenience function for appending a normal menu item to the end of @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative. + @@ -42821,6 +48889,7 @@ flexible alternative. Appends @item to the end of @menu. See g_menu_insert_item() for more information. + @@ -42839,6 +48908,7 @@ See g_menu_insert_item() for more information. Convenience function for appending a section menu item to the end of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a more flexible alternative. + @@ -42861,6 +48931,7 @@ more flexible alternative. Convenience function for appending a submenu menu item to the end of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more flexible alternative. + @@ -42888,6 +48959,7 @@ longer be used. This function causes g_menu_model_is_mutable() to begin returning %FALSE, which has some positive performance implications. + @@ -42902,6 +48974,7 @@ This function causes g_menu_model_is_mutable() to begin returning Convenience function for inserting a normal menu item into @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative. + @@ -42942,6 +49015,7 @@ There are many convenience functions to take care of common cases. See g_menu_insert(), g_menu_insert_section() and g_menu_insert_submenu() as well as "prepend" and "append" variants of each of these functions. + @@ -42964,6 +49038,7 @@ each of these functions. Convenience function for inserting a section menu item into @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a more flexible alternative. + @@ -42990,6 +49065,7 @@ flexible alternative. Convenience function for inserting a submenu menu item into @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more flexible alternative. + @@ -43016,6 +49092,7 @@ flexible alternative. Convenience function for prepending a normal menu item to the start of @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative. + @@ -43038,6 +49115,7 @@ flexible alternative. Prepends @item to the start of @menu. See g_menu_insert_item() for more information. + @@ -43056,6 +49134,7 @@ See g_menu_insert_item() for more information. Convenience function for prepending a section menu item to the start of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a more flexible alternative. + @@ -43078,6 +49157,7 @@ a more flexible alternative. Convenience function for prepending a submenu menu item to the start of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more flexible alternative. + @@ -43107,6 +49187,7 @@ less than the number of items in the menu. It is not possible to remove items by identity since items are added to the menu simply by copying their links and attributes (ie: identity of the item itself is not preserved). + @@ -43123,6 +49204,7 @@ identity of the item itself is not preserved). Removes all items in the menu. + @@ -43137,6 +49219,7 @@ identity of the item itself is not preserved). #GMenuAttributeIter is an opaque structure type. You must access it using the functions below. + This function combines g_menu_attribute_iter_next() with g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value(). @@ -43153,6 +49236,7 @@ return the same values again. The value returned in @name remains valid for as long as the iterator remains at the current position. The value returned in @value must be unreffed using g_variant_unref() when it is no longer in use. + %TRUE on success, or %FALSE if there is no additional attribute @@ -43178,6 +49262,7 @@ be unreffed using g_variant_unref() when it is no longer in use. a string. The iterator is not advanced. + the name of the attribute @@ -43205,6 +49290,7 @@ return the same values again. The value returned in @name remains valid for as long as the iterator remains at the current position. The value returned in @value must be unreffed using g_variant_unref() when it is no longer in use. + %TRUE on success, or %FALSE if there is no additional attribute @@ -43229,6 +49315,7 @@ be unreffed using g_variant_unref() when it is no longer in use. Gets the value of the attribute at the current iterator position. The iterator is not advanced. + the value of the current attribute @@ -43250,6 +49337,7 @@ attributes. You must call this function when you first acquire the iterator to advance it to the first attribute (and determine if the first attribute exists at all). + %TRUE on success, or %FALSE when there are no more attributes @@ -43269,11 +49357,13 @@ attribute exists at all). + + %TRUE on success, or %FALSE if there is no additional attribute @@ -43297,6 +49387,7 @@ attribute exists at all). + #GMenuItem is an opaque structure type. You must access it using the @@ -43310,6 +49401,7 @@ new item. If @detailed_action is non-%NULL it is used to set the "action" and possibly the "target" attribute of the new item. See g_menu_item_set_detailed_action() for more information. + a new #GMenuItem @@ -43331,6 +49423,7 @@ g_menu_item_set_detailed_action() for more information. @item_index must be valid (ie: be sure to call g_menu_model_get_n_items() first). + a new #GMenuItem. @@ -43407,6 +49500,7 @@ purpose of understanding what is really going on). </item> </menu> ]| + a new #GMenuItem @@ -43427,6 +49521,7 @@ purpose of understanding what is really going on). This is a convenience API around g_menu_item_new() and g_menu_item_set_submenu(). + a new #GMenuItem @@ -43452,6 +49547,7 @@ value into the positional parameters and %TRUE is returned. If the attribute does not exist, or it does exist but has the wrong type, then the positional parameters are ignored and %FALSE is returned. + %TRUE if the named attribute was found with the expected type @@ -43482,6 +49578,7 @@ returned. If @expected_type is specified and the attribute does not have this type, %NULL is returned. %NULL is also returned if the attribute simply does not exist. + the attribute value, or %NULL @@ -43503,6 +49600,7 @@ simply does not exist. Queries the named @link on @menu_item. + the link, or %NULL @@ -43538,6 +49636,7 @@ works with string-typed targets. See also g_menu_item_set_action_and_target_value() for a description of the semantics of the action and target attributes. + @@ -43597,6 +49696,7 @@ state is equal to the value of the @target property. See g_menu_item_set_action_and_target() or g_menu_item_set_detailed_action() for two equivalent calls that are probably more convenient for most uses. + @@ -43633,6 +49733,7 @@ and the named attribute is unset. See also g_menu_item_set_attribute_value() for an equivalent call that directly accepts a #GVariant. + @@ -43675,6 +49776,7 @@ the @value #GVariant is floating, it is consumed. See also g_menu_item_set_attribute() for a more convenient way to do the same. + @@ -43705,6 +49807,7 @@ slightly less convenient) alternatives. See also g_menu_item_set_action_and_target_value() for a description of the semantics of the action and target attributes. + @@ -43732,6 +49835,7 @@ menu items corresponding to verbs (eg: stock icons for 'Save' or 'Quit'). If @icon is %NULL then the icon is unset. + @@ -43751,6 +49855,7 @@ If @icon is %NULL then the icon is unset. If @label is non-%NULL it is used as the label for the menu item. If it is %NULL then the label attribute is unset. + @@ -43776,6 +49881,7 @@ is no guarantee that clients will be able to make sense of them. Link types are restricted to lowercase characters, numbers and '-'. Furthermore, the names must begin with a lowercase character, must not end with a '-', and must not contain consecutive dashes. + @@ -43802,6 +49908,7 @@ exactly as it sounds: the items from @section become a direct part of the menu that @menu_item is added to. See g_menu_item_new_section() for more information about what it means for a menu item to be a section. + @@ -43824,6 +49931,7 @@ link is unset. The effect of having one menu appear as a submenu of another is exactly as it sounds. + @@ -43842,6 +49950,7 @@ exactly as it sounds. #GMenuLinkIter is an opaque structure type. You must access it using the functions below. + This function combines g_menu_link_iter_next() with g_menu_link_iter_get_name() and g_menu_link_iter_get_value(). @@ -43857,6 +49966,7 @@ same values again. The value returned in @out_link remains valid for as long as the iterator remains at the current position. The value returned in @value must be unreffed using g_object_unref() when it is no longer in use. + %TRUE on success, or %FALSE if there is no additional link @@ -43880,6 +49990,7 @@ be unreffed using g_object_unref() when it is no longer in use. Gets the name of the link at the current iterator position. The iterator is not advanced. + the type of the link @@ -43906,6 +50017,7 @@ same values again. The value returned in @out_link remains valid for as long as the iterator remains at the current position. The value returned in @value must be unreffed using g_object_unref() when it is no longer in use. + %TRUE on success, or %FALSE if there is no additional link @@ -43929,6 +50041,7 @@ be unreffed using g_object_unref() when it is no longer in use. Gets the linked #GMenuModel at the current iterator position. The iterator is not advanced. + the #GMenuModel that is linked to @@ -43949,6 +50062,7 @@ link. You must call this function when you first acquire the iterator to advance it to the first link (and determine if the first link exists at all). + %TRUE on success, or %FALSE when there are no more links @@ -43968,11 +50082,13 @@ at all). + + %TRUE on success, or %FALSE if there is no additional link @@ -43995,6 +50111,7 @@ at all). + #GMenuModel represents the contents of a menu -- an ordered list of @@ -44110,6 +50227,7 @@ have a target value. Selecting that menu item will result in activation of the action with the target value as the parameter. The menu item should be rendered as "selected" when the state of the action is equal to the target value of the menu item. + Queries the item at position @item_index in @model for the attribute specified by @attribute. @@ -44122,6 +50240,7 @@ expected type is unspecified) then the value is returned. If the attribute does not exist, or does not match the expected type then %NULL is returned. + the value of the attribute @@ -44148,6 +50267,7 @@ then %NULL is returned. Gets all the attributes associated with the item in the menu model. + @@ -44175,6 +50295,7 @@ specified by @link. If the link exists, the linked #GMenuModel is returned. If the link does not exist, %NULL is returned. + the linked #GMenuModel, or %NULL @@ -44196,6 +50317,7 @@ does not exist, %NULL is returned. Gets all the links associated with the item in the menu model. + @@ -44219,6 +50341,7 @@ does not exist, %NULL is returned. Query the number of items in @model. + the number of items @@ -44235,6 +50358,7 @@ does not exist, %NULL is returned. An immutable #GMenuModel will never emit the #GMenuModel::items-changed signal. Consumers of the model may make optimisations accordingly. + %TRUE if the model is mutable (ie: "items-changed" may be emitted). @@ -44252,6 +50376,7 @@ signal. Consumers of the model may make optimisations accordingly. the item at position @item_index in @model. You must free the iterator with g_object_unref() when you are done. + a new #GMenuAttributeIter @@ -44272,6 +50397,7 @@ You must free the iterator with g_object_unref() when you are done. position @item_index in @model. You must free the iterator with g_object_unref() when you are done. + a new #GMenuLinkIter @@ -44304,6 +50430,7 @@ g_variant_get(), followed by a g_variant_unref(). As such, @format_string must make a complete copy of the data (since the #GVariant may go away after the call to g_variant_unref()). In particular, no '&' characters are allowed in @format_string. + %TRUE if the named attribute was found with the expected type @@ -44344,6 +50471,7 @@ expected type is unspecified) then the value is returned. If the attribute does not exist, or does not match the expected type then %NULL is returned. + the value of the attribute @@ -44374,6 +50502,7 @@ specified by @link. If the link exists, the linked #GMenuModel is returned. If the link does not exist, %NULL is returned. + the linked #GMenuModel, or %NULL @@ -44395,6 +50524,7 @@ does not exist, %NULL is returned. Query the number of items in @model. + the number of items @@ -44411,6 +50541,7 @@ does not exist, %NULL is returned. An immutable #GMenuModel will never emit the #GMenuModel::items-changed signal. Consumers of the model may make optimisations accordingly. + %TRUE if the model is mutable (ie: "items-changed" may be emitted). @@ -44439,6 +50570,7 @@ The implementation must dispatch this call directly from a mainloop entry and not in response to calls -- particularly those from the #GMenuModel API. Said another way: the menu must not change while user code is running without returning to the mainloop. + @@ -44466,6 +50598,7 @@ user code is running without returning to the mainloop. the item at position @item_index in @model. You must free the iterator with g_object_unref() when you are done. + a new #GMenuAttributeIter @@ -44486,6 +50619,7 @@ You must free the iterator with g_object_unref() when you are done. position @item_index in @model. You must free the iterator with g_object_unref() when you are done. + a new #GMenuLinkIter @@ -44548,11 +50682,13 @@ reported. The signal is emitted after the modification. + + %TRUE if the model is mutable (ie: "items-changed" may be emitted). @@ -44568,6 +50704,7 @@ reported. The signal is emitted after the modification. + the number of items @@ -44582,6 +50719,7 @@ reported. The signal is emitted after the modification. + @@ -44606,6 +50744,7 @@ reported. The signal is emitted after the modification. + a new #GMenuAttributeIter @@ -44624,6 +50763,7 @@ reported. The signal is emitted after the modification. + the value of the attribute @@ -44651,6 +50791,7 @@ reported. The signal is emitted after the modification. + @@ -44675,6 +50816,7 @@ reported. The signal is emitted after the modification. + a new #GMenuLinkIter @@ -44693,6 +50835,7 @@ reported. The signal is emitted after the modification. + the linked #GMenuModel, or %NULL @@ -44715,6 +50858,7 @@ reported. The signal is emitted after the modification. + The #GMount interface represents user-visible mounts. Note, when @@ -44731,13 +50875,15 @@ and #GTask. To unmount a #GMount instance, first call g_mount_unmount_with_operation() with (at least) the #GMount instance and a #GAsyncReadyCallback. The callback will be fired when the operation has resolved (either with success or failure), and a -#GAsyncReady structure will be passed to the callback. That +#GAsyncResult structure will be passed to the callback. That callback should then call g_mount_unmount_with_operation_finish() with the #GMount -and the #GAsyncReady data to see if the operation was completed +and the #GAsyncResult data to see if the operation was completed successfully. If an @error is present when g_mount_unmount_with_operation_finish() is called, then it will be filled with any error information. + Checks if @mount can be ejected. + %TRUE if the @mount can be ejected. @@ -44751,6 +50897,7 @@ is called, then it will be filled with any error information. Checks if @mount can be unmounted. + %TRUE if the @mount can be unmounted. @@ -44763,6 +50910,7 @@ is called, then it will be filled with any error information. + @@ -44777,6 +50925,7 @@ is called, then it will be filled with any error information. finished by calling g_mount_eject_finish() with the @mount and #GAsyncResult data returned in the @callback. Use g_mount_eject_with_operation() instead. + @@ -44807,6 +50956,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. Use g_mount_eject_with_operation_finish() instead. + %TRUE if the mount was successfully ejected. %FALSE otherwise. @@ -44826,6 +50976,7 @@ and #GAsyncResult data returned in the @callback. Ejects a mount. This is an asynchronous operation, and is finished by calling g_mount_eject_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback. + @@ -44860,6 +51011,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the mount was successfully ejected. %FALSE otherwise. @@ -44879,6 +51031,7 @@ and #GAsyncResult data returned in the @callback. Gets the default location of @mount. The default location of the given @mount is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume). + a #GFile. The returned object should be unreffed with @@ -44897,8 +51050,10 @@ the home directory, or the root of the volume). This is a convenience method for getting the #GVolume and then using that object to get the #GDrive. - - a #GDrive or %NULL if @mount is not associated with a volume or a drive. + + + a #GDrive or %NULL if @mount is not + associated with a volume or a drive. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -44912,6 +51067,7 @@ using that object to get the #GDrive. Gets the icon for @mount. + a #GIcon. The returned object should be unreffed with @@ -44927,6 +51083,7 @@ using that object to get the #GDrive. Gets the name of @mount. + the name for the given @mount. The returned string should be freed with g_free() @@ -44942,6 +51099,7 @@ using that object to get the #GDrive. Gets the root directory on @mount. + a #GFile. The returned object should be unreffed with @@ -44957,7 +51115,8 @@ using that object to get the #GDrive. Gets the sort key for @mount, if any. - + + Sorting key for @mount or %NULL if no such key is available. @@ -44970,6 +51129,7 @@ using that object to get the #GDrive. Gets the symbolic icon for @mount. + a #GIcon. The returned object should be unreffed with @@ -44988,8 +51148,10 @@ using that object to get the #GDrive. the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available. - - the UUID for @mount or %NULL if no UUID can be computed. + + + the UUID for @mount or %NULL if no UUID + can be computed. The returned string should be freed with g_free() when no longer needed. @@ -45003,8 +51165,10 @@ available. Gets the volume for the @mount. - - a #GVolume or %NULL if @mount is not associated with a volume. + + + a #GVolume or %NULL if @mount is not + associated with a volume. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -45028,6 +51192,7 @@ This is an asynchronous operation (see g_mount_guess_content_type_sync() for the synchronous version), and is finished by calling g_mount_guess_content_type_finish() with the @mount and #GAsyncResult data returned in the @callback. + @@ -45061,6 +51226,7 @@ during the operation, @error will be set to contain the errors and %FALSE will be returned. In particular, you may get an %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content guessing. + a %NULL-terminated array of content types or %NULL on error. Caller should free this array with g_strfreev() when done with it. @@ -45087,8 +51253,9 @@ memory cards. See the [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) specification for more on x-content types. -This is an synchronous operation and as such may block doing IO; +This is a synchronous operation and as such may block doing IO; see g_mount_guess_content_type() for the asynchronous version. + a %NULL-terminated array of content types or %NULL on error. Caller should free this array with g_strfreev() when done with it. @@ -45113,6 +51280,7 @@ see g_mount_guess_content_type() for the asynchronous version. + @@ -45132,6 +51300,7 @@ of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted. + @@ -45166,6 +51335,7 @@ unmounted. Finishes remounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the mount was successfully remounted. %FALSE otherwise. @@ -45186,6 +51356,7 @@ unmounted. finished by calling g_mount_unmount_finish() with the @mount and #GAsyncResult data returned in the @callback. Use g_mount_unmount_with_operation() instead. + @@ -45216,6 +51387,7 @@ and #GAsyncResult data returned in the @callback. Finishes unmounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. Use g_mount_unmount_with_operation_finish() instead. + %TRUE if the mount was successfully unmounted. %FALSE otherwise. @@ -45235,6 +51407,7 @@ and #GAsyncResult data returned in the @callback. Unmounts a mount. This is an asynchronous operation, and is finished by calling g_mount_unmount_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback. + @@ -45269,6 +51442,7 @@ and #GAsyncResult data returned in the @callback. Finishes unmounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the mount was successfully unmounted. %FALSE otherwise. @@ -45285,6 +51459,7 @@ and #GAsyncResult data returned in the @callback. + @@ -45296,6 +51471,7 @@ and #GAsyncResult data returned in the @callback. Checks if @mount can be ejected. + %TRUE if the @mount can be ejected. @@ -45309,6 +51485,7 @@ and #GAsyncResult data returned in the @callback. Checks if @mount can be unmounted. + %TRUE if the @mount can be unmounted. @@ -45325,6 +51502,7 @@ and #GAsyncResult data returned in the @callback. finished by calling g_mount_eject_finish() with the @mount and #GAsyncResult data returned in the @callback. Use g_mount_eject_with_operation() instead. + @@ -45355,6 +51533,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. Use g_mount_eject_with_operation_finish() instead. + %TRUE if the mount was successfully ejected. %FALSE otherwise. @@ -45374,6 +51553,7 @@ and #GAsyncResult data returned in the @callback. Ejects a mount. This is an asynchronous operation, and is finished by calling g_mount_eject_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback. + @@ -45408,6 +51588,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the mount was successfully ejected. %FALSE otherwise. @@ -45427,6 +51608,7 @@ and #GAsyncResult data returned in the @callback. Gets the default location of @mount. The default location of the given @mount is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume). + a #GFile. The returned object should be unreffed with @@ -45445,8 +51627,10 @@ the home directory, or the root of the volume). This is a convenience method for getting the #GVolume and then using that object to get the #GDrive. - - a #GDrive or %NULL if @mount is not associated with a volume or a drive. + + + a #GDrive or %NULL if @mount is not + associated with a volume or a drive. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -45460,6 +51644,7 @@ using that object to get the #GDrive. Gets the icon for @mount. + a #GIcon. The returned object should be unreffed with @@ -45475,6 +51660,7 @@ using that object to get the #GDrive. Gets the name of @mount. + the name for the given @mount. The returned string should be freed with g_free() @@ -45490,6 +51676,7 @@ using that object to get the #GDrive. Gets the root directory on @mount. + a #GFile. The returned object should be unreffed with @@ -45505,7 +51692,8 @@ using that object to get the #GDrive. Gets the sort key for @mount, if any. - + + Sorting key for @mount or %NULL if no such key is available. @@ -45518,6 +51706,7 @@ using that object to get the #GDrive. Gets the symbolic icon for @mount. + a #GIcon. The returned object should be unreffed with @@ -45536,8 +51725,10 @@ using that object to get the #GDrive. the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available. - - the UUID for @mount or %NULL if no UUID can be computed. + + + the UUID for @mount or %NULL if no UUID + can be computed. The returned string should be freed with g_free() when no longer needed. @@ -45551,8 +51742,10 @@ available. Gets the volume for the @mount. - - a #GVolume or %NULL if @mount is not associated with a volume. + + + a #GVolume or %NULL if @mount is not + associated with a volume. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -45576,6 +51769,7 @@ This is an asynchronous operation (see g_mount_guess_content_type_sync() for the synchronous version), and is finished by calling g_mount_guess_content_type_finish() with the @mount and #GAsyncResult data returned in the @callback. + @@ -45609,6 +51803,7 @@ during the operation, @error will be set to contain the errors and %FALSE will be returned. In particular, you may get an %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content guessing. + a %NULL-terminated array of content types or %NULL on error. Caller should free this array with g_strfreev() when done with it. @@ -45635,8 +51830,9 @@ memory cards. See the [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) specification for more on x-content types. -This is an synchronous operation and as such may block doing IO; +This is a synchronous operation and as such may block doing IO; see g_mount_guess_content_type() for the asynchronous version. + a %NULL-terminated array of content types or %NULL on error. Caller should free this array with g_strfreev() when done with it. @@ -45684,6 +51880,7 @@ root) that would shadow the original mount. The proxy monitor in GVfs 2.26 and later, automatically creates and manage shadow mounts (and shadows the underlying mount) if the activation root on a #GVolume is set. + %TRUE if @mount is shadowed. @@ -45705,6 +51902,7 @@ of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted. + @@ -45739,6 +51937,7 @@ unmounted. Finishes remounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the mount was successfully remounted. %FALSE otherwise. @@ -45759,6 +51958,7 @@ unmounted. #GVolumeMonitor implementations when creating a shadow mount for @mount, see g_mount_is_shadowed() for more information. The caller will need to emit the #GMount::changed signal on @mount manually. + @@ -45774,6 +51974,7 @@ will need to emit the #GMount::changed signal on @mount manually. finished by calling g_mount_unmount_finish() with the @mount and #GAsyncResult data returned in the @callback. Use g_mount_unmount_with_operation() instead. + @@ -45804,6 +52005,7 @@ and #GAsyncResult data returned in the @callback. Finishes unmounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. Use g_mount_unmount_with_operation_finish() instead. + %TRUE if the mount was successfully unmounted. %FALSE otherwise. @@ -45823,6 +52025,7 @@ and #GAsyncResult data returned in the @callback. Unmounts a mount. This is an asynchronous operation, and is finished by calling g_mount_unmount_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback. + @@ -45857,6 +52060,7 @@ and #GAsyncResult data returned in the @callback. Finishes unmounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the mount was successfully unmounted. %FALSE otherwise. @@ -45877,6 +52081,7 @@ and #GAsyncResult data returned in the @callback. #GVolumeMonitor implementations when destroying a shadow mount for @mount, see g_mount_is_shadowed() for more information. The caller will need to emit the #GMount::changed signal on @mount manually. + @@ -45894,8 +52099,11 @@ will need to emit the #GMount::changed signal on @mount manually. - This signal is emitted when the #GMount is about to be -unmounted. + This signal may be emitted when the #GMount is about to be +unmounted. + +This signal depends on the backend and is only emitted if +GIO was used to unmount. @@ -45912,12 +52120,14 @@ finalized. Interface for implementing operations for mounts. + The parent interface. + @@ -45930,6 +52140,7 @@ finalized. + @@ -45942,6 +52153,7 @@ finalized. + a #GFile. The returned object should be unreffed with @@ -45958,6 +52170,7 @@ finalized. + the name for the given @mount. The returned string should be freed with g_free() @@ -45974,6 +52187,7 @@ finalized. + a #GIcon. The returned object should be unreffed with @@ -45990,8 +52204,10 @@ finalized. - - the UUID for @mount or %NULL if no UUID can be computed. + + + the UUID for @mount or %NULL if no UUID + can be computed. The returned string should be freed with g_free() when no longer needed. @@ -46006,8 +52222,10 @@ finalized. - - a #GVolume or %NULL if @mount is not associated with a volume. + + + a #GVolume or %NULL if @mount is not + associated with a volume. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -46022,8 +52240,10 @@ finalized. - - a #GDrive or %NULL if @mount is not associated with a volume or a drive. + + + a #GDrive or %NULL if @mount is not + associated with a volume or a drive. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -46038,6 +52258,7 @@ finalized. + %TRUE if the @mount can be unmounted. @@ -46052,6 +52273,7 @@ finalized. + %TRUE if the @mount can be ejected. @@ -46066,6 +52288,7 @@ finalized. + @@ -46095,6 +52318,7 @@ finalized. + %TRUE if the mount was successfully unmounted. %FALSE otherwise. @@ -46113,6 +52337,7 @@ finalized. + @@ -46142,6 +52367,7 @@ finalized. + %TRUE if the mount was successfully ejected. %FALSE otherwise. @@ -46160,6 +52386,7 @@ finalized. + @@ -46194,6 +52421,7 @@ finalized. + %TRUE if the mount was successfully remounted. %FALSE otherwise. @@ -46212,6 +52440,7 @@ finalized. + @@ -46242,6 +52471,7 @@ finalized. + a %NULL-terminated array of content types or %NULL on error. Caller should free this array with g_strfreev() when done with it. @@ -46263,6 +52493,7 @@ finalized. + a %NULL-terminated array of content types or %NULL on error. Caller should free this array with g_strfreev() when done with it. @@ -46289,6 +52520,7 @@ finalized. + @@ -46301,6 +52533,7 @@ finalized. + @@ -46335,6 +52568,7 @@ finalized. + %TRUE if the mount was successfully unmounted. %FALSE otherwise. @@ -46353,6 +52587,7 @@ finalized. + @@ -46387,6 +52622,7 @@ finalized. + %TRUE if the mount was successfully ejected. %FALSE otherwise. @@ -46405,6 +52641,7 @@ finalized. + a #GFile. The returned object should be unreffed with @@ -46421,7 +52658,8 @@ finalized. - + + Sorting key for @mount or %NULL if no such key is available. @@ -46435,6 +52673,7 @@ finalized. + a #GIcon. The returned object should be unreffed with @@ -46471,15 +52710,24 @@ Users should instantiate a subclass of this that implements all the various callbacks to show the required dialogs, such as #GtkMountOperation. If no user interaction is desired (for example when automounting filesystems at login time), usually %NULL can be -passed, see each method taking a #GMountOperation for details. +passed, see each method taking a #GMountOperation for details. + +The term ‘TCRYPT’ is used to mean ‘compatible with TrueCrypt and VeraCrypt’. +[TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for +encrypting file containers, partitions or whole disks, typically used with Windows. +[VeraCrypt](https://www.veracrypt.fr/) is a maintained fork of TrueCrypt with various +improvements and auditing fixes. + Creates a new mount operation. + a #GMountOperation. + @@ -46490,6 +52738,7 @@ passed, see each method taking a #GMountOperation for details. + @@ -46512,23 +52761,32 @@ passed, see each method taking a #GMountOperation for details. + Virtual implementation of #GMountOperation::ask-question. + + a #GMountOperation + string containing a message to display to the user - + an array of + strings for each possible choice + + + Emits the #GMountOperation::reply signal. + @@ -46543,28 +52801,39 @@ passed, see each method taking a #GMountOperation for details. - + + Virtual implementation of #GMountOperation::show-processes. + + a #GMountOperation + string containing a message to display to the user + an array of #GPid for processes blocking + the operation - + - + an array of + strings for each possible choice + + + + @@ -46586,6 +52855,7 @@ passed, see each method taking a #GMountOperation for details. Check to see whether the mount operation is being used for an anonymous user. + %TRUE if mount operation is anonymous. @@ -46599,9 +52869,10 @@ for an anonymous user. Gets a choice from the mount operation. + an integer containing an index of the user's choice from -the choice's list, or %0. +the choice's list, or `0`. @@ -46613,6 +52884,7 @@ the choice's list, or %0. Gets the domain of the mount operation. + a string set to the domain. @@ -46624,8 +52896,39 @@ the choice's list, or %0. + + Check to see whether the mount operation is being used +for a TCRYPT hidden volume. + + + %TRUE if mount operation is for hidden volume. + + + + + a #GMountOperation. + + + + + + Check to see whether the mount operation is being used +for a TCRYPT system volume. + + + %TRUE if mount operation is for system volume. + + + + + a #GMountOperation. + + + + Gets a password from the mount operation. + a string containing the password within @op. @@ -46639,6 +52942,7 @@ the choice's list, or %0. Gets the state of saving passwords for the mount operation. + a #GPasswordSave flag. @@ -46650,8 +52954,23 @@ the choice's list, or %0. + + Gets a PIM from the mount operation. + + + The VeraCrypt PIM within @op. + + + + + a #GMountOperation. + + + + Get the user name from the mount operation. + a string containing the user name. @@ -46665,6 +52984,7 @@ the choice's list, or %0. Emits the #GMountOperation::reply signal. + @@ -46681,6 +53001,7 @@ the choice's list, or %0. Sets the mount operation to use an anonymous user if @anonymous is %TRUE. + @@ -46697,6 +53018,7 @@ the choice's list, or %0. Sets a default choice for the mount operation. + @@ -46713,6 +53035,7 @@ the choice's list, or %0. Sets the mount operation's domain. + @@ -46727,8 +53050,43 @@ the choice's list, or %0. + + Sets the mount operation to use a hidden volume if @hidden_volume is %TRUE. + + + + + + + a #GMountOperation. + + + + boolean value. + + + + + + Sets the mount operation to use a system volume if @system_volume is %TRUE. + + + + + + + a #GMountOperation. + + + + boolean value. + + + + Sets the mount operation's password to @password. + @@ -46745,6 +53103,7 @@ the choice's list, or %0. Sets the state of saving passwords for the mount operation. + @@ -46759,8 +53118,26 @@ the choice's list, or %0. + + Sets the mount operation's PIM to @pim. + + + + + + + a #GMountOperation. + + + + an unsigned integer. + + + + Sets the user name within @op to @username. + @@ -46788,6 +53165,19 @@ mount operation. See the #GMountOperation::ask-question signal. The domain to use for the mount operation. + + Whether the device to be unlocked is a TCRYPT hidden volume. +See [the VeraCrypt documentation](https://www.veracrypt.fr/en/Hidden%20Volume.html). + + + + Whether the device to be unlocked is a TCRYPT system volume. +In this context, a system volume is a volume with a bootloader +and operating system installed. This is only supported for Windows +operating systems. For further documentation, see +[the VeraCrypt documentation](https://www.veracrypt.fr/en/System%20Encryption.html). + + The password that is used for authentication when carrying out the mount operation. @@ -46797,6 +53187,11 @@ the mount operation. Determines if and how the password information should be saved. + + The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See +[the VeraCrypt documentation](https://www.veracrypt.fr/en/Personal%20Iterations%20Multiplier%20(PIM).html). + + The user name that is used for authentication when carrying out the mount operation. @@ -46957,11 +53352,13 @@ primary text in a #GtkMessageDialog. + + @@ -46986,24 +53383,32 @@ primary text in a #GtkMessageDialog. + + a #GMountOperation + string containing a message to display to the user - + an array of + strings for each possible choice + + + + @@ -47021,6 +53426,7 @@ primary text in a #GtkMessageDialog. + @@ -47031,31 +53437,41 @@ primary text in a #GtkMessageDialog. - - + + + + a #GMountOperation + string containing a message to display to the user + an array of #GPid for processes blocking + the operation - + - + an array of + strings for each possible choice + + + + @@ -47077,6 +53493,7 @@ primary text in a #GtkMessageDialog. + @@ -47084,6 +53501,7 @@ primary text in a #GtkMessageDialog. + @@ -47091,6 +53509,7 @@ primary text in a #GtkMessageDialog. + @@ -47098,6 +53517,7 @@ primary text in a #GtkMessageDialog. + @@ -47105,6 +53525,7 @@ primary text in a #GtkMessageDialog. + @@ -47112,6 +53533,7 @@ primary text in a #GtkMessageDialog. + @@ -47119,6 +53541,7 @@ primary text in a #GtkMessageDialog. + @@ -47126,6 +53549,7 @@ primary text in a #GtkMessageDialog. + @@ -47133,6 +53557,7 @@ primary text in a #GtkMessageDialog. + @@ -47140,6 +53565,7 @@ primary text in a #GtkMessageDialog. + #GMountOperationResult is returned as a result when a request for @@ -47167,28 +53593,166 @@ information is send by the mounting operation. file operations on the mount. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extension point for network status monitoring functionality. See [Extending GIO][extending-gio]. + - - An socket address of some unknown native type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A socket address of some unknown native type. + + + + Creates a new #GNativeSocketAddress for @native and @len. + + + a new #GNativeSocketAddress + + + + + a native address object + + + + the length of @native, in bytes + + + + + + + + + + + + + + + + + + + + + + @@ -47208,8 +53772,13 @@ See [Extending GIO][extending-gio]. then attempt to connect to that host, handling the possibility of multiple IP addresses and multiple address families. -See #GSocketConnectable for and example of using the connectable +The enumeration results of resolved addresses *may* be cached as long +as this object is kept alive which may have unexpected results if +alive for too long. + +See #GSocketConnectable for an example of using the connectable interface. + Creates a new #GSocketConnectable for connecting to the given @@ -47220,6 +53789,7 @@ Note that depending on the configuration of the machine, a only, or to both IPv4 and IPv6; use g_network_address_new_loopback() to create a #GNetworkAddress that is guaranteed to resolve to both addresses. + the new #GNetworkAddress @@ -47247,7 +53817,8 @@ g_network_address_new() will often only return an IPv4 address when resolving `localhost`, and an IPv6 address for `localhost6`. g_network_address_get_hostname() will always return `localhost` for -#GNetworkAddresses created with this constructor. +a #GNetworkAddress created with this constructor. + the new #GNetworkAddress @@ -47274,13 +53845,14 @@ If no port is specified in @host_and_port then @default_port will be used as the port number to connect to. In general, @host_and_port is expected to be provided by the user -(allowing them to give the hostname, and a port overide if necessary) +(allowing them to give the hostname, and a port override if necessary) and @default_port is expected to be provided by the application. (The port component of @host_and_port can also be specified as a service name rather than as a numeric port, but this functionality is deprecated, because it depends on the contents of /etc/services, which is generally quite sparse on platforms other than Linux.) + the new #GNetworkAddress, or %NULL on error @@ -47304,6 +53876,7 @@ which is generally quite sparse on platforms other than Linux.) Using this rather than g_network_address_new() or g_network_address_parse() allows #GSocketClient to determine when to use application-specific proxy protocols. + the new #GNetworkAddress, or %NULL on error @@ -47323,6 +53896,7 @@ when to use application-specific proxy protocols. Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded, depending on what @addr was created with. + @addr's hostname @@ -47336,6 +53910,7 @@ depending on what @addr was created with. Gets @addr's port number + @addr's port (which may be 0) @@ -47349,6 +53924,7 @@ depending on what @addr was created with. Gets @addr's scheme + @addr's scheme (%NULL if not built from URI) @@ -47377,11 +53953,13 @@ depending on what @addr was created with. + + The host's network connectivity state, as reported by #GNetworkMonitor. @@ -47411,9 +53989,11 @@ implementations are based on the kernel's netlink interface and on NetworkManager. There is also an implementation for use inside Flatpak sandboxes. + Gets the default #GNetworkMonitor for the system. + a #GNetworkMonitor @@ -47437,6 +54017,7 @@ Note that although this does not attempt to connect to @connectable, it may still block for a brief period of time (eg, trying to do multicast DNS on the local network), so if you do not want to block, you should use g_network_monitor_can_reach_async(). + %TRUE if @connectable is reachable, %FALSE if not. @@ -47466,6 +54047,7 @@ For more details, see g_network_monitor_can_reach(). When the operation is finished, @callback will be called. You can then call g_network_monitor_can_reach_finish() to get the result of the operation. + @@ -47496,6 +54078,7 @@ to get the result of the operation. Finishes an async network connectivity test. See g_network_monitor_can_reach_async(). + %TRUE if network is reachable, %FALSE if not. @@ -47512,6 +54095,7 @@ See g_network_monitor_can_reach_async(). + @@ -47519,7 +54103,7 @@ See g_network_monitor_can_reach_async(). - + @@ -47542,6 +54126,7 @@ Note that although this does not attempt to connect to @connectable, it may still block for a brief period of time (eg, trying to do multicast DNS on the local network), so if you do not want to block, you should use g_network_monitor_can_reach_async(). + %TRUE if @connectable is reachable, %FALSE if not. @@ -47571,6 +54156,7 @@ For more details, see g_network_monitor_can_reach(). When the operation is finished, @callback will be called. You can then call g_network_monitor_can_reach_finish() to get the result of the operation. + @@ -47601,6 +54187,7 @@ to get the result of the operation. Finishes an async network connectivity test. See g_network_monitor_can_reach_async(). + %TRUE if network is reachable, %FALSE if not. @@ -47636,6 +54223,7 @@ Note that in the case of %G_NETWORK_CONNECTIVITY_LIMITED and reachable but others are not. In this case, applications can attempt to connect to remote servers, but should gracefully fall back to their "offline" behavior if the connection attempt fails. + the network connectivity state @@ -47652,6 +54240,7 @@ back to their "offline" behavior if the connection attempt fails. system has a default route available for at least one of IPv4 or IPv6. It does not necessarily imply that the public Internet is reachable. See #GNetworkMonitor:network-available for more details. + whether the network is available @@ -47666,6 +54255,7 @@ reachable. See #GNetworkMonitor:network-available for more details. Checks if the network is metered. See #GNetworkMonitor:network-metered for more details. + whether the connection is metered @@ -47724,16 +54314,12 @@ See also #GNetworkMonitor:network-available. - Emitted when the network configuration changes. If @available is -%TRUE, then some hosts may be reachable that were not reachable -before, while others that were reachable before may no longer be -reachable. If @available is %FALSE, then no remote hosts are -reachable. + Emitted when the network configuration changes. - + the current value of #GNetworkMonitor:network-available @@ -47742,12 +54328,14 @@ reachable. The virtual function table for #GNetworkMonitor. + The parent interface. + @@ -47755,7 +54343,7 @@ reachable. - + @@ -47763,6 +54351,7 @@ reachable. + %TRUE if @connectable is reachable, %FALSE if not. @@ -47785,6 +54374,7 @@ reachable. + @@ -47815,6 +54405,7 @@ reachable. + %TRUE if network is reachable, %FALSE if not. @@ -47840,13 +54431,15 @@ service priority/weighting, multiple IP addresses, and multiple address families. See #GSrvTarget for more information about SRV records, and see -#GSocketConnectable for and example of using the connectable +#GSocketConnectable for an example of using the connectable interface. + Creates a new #GNetworkService representing the given @service, @protocol, and @domain. This will initially be unresolved; use the #GSocketConnectable interface to resolve it. + a new #GNetworkService @@ -47869,6 +54462,7 @@ interface. Gets the domain that @srv serves. This might be either UTF-8 or ASCII-encoded, depending on what @srv was created with. + @srv's domain name @@ -47882,6 +54476,7 @@ ASCII-encoded, depending on what @srv was created with. Gets @srv's protocol name (eg, "tcp"). + @srv's protocol name @@ -47896,6 +54491,7 @@ ASCII-encoded, depending on what @srv was created with. Get's the URI scheme used to resolve proxies. By default, the service name is used as scheme. + @srv's scheme name @@ -47909,6 +54505,7 @@ is used as scheme. Gets @srv's service name (eg, "ldap"). + @srv's service name @@ -47923,6 +54520,7 @@ is used as scheme. Set's the URI scheme used to resolve proxies. By default, the service name is used as scheme. + @@ -47957,11 +54555,13 @@ is used as scheme. + + #GNotification is a mechanism for creating a notification to be shown @@ -47992,6 +54592,7 @@ After populating @notification with more details, it can be sent to the desktop shell with g_application_send_notification(). Changing any properties after this call will not have any effect until resending @notification. + a new #GNotification instance @@ -48012,6 +54613,7 @@ its parameter. See g_action_parse_detailed_name() for a description of the format for @detailed_action. + @@ -48038,6 +54640,7 @@ If @target_format is given, it is used to collect remaining positional parameters into a #GVariant instance, similar to g_variant_new(). @action will be activated with that #GVariant as its parameter. + @@ -48070,6 +54673,7 @@ parameter. If @target is non-%NULL, @action will be activated with @target as its parameter. + @@ -48094,6 +54698,7 @@ its parameter. Sets the body of @notification to @body. + @@ -48120,6 +54725,7 @@ for @detailed_action. When no default action is set, the application that the notification was sent on is activated. + @@ -48146,6 +54752,7 @@ parameter. When no default action is set, the application that the notification was sent on is activated. + @@ -48178,6 +54785,7 @@ its parameter. When no default action is set, the application that the notification was sent on is activated. + @@ -48198,6 +54806,7 @@ was sent on is activated. Sets the icon of @notification to @icon. + @@ -48215,6 +54824,7 @@ was sent on is activated. Sets the priority of @notification to @priority. See #GNotificationPriority for possible values. + @@ -48231,6 +54841,7 @@ was sent on is activated. Sets the title of @notification to @title. + @@ -48245,8 +54856,11 @@ was sent on is activated. - + Deprecated in favor of g_notification_set_priority(). + Since 2.42, this has been deprecated in favour of + g_notification_set_priority(). + @@ -48285,6 +54899,27 @@ was sent on is activated. or emergency warnings) + + + + + + + + + + + + + + + + + + + + + Structure used for scatter/gather data output when sending multiple messages or packets in one go. You generally pass in an array of @@ -48293,6 +54928,7 @@ were one buffer. If @address is %NULL then the message is sent to the default receiver (as previously set by g_socket_connect()). + a #GSocketAddress, or %NULL @@ -48334,6 +54970,7 @@ See the documentation for #GIOStream for details of thread safety of streaming APIs. All of these functions have async variants too. + Requests an asynchronous close of the stream, releasing resources related to it. When the operation is finished @callback will be @@ -48345,6 +54982,7 @@ For behaviour details see g_output_stream_close(). The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -48373,6 +55011,7 @@ classes. However, if you override one you must override all. Closes an output stream. + %TRUE if stream was successfully closed, %FALSE otherwise. @@ -48389,6 +55028,7 @@ classes. However, if you override one you must override all. + @@ -48411,6 +55051,7 @@ This function is optional for inherited classes. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on success, %FALSE on error @@ -48434,6 +55075,7 @@ For behaviour details see g_output_stream_flush(). When the operation is finished @callback will be called. You can then call g_output_stream_flush_finish() to get the result of the operation. + @@ -48462,6 +55104,7 @@ result of the operation. Finishes flushing an output stream. + %TRUE if flush operation succeeded, %FALSE otherwise. @@ -48479,6 +55122,7 @@ result of the operation. Splices an input stream into an output stream. + a #gssize containing the size of the data spliced, or -1 if an error occurred. Note that if the number of bytes @@ -48514,6 +55158,7 @@ result of the operation. For the synchronous, blocking version of this function, see g_output_stream_splice(). + @@ -48550,6 +55195,7 @@ g_output_stream_splice(). Finishes an asynchronous stream splice operation. + a #gssize of the number of bytes spliced. Note that if the number of bytes spliced is greater than %G_MAXSSIZE, then that @@ -48604,6 +55250,7 @@ Note that no copy of @buffer will be made, so it must stay valid until @callback is called. See g_output_stream_write_bytes_async() for a #GBytes version that will automatically hold a reference to the contents (without copying) for the duration of the call. + @@ -48642,6 +55289,7 @@ the contents (without copying) for the duration of the call. Finishes a stream write operation. + a #gssize containing the number of bytes written to the stream. @@ -48678,6 +55326,7 @@ operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. + Number of bytes written, or -1 on error @@ -48703,8 +55352,154 @@ On error -1 is returned and @error is set accordingly. + + Request an asynchronous write of the bytes contained in @n_vectors @vectors into +the stream. When the operation is finished @callback will be called. +You can then call g_output_stream_writev_finish() to get the result of the +operation. + +During an async request no other sync and async calls are allowed, +and will result in %G_IO_ERROR_PENDING errors. + +On success, the number of bytes written will be passed to the +@callback. It is not an error if this is not the same as the +requested size, as it can happen e.g. on a partial I/O error, +but generally we try to write as many bytes as requested. + +You are guaranteed that this method will never fail with +%G_IO_ERROR_WOULD_BLOCK — if @stream can't accept more data, the +method will just wait until this changes. + +Any outstanding I/O request with higher priority (lower numerical +value) will be executed before an outstanding request with lower +priority. Default priority is %G_PRIORITY_DEFAULT. + +The asynchronous methods have a default fallback that uses threads +to implement asynchronicity, so they are optional for inheriting +classes. However, if you override one you must override all. + +For the synchronous, blocking version of this function, see +g_output_stream_writev(). + +Note that no copy of @vectors will be made, so it must stay valid +until @callback is called. + + + + + + + A #GOutputStream. + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + the I/O priority of the request. + + + + optional #GCancellable object, %NULL to ignore. + + + + callback to call when the request is satisfied + + + + the data to pass to callback function + + + + + + Finishes a stream writev operation. + + + %TRUE on success, %FALSE if there was an error + + + + + a #GOutputStream. + + + + a #GAsyncResult. + + + + location to store the number of bytes that were written to the stream + + + + + + Tries to write the bytes contained in the @n_vectors @vectors into the +stream. Will block during the operation. + +If @n_vectors is 0 or the sum of all bytes in @vectors is 0, returns 0 and +does nothing. + +On success, the number of bytes written to the stream is returned. +It is not an error if this is not the same as the requested size, as it +can happen e.g. on a partial I/O error, or if there is not enough +storage in the stream. All writes block until at least one byte +is written or an error occurs; 0 is never returned (unless +@n_vectors is 0 or the sum of all bytes in @vectors is 0). + +If @cancellable is not %NULL, then the operation can be cancelled by +triggering the cancellable object from another thread. If the operation +was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an +operation was partially finished when the operation was cancelled the +partial result will be returned, without an error. + +Some implementations of g_output_stream_writev() may have limitations on the +aggregate buffer size, and will return %G_IO_ERROR_INVALID_ARGUMENT if these +are exceeded. For example, when writing to a local file on UNIX platforms, +the aggregate buffer size must not exceed %G_MAXSSIZE bytes. + + + %TRUE on success, %FALSE if there was an error + + + + + a #GOutputStream. + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + location to store the number of bytes that were + written to the stream + + + + optional cancellable object + + + + Clears the pending flag on @stream. + @@ -48745,6 +55540,7 @@ Cancelling a close will still leave the stream closed, but there some streams can use a faster close that doesn't block to e.g. check errors. On cancellation (as with any error) there is no guarantee that all written data will reach the target. + %TRUE on success, %FALSE on failure @@ -48771,6 +55567,7 @@ For behaviour details see g_output_stream_close(). The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all. + @@ -48799,6 +55596,7 @@ classes. However, if you override one you must override all. Closes an output stream. + %TRUE if stream was successfully closed, %FALSE otherwise. @@ -48824,6 +55622,7 @@ This function is optional for inherited classes. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE on success, %FALSE on error @@ -48847,6 +55646,7 @@ For behaviour details see g_output_stream_flush(). When the operation is finished @callback will be called. You can then call g_output_stream_flush_finish() to get the result of the operation. + @@ -48875,6 +55675,7 @@ result of the operation. Finishes flushing an output stream. + %TRUE if flush operation succeeded, %FALSE otherwise. @@ -48892,6 +55693,7 @@ result of the operation. Checks if an output stream has pending actions. + %TRUE if @stream has pending actions. @@ -48905,6 +55707,7 @@ result of the operation. Checks if an output stream has already been closed. + %TRUE if @stream is closed. %FALSE otherwise. @@ -48921,6 +55724,7 @@ result of the operation. used inside e.g. a flush implementation to see if the flush (or other i/o operation) is called from within the closing operation. + %TRUE if @stream is being closed. %FALSE otherwise. @@ -48945,6 +55749,7 @@ function due to the variable length of the written string, if you need precise control over partial write failures, you need to create you own printf()-like wrapper around g_output_stream_write() or g_output_stream_write_all(). + %TRUE on success, %FALSE if there was an error @@ -48954,7 +55759,7 @@ or g_output_stream_write_all(). a #GOutputStream. - + location to store the number of bytes that was written to the stream @@ -48981,6 +55786,7 @@ or g_output_stream_write_all(). Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return %FALSE and set @error. + %TRUE if pending was previously unset and is now set. @@ -48994,6 +55800,7 @@ already set or @stream is closed, it will return %FALSE and set Splices an input stream into an output stream. + a #gssize containing the size of the data spliced, or -1 if an error occurred. Note that if the number of bytes @@ -49029,6 +55836,7 @@ result of the operation. For the synchronous, blocking version of this function, see g_output_stream_splice(). + @@ -49065,6 +55873,7 @@ g_output_stream_splice(). Finishes an asynchronous stream splice operation. + a #gssize of the number of bytes spliced. Note that if the number of bytes spliced is greater than %G_MAXSSIZE, then that @@ -49096,6 +55905,7 @@ function due to the variable length of the written string, if you need precise control over partial write failures, you need to create you own printf()-like wrapper around g_output_stream_write() or g_output_stream_write_all(). + %TRUE on success, %FALSE if there was an error @@ -49105,7 +55915,7 @@ or g_output_stream_write_all(). a #GOutputStream. - + location to store the number of bytes that was written to the stream @@ -49149,6 +55959,7 @@ operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and @error is set accordingly. + Number of bytes written, or -1 on error @@ -49194,6 +56005,7 @@ successfully written before the error was encountered. This functionality is only available from C. If you need it from another language then you must write your own loop around g_output_stream_write(). + %TRUE on success, %FALSE if there was an error @@ -49213,7 +56025,7 @@ g_output_stream_write(). the number of bytes to write - + location to store the number of bytes that was written to the stream @@ -49240,6 +56052,7 @@ priority. Default priority is %G_PRIORITY_DEFAULT. Note that no copy of @buffer will be made, so it must stay valid until @callback is called. + @@ -49287,6 +56100,7 @@ successfully written before the error was encountered. This functionality is only available from C. If you need it from another language then you must write your own loop around g_output_stream_write_async(). + %TRUE on success, %FALSE if there was an error @@ -49300,7 +56114,7 @@ g_output_stream_write_async(). a #GAsyncResult - + location to store the number of bytes that was written to the stream @@ -49342,6 +56156,7 @@ Note that no copy of @buffer will be made, so it must stay valid until @callback is called. See g_output_stream_write_bytes_async() for a #GBytes version that will automatically hold a reference to the contents (without copying) for the duration of the call. + @@ -49390,6 +56205,7 @@ writing, you will need to create a new #GBytes containing just the remaining bytes, using g_bytes_new_from_bytes(). Passing the same #GBytes instance multiple times potentially can result in duplicated data in the output stream. + Number of bytes written, or -1 on error @@ -49423,6 +56239,7 @@ data in the output stream. For the synchronous, blocking version of this function, see g_output_stream_write_bytes(). + @@ -49455,6 +56272,7 @@ g_output_stream_write_bytes(). Finishes a stream write-from-#GBytes operation. + a #gssize containing the number of bytes written to the stream. @@ -49472,6 +56290,7 @@ g_output_stream_write_bytes(). Finishes a stream write operation. + a #gssize containing the number of bytes written to the stream. @@ -49487,6 +56306,290 @@ g_output_stream_write_bytes(). + + Tries to write the bytes contained in the @n_vectors @vectors into the +stream. Will block during the operation. + +If @n_vectors is 0 or the sum of all bytes in @vectors is 0, returns 0 and +does nothing. + +On success, the number of bytes written to the stream is returned. +It is not an error if this is not the same as the requested size, as it +can happen e.g. on a partial I/O error, or if there is not enough +storage in the stream. All writes block until at least one byte +is written or an error occurs; 0 is never returned (unless +@n_vectors is 0 or the sum of all bytes in @vectors is 0). + +If @cancellable is not %NULL, then the operation can be cancelled by +triggering the cancellable object from another thread. If the operation +was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an +operation was partially finished when the operation was cancelled the +partial result will be returned, without an error. + +Some implementations of g_output_stream_writev() may have limitations on the +aggregate buffer size, and will return %G_IO_ERROR_INVALID_ARGUMENT if these +are exceeded. For example, when writing to a local file on UNIX platforms, +the aggregate buffer size must not exceed %G_MAXSSIZE bytes. + + + %TRUE on success, %FALSE if there was an error + + + + + a #GOutputStream. + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + location to store the number of bytes that were + written to the stream + + + + optional cancellable object + + + + + + Tries to write the bytes contained in the @n_vectors @vectors into the +stream. Will block during the operation. + +This function is similar to g_output_stream_writev(), except it tries to +write as many bytes as requested, only stopping on an error. + +On a successful write of all @n_vectors vectors, %TRUE is returned, and +@bytes_written is set to the sum of all the sizes of @vectors. + +If there is an error during the operation %FALSE is returned and @error +is set to indicate the error status. + +As a special exception to the normal conventions for functions that +use #GError, if this function returns %FALSE (and sets @error) then +@bytes_written will be set to the number of bytes that were +successfully written before the error was encountered. This +functionality is only available from C. If you need it from another +language then you must write your own loop around +g_output_stream_write(). + +The content of the individual elements of @vectors might be changed by this +function. + + + %TRUE on success, %FALSE if there was an error + + + + + a #GOutputStream. + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + location to store the number of bytes that were + written to the stream + + + + optional #GCancellable object, %NULL to ignore. + + + + + + Request an asynchronous write of the bytes contained in the @n_vectors @vectors into +the stream. When the operation is finished @callback will be called. +You can then call g_output_stream_writev_all_finish() to get the result of the +operation. + +This is the asynchronous version of g_output_stream_writev_all(). + +Call g_output_stream_writev_all_finish() to collect the result. + +Any outstanding I/O request with higher priority (lower numerical +value) will be executed before an outstanding request with lower +priority. Default priority is %G_PRIORITY_DEFAULT. + +Note that no copy of @vectors will be made, so it must stay valid +until @callback is called. The content of the individual elements +of @vectors might be changed by this function. + + + + + + + A #GOutputStream + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + the I/O priority of the request + + + + optional #GCancellable object, %NULL to ignore + + + + callback to call when the request is satisfied + + + + the data to pass to callback function + + + + + + Finishes an asynchronous stream write operation started with +g_output_stream_writev_all_async(). + +As a special exception to the normal conventions for functions that +use #GError, if this function returns %FALSE (and sets @error) then +@bytes_written will be set to the number of bytes that were +successfully written before the error was encountered. This +functionality is only available from C. If you need it from another +language then you must write your own loop around +g_output_stream_writev_async(). + + + %TRUE on success, %FALSE if there was an error + + + + + a #GOutputStream + + + + a #GAsyncResult + + + + location to store the number of bytes that were written to the stream + + + + + + Request an asynchronous write of the bytes contained in @n_vectors @vectors into +the stream. When the operation is finished @callback will be called. +You can then call g_output_stream_writev_finish() to get the result of the +operation. + +During an async request no other sync and async calls are allowed, +and will result in %G_IO_ERROR_PENDING errors. + +On success, the number of bytes written will be passed to the +@callback. It is not an error if this is not the same as the +requested size, as it can happen e.g. on a partial I/O error, +but generally we try to write as many bytes as requested. + +You are guaranteed that this method will never fail with +%G_IO_ERROR_WOULD_BLOCK — if @stream can't accept more data, the +method will just wait until this changes. + +Any outstanding I/O request with higher priority (lower numerical +value) will be executed before an outstanding request with lower +priority. Default priority is %G_PRIORITY_DEFAULT. + +The asynchronous methods have a default fallback that uses threads +to implement asynchronicity, so they are optional for inheriting +classes. However, if you override one you must override all. + +For the synchronous, blocking version of this function, see +g_output_stream_writev(). + +Note that no copy of @vectors will be made, so it must stay valid +until @callback is called. + + + + + + + A #GOutputStream. + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + the I/O priority of the request. + + + + optional #GCancellable object, %NULL to ignore. + + + + callback to call when the request is satisfied + + + + the data to pass to callback function + + + + + + Finishes a stream writev operation. + + + %TRUE on success, %FALSE if there was an error + + + + + a #GOutputStream. + + + + a #GAsyncResult. + + + + location to store the number of bytes that were written to the stream + + + + @@ -49495,11 +56598,13 @@ g_output_stream_write_bytes(). + + Number of bytes written, or -1 on error @@ -49528,6 +56633,7 @@ g_output_stream_write_bytes(). + a #gssize containing the size of the data spliced, or -1 if an error occurred. Note that if the number of bytes @@ -49558,6 +56664,7 @@ g_output_stream_write_bytes(). + %TRUE on success, %FALSE on error @@ -49576,6 +56683,7 @@ g_output_stream_write_bytes(). + @@ -49591,6 +56699,7 @@ g_output_stream_write_bytes(). + @@ -49630,6 +56739,7 @@ g_output_stream_write_bytes(). + a #gssize containing the number of bytes written to the stream. @@ -49648,6 +56758,7 @@ g_output_stream_write_bytes(). + @@ -49685,6 +56796,7 @@ g_output_stream_write_bytes(). + a #gssize of the number of bytes spliced. Note that if the number of bytes spliced is greater than %G_MAXSSIZE, then that @@ -49706,6 +56818,7 @@ g_output_stream_write_bytes(). + @@ -49735,6 +56848,7 @@ g_output_stream_write_bytes(). + %TRUE if flush operation succeeded, %FALSE otherwise. @@ -49753,6 +56867,7 @@ g_output_stream_write_bytes(). + @@ -49782,6 +56897,7 @@ g_output_stream_write_bytes(). + %TRUE if stream was successfully closed, %FALSE otherwise. @@ -49798,29 +56914,106 @@ g_output_stream_write_bytes(). - - + + + - + %TRUE on success, %FALSE if there was an error + + + + a #GOutputStream. + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + location to store the number of bytes that were + written to the stream + + + + optional cancellable object + + + - - + + + + + + A #GOutputStream. + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + the I/O priority of the request. + + + + optional #GCancellable object, %NULL to ignore. + + + + callback to call when the request is satisfied + + + + the data to pass to callback function + + + - - + + + - + %TRUE on success, %FALSE if there was an error + + + + a #GOutputStream. + + + + a #GAsyncResult. + + + + location to store the number of bytes that were written to the stream + + + + @@ -49828,6 +57021,7 @@ g_output_stream_write_bytes(). + @@ -49835,6 +57029,7 @@ g_output_stream_write_bytes(). + @@ -49842,6 +57037,7 @@ g_output_stream_write_bytes(). + @@ -49849,6 +57045,7 @@ g_output_stream_write_bytes(). + @@ -49856,6 +57053,7 @@ g_output_stream_write_bytes(). + GOutputStreamSpliceFlags determine how streams should be spliced. @@ -49876,6 +57074,7 @@ g_output_stream_write_bytes(). You generally pass in an array of #GOutputVectors and the operation will use all the buffers as if they were one buffer. + Pointer to a buffer of data to read. @@ -49885,16 +57084,144 @@ one buffer. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extension point for proxy functionality. See [Extending GIO][extending-gio]. + + + + + + + + + + + + + + + Extension point for proxy resolving functionality. See [Extending GIO][extending-gio]. + + + + + + + + #GPasswordSave is used to indicate the lifespan of a saved password. @@ -49926,6 +57253,7 @@ user to write to a #GSettings object. This #GPermission object could then be used to decide if it is appropriate to show a "Click here to unlock" button in a dialog and to provide the mechanism to invoke when that button is clicked. + Attempts to acquire the permission represented by @permission. @@ -49942,6 +57270,7 @@ If the permission is acquired then %TRUE is returned. Otherwise, This call is blocking, likely for a very long time (in the case that user interaction is required). See g_permission_acquire_async() for the non-blocking version. + %TRUE if the permission was successfully acquired @@ -49962,6 +57291,7 @@ the non-blocking version. This is the first half of the asynchronous version of g_permission_acquire(). + @@ -49990,6 +57320,7 @@ represented by @permission. This is the second half of the asynchronous version of g_permission_acquire(). + %TRUE if the permission was successfully acquired @@ -50021,6 +57352,7 @@ If the permission is released then %TRUE is returned. Otherwise, This call is blocking, likely for a very long time (in the case that user interaction is required). See g_permission_release_async() for the non-blocking version. + %TRUE if the permission was successfully released @@ -50041,6 +57373,7 @@ the non-blocking version. This is the first half of the asynchronous version of g_permission_release(). + @@ -50069,6 +57402,7 @@ represented by @permission. This is the second half of the asynchronous version of g_permission_release(). + %TRUE if the permission was successfully released @@ -50100,6 +57434,7 @@ If the permission is acquired then %TRUE is returned. Otherwise, This call is blocking, likely for a very long time (in the case that user interaction is required). See g_permission_acquire_async() for the non-blocking version. + %TRUE if the permission was successfully acquired @@ -50120,6 +57455,7 @@ the non-blocking version. This is the first half of the asynchronous version of g_permission_acquire(). + @@ -50148,6 +57484,7 @@ represented by @permission. This is the second half of the asynchronous version of g_permission_acquire(). + %TRUE if the permission was successfully acquired @@ -50167,6 +57504,7 @@ g_permission_acquire(). Gets the value of the 'allowed' property. This property is %TRUE if the caller currently has permission to perform the action that @permission represents the permission to perform. + the value of the 'allowed' property @@ -50182,6 +57520,7 @@ the caller currently has permission to perform the action that Gets the value of the 'can-acquire' property. This property is %TRUE if it is generally possible to acquire the permission by calling g_permission_acquire(). + the value of the 'can-acquire' property @@ -50197,6 +57536,7 @@ g_permission_acquire(). Gets the value of the 'can-release' property. This property is %TRUE if it is generally possible to release the permission by calling g_permission_release(). + the value of the 'can-release' property @@ -50214,6 +57554,7 @@ the properties of the permission. You should never call this function except from a #GPermission implementation. GObject notify signals are generated, as appropriate. + @@ -50252,6 +57593,7 @@ If the permission is released then %TRUE is returned. Otherwise, This call is blocking, likely for a very long time (in the case that user interaction is required). See g_permission_release_async() for the non-blocking version. + %TRUE if the permission was successfully released @@ -50272,6 +57614,7 @@ the non-blocking version. This is the first half of the asynchronous version of g_permission_release(). + @@ -50300,6 +57643,7 @@ represented by @permission. This is the second half of the asynchronous version of g_permission_release(). + %TRUE if the permission was successfully released @@ -50338,11 +57682,13 @@ g_permission_release(). + + %TRUE if the permission was successfully acquired @@ -50361,6 +57707,7 @@ g_permission_release(). + @@ -50386,6 +57733,7 @@ g_permission_release(). + %TRUE if the permission was successfully acquired @@ -50404,6 +57752,7 @@ g_permission_release(). + %TRUE if the permission was successfully released @@ -50422,6 +57771,7 @@ g_permission_release(). + @@ -50447,6 +57797,7 @@ g_permission_release(). + %TRUE if the permission was successfully released @@ -50464,18 +57815,20 @@ g_permission_release(). - + + #GPollableInputStream is implemented by #GInputStreams that can be polled for readiness to read. This can be used when interfacing with a non-GIO API that expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style. + Checks if @stream is actually pollable. Some classes may implement @@ -50485,6 +57838,7 @@ other #GPollableInputStream methods is undefined. For any given stream, the value returned by this method is constant; a stream cannot switch from pollable to non-pollable or vice versa. + %TRUE if @stream is pollable, %FALSE if not. @@ -50505,6 +57859,7 @@ As with g_pollable_input_stream_is_readable(), it is possible that the stream may not actually be readable even after the source triggers, so you should use g_pollable_input_stream_read_nonblocking() rather than g_input_stream_read() from the callback. + a new #GSource @@ -50529,6 +57884,7 @@ after this returns %TRUE would still block. To guarantee non-blocking behavior, you should always use g_pollable_input_stream_read_nonblocking(), which will return a %G_IO_ERROR_WOULD_BLOCK error rather than blocking. + %TRUE if @stream is readable, %FALSE if not. If an error has occurred on @stream, this will result in @@ -50555,6 +57911,7 @@ use @cancellable to cancel it. However, it will return an error if @cancellable has already been cancelled when you call, which may happen if you call this method after a source triggers due to having been cancelled. + the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK). @@ -50586,6 +57943,7 @@ other #GPollableInputStream methods is undefined. For any given stream, the value returned by this method is constant; a stream cannot switch from pollable to non-pollable or vice versa. + %TRUE if @stream is pollable, %FALSE if not. @@ -50606,6 +57964,7 @@ As with g_pollable_input_stream_is_readable(), it is possible that the stream may not actually be readable even after the source triggers, so you should use g_pollable_input_stream_read_nonblocking() rather than g_input_stream_read() from the callback. + a new #GSource @@ -50630,6 +57989,7 @@ after this returns %TRUE would still block. To guarantee non-blocking behavior, you should always use g_pollable_input_stream_read_nonblocking(), which will return a %G_IO_ERROR_WOULD_BLOCK error rather than blocking. + %TRUE if @stream is readable, %FALSE if not. If an error has occurred on @stream, this will result in @@ -50656,6 +58016,7 @@ use @cancellable to cancel it. However, it will return an error if @cancellable has already been cancelled when you call, which may happen if you call this method after a source triggers due to having been cancelled. + the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK). @@ -50695,12 +58056,14 @@ g_input_stream_read() if it returns %TRUE. This means you only need to override it if it is possible that your @is_readable implementation may return %TRUE when the stream is not actually readable. + The parent interface. + %TRUE if @stream is pollable, %FALSE if not. @@ -50715,6 +58078,7 @@ readable. + %TRUE if @stream is readable, %FALSE if not. If an error has occurred on @stream, this will result in @@ -50732,6 +58096,7 @@ readable. + a new #GSource @@ -50750,6 +58115,7 @@ readable. + the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK). @@ -50780,6 +58146,7 @@ readable. can be polled for readiness to write. This can be used when interfacing with a non-GIO API that expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style. + Checks if @stream is actually pollable. Some classes may implement @@ -50789,6 +58156,7 @@ of other #GPollableOutputStream methods is undefined. For any given stream, the value returned by this method is constant; a stream cannot switch from pollable to non-pollable or vice versa. + %TRUE if @stream is pollable, %FALSE if not. @@ -50809,6 +58177,7 @@ As with g_pollable_output_stream_is_writable(), it is possible that the stream may not actually be writable even after the source triggers, so you should use g_pollable_output_stream_write_nonblocking() rather than g_output_stream_write() from the callback. + a new #GSource @@ -50833,6 +58202,7 @@ after this returns %TRUE would still block. To guarantee non-blocking behavior, you should always use g_pollable_output_stream_write_nonblocking(), which will return a %G_IO_ERROR_WOULD_BLOCK error rather than blocking. + %TRUE if @stream is writable, %FALSE if not. If an error has occurred on @stream, this will result in @@ -50858,7 +58228,12 @@ Note that since this method never blocks, you cannot actually use @cancellable to cancel it. However, it will return an error if @cancellable has already been cancelled when you call, which may happen if you call this method after a source triggers due -to having been cancelled. +to having been cancelled. + +Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying +transports like D/TLS require that you re-send the same @buffer and +@count in the next write call. + the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK). @@ -50882,6 +58257,53 @@ to having been cancelled. + + Attempts to write the bytes contained in the @n_vectors @vectors to @stream, +as with g_output_stream_writev(). If @stream is not currently writable, +this will immediately return %@G_POLLABLE_RETURN_WOULD_BLOCK, and you can +use g_pollable_output_stream_create_source() to create a #GSource +that will be triggered when @stream is writable. @error will *not* be +set in that case. + +Note that since this method never blocks, you cannot actually +use @cancellable to cancel it. However, it will return an error +if @cancellable has already been cancelled when you call, which +may happen if you call this method after a source triggers due +to having been cancelled. + +Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying +transports like D/TLS require that you re-send the same @vectors and +@n_vectors in the next write call. + + + %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK +if the stream is not currently writable (and @error is *not* set), or +%G_POLLABLE_RETURN_FAILED if there was an error in which case @error will +be set. + + + + + a #GPollableOutputStream + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + location to store the number of bytes that were + written to the stream + + + + Checks if @stream is actually pollable. Some classes may implement #GPollableOutputStream but have only certain instances of that @@ -50890,6 +58312,7 @@ of other #GPollableOutputStream methods is undefined. For any given stream, the value returned by this method is constant; a stream cannot switch from pollable to non-pollable or vice versa. + %TRUE if @stream is pollable, %FALSE if not. @@ -50910,6 +58333,7 @@ As with g_pollable_output_stream_is_writable(), it is possible that the stream may not actually be writable even after the source triggers, so you should use g_pollable_output_stream_write_nonblocking() rather than g_output_stream_write() from the callback. + a new #GSource @@ -50934,6 +58358,7 @@ after this returns %TRUE would still block. To guarantee non-blocking behavior, you should always use g_pollable_output_stream_write_nonblocking(), which will return a %G_IO_ERROR_WOULD_BLOCK error rather than blocking. + %TRUE if @stream is writable, %FALSE if not. If an error has occurred on @stream, this will result in @@ -50959,7 +58384,12 @@ Note that since this method never blocks, you cannot actually use @cancellable to cancel it. However, it will return an error if @cancellable has already been cancelled when you call, which may happen if you call this method after a source triggers due -to having been cancelled. +to having been cancelled. + +Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying +transports like D/TLS require that you re-send the same @buffer and +@count in the next write call. + the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK). @@ -50987,6 +58417,57 @@ to having been cancelled. + + Attempts to write the bytes contained in the @n_vectors @vectors to @stream, +as with g_output_stream_writev(). If @stream is not currently writable, +this will immediately return %@G_POLLABLE_RETURN_WOULD_BLOCK, and you can +use g_pollable_output_stream_create_source() to create a #GSource +that will be triggered when @stream is writable. @error will *not* be +set in that case. + +Note that since this method never blocks, you cannot actually +use @cancellable to cancel it. However, it will return an error +if @cancellable has already been cancelled when you call, which +may happen if you call this method after a source triggers due +to having been cancelled. + +Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying +transports like D/TLS require that you re-send the same @vectors and +@n_vectors in the next write call. + + + %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK +if the stream is not currently writable (and @error is *not* set), or +%G_POLLABLE_RETURN_FAILED if there was an error in which case @error will +be set. + + + + + a #GPollableOutputStream + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + location to store the number of bytes that were + written to the stream + + + + a #GCancellable, or %NULL + + + + The interface for pollable output streams. @@ -50998,13 +58479,21 @@ g_pollable_output_stream_is_writable(), and then calls g_output_stream_write() if it returns %TRUE. This means you only need to override it if it is possible that your @is_writable implementation may return %TRUE when the stream is not actually -writable. +writable. + +The default implementation of @writev_nonblocking calls +g_pollable_output_stream_write_nonblocking() for each vector, and converts +its return value and error (if set) to a #GPollableReturn. You should +override this where possible to avoid having to allocate a #GError to return +%G_IO_ERROR_WOULD_BLOCK. + The parent interface. + %TRUE if @stream is pollable, %FALSE if not. @@ -51019,6 +58508,7 @@ writable. + %TRUE if @stream is writable, %FALSE if not. If an error has occurred on @stream, this will result in @@ -51036,6 +58526,7 @@ writable. + a new #GSource @@ -51054,6 +58545,7 @@ writable. + the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK). @@ -51078,11 +58570,65 @@ writable. + + + + + %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK +if the stream is not currently writable (and @error is *not* set), or +%G_POLLABLE_RETURN_FAILED if there was an error in which case @error will +be set. + + + + + a #GPollableOutputStream + + + + the buffer containing the #GOutputVectors to write. + + + + + + the number of vectors to write + + + + location to store the number of bytes that were + written to the stream + + + + + + + Return value for various IO operations that signal errors via the +return value and not necessarily via a #GError. + +This enum exists to be able to return errors to callers without having to +allocate a #GError. Allocating #GErrors can be quite expensive for +regularly happening errors like %G_IO_ERROR_WOULD_BLOCK. + +In case of %G_POLLABLE_RETURN_FAILED a #GError should be set for the +operation to give details about the error that happened. + + Generic error condition for when an operation fails. + + + The operation was successfully finished. + + + The operation would block. + + This is the function type of the callback used for the #GSource returned by g_pollable_input_stream_create_source() and g_pollable_output_stream_create_source(). + it should return %FALSE if the source should be removed. @@ -51160,6 +58706,7 @@ construct-only). This function takes a reference on @object and doesn't release it until the action is destroyed. + a new #GPropertyAction @@ -51232,9 +58779,11 @@ The extensions are named after their proxy protocol name. As an example, a SOCKS5 proxy implementation can be retrieved with the name 'socks5' using the function g_io_extension_point_get_extension_by_name(). + - Lookup "gio-proxy" extension point for a proxy implementation that supports -specified protocol. + Find the `gio-proxy` extension point for a proxy implementation that supports +the specified protocol. + return a #GProxy or NULL if protocol is not supported. @@ -51252,6 +58801,7 @@ specified protocol. #GSocketConnection that is connected to the proxy server), this does the necessary handshake to connect to @proxy_address, and if required, wraps the #GIOStream to handle proxy payload. + a #GIOStream that will replace @connection. This might be the same as @connection, in which case a reference @@ -51279,6 +58829,7 @@ required, wraps the #GIOStream to handle proxy payload. Asynchronous version of g_proxy_connect(). + @@ -51311,6 +58862,7 @@ required, wraps the #GIOStream to handle proxy payload. See g_proxy_connect(). + a #GIOStream. @@ -51334,6 +58886,7 @@ implementing such a protocol. When %FALSE is returned, the caller should resolve the destination hostname first, and then pass a #GProxyAddress containing the stringified IP address to g_proxy_connect() or g_proxy_connect_async(). + %TRUE if hostname resolution is supported. @@ -51350,6 +58903,7 @@ g_proxy_connect() or g_proxy_connect_async(). #GSocketConnection that is connected to the proxy server), this does the necessary handshake to connect to @proxy_address, and if required, wraps the #GIOStream to handle proxy payload. + a #GIOStream that will replace @connection. This might be the same as @connection, in which case a reference @@ -51377,6 +58931,7 @@ required, wraps the #GIOStream to handle proxy payload. Asynchronous version of g_proxy_connect(). + @@ -51409,6 +58964,7 @@ required, wraps the #GIOStream to handle proxy payload. See g_proxy_connect(). + a #GIOStream. @@ -51432,6 +58988,7 @@ implementing such a protocol. When %FALSE is returned, the caller should resolve the destination hostname first, and then pass a #GProxyAddress containing the stringified IP address to g_proxy_connect() or g_proxy_connect_async(). + %TRUE if hostname resolution is supported. @@ -51446,6 +59003,7 @@ g_proxy_connect() or g_proxy_connect_async(). Support for proxied #GInetSocketAddress. + Creates a new #GProxyAddress for @inetaddr with @protocol that should @@ -51454,6 +59012,7 @@ tunnel through @dest_hostname and @dest_port. (Note that this method doesn't set the #GProxyAddress:uri or #GProxyAddress:destination-protocol fields; use g_object_new() directly if you want to set those.) + a new #GProxyAddress @@ -51495,6 +59054,7 @@ directly if you want to set those.) Gets @proxy's destination hostname; that is, the name of the host that will be connected to via the proxy, not the name of the proxy itself. + the @proxy's destination hostname @@ -51510,6 +59070,7 @@ itself. Gets @proxy's destination port; that is, the port on the destination host that will be connected to via the proxy, not the port number of the proxy itself. + the @proxy's destination port @@ -51524,6 +59085,7 @@ port number of the proxy itself. Gets the protocol that is being spoken to the destination server; eg, "http" or "ftp". + the @proxy's destination protocol @@ -51537,6 +59099,7 @@ server; eg, "http" or "ftp". Gets @proxy's password. + the @proxy's password @@ -51550,6 +59113,7 @@ server; eg, "http" or "ftp". Gets @proxy's protocol. eg, "socks" or "http" + the @proxy's protocol @@ -51563,6 +59127,7 @@ server; eg, "http" or "ftp". Gets the proxy URI that @proxy was constructed from. + the @proxy's URI, or %NULL if unknown @@ -51576,6 +59141,7 @@ server; eg, "http" or "ftp". Gets @proxy's username. + the @proxy's username @@ -51621,14 +59187,22 @@ if the creator didn't specify this). Class structure for #GProxyAddress. + - A subclass of #GSocketAddressEnumerator that takes another address -enumerator and wraps its results in #GProxyAddress<!-- -->es as -directed by the default #GProxyResolver. + #GProxyAddressEnumerator is a wrapper around #GSocketAddressEnumerator which +takes the #GSocketAddress instances returned by the #GSocketAddressEnumerator +and wraps them in #GProxyAddress instances, using the given +#GProxyAddressEnumerator:proxy-resolver. + +This enumerator will be returned (for example, by +g_socket_connectable_enumerate()) as appropriate when a proxy is configured; +there should be no need to manually wrap a #GSocketAddressEnumerator instance +with one. + @@ -51644,19 +59218,22 @@ specify one. - + - + - + Class structure for #GProxyAddressEnumerator. + + + @@ -51664,6 +59241,7 @@ specify one. + @@ -51671,6 +59249,7 @@ specify one. + @@ -51678,6 +59257,7 @@ specify one. + @@ -51685,6 +59265,7 @@ specify one. + @@ -51692,6 +59273,7 @@ specify one. + @@ -51699,6 +59281,7 @@ specify one. + @@ -51706,17 +59289,21 @@ specify one. + + Provides an interface for handling proxy connection and payload. + The parent interface. + a #GIOStream that will replace @connection. This might be the same as @connection, in which case a reference @@ -51745,6 +59332,7 @@ specify one. + @@ -51778,6 +59366,7 @@ specify one. + a #GIOStream. @@ -51796,6 +59385,7 @@ specify one. + %TRUE if hostname resolution is supported. @@ -51817,8 +59407,10 @@ the method g_socket_connectable_proxy_enumerate(). Implementations of #GProxyResolver based on libproxy and GNOME settings can be found in glib-networking. GIO comes with an implementation for use inside Flatpak portals. + Gets the default #GProxyResolver for the system. + the default #GProxyResolver. @@ -51828,6 +59420,7 @@ Flatpak portals. Checks if @resolver can be used on this system. (This is used internally; g_proxy_resolver_get_default() will only return a proxy resolver that returns %TRUE for this method.) + %TRUE if @resolver is supported. @@ -51855,6 +59448,7 @@ In this case, the resolver might still return a generic proxy type `direct://` is used when no proxy is needed. Direct connection should not be attempted unless it is part of the returned array of proxies. + A NULL-terminated array of proxy URIs. Must be freed @@ -51881,6 +59475,7 @@ returned array of proxies. Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more details. + @@ -51911,6 +59506,7 @@ details. Call this function to obtain the array of proxy URIs when g_proxy_resolver_lookup_async() is complete. See g_proxy_resolver_lookup() for more details. + A NULL-terminated array of proxy URIs. Must be freed @@ -51934,6 +59530,7 @@ g_proxy_resolver_lookup() for more details. Checks if @resolver can be used on this system. (This is used internally; g_proxy_resolver_get_default() will only return a proxy resolver that returns %TRUE for this method.) + %TRUE if @resolver is supported. @@ -51961,6 +59558,7 @@ In this case, the resolver might still return a generic proxy type `direct://` is used when no proxy is needed. Direct connection should not be attempted unless it is part of the returned array of proxies. + A NULL-terminated array of proxy URIs. Must be freed @@ -51987,6 +59585,7 @@ returned array of proxies. Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more details. + @@ -52017,6 +59616,7 @@ details. Call this function to obtain the array of proxy URIs when g_proxy_resolver_lookup_async() is complete. See g_proxy_resolver_lookup() for more details. + A NULL-terminated array of proxy URIs. Must be freed @@ -52039,12 +59639,14 @@ g_proxy_resolver_lookup() for more details. The virtual function table for #GProxyResolver. + The parent interface. + %TRUE if @resolver is supported. @@ -52059,6 +59661,7 @@ g_proxy_resolver_lookup() for more details. + A NULL-terminated array of proxy URIs. Must be freed @@ -52085,6 +59688,7 @@ g_proxy_resolver_lookup() for more details. + @@ -52114,6 +59718,7 @@ g_proxy_resolver_lookup() for more details. + A NULL-terminated array of proxy URIs. Must be freed @@ -52135,11 +59740,47 @@ g_proxy_resolver_lookup() for more details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Changes the size of the memory block pointed to by @data to @size bytes. The function should have the same semantics as realloc(). + a pointer to the reallocated memory @@ -52155,7 +59796,7 @@ The function should have the same semantics as realloc(). - + The GRemoteActionGroup interface is implemented by #GActionGroup instances that either transmit action invocations to other processes or receive action invocations in the local process from other @@ -52177,6 +59818,7 @@ the exported #GActionGroup implements #GRemoteActionGroup and use the `_full` variants of the calls if available. This provides a mechanism by which to receive platform data for action invocations that arrive by way of D-Bus. + Activates the remote action. @@ -52188,6 +59830,7 @@ interaction timestamp or startup notification information. @platform_data must be non-%NULL and must have the type %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. + @@ -52220,6 +59863,7 @@ user interaction timestamp or startup notification information. @platform_data must be non-%NULL and must have the type %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. + @@ -52252,6 +59896,7 @@ interaction timestamp or startup notification information. @platform_data must be non-%NULL and must have the type %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. + @@ -52284,6 +59929,7 @@ user interaction timestamp or startup notification information. @platform_data must be non-%NULL and must have the type %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. + @@ -52309,11 +59955,13 @@ user interaction timestamp or startup notification information. The virtual function table for #GRemoteActionGroup. + + @@ -52339,6 +59987,7 @@ user interaction timestamp or startup notification information. + @@ -52372,11 +60021,13 @@ g_resolver_lookup_by_name() and their async variants) and SRV #GNetworkAddress and #GNetworkService provide wrappers around #GResolver functionality that also implement #GSocketConnectable, making it easy to connect to a remote host/service. + Frees @addresses (which should be the return value from g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()). (This is a convenience method; you can also simply free the results by hand.) + @@ -52394,6 +60045,7 @@ by hand.) g_resolver_lookup_service() or g_resolver_lookup_service_finish()). (This is a convenience method; you can also simply free the results by hand.) + @@ -52410,6 +60062,7 @@ results by hand.) Gets the default #GResolver. You should unref it when you are done with it. #GResolver may use its reference count as a hint about how many threads it should allocate for concurrent DNS resolutions. + the default #GResolver. @@ -52425,6 +60078,7 @@ a value from #GResolverError. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED. + a hostname (either ASCII-only, or in ASCII-encoded form), or %NULL on error. @@ -52449,6 +60103,7 @@ operation, in which case @error (if non-%NULL) will be set to Begins asynchronously reverse-resolving @address to determine its associated hostname, and eventually calls @callback, which must call g_resolver_lookup_by_address_finish() to get the final result. + @@ -52482,6 +60137,7 @@ g_resolver_lookup_by_address_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + a hostname (either ASCII-only, or in ASCII-encoded form), or %NULL on error. @@ -52522,6 +60178,7 @@ operation, in which case @error (if non-%NULL) will be set to If you are planning to connect to a socket on the resolved IP address, it may be easier to create a #GNetworkAddress and use its #GSocketConnectable interface. + a non-empty #GList of #GInetAddress, or %NULL on error. You @@ -52551,6 +60208,7 @@ done with it. (You can use g_resolver_free_addresses() to do this.) associated IP address(es), and eventually calls @callback, which must call g_resolver_lookup_by_name_finish() to get the result. See g_resolver_lookup_by_name() for more details. + @@ -52584,6 +60242,103 @@ g_resolver_lookup_by_name_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + + + a #GList +of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() +for more details. + + + + + + + a #GResolver + + + + the result passed to your #GAsyncReadyCallback + + + + + + This differs from g_resolver_lookup_by_name() in that you can modify +the lookup behavior with @flags. For example this can be used to limit +results with #G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY. + + + a non-empty #GList +of #GInetAddress, or %NULL on error. You +must unref each of the addresses and free the list when you are +done with it. (You can use g_resolver_free_addresses() to do this.) + + + + + + + a #GResolver + + + + the hostname to look up + + + + extra #GResolverNameLookupFlags for the lookup + + + + a #GCancellable, or %NULL + + + + + + Begins asynchronously resolving @hostname to determine its +associated IP address(es), and eventually calls @callback, which +must call g_resolver_lookup_by_name_with_flags_finish() to get the result. +See g_resolver_lookup_by_name() for more details. + + + + + + + a #GResolver + + + + the hostname to look up the address of + + + + extra #GResolverNameLookupFlags for the lookup + + + + a #GCancellable, or %NULL + + + + callback to call after resolution completes + + + + data for @callback + + + + + + Retrieves the result of a call to +g_resolver_lookup_by_name_with_flags_async(). + +If the DNS resolution failed, @error (if non-%NULL) will be set to +a value from #GResolverError. If the operation was cancelled, +@error will be set to %G_IO_ERROR_CANCELLED. + a #GList of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() @@ -52614,6 +60369,7 @@ a value from #GResolverError and %NULL will be returned. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED. + a non-empty #GList of #GVariant, or %NULL on error. You must free each of the records and the list @@ -52629,11 +60385,11 @@ g_variant_unref() to do this.) - the DNS name to lookup the record for + the DNS name to look up the record for - the type of DNS record to lookup + the type of DNS record to look up @@ -52647,6 +60403,7 @@ g_variant_unref() to do this.) @rrname, and eventually calls @callback, which must call g_resolver_lookup_records_finish() to get the final result. See g_resolver_lookup_records() for more details. + @@ -52656,11 +60413,11 @@ g_resolver_lookup_records() for more details. - the DNS name to lookup the record for + the DNS name to look up the record for - the type of DNS record to lookup + the type of DNS record to look up @@ -52686,6 +60443,7 @@ records contain. If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + a non-empty #GList of #GVariant, or %NULL on error. You must free each of the records and the list @@ -52707,6 +60465,7 @@ g_variant_unref() to do this.) + @@ -52725,6 +60484,7 @@ g_variant_unref() to do this.) + @@ -52753,6 +60513,7 @@ g_resolver_lookup_service_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + a non-empty #GList of #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more @@ -52773,6 +60534,7 @@ details. + @@ -52792,6 +60554,7 @@ a value from #GResolverError. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED. + a hostname (either ASCII-only, or in ASCII-encoded form), or %NULL on error. @@ -52816,6 +60579,7 @@ operation, in which case @error (if non-%NULL) will be set to Begins asynchronously reverse-resolving @address to determine its associated hostname, and eventually calls @callback, which must call g_resolver_lookup_by_address_finish() to get the final result. + @@ -52849,6 +60613,7 @@ g_resolver_lookup_by_address_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + a hostname (either ASCII-only, or in ASCII-encoded form), or %NULL on error. @@ -52889,6 +60654,7 @@ operation, in which case @error (if non-%NULL) will be set to If you are planning to connect to a socket on the resolved IP address, it may be easier to create a #GNetworkAddress and use its #GSocketConnectable interface. + a non-empty #GList of #GInetAddress, or %NULL on error. You @@ -52918,6 +60684,7 @@ done with it. (You can use g_resolver_free_addresses() to do this.) associated IP address(es), and eventually calls @callback, which must call g_resolver_lookup_by_name_finish() to get the result. See g_resolver_lookup_by_name() for more details. + @@ -52951,6 +60718,103 @@ g_resolver_lookup_by_name_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + + + a #GList +of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() +for more details. + + + + + + + a #GResolver + + + + the result passed to your #GAsyncReadyCallback + + + + + + This differs from g_resolver_lookup_by_name() in that you can modify +the lookup behavior with @flags. For example this can be used to limit +results with #G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY. + + + a non-empty #GList +of #GInetAddress, or %NULL on error. You +must unref each of the addresses and free the list when you are +done with it. (You can use g_resolver_free_addresses() to do this.) + + + + + + + a #GResolver + + + + the hostname to look up + + + + extra #GResolverNameLookupFlags for the lookup + + + + a #GCancellable, or %NULL + + + + + + Begins asynchronously resolving @hostname to determine its +associated IP address(es), and eventually calls @callback, which +must call g_resolver_lookup_by_name_with_flags_finish() to get the result. +See g_resolver_lookup_by_name() for more details. + + + + + + + a #GResolver + + + + the hostname to look up the address of + + + + extra #GResolverNameLookupFlags for the lookup + + + + a #GCancellable, or %NULL + + + + callback to call after resolution completes + + + + data for @callback + + + + + + Retrieves the result of a call to +g_resolver_lookup_by_name_with_flags_async(). + +If the DNS resolution failed, @error (if non-%NULL) will be set to +a value from #GResolverError. If the operation was cancelled, +@error will be set to %G_IO_ERROR_CANCELLED. + a #GList of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() @@ -52981,6 +60845,7 @@ a value from #GResolverError and %NULL will be returned. If @cancellable is non-%NULL, it can be used to cancel the operation, in which case @error (if non-%NULL) will be set to %G_IO_ERROR_CANCELLED. + a non-empty #GList of #GVariant, or %NULL on error. You must free each of the records and the list @@ -52996,11 +60861,11 @@ g_variant_unref() to do this.) - the DNS name to lookup the record for + the DNS name to look up the record for - the type of DNS record to lookup + the type of DNS record to look up @@ -53014,6 +60879,7 @@ g_variant_unref() to do this.) @rrname, and eventually calls @callback, which must call g_resolver_lookup_records_finish() to get the final result. See g_resolver_lookup_records() for more details. + @@ -53023,11 +60889,11 @@ g_resolver_lookup_records() for more details. - the DNS name to lookup the record for + the DNS name to look up the record for - the type of DNS record to lookup + the type of DNS record to look up @@ -53053,6 +60919,7 @@ records contain. If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + a non-empty #GList of #GVariant, or %NULL on error. You must free each of the records and the list @@ -53095,6 +60962,7 @@ operation, in which case @error (if non-%NULL) will be set to If you are planning to connect to the service, it is usually easier to create a #GNetworkService and use its #GSocketConnectable interface. + a non-empty #GList of #GSrvTarget, or %NULL on error. You must free each of the targets and the @@ -53133,6 +61001,7 @@ this.) @callback, which must call g_resolver_lookup_service_finish() to get the final result. See g_resolver_lookup_service() for more details. + @@ -53174,6 +61043,7 @@ g_resolver_lookup_service_async(). If the DNS resolution failed, @error (if non-%NULL) will be set to a value from #GResolverError. If the operation was cancelled, @error will be set to %G_IO_ERROR_CANCELLED. + a non-empty #GList of #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more @@ -53203,6 +61073,7 @@ caching or "pinning"; it can implement its own #GResolver that calls the original default resolver for DNS operations, and implements its own cache policies on top of that, and then set itself as the default resolver for all later code to use. + @@ -53228,11 +61099,13 @@ configuration has changed. + + @@ -53245,6 +61118,7 @@ configuration has changed. + a non-empty #GList of #GInetAddress, or %NULL on error. You @@ -53272,6 +61146,7 @@ done with it. (You can use g_resolver_free_addresses() to do this.) + @@ -53301,6 +61176,7 @@ done with it. (You can use g_resolver_free_addresses() to do this.) + a #GList of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() @@ -53323,6 +61199,7 @@ for more details. + a hostname (either ASCII-only, or in ASCII-encoded form), or %NULL on error. @@ -53346,6 +61223,7 @@ for more details. + @@ -53375,6 +61253,7 @@ for more details. + a hostname (either ASCII-only, or in ASCII-encoded form), or %NULL on error. @@ -53394,6 +61273,7 @@ form), or %NULL on error. + @@ -53414,6 +61294,7 @@ form), or %NULL on error. + @@ -53438,6 +61319,7 @@ form), or %NULL on error. + a non-empty #GList of #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more @@ -53460,6 +61342,7 @@ details. + a non-empty #GList of #GVariant, or %NULL on error. You must free each of the records and the list @@ -53475,11 +61358,11 @@ g_variant_unref() to do this.) - the DNS name to lookup the record for + the DNS name to look up the record for - the type of DNS record to lookup + the type of DNS record to look up @@ -53491,6 +61374,7 @@ g_variant_unref() to do this.) + @@ -53500,11 +61384,11 @@ g_variant_unref() to do this.) - the DNS name to lookup the record for + the DNS name to look up the record for - the type of DNS record to lookup + the type of DNS record to look up @@ -53524,6 +61408,7 @@ g_variant_unref() to do this.) + a non-empty #GList of #GVariant, or %NULL on error. You must free each of the records and the list @@ -53545,25 +61430,93 @@ g_variant_unref() to do this.) - - + + + + + + a #GResolver + + + + the hostname to look up the address of + + + + extra #GResolverNameLookupFlags for the lookup + + + + a #GCancellable, or %NULL + + + + callback to call after resolution completes + + + + data for @callback + + + - - - - + + + + + a #GList +of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() +for more details. + + + + + + a #GResolver + + + + the result passed to your #GAsyncReadyCallback + + + - - - - + + + + + a non-empty #GList +of #GInetAddress, or %NULL on error. You +must unref each of the addresses and free the list when you are +done with it. (You can use g_resolver_free_addresses() to do this.) + + + + + + a #GResolver + + + + the hostname to look up + + + + extra #GResolverNameLookupFlags for the lookup + + + + a #GCancellable, or %NULL + + + @@ -53589,7 +61542,20 @@ from a #GResolver routine. + + Flags to modify lookup behavior. + + default behavior (same as g_resolver_lookup_by_name()) + + + only resolve ipv4 addresses + + + only resolve ipv6 addresses + + + The type of record that g_resolver_lookup_records() or @@ -53598,38 +61564,44 @@ as lists of #GVariant tuples. Each record type has different values in the variant tuples returned. %G_RESOLVER_RECORD_SRV records are returned as variants with the signature -'(qqqs)', containing a guint16 with the priority, a guint16 with the -weight, a guint16 with the port, and a string of the hostname. +`(qqqs)`, containing a `guint16` with the priority, a `guint16` with the +weight, a `guint16` with the port, and a string of the hostname. %G_RESOLVER_RECORD_MX records are returned as variants with the signature -'(qs)', representing a guint16 with the preference, and a string containing +`(qs)`, representing a `guint16` with the preference, and a string containing the mail exchanger hostname. %G_RESOLVER_RECORD_TXT records are returned as variants with the signature -'(as)', representing an array of the strings in the text record. +`(as)`, representing an array of the strings in the text record. Note: Most TXT +records only contain a single string, but +[RFC 1035](https://tools.ietf.org/html/rfc1035#section-3.3.14) does allow a +record to contain multiple strings. The RFC which defines the interpretation +of a specific TXT record will likely require concatenation of multiple +strings if they are present, as with +[RFC 7208](https://tools.ietf.org/html/rfc7208#section-3.3). %G_RESOLVER_RECORD_SOA records are returned as variants with the signature -'(ssuuuuu)', representing a string containing the primary name server, a -string containing the administrator, the serial as a guint32, the refresh -interval as guint32, the retry interval as a guint32, the expire timeout -as a guint32, and the ttl as a guint32. +`(ssuuuuu)`, representing a string containing the primary name server, a +string containing the administrator, the serial as a `guint32`, the refresh +interval as a `guint32`, the retry interval as a `guint32`, the expire timeout +as a `guint32`, and the TTL as a `guint32`. %G_RESOLVER_RECORD_NS records are returned as variants with the signature -'(s)', representing a string of the hostname of the name server. +`(s)`, representing a string of the hostname of the name server. - lookup DNS SRV records for a domain + look up DNS SRV records for a domain - lookup DNS MX records for a domain + look up DNS MX records for a domain - lookup DNS TXT records for a name + look up DNS TXT records for a name - lookup DNS SOA records for a zone + look up DNS SOA records for a zone - lookup DNS NS records for a domain + look up DNS NS records for a domain @@ -53663,7 +61635,7 @@ the preprocessing step is skipped. `to-pixdata` which will use the gdk-pixbuf-pixdata command to convert images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside -the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata +the resource file, rather than an (uncompressed) copy of it. For this, the gdk-pixbuf-pixdata program must be in the PATH, or the `GDK_PIXBUF_PIXDATA` environment variable must be set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will abort. @@ -53736,7 +61708,7 @@ are for your own resources, and resource data is often used once, during parsing When debugging a program or testing a change to an installed version, it is often useful to be able to replace resources in the program or library, without recompiling, for debugging or quick hacking and testing purposes. Since GLib 2.50, it is possible to use the `G_RESOURCE_OVERLAYS` environment variable to selectively overlay -resources with replacements from the filesystem. It is a colon-separated list of substitutions to perform +resources with replacements from the filesystem. It is a %G_SEARCHPATH_SEPARATOR-separated list of substitutions to perform during resource lookups. A substitution has the form @@ -53758,13 +61730,21 @@ version will be used instead. Whiteouts are not currently supported. Substitutions must start with a slash, and must not contain a trailing slash before the '='. The path after the slash should ideally be absolute, but this is not strictly required. It is possible to overlay the location of a single resource with an individual file. + Creates a GResource from a reference to the binary resource bundle. This will keep a reference to @data while the resource lives, so the data should not be modified or freed. If you want to use this resource in the global resource namespace you need -to register it with g_resources_register(). +to register it with g_resources_register(). + +Note: @data must be backed by memory that is at least pointer aligned. +Otherwise this function will internally create a copy of the memory since +GLib 2.56, or in older versions fail and exit the process. + +If @data is empty or corrupt, %G_RESOURCE_ERROR_INTERNAL will be returned. + a new #GResource, or %NULL on error @@ -53780,6 +61760,7 @@ to register it with g_resources_register(). Registers the resource with the process-global set of resources. Once a resource is registered the files in it can be accessed with the global resource lookup functions like g_resources_lookup_data(). + @@ -53792,6 +61773,7 @@ with the global resource lookup functions like g_resources_lookup_data(). Unregisters the resource from the process-global set of resources. + @@ -53811,6 +61793,7 @@ If @path is invalid or does not exist in the #GResource, %G_RESOURCE_ERROR_NOT_FOUND will be returned. @lookup_flags controls the behaviour of the lookup. + an array of constant strings @@ -53837,6 +61820,7 @@ If @path is invalid or does not exist in the #GResource, if found returns information about it. @lookup_flags controls the behaviour of the lookup. + %TRUE if the file was found. %FALSE if there were errors @@ -53881,6 +61865,7 @@ in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data. @lookup_flags controls the behaviour of the lookup. + #GBytes or %NULL on error. Free the returned object with g_bytes_unref() @@ -53906,6 +61891,7 @@ the heap and automatically uncompress the data. returns a #GInputStream that lets you read the data. @lookup_flags controls the behaviour of the lookup. + #GInputStream or %NULL on error. Free the returned object with g_object_unref() @@ -53929,6 +61915,7 @@ returns a #GInputStream that lets you read the data. Atomically increments the reference count of @resource by one. This function is MT-safe and may be called from any thread. + The passed in #GResource @@ -53945,6 +61932,7 @@ function is MT-safe and may be called from any thread. reference count drops to 0, all memory allocated by the resource is released. This function is MT-safe and may be called from any thread. + @@ -53960,7 +61948,13 @@ thread. you to query it for data. If you want to use this resource in the global resource namespace you need -to register it with g_resources_register(). +to register it with g_resources_register(). + +If @filename is empty or the data in it is corrupt, +%G_RESOURCE_ERROR_INTERNAL will be returned. If @filename doesn’t exist, or +there is an error in reading it, an error from g_mapped_file_new() will be +returned. + a new #GResource, or %NULL on error @@ -53968,7 +61962,7 @@ to register it with g_resources_register(). the path of a filename to load, in the GLib filename encoding - + @@ -54006,10 +62000,347 @@ bundle. No flags set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extension point for #GSettingsBackend functionality. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #GSeekable is implemented by streams (implementations of #GInputStream or #GOutputStream) that support seeking. @@ -54018,15 +62349,17 @@ Seekable streams largely fall into two categories: resizable and fixed-size. #GSeekable on fixed-sized streams is approximately the same as POSIX -lseek() on a block device (for example: attmepting to seek past the +lseek() on a block device (for example: attempting to seek past the end of the device is an error). Fixed streams typically cannot be truncated. #GSeekable on resizable streams is approximately the same as POSIX lseek() on a normal file. Seeking past the end and writing data will usually cause the stream to resize by introducing zero bytes. + Tests if the stream supports the #GSeekableIface. + %TRUE if @seekable can be seeked. %FALSE otherwise. @@ -54039,7 +62372,9 @@ usually cause the stream to resize by introducing zero bytes. - Tests if the stream can be truncated. + Tests if the length of the stream can be adjusted with +g_seekable_truncate(). + %TRUE if the stream can be truncated, %FALSE otherwise. @@ -54066,6 +62401,7 @@ Any operation that would result in a negative offset will fail. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -54093,6 +62429,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Tells the current position within the stream. + the offset from the beginning of the buffer. @@ -54105,13 +62442,16 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. - Truncates a stream with a given #offset. + Sets the length of the stream to @offset. If the stream was previously +larger than @offset, the extra data is discarded. If the stream was +previouly shorter than @offset, it is extended with NUL ('\0') bytes. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -54124,7 +62464,7 @@ partial result will be returned, without an error. - a #goffset. + new length for @seekable, in bytes. @@ -54135,6 +62475,7 @@ partial result will be returned, without an error. Tests if the stream supports the #GSeekableIface. + %TRUE if @seekable can be seeked. %FALSE otherwise. @@ -54147,7 +62488,9 @@ partial result will be returned, without an error. - Tests if the stream can be truncated. + Tests if the length of the stream can be adjusted with +g_seekable_truncate(). + %TRUE if the stream can be truncated, %FALSE otherwise. @@ -54174,6 +62517,7 @@ Any operation that would result in a negative offset will fail. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -54201,6 +62545,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Tells the current position within the stream. + the offset from the beginning of the buffer. @@ -54213,13 +62558,16 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. - Truncates a stream with a given #offset. + Sets the length of the stream to @offset. If the stream was previously +larger than @offset, the extra data is discarded. If the stream was +previouly shorter than @offset, it is extended with NUL ('\0') bytes. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -54232,7 +62580,7 @@ partial result will be returned, without an error. - a #goffset. + new length for @seekable, in bytes. @@ -54244,12 +62592,14 @@ partial result will be returned, without an error. Provides an interface for implementing seekable functionality on I/O Streams. + The parent interface. + the offset from the beginning of the buffer. @@ -54264,6 +62614,7 @@ partial result will be returned, without an error. + %TRUE if @seekable can be seeked. %FALSE otherwise. @@ -54278,6 +62629,7 @@ partial result will be returned, without an error. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -54306,6 +62658,7 @@ partial result will be returned, without an error. + %TRUE if the stream can be truncated, %FALSE otherwise. @@ -54320,6 +62673,7 @@ partial result will be returned, without an error. + %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error @@ -54332,7 +62686,7 @@ partial result will be returned, without an error. - a #goffset. + new length for @seekable, in bytes. @@ -54368,7 +62722,7 @@ When creating a GSettings instance, you have to specify a schema that describes the keys in your settings and their types and default values, as well as some other information. -Normally, a schema has as fixed path that determines where the settings +Normally, a schema has a fixed path that determines where the settings are stored in the conceptual global tree of settings. However, schemas can also be '[relocatable][gsettings-relocatable]', i.e. not equipped with a fixed path. This is @@ -54465,6 +62819,11 @@ An example for default value: <default>(20,30)</default> </key> + <key name="empty-string" type="s"> + <default>""</default> + <summary>Empty strings have to be provided in GVariant form</summary> + </key> + </schema> </schemalist> ]| @@ -54626,6 +62985,7 @@ which are specified in `gsettings_ENUM_FILES`. This will generate a automatically included in the schema compilation, install and uninstall rules. It should not be committed to version control or included in `EXTRA_DIST`. + Creates a new #GSettings object with the schema specified by @schema_id. @@ -54634,6 +62994,7 @@ Signals on the newly created #GSettings object will be dispatched via the thread-default #GMainContext in effect at the time of the call to g_settings_new(). The new #GSettings will hold a reference on the context. See g_main_context_push_thread_default(). + a new #GSettings object @@ -54669,6 +63030,7 @@ If @path is %NULL then the path from the schema is used. It is an error if @path is %NULL and the schema has no path of its own or if @path is non-%NULL and not equal to the path that the schema does have. + a new #GSettings object @@ -54697,6 +63059,7 @@ settings from a database other than the usual one. For example, it may make sense to pass a backend corresponding to the "defaults" settings database on the system to get a settings object that modifies the system default settings instead of the settings for this user. + a new #GSettings object @@ -54718,6 +63081,7 @@ settings instead of the settings for this user. This is a mix of g_settings_new_with_backend() and g_settings_new_with_path(). + a new #GSettings object @@ -54751,6 +63115,7 @@ has an explicitly specified path. It is a programmer error if @path is not a valid path. A valid path begins and ends with '/' and does not contain two consecutive '/' characters. + a new #GSettings object @@ -54767,27 +63132,29 @@ characters. - <!-- --> + Deprecated. Use g_settings_schema_source_list_schemas() instead + a list of relocatable - #GSettings schemas that are available. The list must not be - modified or freed. + #GSettings schemas that are available, in no defined order. The list must + not be modified or freed. - <!-- --> + Deprecated. Use g_settings_schema_source_list_schemas() instead. If you used g_settings_list_schemas() to check for the presence of a particular schema, use g_settings_schema_source_lookup() instead of your whole loop. + a list of #GSettings - schemas that are available. The list must not be modified or - freed. + schemas that are available, in no defined order. The list must not be + modified or freed. @@ -54804,6 +63171,7 @@ This call will block until all of the writes have made it to the backend. Since the mainloop is not running, no change notifications will be dispatched during this call (but some may be queued by the time the call is done). + @@ -54814,6 +63182,7 @@ time the call is done). Note that bindings are automatically removed when the object is finalized, so it is rarely necessary to call this function. + @@ -54829,6 +63198,7 @@ function. + @@ -54845,6 +63215,7 @@ function. + @@ -54858,6 +63229,7 @@ function. + @@ -54871,6 +63243,7 @@ function. + @@ -54888,6 +63261,7 @@ function. function does nothing unless @settings is in 'delay-apply' mode; see g_settings_delay(). In the normal case settings are always applied immediately. + @@ -54915,10 +63289,11 @@ function also establishes a binding between the writability of a boolean property by that name). See g_settings_bind_writable() for more details about writable bindings. -Note that the lifecycle of the binding is tied to the object, +Note that the lifecycle of the binding is tied to @object, and that you can have only one binding per object property. If you bind the same property twice on the same object, the second binding overrides the first one. + @@ -54952,10 +63327,11 @@ and the property @property of @object. The binding uses the provided mapping functions to map between settings and property values. -Note that the lifecycle of the binding is tied to the object, +Note that the lifecycle of the binding is tied to @object, and that you can have only one binding per object property. If you bind the same property twice on the same object, the second binding overrides the first one. + @@ -55014,10 +63390,11 @@ When the @inverted argument is %TRUE, the binding inverts the value as it passes from the setting to the object, i.e. @property will be set to %TRUE if the key is not writable. -Note that the lifecycle of the binding is tied to the object, +Note that the lifecycle of the binding is tied to @object, and that you can have only one binding per object property. If you bind the same property twice on the same object, the second binding overrides the first one. + @@ -55059,6 +63436,7 @@ For boolean-valued keys, action activations take no parameter and result in the toggling of the value. For all other types, activations take the new value for the key (which must have the correct type). + a new #GAction @@ -55078,6 +63456,7 @@ correct type). Changes the #GSettings object into 'delay-apply' mode. In this mode, changes to @settings are not immediately propagated to the backend, but kept locally until g_settings_apply() is called. + @@ -55097,6 +63476,7 @@ g_variant_get(). It is a programmer error to give a @key that isn't contained in the schema for @settings or for the #GVariantType of @format to mismatch the type given in the schema. + @@ -55126,6 +63506,7 @@ A convenience variant of g_settings_get() for booleans. It is a programmer error to give a @key that isn't specified as having a boolean type in the schema for @settings. + a boolean @@ -55148,6 +63529,7 @@ having a boolean type in the schema for @settings. The schema for the child settings object must have been declared in the schema of @settings using a <child> element. + a 'child' settings object @@ -55185,6 +63567,7 @@ the default value was before the user set it. It is a programmer error to give a @key that isn't contained in the schema for @settings. + the default value @@ -55207,6 +63590,7 @@ A convenience variant of g_settings_get() for doubles. It is a programmer error to give a @key that isn't specified as having a 'double' type in the schema for @settings. + a double @@ -55235,6 +63619,7 @@ schema for @settings or is not marked as an enumerated type. If the value stored in the configuration database is not a valid value for the enumerated type then this function will return the default value. + the enum value @@ -55255,7 +63640,7 @@ default value. to the flags value that it represents. In order to use this function the type of the value must be an array -of strings and it must be marked in the schema file as an flags type. +of strings and it must be marked in the schema file as a flags type. It is a programmer error to give a @key that isn't contained in the schema for @settings or is not marked as a flags type. @@ -55263,6 +63648,7 @@ schema for @settings or is not marked as a flags type. If the value stored in the configuration database is not a valid value for the flags type then this function will return the default value. + the flags value @@ -55281,6 +63667,7 @@ value. Returns whether the #GSettings object has any unapplied changes. This can only be the case if it is in 'delayed-apply' mode. + %TRUE if @settings has unapplied changes @@ -55299,6 +63686,7 @@ A convenience variant of g_settings_get() for 32-bit integers. It is a programmer error to give a @key that isn't specified as having a int32 type in the schema for @settings. + an integer @@ -55321,6 +63709,7 @@ A convenience variant of g_settings_get() for 64-bit integers. It is a programmer error to give a @key that isn't specified as having a int64 type in the schema for @settings. + a 64-bit integer @@ -55364,6 +63753,7 @@ The result parameter for the @mapping function is pointed to a to each invocation of @mapping. The final value of that #gpointer is what is returned by this function. %NULL is valid; it is returned just as any other value would be. + the result, which may be %NULL @@ -55391,6 +63781,7 @@ just as any other value would be. Queries the range of a key. Use g_settings_schema_key_get_range() instead. + @@ -55412,6 +63803,7 @@ A convenience variant of g_settings_get() for strings. It is a programmer error to give a @key that isn't specified as having a string type in the schema for @settings. + a newly-allocated string @@ -55432,6 +63824,7 @@ having a string type in the schema for @settings. It is a programmer error to give a @key that isn't specified as having an array of strings type in the schema for @settings. + a newly-allocated, %NULL-terminated array of strings, the value that @@ -55459,6 +63852,7 @@ integers. It is a programmer error to give a @key that isn't specified as having a uint32 type in the schema for @settings. + an unsigned integer @@ -55482,6 +63876,7 @@ integers. It is a programmer error to give a @key that isn't specified as having a uint64 type in the schema for @settings. + a 64-bit unsigned integer @@ -55516,6 +63911,7 @@ for providing indication that a particular value has been changed. It is a programmer error to give a @key that isn't contained in the schema for @settings. + the user's value, if set @@ -55536,6 +63932,7 @@ schema for @settings. It is a programmer error to give a @key that isn't contained in the schema for @settings. + a new #GVariant @@ -55553,6 +63950,7 @@ schema for @settings. Finds out if a key can be written or not + %TRUE if the key @name is writable @@ -55574,22 +63972,16 @@ schema for @settings. The list is exactly the list of strings for which it is not an error to call g_settings_get_child(). -For GSettings objects that are lists, this value can change at any -time and you should connect to the "children-changed" signal to watch -for those changes. Note that there is a race condition here: you may -request a child after listing it only for it to have been destroyed -in the meantime. For this reason, g_settings_get_child() may return -%NULL even for a child that was listed by this function. - -For GSettings objects that are not lists, you should probably not be -calling this function from "normal" code (since you should already -know what children are in your schema). This function may still be -useful there for introspection reasons, however. +There is little reason to call this function from "normal" code, since +you should already know what children are in your schema. This function +may still be useful there for introspection reasons, however. You should free the return value with g_strfreev() when you are done with it. + - a list of the children on @settings + a list of the children on + @settings, in no defined order @@ -55601,7 +63993,7 @@ with it. - + Introspects the list of keys on @settings. You should probably not be calling this function from "normal" code @@ -55610,8 +64002,11 @@ function is intended for introspection reasons. You should free the return value with g_strfreev() when you are done with it. + Use g_settings_schema_list_keys() instead. + - a list of the keys on @settings + a list of the keys on + @settings, in no defined order @@ -55627,6 +64022,7 @@ with it. Checks if the given @value is of the correct type and within the permitted range for @key. Use g_settings_schema_key_range_check() instead. + %TRUE if @value is valid for @key @@ -55650,8 +64046,9 @@ permitted range for @key. Resets @key to its default value. This call resets the key, as much as possible, to its default value. -That might the value specified in the schema or the one set by the +That might be the value specified in the schema or the one set by the administrator. + @@ -55673,6 +64070,7 @@ g_settings_delay(). In the normal case settings are always applied immediately. Change notifications will be emitted for affected keys. + @@ -55692,6 +64090,7 @@ g_variant_new(). It is a programmer error to give a @key that isn't contained in the schema for @settings or for the #GVariantType of @format to mismatch the type given in the schema. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55723,6 +64122,7 @@ A convenience variant of g_settings_set() for booleans. It is a programmer error to give a @key that isn't specified as having a boolean type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55750,6 +64150,7 @@ A convenience variant of g_settings_set() for doubles. It is a programmer error to give a @key that isn't specified as having a 'double' type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55781,6 +64182,7 @@ schema for @settings or is not marked as an enumerated type, or for After performing the write, accessing @key directly with g_settings_get_string() will return the 'nick' associated with @value. + %TRUE, if the set succeeds @@ -55812,6 +64214,7 @@ to contain any bits that are not value for the named type. After performing the write, accessing @key directly with g_settings_get_strv() will return an array of 'nicks'; one for each bit in @value. + %TRUE, if the set succeeds @@ -55838,6 +64241,7 @@ A convenience variant of g_settings_set() for 32-bit integers. It is a programmer error to give a @key that isn't specified as having a int32 type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55865,6 +64269,7 @@ A convenience variant of g_settings_set() for 64-bit integers. It is a programmer error to give a @key that isn't specified as having a int64 type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55892,6 +64297,7 @@ A convenience variant of g_settings_set() for strings. It is a programmer error to give a @key that isn't specified as having a string type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55920,6 +64326,7 @@ A convenience variant of g_settings_set() for string arrays. If It is a programmer error to give a @key that isn't specified as having an array of strings type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55936,7 +64343,7 @@ having an array of strings type in the schema for @settings. the value to set it to, or %NULL - + @@ -55950,6 +64357,7 @@ integers. It is a programmer error to give a @key that isn't specified as having a uint32 type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -55978,6 +64386,7 @@ integers. It is a programmer error to give a @key that isn't specified as having a uint64 type in the schema for @settings. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -56006,6 +64415,7 @@ schema for @settings or for @value to have the incorrect type, per the schema. If @value is floating then this function consumes the reference. + %TRUE if setting the key succeeded, %FALSE if the key was not writable @@ -56027,6 +64437,7 @@ If @value is floating then this function consumes the reference. + The name of the context that the settings are stored in. @@ -56199,16 +64610,17 @@ The semantics of the interface are very precisely defined and implementations must carefully adhere to the expectations of callers that are documented on each of the interface methods. -Some of the GSettingsBackend functions accept or return a #GTree. +Some of the #GSettingsBackend functions accept or return a #GTree. These trees always have strings as keys and #GVariant as values. g_settings_backend_create_tree() is a convenience function to create suitable trees. -The GSettingsBackend API is exported to allow third-party +The #GSettingsBackend API is exported to allow third-party implementations, but does not carry the same stability guarantees as the public GIO API. For this reason, you have to define the C preprocessor symbol %G_SETTINGS_ENABLE_BACKEND before including `gio/gsettingsbackend.h`. + Calculate the longest common prefix of all keys in a tree and write out an array of the key names relative to that prefix and, @@ -56217,6 +64629,7 @@ optionally, the value to store at each of those keys. You must free the value returned in @path, @keys and @values using g_free(). You should not attempt to free or unref the contents of @keys or @values. + @@ -56232,7 +64645,7 @@ g_free(). You should not attempt to free or unref the contents of the location to save the relative keys - + @@ -56251,12 +64664,14 @@ the default by setting the `GSETTINGS_BACKEND` environment variable to the name of a settings backend. The user gets a reference to the backend. + the default #GSettingsBackend + @@ -56270,6 +64685,7 @@ The user gets a reference to the backend. + @@ -56283,6 +64699,7 @@ The user gets a reference to the backend. + @@ -56302,6 +64719,7 @@ The user gets a reference to the backend. + @@ -56318,6 +64736,7 @@ The user gets a reference to the backend. + @@ -56334,6 +64753,7 @@ The user gets a reference to the backend. + @@ -56347,6 +64767,7 @@ The user gets a reference to the backend. + @@ -56357,6 +64778,7 @@ The user gets a reference to the backend. + @@ -56370,6 +64792,7 @@ The user gets a reference to the backend. + @@ -56389,6 +64812,7 @@ The user gets a reference to the backend. + @@ -56427,6 +64851,7 @@ g_settings_backend_write()). In the case that this call is in response to a call to g_settings_backend_write() then @origin_tag must be set to the same value that was passed to that call. + @@ -56449,6 +64874,7 @@ value that was passed to that call. This call is a convenience wrapper. It gets the list of changes from @tree, computes the longest common prefix and calls g_settings_backend_changed(). + @@ -56489,6 +64915,7 @@ case g_settings_backend_changed() is definitely preferred). For efficiency reasons, the implementation should strive for @path to be as long as possible (ie: the longest common prefix of all of the keys that were changed) but this is not strictly required. + @@ -56503,7 +64930,7 @@ keys that were changed) but this is not strictly required. the %NULL-terminated list of changed keys - + @@ -56535,6 +64962,7 @@ be as long as possible (ie: the longest common prefix of all of the keys that were changed) but this is not strictly required. As an example, if this function is called with the path of "/" then every single key in the application will be notified of a possible change. + @@ -56559,6 +64987,7 @@ changed. Since GSettings performs no locking operations for itself, this call will always be made in response to external events. + @@ -56578,6 +65007,7 @@ will always be made in response to external events. Since GSettings performs no locking operations for itself, this call will always be made in response to external events. + @@ -56601,11 +65031,13 @@ will always be made in response to external events. Class structure for #GSettingsBackend. + + @@ -56627,6 +65059,7 @@ will always be made in response to external events. + @@ -56642,6 +65075,7 @@ will always be made in response to external events. + @@ -56663,6 +65097,7 @@ will always be made in response to external events. + @@ -56681,6 +65116,7 @@ will always be made in response to external events. + @@ -56699,6 +65135,7 @@ will always be made in response to external events. + @@ -56714,6 +65151,7 @@ will always be made in response to external events. + @@ -56729,6 +65167,7 @@ will always be made in response to external events. + @@ -56741,6 +65180,7 @@ will always be made in response to external events. + @@ -56756,6 +65196,7 @@ will always be made in response to external events. + @@ -56773,12 +65214,13 @@ will always be made in response to external events. - + + Flags used when creating a binding. These flags determine in which @@ -56812,6 +65254,7 @@ directions. The type for the function that is used to convert from #GSettings to an object property. The @value is already initialized to hold values of the appropriate type. + %TRUE if the conversion succeeded, %FALSE in case of an error @@ -56834,6 +65277,7 @@ of the appropriate type. The type for the function that is used to convert an object property value to a #GVariant for storing it in #GSettings. + a new #GVariant holding the data from @value, or %NULL in case of an error @@ -56855,11 +65299,13 @@ value to a #GVariant for storing it in #GSettings. + + @@ -56875,6 +65321,7 @@ value to a #GVariant for storing it in #GSettings. + @@ -56890,6 +65337,7 @@ value to a #GVariant for storing it in #GSettings. + @@ -56905,6 +65353,7 @@ value to a #GVariant for storing it in #GSettings. + @@ -56922,7 +65371,7 @@ value to a #GVariant for storing it in #GSettings. - + @@ -56938,6 +65387,7 @@ is not in the right format) then %FALSE should be returned. If @value is %NULL then it means that the mapping function is being given a "last chance" to successfully return a valid value. %TRUE must be returned in this case. + %TRUE if the conversion succeeded, %FALSE in case of an error @@ -56959,6 +65409,7 @@ g_settings_get_mapped() + The #GSettingsSchemaSource and #GSettingsSchema APIs provide a @@ -56995,7 +65446,7 @@ initialise_plugin (const gchar *dir) ... plugin->schema_source = - g_settings_new_schema_source_from_directory (dir, + g_settings_schema_source_new_from_directory (dir, g_settings_schema_source_get_default (), FALSE, NULL); ... @@ -57051,8 +65502,10 @@ It's also possible that the plugin system expects the schema source files (ie: .gschema.xml files) instead of a gschemas.compiled file. In that case, the plugin loading system must compile the schemas for itself before attempting to create the settings source. + Get the ID of @schema. + the ID @@ -57069,6 +65522,7 @@ itself before attempting to create the settings source. It is a programmer error to request a key that does not exist. See g_settings_schema_list_keys(). + the #GSettingsSchemaKey for @name @@ -57092,8 +65546,9 @@ schemas correspond to exactly one set of keys in the backend database: those located at the path returned by this function. Relocatable schemas can be referenced by other schemas and can -threfore describe multiple sets of keys at different locations. For +therefore describe multiple sets of keys at different locations. For relocatable schemas, this function will return %NULL. + the path of the schema, or %NULL @@ -57107,6 +65562,7 @@ relocatable schemas, this function will return %NULL. Checks if @schema has a key named @name. + %TRUE if such a key exists @@ -57127,8 +65583,10 @@ relocatable schemas, this function will return %NULL. You should free the return value with g_strfreev() when you are done with it. + - a list of the children on @settings + a list of the children on + @settings, in no defined order @@ -57146,9 +65604,10 @@ with it. You should probably not be calling this function from "normal" code (since you should already know what keys are in your schema). This function is intended for introspection reasons. + a list of the keys on - @schema + @schema, in no defined order @@ -57162,6 +65621,7 @@ function is intended for introspection reasons. Increase the reference count of @schema, returning a new reference. + a new reference to @schema @@ -57175,6 +65635,7 @@ function is intended for introspection reasons. Decrease the reference count of @schema, possibly freeing it. + @@ -57189,11 +65650,13 @@ function is intended for introspection reasons. #GSettingsSchemaKey is an opaque data structure and can only be accessed using the following functions. + Gets the default value for @key. Note that this is the default value according to the schema. System administrator defaults and lockdown are not visible via this API. + the default value for the key @@ -57220,6 +65683,7 @@ This function is slow. The summary and description information for the schemas is not stored in the compiled schema database so this function has to parse all of the source XML files in the schema directory. + the description for @key, or %NULL @@ -57233,6 +65697,7 @@ directory. Gets the name of @key. + the name of @key. @@ -57281,6 +65746,7 @@ forms may be added to the possibilities described above. You should free the returned value with g_variant_unref() when it is no longer needed. + a #GVariant describing the range @@ -57306,6 +65772,7 @@ This function is slow. The summary and description information for the schemas is not stored in the compiled schema database so this function has to parse all of the source XML files in the schema directory. + the summary for @key, or %NULL @@ -57319,6 +65786,7 @@ directory. Gets the #GVariantType of @key. + the type of @key @@ -57336,6 +65804,7 @@ permitted range for @key. It is a programmer error if @value is not of the correct type -- you must check for this first. + %TRUE if @value is valid for @key @@ -57353,6 +65822,7 @@ must check for this first. Increase the reference count of @key, returning a new reference. + a new reference to @key @@ -57366,6 +65836,7 @@ must check for this first. Decrease the reference count of @key, possibly freeing it. + @@ -57379,6 +65850,7 @@ must check for this first. This is an opaque structure type. You may not access it directly. + Attempts to create a new schema source corresponding to the contents of the given directory. @@ -57395,6 +65867,9 @@ in crashes or inconsistent behaviour in the case of a corrupted file. Generally, you should set @trusted to %TRUE for files installed by the system and to %FALSE for files in the home directory. +In either case, an empty file or some types of corruption in the file will +result in %G_FILE_ERROR_INVAL being returned. + If @parent is non-%NULL then there are two effects. First, if g_settings_schema_source_lookup() is called with the @@ -57408,13 +65883,14 @@ from the @parent. For this second reason, except in very unusual situations, the @parent should probably be given as the default schema source, as returned by g_settings_schema_source_get_default(). + the filename of a directory - + a #GSettingsSchemaSource, or %NULL @@ -57439,6 +65915,7 @@ use g_settings_new_with_path(). Do not call this function from normal programs. This is designed for use by database editors, commandline tools, etc. + @@ -57453,14 +65930,14 @@ use by database editors, commandline tools, etc. the - list of non-relocatable schemas + list of non-relocatable schemas, in no defined order the list - of relocatable schemas + of relocatable schemas, in no defined order @@ -57478,6 +65955,7 @@ If the schema isn't found directly in @source and @recursive is %TRUE then the parent sources will also be checked. If the schema isn't found, %NULL is returned. + a new #GSettingsSchema @@ -57499,6 +65977,7 @@ If the schema isn't found, %NULL is returned. Increase the reference count of @source, returning a new reference. + a new reference to @source @@ -57512,6 +65991,7 @@ If the schema isn't found, %NULL is returned. Decrease the reference count of @source, possibly freeing it. + @@ -57536,7 +66016,8 @@ from different directories, depending on which directories were given in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all lookups performed against the default source should probably be done recursively. - + + the default schema source @@ -57552,7 +66033,9 @@ See also #GtkAction. Creates a new action. -The created action is stateless. See g_simple_action_new_stateful(). +The created action is stateless. See g_simple_action_new_stateful() to create +an action that has state. + a new #GSimpleAction @@ -57563,7 +66046,8 @@ The created action is stateless. See g_simple_action_new_stateful(). - the type of parameter to the activate function + the type of parameter that will be passed to + handlers for the #GSimpleAction::activate signal, or %NULL for no parameter @@ -57571,10 +66055,11 @@ The created action is stateless. See g_simple_action_new_stateful(). Creates a new stateful action. -@state is the initial state of the action. All future state values -must have the same #GVariantType as the initial state. +All future state values must have the same #GVariantType as the initial +@state. -If the @state GVariant is floating, it is consumed. +If the @state #GVariant is floating, it is consumed. + a new #GSimpleAction @@ -57585,7 +66070,8 @@ If the @state GVariant is floating, it is consumed. - the type of the parameter to the activate function + the type of the parameter that will be passed to + handlers for the #GSimpleAction::activate signal, or %NULL for no parameter @@ -57602,6 +66088,7 @@ have its state changed from outside callers. This should only be called by the implementor of the action. Users of the action should not attempt to modify its enabled flag. + @@ -57627,6 +66114,7 @@ property. Instead, they should call g_action_change_state() to request the change. If the @value GVariant is floating, it is consumed. + @@ -57646,6 +66134,7 @@ If the @value GVariant is floating, it is consumed. See g_action_get_state_hint() for more information about action state hints. + @@ -57689,8 +66178,9 @@ action is stateless. Indicates that the action was just activated. -@parameter will always be of the expected type. In the event that -an incorrect type was given, no signal will be emitted. +@parameter will always be of the expected type, i.e. the parameter type +specified when the action was created. If an incorrect type is given when +activating the action, this signal is not emitted. Since GLib 2.40, if no handler is connected to this signal then the default behaviour for boolean-stated actions with a %NULL parameter @@ -57704,7 +66194,8 @@ of #GSimpleAction to connect only one handler or the other. - the parameter to the activation + the parameter to the activation, or %NULL if it has + no parameter @@ -57713,8 +66204,10 @@ of #GSimpleAction to connect only one handler or the other. Indicates that the action just received a request to change its state. -@value will always be of the correct state type. In the event that -an incorrect type was given, no signal will be emitted. +@value will always be of the correct state type, i.e. the type of the +initial state passed to g_simple_action_new_stateful(). If an incorrect +type is given when requesting to change the state, this signal is not +emitted. If no handler is connected to this signal then the default behaviour is to call g_simple_action_set_state() to set the state @@ -57755,10 +66248,12 @@ It could set it to any value at all, or take some other action. #GSimpleActionGroup is a hash table filled with #GAction objects, implementing the #GActionGroup and #GActionMap interfaces. + Creates a new, empty, #GSimpleActionGroup. + a new #GSimpleActionGroup @@ -57768,6 +66263,7 @@ implementing the #GActionGroup and #GActionMap interfaces. A convenience function for creating multiple #GSimpleAction instances and adding them to the action group. Use g_action_map_add_action_entries() + @@ -57779,7 +66275,7 @@ and adding them to the action group. a pointer to the first item in an array of #GActionEntry structs - + @@ -57801,6 +66297,7 @@ If the action group already contains an action with the same name as The action group takes its own reference on @action. Use g_action_map_add_action() + @@ -57820,6 +66317,7 @@ The action group takes its own reference on @action. If no such action exists, returns %NULL. Use g_action_map_lookup_action() + a #GAction, or %NULL @@ -57840,6 +66338,7 @@ If no such action exists, returns %NULL. If no action of this name is in the group then nothing happens. Use g_action_map_remove_action() + @@ -57862,16 +66361,18 @@ If no action of this name is in the group then nothing happens. + - + + As of GLib 2.46, #GSimpleAsyncResult is deprecated in favor of @@ -57922,9 +66423,10 @@ g_simple_async_result_complete() will finish an I/O task directly from the point where it is called. g_simple_async_result_complete_in_idle() will finish it from an idle handler in the [thread-default main context][g-main-context-push-thread-default] -. g_simple_async_result_run_in_thread() will run the -job in a separate thread and then deliver the result to the -thread-default main context. +where the #GSimpleAsyncResult was created. +g_simple_async_result_run_in_thread() will run the job in a +separate thread and then use +g_simple_async_result_complete_in_idle() to deliver the result. To set the results of an asynchronous function, g_simple_async_result_set_op_res_gpointer(), @@ -58038,6 +66540,7 @@ baker_bake_cake_finish (Baker *self, return g_object_ref (cake); } ]| + Creates a #GSimpleAsyncResult. @@ -58051,6 +66554,7 @@ probably should) then you should provide the user's cancellable to g_simple_async_result_set_check_cancellable() immediately after this function returns. Use g_task_new() instead. + a #GSimpleAsyncResult. @@ -58077,6 +66581,7 @@ this function returns. Creates a new #GSimpleAsyncResult with a set error. Use g_task_new() and g_task_return_new_error() instead. + a #GSimpleAsyncResult. @@ -58115,6 +66620,7 @@ this function returns. Creates a #GSimpleAsyncResult from an error condition. Use g_task_new() and g_task_return_error() instead. + a #GSimpleAsyncResult. @@ -58142,6 +66648,7 @@ this function returns. Creates a #GSimpleAsyncResult from an error condition, and takes over the caller's ownership of @error, so the caller does not need to free it anymore. Use g_task_new() and g_task_return_error() instead. + a #GSimpleAsyncResult @@ -58179,6 +66686,7 @@ which this function is called). (Alternatively, if either @source_tag or @result's source tag is %NULL, then the source tag check is skipped.) Use #GTask and g_task_is_valid() instead. + #TRUE if all checks passed or #FALSE if any failed. @@ -58207,6 +66715,7 @@ g_simple_async_result_complete_in_idle(). Calling this function takes a reference to @simple for as long as is needed to complete the call. Use #GTask instead. + @@ -58226,6 +66735,7 @@ of the thread that @simple was initially created in Calling this function takes a reference to @simple for as long as is needed to complete the call. Use #GTask instead. + @@ -58239,6 +66749,7 @@ is needed to complete the call. Gets the operation result boolean from within the asynchronous result. Use #GTask and g_task_propagate_boolean() instead. + %TRUE if the operation's result was %TRUE, %FALSE if the operation's result was %FALSE. @@ -58254,6 +66765,7 @@ is needed to complete the call. Gets a pointer result as returned by the asynchronous function. Use #GTask and g_task_propagate_pointer() instead. + a pointer from the result. @@ -58268,6 +66780,7 @@ is needed to complete the call. Gets a gssize from the asynchronous result. Use #GTask and g_task_propagate_int() instead. + a gssize returned from the asynchronous function. @@ -58282,6 +66795,7 @@ is needed to complete the call. Gets the source tag for the #GSimpleAsyncResult. Use #GTask and g_task_get_source_tag() instead. + a #gpointer to the source object for the #GSimpleAsyncResult. @@ -58301,6 +66815,7 @@ If the #GCancellable given to a prior call to g_simple_async_result_set_check_cancellable() is cancelled then this function will return %TRUE with @dest set appropriately. Use #GTask instead. + %TRUE if the error was propagated to @dest. %FALSE otherwise. @@ -58320,6 +66835,7 @@ the result to the appropriate main loop. Calling this function takes a reference to @simple for as long as is needed to run the job and report its completion. Use #GTask and g_task_run_in_thread() instead. + @@ -58359,6 +66875,7 @@ already been sent as an idle to the main context to be dispatched). The checking described above is done regardless of any call to the unrelated g_simple_async_result_set_handle_cancellation() function. Use #GTask instead. + @@ -58376,6 +66893,7 @@ unrelated g_simple_async_result_set_handle_cancellation() function. Sets an error within the asynchronous result without a #GError. Use #GTask and g_task_return_new_error() instead. + @@ -58406,6 +66924,7 @@ unrelated g_simple_async_result_set_handle_cancellation() function. Sets an error within the asynchronous result without a #GError. Unless writing a binding, see g_simple_async_result_set_error(). Use #GTask and g_task_return_error() instead. + @@ -58435,6 +66954,7 @@ Unless writing a binding, see g_simple_async_result_set_error(). Sets the result from a #GError. Use #GTask and g_task_return_error() instead. + @@ -58455,6 +66975,7 @@ Unless writing a binding, see g_simple_async_result_set_error(). This function has nothing to do with g_simple_async_result_set_check_cancellable(). It only refers to the #GCancellable passed to g_simple_async_result_run_in_thread(). + @@ -58472,6 +66993,7 @@ g_simple_async_result_set_check_cancellable(). It only refers to the Sets the operation result to a boolean within the asynchronous result. Use #GTask and g_task_return_boolean() instead. + @@ -58489,6 +67011,7 @@ g_simple_async_result_set_check_cancellable(). It only refers to the Sets the operation result within the asynchronous result to a pointer. Use #GTask and g_task_return_pointer() instead. + @@ -58511,6 +67034,7 @@ g_simple_async_result_set_check_cancellable(). It only refers to the Sets the operation result within the asynchronous result to the given @op_res. Use #GTask and g_task_return_int() instead. + @@ -58529,6 +67053,7 @@ the given @op_res. Sets the result from @error, and takes over the caller's ownership of @error, so the caller does not need to free it any more. Use #GTask and g_task_return_error() instead. + @@ -58545,10 +67070,12 @@ of @error, so the caller does not need to free it any more. + Simple thread function that runs an asynchronous operation and checks for cancellation. + @@ -58579,6 +67106,7 @@ to take advantage of the methods provided by #GIOStream. Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream. See also #GIOStream. + a new #GSimpleIOStream instance. @@ -58610,6 +67138,7 @@ Calling request or release will result in errors. Creates a new #GPermission instance that represents an action that is either always or never allowed. + the #GSimplePermission, as a #GPermission @@ -58622,7 +67151,7 @@ either always or never allowed. - + #GSimpleProxyResolver is a simple #GProxyResolver implementation that handles a single default proxy, multiple URI-scheme-specific proxies, and a list of hosts that proxies should not be used for. @@ -58631,12 +67160,14 @@ proxies, and a list of hosts that proxies should not be used for. can be used as the base class for another proxy resolver implementation, or it can be created and used manually, such as with g_socket_client_set_proxy_resolver(). + Creates a new #GSimpleProxyResolver. See #GSimpleProxyResolver:default-proxy and #GSimpleProxyResolver:ignore-hosts for more details on how the arguments are interpreted. + a new #GSimpleProxyResolver @@ -58662,6 +67193,7 @@ via g_simple_proxy_resolver_set_uri_proxy(). If @default_proxy starts with "socks://", #GSimpleProxyResolver will treat it as referring to all three of the socks5, socks4a, and socks4 proxy types. + @@ -58681,6 +67213,7 @@ the socks5, socks4a, and socks4 proxy types. See #GSimpleProxyResolver:ignore-hosts for more details on how the @ignore_hosts argument is interpreted. + @@ -58705,6 +67238,7 @@ As with #GSimpleProxyResolver:default-proxy, if @proxy starts with "socks://", #GSimpleProxyResolver will treat it as referring to all three of the socks5, socks4a, and socks4 proxy types. + @@ -58780,11 +67314,13 @@ commonly used by other applications. + + @@ -58792,6 +67328,7 @@ commonly used by other applications. + @@ -58799,6 +67336,7 @@ commonly used by other applications. + @@ -58806,6 +67344,7 @@ commonly used by other applications. + @@ -58813,6 +67352,7 @@ commonly used by other applications. + @@ -58820,6 +67360,7 @@ commonly used by other applications. + A #GSocket is a low-level networking primitive. It is a more or less @@ -58873,6 +67414,7 @@ if it tries to write to %stdout after it has been closed. Like most other APIs in GLib, #GSocket is not inherently thread safe. To use a #GSocket concurrently from multiple threads, you must implement your own locking. + @@ -58889,6 +67431,7 @@ the family and type. The protocol id is passed directly to the operating system, so you can use protocols not listed in #GSocketProtocol if you know the protocol number used for it. + a #GSocket or %NULL on error. Free the returned object with g_object_unref(). @@ -58923,6 +67466,7 @@ caller must close @fd themselves. Since GLib 2.46, it is no longer a fatal error to call this on a non-socket descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED + a #GSocket or %NULL on error. Free the returned object with g_object_unref(). @@ -58946,6 +67490,7 @@ must be listening for incoming connections (g_socket_listen()). If there are no outstanding connections then the operation will block or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. To be notified of an incoming connection, wait for the %G_IO_IN condition. + a new #GSocket, or %NULL on error. Free the returned object with g_object_unref(). @@ -58986,6 +67531,7 @@ time. In particular, you can have several UDP sockets bound to the same address, and they will all receive all of the multicast and broadcast packets sent to that address. (The behavior of unicast UDP packets to an address with multiple listeners is not defined.) + %TRUE on success, %FALSE on error. @@ -59009,6 +67555,7 @@ UDP packets to an address with multiple listeners is not defined.) Checks and resets the pending connect error for the socket. This is used to check for errors when g_socket_connect() is used in non-blocking mode. + %TRUE if no error, %FALSE otherwise, setting @error to the error @@ -59050,6 +67597,7 @@ connection, after which the server can safely call g_socket_close(). g_tcp_connection_set_graceful_disconnect(). But of course, this only works if the client will close its connection after the server does.) + %TRUE on success, %FALSE on error @@ -59079,6 +67627,7 @@ It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition; these conditions will always be set in the output if they are true. This call never blocks. + the @GIOCondition mask of the current state @@ -59095,22 +67644,23 @@ This call never blocks. - Waits for up to @timeout microseconds for @condition to become true + Waits for up to @timeout_us microseconds for @condition to become true on @socket. If the condition is met, %TRUE is returned. If @cancellable is cancelled before the condition is met, or if -@timeout (or the socket's #GSocket:timeout) is reached before the +@timeout_us (or the socket's #GSocket:timeout) is reached before the condition is met, then %FALSE is returned and @error, if non-%NULL, is set to the appropriate value (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). If you don't want a timeout, use g_socket_condition_wait(). -(Alternatively, you can pass -1 for @timeout.) +(Alternatively, you can pass -1 for @timeout_us.) -Note that although @timeout is in microseconds for consistency with +Note that although @timeout_us is in microseconds for consistency with other GLib APIs, this function actually only has millisecond -resolution, and the behavior is undefined if @timeout is not an +resolution, and the behavior is undefined if @timeout_us is not an exact number of milliseconds. + %TRUE if the condition was met, %FALSE otherwise @@ -59124,7 +67674,7 @@ exact number of milliseconds. a #GIOCondition mask to wait for - + the maximum time (in microseconds) to wait, or -1 @@ -59145,6 +67695,7 @@ the appropriate value (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). See also g_socket_condition_timed_wait(). + %TRUE if the condition was met, %FALSE otherwise @@ -59181,6 +67732,7 @@ non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned and the user can be notified of the connection finishing by waiting for the G_IO_OUT condition. The result of the connection must then be checked with g_socket_check_connect_result(). + %TRUE if connected, %FALSE on error. @@ -59203,6 +67755,7 @@ checked with g_socket_check_connect_result(). Creates a #GSocketConnection subclass of the right type for @socket. + a #GSocketConnection @@ -59235,6 +67788,7 @@ occurs, the source will then trigger anyway, reporting %G_IO_IN or %G_IO_OUT depending on @condition. However, @socket will have been marked as having had a timeout, and so the next #GSocket I/O method you call will then fail with a %G_IO_ERROR_TIMED_OUT. + a newly allocated %GSource, free with g_source_unref(). @@ -59267,6 +67821,7 @@ of the incoming packet, it is better to just do a g_socket_receive() with a buffer of that size, rather than calling g_socket_get_available_bytes() first and then doing a receive of exactly the right size. + the number of bytes that can be read from the socket without blocking or truncating, or -1 on error. @@ -59282,6 +67837,7 @@ without blocking or truncating, or -1 on error. Gets the blocking mode of the socket. For details on blocking I/O, see g_socket_set_blocking(). + %TRUE if blocking I/O is used, %FALSE otherwise. @@ -59297,6 +67853,7 @@ see g_socket_set_blocking(). Gets the broadcast setting on @socket; if %TRUE, it is possible to send packets to broadcast addresses. + the broadcast setting on @socket @@ -59317,10 +67874,18 @@ If this operation isn't supported on the OS, the method fails with the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented by reading the %SO_PEERCRED option on the underlying socket. +This method can be expected to be available on the following platforms: + +- Linux since GLib 2.26 +- OpenBSD since GLib 2.30 +- Solaris, Illumos and OpenSolaris since GLib 2.40 +- NetBSD since GLib 2.42 + Other ways to obtain credentials from a foreign peer includes the #GUnixCredentialsMessage type and g_unix_connection_send_credentials() / g_unix_connection_receive_credentials() functions. + %NULL if @error is set, otherwise a #GCredentials object that must be freed with g_object_unref(). @@ -59335,6 +67900,7 @@ that must be freed with g_object_unref(). Gets the socket family of the socket. + a #GSocketFamily @@ -59352,6 +67918,7 @@ is a socket file descriptor, and on Windows this is a Winsock2 SOCKET handle. This may be useful for doing platform specific or otherwise unusual operations on the socket. + the file descriptor of the socket. @@ -59366,6 +67933,7 @@ on the socket. Gets the keepalive mode of the socket. For details on this, see g_socket_set_keepalive(). + %TRUE if keepalive is active, %FALSE otherwise. @@ -59380,6 +67948,7 @@ see g_socket_set_keepalive(). Gets the listen backlog setting of the socket. For details on this, see g_socket_set_listen_backlog(). + the maximum number of pending connections. @@ -59395,6 +67964,7 @@ see g_socket_set_listen_backlog(). Try to get the local address of a bound socket. This is only useful if the socket has been bound to a local address, either explicitly or implicitly when connecting. + a #GSocketAddress or %NULL on error. Free the returned object with g_object_unref(). @@ -59411,6 +67981,7 @@ either explicitly or implicitly when connecting. Gets the multicast loopback setting on @socket; if %TRUE (the default), outgoing multicast packets will be looped back to multicast listeners on the same host. + the multicast loopback setting on @socket @@ -59425,6 +67996,7 @@ multicast listeners on the same host. Gets the multicast time-to-live setting on @socket; see g_socket_set_multicast_ttl() for more details. + the multicast time-to-live setting on @socket @@ -59450,6 +68022,7 @@ headers. Note that even for socket options that are a single byte in size, @value is still a pointer to a #gint variable, not a #guchar; g_socket_get_option() will handle the conversion internally. + success or failure. On failure, @error will be set, and the system error value (`errno` or WSAGetLastError()) will still @@ -59478,6 +68051,7 @@ g_socket_get_option() will handle the conversion internally. Gets the socket protocol id the socket was created with. In case the protocol is unknown, -1 is returned. + a protocol id, or -1 if unknown @@ -59490,8 +68064,9 @@ In case the protocol is unknown, -1 is returned. - Try to get the remove address of a connected socket. This is only + Try to get the remote address of a connected socket. This is only useful for connection oriented sockets that have been connected. + a #GSocketAddress or %NULL on error. Free the returned object with g_object_unref(). @@ -59506,6 +68081,7 @@ useful for connection oriented sockets that have been connected. Gets the socket type of the socket. + a #GSocketType @@ -59520,6 +68096,7 @@ useful for connection oriented sockets that have been connected. Gets the timeout setting of the socket. For details on this, see g_socket_set_timeout(). + the timeout in seconds @@ -59534,6 +68111,7 @@ g_socket_set_timeout(). Gets the unicast time-to-live setting on @socket; see g_socket_set_ttl() for more details. + the time-to-live setting on @socket @@ -59547,6 +68125,7 @@ g_socket_set_ttl() for more details. Checks whether a socket is closed. + %TRUE if socket is closed, %FALSE otherwise @@ -59566,6 +68145,7 @@ If using g_socket_shutdown(), this function will return %TRUE until the socket has been shut down for reading and writing. If you do a non-blocking connect, this function will not return %TRUE until after you call g_socket_check_connect_result(). + %TRUE if socket is connected, %FALSE otherwise. @@ -59588,7 +68168,11 @@ to bind to based on @group. If @source_specific is %TRUE, source-specific multicast as defined in RFC 4604 is used. Note that on older platforms this may fail -with a %G_IO_ERROR_NOT_SUPPORTED error. +with a %G_IO_ERROR_NOT_SUPPORTED error. + +To bind to a given source-specific multicast address, use +g_socket_join_multicast_group_ssm() instead. + %TRUE on success, %FALSE on error. @@ -59612,13 +68196,58 @@ with a %G_IO_ERROR_NOT_SUPPORTED error. + + Registers @socket to receive multicast messages sent to @group. +@socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have +been bound to an appropriate interface and port with +g_socket_bind(). + +If @iface is %NULL, the system will automatically pick an interface +to bind to based on @group. + +If @source_specific is not %NULL, use source-specific multicast as +defined in RFC 4604. Note that on older platforms this may fail +with a %G_IO_ERROR_NOT_SUPPORTED error. + +Note that this function can be called multiple times for the same +@group with different @source_specific in order to receive multicast +packets from more than one source. + + + %TRUE on success, %FALSE on error. + + + + + a #GSocket. + + + + a #GInetAddress specifying the group address to join. + + + + a #GInetAddress specifying the +source-specific multicast address or %NULL to ignore. + + + + Name of the interface to use, or %NULL + + + + Removes @socket from the multicast group defined by @group, @iface, and @source_specific (which must all have the same values they had when you joined the group). @socket remains bound to its address and port, and can still receive -unicast messages after calling this. +unicast messages after calling this. + +To unbind to a given source-specific multicast address, use +g_socket_leave_multicast_group_ssm() instead. + %TRUE on success, %FALSE on error. @@ -59642,6 +68271,38 @@ unicast messages after calling this. + + Removes @socket from the multicast group defined by @group, @iface, +and @source_specific (which must all have the same values they had +when you joined the group). + +@socket remains bound to its address and port, and can still receive +unicast messages after calling this. + + + %TRUE on success, %FALSE on error. + + + + + a #GSocket. + + + + a #GInetAddress specifying the group address to leave. + + + + a #GInetAddress specifying the +source-specific multicast address or %NULL to ignore. + + + + Name of the interface to use, or %NULL + + + + Marks the socket as a server socket, i.e. a socket that is used to accept incoming requests using g_socket_accept(). @@ -59651,6 +68312,7 @@ g_socket_bind(). To set the maximum amount of outstanding clients, use g_socket_set_listen_backlog(). + %TRUE on success, %FALSE on error. @@ -59686,6 +68348,7 @@ returned. To be notified when data is available, wait for the %G_IO_IN condition. On error -1 is returned and @error is set accordingly. + Number of bytes read, or 0 if the connection was closed by the peer, or -1 on error @@ -59721,6 +68384,7 @@ source address of the received packet. @address is owned by the caller. See g_socket_receive() for additional information. + Number of bytes read, or 0 if the connection was closed by the peer, or -1 on error @@ -59813,6 +68477,7 @@ returned. To be notified when data is available, wait for the %G_IO_IN condition. On error -1 is returned and @error is set accordingly. + Number of bytes read, or 0 if the connection was closed by the peer, or -1 on error @@ -59851,7 +68516,9 @@ the peer, or -1 on error - a pointer to an int containing #GSocketMsgFlags flags + a pointer to an int containing #GSocketMsgFlags flags, + which may additionally contain + [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) @@ -59909,6 +68576,7 @@ g_socket_receive_messages() will return 0 (with no error set). On error -1 is returned and @error is set accordingly. An error will only be returned if zero messages could be received; otherwise the number of messages successfully received before the error will be returned. + number of messages received, or -1 on error. Note that the number of messages received may be smaller than @num_messages if in non-blocking @@ -59933,7 +68601,9 @@ messages successfully received before the error will be returned. - an int containing #GSocketMsgFlags flags for the overall operation + an int containing #GSocketMsgFlags flags for the overall operation, + which may additionally contain + [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) @@ -59946,6 +68616,7 @@ messages successfully received before the error will be returned. This behaves exactly the same as g_socket_receive(), except that the choice of blocking or non-blocking behavior is determined by the @blocking argument rather than by @socket's properties. + Number of bytes read, or 0 if the connection was closed by the peer, or -1 on error @@ -59992,6 +68663,7 @@ notified of a %G_IO_OUT condition. (On Windows in particular, this is very common due to the way the underlying APIs work.) On error -1 is returned and @error is set accordingly. + Number of bytes written (which may be less than @size), or -1 on error @@ -60005,7 +68677,7 @@ on error the buffer containing the data to send. - + @@ -60057,6 +68729,7 @@ notified of a %G_IO_OUT condition. (On Windows in particular, this is very common due to the way the underlying APIs work.) On error -1 is returned and @error is set accordingly. + Number of bytes written (which may be less than @size), or -1 on error @@ -60093,7 +68766,8 @@ on error - an int containing #GSocketMsgFlags flags + an int containing #GSocketMsgFlags flags, which may additionally + contain [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) @@ -60102,6 +68776,70 @@ on error + + This behaves exactly the same as g_socket_send_message(), except that +the choice of timeout behavior is determined by the @timeout_us argument +rather than by @socket's properties. + +On error %G_POLLABLE_RETURN_FAILED is returned and @error is set accordingly, or +if the socket is currently not writable %G_POLLABLE_RETURN_WOULD_BLOCK is +returned. @bytes_written will contain 0 in both cases. + + + %G_POLLABLE_RETURN_OK if all data was successfully written, +%G_POLLABLE_RETURN_WOULD_BLOCK if the socket is currently not writable, or +%G_POLLABLE_RETURN_FAILED if an error happened and @error is set. + + + + + a #GSocket + + + + a #GSocketAddress, or %NULL + + + + an array of #GOutputVector structs + + + + + + the number of elements in @vectors, or -1 + + + + a pointer to an + array of #GSocketControlMessages, or %NULL. + + + + + + number of elements in @messages, or -1. + + + + an int containing #GSocketMsgFlags flags, which may additionally + contain [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) + + + + the maximum time (in microseconds) to wait, or -1 + + + + location to store the number of bytes that were written to the socket + + + + a %GCancellable or %NULL + + + + Send multiple data messages from @socket in one go. This is the most complicated and fully-featured version of this call. For easier use, see @@ -60137,6 +68875,7 @@ very common due to the way the underlying APIs work.) On error -1 is returned and @error is set accordingly. An error will only be returned if zero messages could be sent; otherwise the number of messages successfully sent before the error will be returned. + number of messages sent, or -1 on error. Note that the number of messages sent may be smaller than @num_messages if the socket is @@ -60160,7 +68899,8 @@ successfully sent before the error will be returned. - an int containing #GSocketMsgFlags flags + an int containing #GSocketMsgFlags flags, which may additionally + contain [other platform specific flags](http://man7.org/linux/man-pages/man2/recv.2.html) @@ -60175,6 +68915,7 @@ successfully sent before the error will be returned. g_socket_connect()). See g_socket_send() for additional information. + Number of bytes written (which may be less than @size), or -1 on error @@ -60192,7 +68933,7 @@ on error the buffer containing the data to send. - + @@ -60210,6 +68951,7 @@ on error This behaves exactly the same as g_socket_send(), except that the choice of blocking or non-blocking behavior is determined by the @blocking argument rather than by @socket's properties. + Number of bytes written (which may be less than @size), or -1 on error @@ -60223,7 +68965,7 @@ on error the buffer containing the data to send. - + @@ -60251,6 +68993,7 @@ with a %G_IO_ERROR_WOULD_BLOCK error. All sockets are created in blocking mode. However, note that the platform level socket is always non-blocking, and blocking mode is a GSocket level feature. + @@ -60268,6 +69011,7 @@ is a GSocket level feature. Sets whether @socket should allow sending to broadcast addresses. This is %FALSE by default. + @@ -60299,6 +69043,7 @@ normally be at least two hours. Most commonly, you would set this flag on a server socket if you want to allow clients to remain idle for long periods of time, but also want to ensure that connections are eventually garbage-collected if clients crash or become unreachable. + @@ -60321,6 +69066,7 @@ on time then the new connections will be refused. Note that this must be called before g_socket_listen() and has no effect if called after that. + @@ -60339,6 +69085,7 @@ effect if called after that. Sets whether outgoing multicast packets will be received by sockets listening on that multicast address on the same host. This is %TRUE by default. + @@ -60358,6 +69105,7 @@ by default. Sets the time-to-live for outgoing multicast datagrams on @socket. By default, this is 1, meaning that multicast packets will not leave the local network. + @@ -60382,6 +69130,7 @@ header pulls in system headers that will define most of the standard/portable socket options. For unusual socket protocols or platform-dependent options, you may need to include additional headers. + success or failure. On failure, @error will be set, and the system error value (`errno` or WSAGetLastError()) will still @@ -60428,6 +69177,7 @@ on their own. Note that if an I/O operation is interrupted by a signal, this may cause the timeout to be reset. + @@ -60445,6 +69195,7 @@ cause the timeout to be reset. Sets the time-to-live for outgoing unicast packets on @socket. By default the platform-specific default value is used. + @@ -60474,6 +69225,7 @@ One example where it is useful to shut down only one side of a connection is graceful disconnect for TCP connections where you close the sending side, then wait for the other side to close the connection, thus ensuring that the other side saw all sent data. + %TRUE on success, %FALSE on error @@ -60503,6 +69255,7 @@ information. No other types of sockets are currently considered as being capable of speaking IPv4. + %TRUE if this socket can be used with IPv4. @@ -60572,10 +69325,12 @@ of speaking IPv4. #GSocketAddress is the equivalent of struct sockaddr in the BSD sockets API. This is an abstract class; use #GInetSocketAddress for internet sockets, or #GUnixSocketAddress for UNIX domain sockets. + Creates a #GSocketAddress subclass corresponding to the native struct sockaddr @native. + a new #GSocketAddress if @native could successfully be converted, otherwise %NULL @@ -60594,6 +69349,7 @@ struct sockaddr @native. Gets the socket family type of @address. + the socket family type of @address @@ -60609,6 +69365,7 @@ struct sockaddr @native. Gets the size of @address's native struct sockaddr. You can use this to allocate memory to pass to g_socket_address_to_native(). + the size of the native struct sockaddr that @address represents @@ -60628,6 +69385,7 @@ be passed to low-level functions like connect() or bind(). If not enough space is available, a %G_IO_ERROR_NO_SPACE error is returned. If the address type is not known on the system then a %G_IO_ERROR_NOT_SUPPORTED error is returned. + %TRUE if @dest was filled in, %FALSE on error @@ -60651,6 +69409,7 @@ struct sockaddr Gets the socket family type of @address. + the socket family type of @address @@ -60666,6 +69425,7 @@ struct sockaddr Gets the size of @address's native struct sockaddr. You can use this to allocate memory to pass to g_socket_address_to_native(). + the size of the native struct sockaddr that @address represents @@ -60685,6 +69445,7 @@ be passed to low-level functions like connect() or bind(). If not enough space is available, a %G_IO_ERROR_NO_SPACE error is returned. If the address type is not known on the system then a %G_IO_ERROR_NOT_SUPPORTED error is returned. + %TRUE if @dest was filled in, %FALSE on error @@ -60714,11 +69475,13 @@ struct sockaddr + + the socket family type of @address @@ -60733,6 +69496,7 @@ struct sockaddr + the size of the native struct sockaddr that @address represents @@ -60748,6 +69512,7 @@ struct sockaddr + %TRUE if @dest was filled in, %FALSE on error @@ -60772,8 +69537,21 @@ struct sockaddr - Enumerator type for objects that contain or generate -#GSocketAddress<!-- -->es. + #GSocketAddressEnumerator is an enumerator type for #GSocketAddress +instances. It is returned by enumeration functions such as +g_socket_connectable_enumerate(), which returns a #GSocketAddressEnumerator +to list each #GSocketAddress which could be used to connect to that +#GSocketConnectable. + +Enumeration is typically a blocking operation, so the asynchronous methods +g_socket_address_enumerator_next_async() and +g_socket_address_enumerator_next_finish() should be used where possible. + +Each #GSocketAddressEnumerator can only be enumerated once. Once +g_socket_address_enumerator_next() has returned %NULL (and no error), further +enumeration with that #GSocketAddressEnumerator is not possible, and it can +be unreffed. + Retrieves the next #GSocketAddress from @enumerator. Note that this may block for some amount of time. (Eg, a #GNetworkAddress may need @@ -60788,6 +69566,7 @@ in *@error. However, if the first call to g_socket_address_enumerator_next() succeeds, then any further internal errors (other than @cancellable being triggered) will be ignored. + a #GSocketAddress (owned by the caller), or %NULL on error (in which case *@error will be set) or if there are no @@ -60808,7 +69587,10 @@ ignored. Asynchronously retrieves the next #GSocketAddress from @enumerator and then calls @callback, which must call -g_socket_address_enumerator_next_finish() to get the result. +g_socket_address_enumerator_next_finish() to get the result. + +It is an error to call this multiple times before the previous callback has finished. + @@ -60837,6 +69619,7 @@ g_socket_address_enumerator_next_finish() to get the result. g_socket_address_enumerator_next_async(). See g_socket_address_enumerator_next() for more information about error handling. + a #GSocketAddress (owned by the caller), or %NULL on error (in which case *@error will be set) or if there are no @@ -60868,6 +69651,7 @@ in *@error. However, if the first call to g_socket_address_enumerator_next() succeeds, then any further internal errors (other than @cancellable being triggered) will be ignored. + a #GSocketAddress (owned by the caller), or %NULL on error (in which case *@error will be set) or if there are no @@ -60888,7 +69672,10 @@ ignored. Asynchronously retrieves the next #GSocketAddress from @enumerator and then calls @callback, which must call -g_socket_address_enumerator_next_finish() to get the result. +g_socket_address_enumerator_next_finish() to get the result. + +It is an error to call this multiple times before the previous callback has finished. + @@ -60917,6 +69704,7 @@ g_socket_address_enumerator_next_finish() to get the result. g_socket_address_enumerator_next_async(). See g_socket_address_enumerator_next() for more information about error handling. + a #GSocketAddress (owned by the caller), or %NULL on error (in which case *@error will be set) or if there are no @@ -60934,16 +69722,19 @@ error handling. - + - + Class structure for #GSocketAddressEnumerator. + + + a #GSocketAddress (owned by the caller), or %NULL on error (in which case *@error will be set) or if there are no @@ -60964,6 +69755,7 @@ error handling. + @@ -60990,6 +69782,7 @@ error handling. + a #GSocketAddress (owned by the caller), or %NULL on error (in which case *@error will be set) or if there are no @@ -61010,11 +69803,13 @@ error handling. + + @@ -61022,6 +69817,7 @@ error handling. + @@ -61029,6 +69825,7 @@ error handling. + @@ -61036,6 +69833,7 @@ error handling. + @@ -61043,6 +69841,7 @@ error handling. + @@ -61050,6 +69849,7 @@ error handling. + @@ -61057,6 +69857,7 @@ error handling. + @@ -61064,6 +69865,7 @@ error handling. + @@ -61071,6 +69873,7 @@ error handling. + @@ -61078,6 +69881,7 @@ error handling. + @@ -61098,8 +69902,10 @@ it will be a #GTcpConnection. As #GSocketClient is a lightweight object, you don't need to cache it. You can just create a new one any time you need one. + Creates a new #GSocketClient with the default options. + a #GSocketClient. Free the returned object with g_object_unref(). @@ -61107,6 +69913,7 @@ can just create a new one any time you need one. + @@ -61145,6 +69952,7 @@ be use as generic socket proxy through the HTTP CONNECT method. When the proxy is detected as being an application proxy, TLS handshake will be skipped. This is required to let the application do the proxy specific handshake. + @@ -61178,6 +69986,7 @@ g_socket_client_set_socket_type(). If a local address is specified with g_socket_client_set_local_address() the socket will be bound to this address before connecting. + a #GSocketConnection on success, %NULL on error. @@ -61203,6 +70012,7 @@ socket will be bound to this address before connecting. When the operation is finished @callback will be called. You can then call g_socket_client_connect_finish() to get the result of the operation. + @@ -61231,6 +70041,7 @@ the result of the operation. Finishes an async connect operation. See g_socket_client_connect_async() + a #GSocketConnection on success, %NULL on error. @@ -61277,6 +70088,7 @@ reference to it when finished with it. In the event of any failure (DNS error, service not found, no hosts connectable) %NULL is returned and @error (if non-%NULL) is set accordingly. + a #GSocketConnection on success, %NULL on error. @@ -61306,6 +70118,7 @@ accordingly. When the operation is finished @callback will be called. You can then call g_socket_client_connect_to_host_finish() to get the result of the operation. + @@ -61338,6 +70151,7 @@ the result of the operation. Finishes an async connect operation. See g_socket_client_connect_to_host_async() + a #GSocketConnection on success, %NULL on error. @@ -61368,6 +70182,7 @@ reference to it when finished with it. In the event of any failure (DNS error, service not found, no hosts connectable) %NULL is returned and @error (if non-%NULL) is set accordingly. + a #GSocketConnection if successful, or %NULL on error @@ -61394,6 +70209,7 @@ accordingly. This is the asynchronous version of g_socket_client_connect_to_service(). + @@ -61426,6 +70242,7 @@ g_socket_client_connect_to_service(). Finishes an async connect operation. See g_socket_client_connect_to_service_async() + a #GSocketConnection on success, %NULL on error. @@ -61463,6 +70280,7 @@ reference to it when finished with it. In the event of any failure (DNS error, service not found, no hosts connectable) %NULL is returned and @error (if non-%NULL) is set accordingly. + a #GSocketConnection on success, %NULL on error. @@ -61492,6 +70310,7 @@ accordingly. When the operation is finished @callback will be called. You can then call g_socket_client_connect_to_uri_finish() to get the result of the operation. + @@ -61524,6 +70343,7 @@ the result of the operation. Finishes an async connect operation. See g_socket_client_connect_to_uri_async() + a #GSocketConnection on success, %NULL on error. @@ -61541,6 +70361,7 @@ the result of the operation. Gets the proxy enable state; see g_socket_client_set_enable_proxy() + whether proxying is enabled @@ -61556,6 +70377,7 @@ the result of the operation. Gets the socket family of the socket client. See g_socket_client_set_family() for details. + a #GSocketFamily @@ -61571,6 +70393,7 @@ See g_socket_client_set_family() for details. Gets the local address of the socket client. See g_socket_client_set_local_address() for details. + a #GSocketAddress or %NULL. Do not free. @@ -61586,6 +70409,7 @@ See g_socket_client_set_local_address() for details. Gets the protocol name type of the socket client. See g_socket_client_set_protocol() for details. + a #GSocketProtocol @@ -61601,6 +70425,7 @@ See g_socket_client_set_protocol() for details. Gets the #GProxyResolver being used by @client. Normally, this will be the resolver returned by g_proxy_resolver_get_default(), but you can override it with g_socket_client_set_proxy_resolver(). + The #GProxyResolver being used by @client. @@ -61617,6 +70442,7 @@ can override it with g_socket_client_set_proxy_resolver(). Gets the socket type of the socket client. See g_socket_client_set_socket_type() for details. + a #GSocketFamily @@ -61632,6 +70458,7 @@ See g_socket_client_set_socket_type() for details. Gets the I/O timeout time for sockets created by @client. See g_socket_client_set_timeout() for details. + the timeout in seconds @@ -61646,6 +70473,7 @@ See g_socket_client_set_timeout() for details. Gets whether @client creates TLS connections. See g_socket_client_set_tls() for details. + whether @client uses TLS @@ -61660,6 +70488,7 @@ g_socket_client_set_tls() for details. Gets the TLS validation flags used creating TLS connections via @client. + the TLS validation flags @@ -61678,6 +70507,7 @@ proxy server. When enabled (the default), #GSocketClient will use a needed, and automatically do the necessary proxy negotiation. See also g_socket_client_set_proxy_resolver(). + @@ -61701,6 +70531,7 @@ family. This might be useful for instance if you want to force the local connection to be an ipv4 socket, even though the address might be an ipv6 mapped to ipv4 address. + @@ -61723,6 +70554,7 @@ specified address (if not %NULL) before connecting. This is useful if you want to ensure that the local side of the connection is on a specific port, or on a specific interface. + @@ -61742,8 +70574,9 @@ a specific interface. The sockets created by this object will use of the specified protocol. -If @protocol is %0 that means to use the default +If @protocol is %G_SOCKET_PROTOCOL_DEFAULT that means to use the default protocol for the socket family and type. + @@ -61766,6 +70599,7 @@ default proxy settings. Note that whether or not the proxy resolver is actually used depends on the setting of #GSocketClient:enable-proxy, which is not changed by this function (but which is %TRUE by default) + @@ -61788,6 +70622,7 @@ type. It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM, as GSocketClient is used for connection oriented services. + @@ -61809,6 +70644,7 @@ time in seconds, or 0 for no timeout (the default). The timeout value affects the initial connection attempt as well, so setting this may cause calls to g_socket_client_connect(), etc, to fail with %G_IO_ERROR_TIMED_OUT. + @@ -61842,6 +70678,7 @@ setting a client-side certificate to use, or connecting to the emitted with %G_SOCKET_CLIENT_TLS_HANDSHAKING, which will give you a chance to see the #GTlsClientConnection before the handshake starts. + @@ -61859,6 +70696,7 @@ starts. Sets the TLS validation flags used when creating TLS connections via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL. + @@ -61977,11 +70815,13 @@ the future; unrecognized @event values should be ignored. + + @@ -62003,6 +70843,7 @@ the future; unrecognized @event values should be ignored. + @@ -62010,6 +70851,7 @@ the future; unrecognized @event values should be ignored. + @@ -62017,6 +70859,7 @@ the future; unrecognized @event values should be ignored. + @@ -62024,6 +70867,7 @@ the future; unrecognized @event values should be ignored. + @@ -62071,6 +70915,7 @@ Additional values may be added to this type in the future. + Objects that describe one or more potential socket endpoints @@ -62130,8 +70975,10 @@ connect_to_host (const char *hostname, } } ]| + Creates a #GSocketAddressEnumerator for @connectable. + a new #GSocketAddressEnumerator. @@ -62145,12 +70992,13 @@ connect_to_host (const char *hostname, Creates a #GSocketAddressEnumerator for @connectable that will -return #GProxyAddresses for addresses that you must connect +return a #GProxyAddress for each of its addresses that you must connect to via a proxy. If @connectable does not implement g_socket_connectable_proxy_enumerate(), this will fall back to calling g_socket_connectable_enumerate(). + a new #GSocketAddressEnumerator. @@ -62170,6 +71018,7 @@ user. If the #GSocketConnectable implementation does not support string formatting, the implementation’s type name will be returned as a fallback. + the formatted string @@ -62183,6 +71032,7 @@ the implementation’s type name will be returned as a fallback. Creates a #GSocketAddressEnumerator for @connectable. + a new #GSocketAddressEnumerator. @@ -62196,12 +71046,13 @@ the implementation’s type name will be returned as a fallback. Creates a #GSocketAddressEnumerator for @connectable that will -return #GProxyAddresses for addresses that you must connect +return a #GProxyAddress for each of its addresses that you must connect to via a proxy. If @connectable does not implement g_socket_connectable_proxy_enumerate(), this will fall back to calling g_socket_connectable_enumerate(). + a new #GSocketAddressEnumerator. @@ -62221,6 +71072,7 @@ user. If the #GSocketConnectable implementation does not support string formatting, the implementation’s type name will be returned as a fallback. + the formatted string @@ -62236,12 +71088,14 @@ the implementation’s type name will be returned as a fallback. Provides an interface for returning a #GSocketAddressEnumerator and #GProxyAddressEnumerator + The parent interface. + a new #GSocketAddressEnumerator. @@ -62256,6 +71110,7 @@ and #GProxyAddressEnumerator + a new #GSocketAddressEnumerator. @@ -62270,6 +71125,7 @@ and #GProxyAddressEnumerator + the formatted string @@ -62300,11 +71156,13 @@ family/type/protocol using g_socket_connection_factory_register_type(). To close a #GSocketConnection, use g_io_stream_close(). Closing both substreams of the #GIOStream separately will not close the underlying #GSocket. + Looks up the #GType to be used when creating socket connections on sockets with the specified @family, @type and @protocol_id. If no type is registered, the #GSocketConnection base type is returned. + a #GType @@ -62329,6 +71187,7 @@ If no type is registered, the #GSocketConnection base type is returned. sockets with the specified @family, @type and @protocol. If no type is registered, the #GSocketConnection base type is returned. + @@ -62353,6 +71212,7 @@ If no type is registered, the #GSocketConnection base type is returned. Connect @connection to the specified remote address. + %TRUE if the connection succeeded, %FALSE on error @@ -62379,6 +71239,7 @@ This clears the #GSocket:blocking flag on @connection's underlying socket if it is currently set. Use g_socket_connection_connect_finish() to retrieve the result. + @@ -62407,6 +71268,7 @@ Use g_socket_connection_connect_finish() to retrieve the result. Gets the result of a g_socket_connection_connect_async() call. + %TRUE if the connection succeeded, %FALSE on error @@ -62424,6 +71286,7 @@ Use g_socket_connection_connect_finish() to retrieve the result. Try to get the local address of a socket connection. + a #GSocketAddress or %NULL on error. Free the returned object with g_object_unref(). @@ -62445,6 +71308,7 @@ g_socket_client_connect_async(), during emission of address that will be used for the connection. This allows applications to print e.g. "Connecting to example.com (10.42.77.3)...". + a #GSocketAddress or %NULL on error. Free the returned object with g_object_unref(). @@ -62461,6 +71325,7 @@ applications to print e.g. "Connecting to example.com Gets the underlying #GSocket object of the connection. This can be useful if you want to do something unusual on it not supported by the #GSocketConnection APIs. + a #GSocket or %NULL on error. @@ -62475,6 +71340,7 @@ not supported by the #GSocketConnection APIs. Checks if @connection is connected. This is equivalent to calling g_socket_is_connected() on @connection's underlying #GSocket. + whether @connection is connected @@ -62497,11 +71363,13 @@ g_socket_is_connected() on @connection's underlying #GSocket. + + @@ -62509,6 +71377,7 @@ g_socket_is_connected() on @connection's underlying #GSocket. + @@ -62516,6 +71385,7 @@ g_socket_is_connected() on @connection's underlying #GSocket. + @@ -62523,6 +71393,7 @@ g_socket_is_connected() on @connection's underlying #GSocket. + @@ -62530,6 +71401,7 @@ g_socket_is_connected() on @connection's underlying #GSocket. + @@ -62537,6 +71409,7 @@ g_socket_is_connected() on @connection's underlying #GSocket. + @@ -62544,8 +71417,9 @@ g_socket_is_connected() on @connection's underlying #GSocket. + - + A #GSocketControlMessage is a special-purpose utility message that can be sent to or received from a #GSocket. These types of messages are often called "ancillary data". @@ -62566,6 +71440,7 @@ To extend the set of control messages that can be received, subclass this class and implement the deserialize method. Also, make sure your class is registered with the GType typesystem before calling g_socket_receive_message() to read such a message. + Tries to deserialize a socket control message of a given @level and @type. This will ask all known (to GType) subclasses @@ -62574,6 +71449,7 @@ of message and if so deserialize it into a #GSocketControlMessage. If there is no implementation for this kind of control message, %NULL will be returned. + the deserialized message or %NULL @@ -62602,6 +71478,7 @@ will be returned. Returns the "level" (i.e. the originating protocol) of the control message. This is often SOL_SOCKET. + an integer describing the level @@ -62616,6 +71493,7 @@ This is often SOL_SOCKET. Returns the space required for the control message, not including headers or alignment. + The number of bytes required. @@ -62628,6 +71506,7 @@ headers or alignment. + @@ -62644,6 +71523,7 @@ message. @data is guaranteed to have enough space to fit the size returned by g_socket_control_message_get_size() on this object. + @@ -62661,6 +71541,7 @@ object. Returns the "level" (i.e. the originating protocol) of the control message. This is often SOL_SOCKET. + an integer describing the level @@ -62675,6 +71556,7 @@ This is often SOL_SOCKET. Returns the protocol specific type of the control message. For instance, for UNIX fd passing this would be SCM_RIGHTS. + an integer describing the type of control message @@ -62689,6 +71571,7 @@ For instance, for UNIX fd passing this would be SCM_RIGHTS. Returns the space required for the control message, not including headers or alignment. + The number of bytes required. @@ -62707,6 +71590,7 @@ message. @data is guaranteed to have enough space to fit the size returned by g_socket_control_message_get_size() on this object. + @@ -62730,11 +71614,13 @@ object. Class structure for #GSocketControlMessage. + + The number of bytes required. @@ -62749,6 +71635,7 @@ object. + an integer describing the level @@ -62763,6 +71650,7 @@ object. + @@ -62775,6 +71663,7 @@ object. + @@ -62792,6 +71681,7 @@ object. + @@ -62813,6 +71703,7 @@ object. + @@ -62820,6 +71711,7 @@ object. + @@ -62827,6 +71719,7 @@ object. + @@ -62834,6 +71727,7 @@ object. + @@ -62841,6 +71735,7 @@ object. + @@ -62848,6 +71743,7 @@ object. + The protocol family of a #GSocketAddress. (These values are @@ -62871,19 +71767,29 @@ if available.) of server sockets and helps you accept sockets from any of the socket, either sync or async. +Add addresses and ports to listen on using g_socket_listener_add_address() +and g_socket_listener_add_inet_port(). These will be listened on until +g_socket_listener_close() is called. Dropping your final reference to the +#GSocketListener will not cause g_socket_listener_close() to be called +implicitly, as some references to the #GSocketListener may be held +internally. + If you want to implement a network server, also look at #GSocketService -and #GThreadedSocketService which are subclass of #GSocketListener -that makes this even easier. +and #GThreadedSocketService which are subclasses of #GSocketListener +that make this even easier. + Creates a new #GSocketListener with no sockets to listen for. New listeners can be added with e.g. g_socket_listener_add_address() or g_socket_listener_add_inet_port(). + a new #GSocketListener. + @@ -62894,6 +71800,7 @@ or g_socket_listener_add_inet_port(). + @@ -62902,7 +71809,7 @@ or g_socket_listener_add_inet_port(). - + @@ -62921,6 +71828,7 @@ to the listener. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GSocketConnection on success, %NULL on error. @@ -62946,6 +71854,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished @callback will be called. You can then call g_socket_listener_accept_socket() to get the result of the operation. + @@ -62970,6 +71879,7 @@ to get the result of the operation. Finishes an async accept operation. See g_socket_listener_accept_async() + a #GSocketConnection on success, %NULL on error. @@ -63004,6 +71914,7 @@ to the listener. If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. + a #GSocket on success, %NULL on error. @@ -63029,6 +71940,7 @@ was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. When the operation is finished @callback will be called. You can then call g_socket_listener_accept_socket_finish() to get the result of the operation. + @@ -63053,6 +71965,7 @@ to get the result of the operation. Finishes an async accept operation. See g_socket_listener_accept_socket_async() + a #GSocket on success, %NULL on error. @@ -63091,7 +72004,12 @@ If successful and @effective_address is non-%NULL then it will be set to the address that the binding actually occurred at. This is helpful for determining the port number that was used for when requesting a binding to port 0 (ie: "any port"). This address, if -requested, belongs to the caller and must be freed. +requested, belongs to the caller and must be freed. + +Call g_socket_listener_close() to stop listening on @address; this will not +be done automatically when you drop your final reference to @listener, as +references may be held internally. + %TRUE on success, %FALSE on error. @@ -63134,6 +72052,7 @@ but don't care about the specific port number. to accept to identify this particular source, which is useful if you're listening on multiple addresses and do different things depending on what address is connected to. + the port number, or 0 in case of failure. @@ -63157,7 +72076,12 @@ supported) on the specified port on all interfaces. @source_object will be passed out in the various calls to accept to identify this particular source, which is useful if you're listening on multiple addresses and do -different things depending on what address is connected to. +different things depending on what address is connected to. + +Call g_socket_listener_close() to stop listening on @port; this will not +be done automatically when you drop your final reference to @listener, as +references may be held internally. + %TRUE on success, %FALSE on error. @@ -63191,6 +72115,7 @@ The @socket will not be automatically closed when the @listener is finalized unless the listener held the final reference to the socket. Before GLib 2.42, the @socket was automatically closed on finalization of the @listener, even if references to it were held elsewhere. + %TRUE on success, %FALSE on error. @@ -63212,6 +72137,7 @@ if references to it were held elsewhere. Closes all the sockets in the listener. + @@ -63223,9 +72149,12 @@ if references to it were held elsewhere. - Sets the listen backlog on the sockets in the listener. + Sets the listen backlog on the sockets in the listener. This must be called +before adding any sockets, addresses or ports to the #GSocketListener (for +example, by calling g_socket_listener_add_inet_port()) to be effective. See g_socket_set_listen_backlog() for details + @@ -63271,11 +72200,13 @@ the order they happen in is undefined. Class structure for #GSocketListener. + + @@ -63288,6 +72219,7 @@ the order they happen in is undefined. + @@ -63296,7 +72228,7 @@ the order they happen in is undefined. - + @@ -63306,6 +72238,7 @@ the order they happen in is undefined. + @@ -63313,6 +72246,7 @@ the order they happen in is undefined. + @@ -63320,6 +72254,7 @@ the order they happen in is undefined. + @@ -63327,6 +72262,7 @@ the order they happen in is undefined. + @@ -63334,6 +72270,7 @@ the order they happen in is undefined. + @@ -63361,6 +72298,7 @@ Additional values may be added to this type in the future. + Flags used in g_socket_receive_message() and g_socket_send_message(). @@ -63384,6 +72322,7 @@ the right system header and pass in the flag. + A protocol identifier is specified when creating a #GSocket, which is a @@ -63436,6 +72375,7 @@ of the thread it is created in, and is not threadsafe in general. However, the calls to start and stop the service are thread-safe so these can be used from threads that handle incoming clients. + Creates a new #GSocketService with no sockets to listen for. New listeners can be added with e.g. g_socket_listener_add_address() @@ -63444,12 +72384,14 @@ or g_socket_listener_add_inet_port(). New services are created active, there is no need to call g_socket_service_start(), unless g_socket_service_stop() has been called before. + a new #GSocketService. + @@ -63470,6 +72412,7 @@ called before. service will accept new clients that connect, while a non-active service will let connecting clients queue up until the service is started. + %TRUE if the service is active, %FALSE otherwise @@ -63489,6 +72432,7 @@ g_socket_service_stop(). This call is thread-safe, so it may be called from a thread handling an incoming client request. + @@ -63515,6 +72459,7 @@ will happen automatically when the #GSocketService is finalized.) This must be called before calling g_socket_listener_close() as the socket service will start accepting connections immediately when a new socket is added. + @@ -63562,11 +72507,13 @@ so you need to ref it yourself if you are planning to use it. Class structure for #GSocketService. + + @@ -63585,6 +72532,7 @@ so you need to ref it yourself if you are planning to use it. + @@ -63592,6 +72540,7 @@ so you need to ref it yourself if you are planning to use it. + @@ -63599,6 +72548,7 @@ so you need to ref it yourself if you are planning to use it. + @@ -63606,6 +72556,7 @@ so you need to ref it yourself if you are planning to use it. + @@ -63613,6 +72564,7 @@ so you need to ref it yourself if you are planning to use it. + @@ -63620,6 +72572,7 @@ so you need to ref it yourself if you are planning to use it. + @@ -63627,10 +72580,12 @@ so you need to ref it yourself if you are planning to use it. + This is the function type of the callback used for the #GSource returned by g_socket_create_source(). + it should return %FALSE if the source should be removed. @@ -63683,11 +72638,13 @@ for a given service. However, if you are simply planning to connect to the remote service, you can use #GNetworkService's #GSocketConnectable interface and not need to worry about #GSrvTarget at all. + Creates a new #GSrvTarget with the given parameters. You should not need to use this; normally #GSrvTargets are created by #GResolver. + a new #GSrvTarget. @@ -63713,6 +72670,7 @@ created by #GResolver. Copies @target + a copy of @target @@ -63726,6 +72684,7 @@ created by #GResolver. Frees @target + @@ -63741,6 +72700,7 @@ created by #GResolver. this to the user, you should use g_hostname_is_ascii_encoded() to check if it contains encoded Unicode segments, and use g_hostname_to_unicode() to convert it if it does.) + @target's hostname @@ -63754,6 +72714,7 @@ g_hostname_to_unicode() to convert it if it does.) Gets @target's port + @target's port @@ -63769,6 +72730,7 @@ g_hostname_to_unicode() to convert it if it does.) Gets @target's priority. You should not need to look at this; #GResolver already sorts the targets according to the algorithm in RFC 2782. + @target's priority @@ -63784,6 +72746,7 @@ RFC 2782. Gets @target's weight. You should not need to look at this; #GResolver already sorts the targets according to the algorithm in RFC 2782. + @target's weight @@ -63797,6 +72760,7 @@ RFC 2782. Sorts @targets in place according to the algorithm in RFC 2782. + the head of the sorted list. @@ -63816,6 +72780,7 @@ RFC 2782. #GStaticResource is an opaque data structure and can only be accessed using the following functions. + @@ -63837,6 +72802,7 @@ using the following functions. This is normally used by code generated by [glib-compile-resources][glib-compile-resources] and is not typically used by other code. + @@ -63853,6 +72819,7 @@ and is not typically used by other code. This is normally used by code generated by [glib-compile-resources][glib-compile-resources] and is not typically used by other code. + a #GResource @@ -63871,6 +72838,7 @@ GStaticResource. This is normally used by code generated by [glib-compile-resources][glib-compile-resources] and is not typically used by other code. + @@ -63946,6 +72914,7 @@ stdout/stderr will be inherited from the parent. You can use @flags to control this behavior. The argument list must be terminated with %NULL. + A newly created #GSubprocess, or %NULL on error (and @error will be set) @@ -63974,6 +72943,7 @@ The argument list must be terminated with %NULL. Create a new process with the given flags and argument list. The argument list is expected to be %NULL-terminated. + A newly created #GSubprocess, or %NULL on error (and @error will be set) @@ -63982,8 +72952,8 @@ The argument list is expected to be %NULL-terminated. commandline arguments for the subprocess - - + + @@ -64034,6 +73004,7 @@ starting this function, since they may be left in strange states, even if the operation was cancelled. You should especially not attempt to interact with the pipes while the operation is in progress (either from another thread or if using the asynchronous version). + %TRUE if successful @@ -64051,11 +73022,11 @@ attempt to interact with the pipes while the operation is in progress a #GCancellable - + data read from the subprocess stdout - + data read from the subprocess stderr @@ -64064,6 +73035,7 @@ attempt to interact with the pipes while the operation is in progress Asynchronous version of g_subprocess_communicate(). Complete invocation with g_subprocess_communicate_finish(). + @@ -64092,6 +73064,7 @@ invocation with g_subprocess_communicate_finish(). Complete an invocation of g_subprocess_communicate_async(). + @@ -64104,11 +73077,11 @@ invocation with g_subprocess_communicate_finish(). Result - + Return location for stdout data - + Return location for stderr data @@ -64116,7 +73089,11 @@ invocation with g_subprocess_communicate_finish(). Like g_subprocess_communicate(), but validates the output of the -process as UTF-8, and returns it as a regular NUL terminated string. +process as UTF-8, and returns it as a regular NUL terminated string. + +On error, @stdout_buf and @stderr_buf will be set to undefined values and +should not be used. + @@ -64133,11 +73110,11 @@ process as UTF-8, and returns it as a regular NUL terminated string. a #GCancellable - + data read from the subprocess stdout - + data read from the subprocess stderr @@ -64146,6 +73123,7 @@ process as UTF-8, and returns it as a regular NUL terminated string. Asynchronous version of g_subprocess_communicate_utf8(). Complete invocation with g_subprocess_communicate_utf8_finish(). + @@ -64174,6 +73152,7 @@ invocation with g_subprocess_communicate_utf8_finish(). Complete an invocation of g_subprocess_communicate_utf8_async(). + @@ -64186,11 +73165,11 @@ invocation with g_subprocess_communicate_utf8_finish(). Result - + Return location for stdout data - + Return location for stderr data @@ -64204,6 +73183,7 @@ however, you can use g_subprocess_wait() to monitor the status of the process after calling this function. On Unix, this function sends %SIGKILL. + @@ -64223,6 +73203,7 @@ This is equivalent to the system WEXITSTATUS macro. It is an error to call this function before g_subprocess_wait() and unless g_subprocess_get_if_exited() returned %TRUE. + the exit status @@ -64234,10 +73215,14 @@ unless g_subprocess_get_if_exited() returned %TRUE. - + On UNIX, returns the process ID as a decimal string. -On Windows, returns the result of GetProcessId() also as a string. - +On Windows, returns the result of GetProcessId() also as a string. +If the subprocess has terminated, this will return %NULL. + + + the subprocess identifier, or %NULL if the subprocess + has terminated @@ -64255,6 +73240,7 @@ This is equivalent to the system WIFEXITED macro. It is an error to call this function before g_subprocess_wait() has returned. + %TRUE if the case of a normal exit @@ -64273,6 +73259,7 @@ This is equivalent to the system WIFSIGNALED macro. It is an error to call this function before g_subprocess_wait() has returned. + %TRUE if the case of termination due to a signal @@ -64296,6 +73283,7 @@ followed by g_subprocess_get_exit_status(). It is an error to call this function before g_subprocess_wait() has returned. + the (meaningless) waitpid() exit status from the kernel @@ -64313,6 +73301,7 @@ returned. The process must have been created with %G_SUBPROCESS_FLAGS_STDERR_PIPE. + the stderr pipe @@ -64330,6 +73319,7 @@ to the stdin of @subprocess. The process must have been created with %G_SUBPROCESS_FLAGS_STDIN_PIPE. + the stdout pipe @@ -64347,6 +73337,7 @@ The process must have been created with The process must have been created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE. + the stdout pipe @@ -64365,6 +73356,7 @@ way of the exit() system call or return from main(). It is an error to call this function before g_subprocess_wait() has returned. + %TRUE if the process exited cleanly with a exit status of 0 @@ -64384,6 +73376,7 @@ This is equivalent to the system WTERMSIG macro. It is an error to call this function before g_subprocess_wait() and unless g_subprocess_get_if_signaled() returned %TRUE. + the signal causing termination @@ -64403,6 +73396,7 @@ This API is race-free. If the subprocess has terminated, it will not be signalled. This API is not available on Windows. + @@ -64429,6 +73423,7 @@ abnormal termination. See g_subprocess_wait_check() for that. Cancelling @cancellable doesn't kill the subprocess. Call g_subprocess_force_exit() if it is desirable. + %TRUE on success, %FALSE if @cancellable was cancelled @@ -64448,6 +73443,7 @@ g_subprocess_force_exit() if it is desirable. Wait for the subprocess to terminate. This is the asynchronous version of g_subprocess_wait(). + @@ -64472,6 +73468,7 @@ This is the asynchronous version of g_subprocess_wait(). Combines g_subprocess_wait() with g_spawn_check_exit_status(). + %TRUE on success, %FALSE if process exited abnormally, or @cancellable was cancelled @@ -64492,6 +73489,7 @@ This is the asynchronous version of g_subprocess_wait(). Combines g_subprocess_wait_async() with g_spawn_check_exit_status(). This is the asynchronous version of g_subprocess_wait_check(). + @@ -64517,6 +73515,7 @@ This is the asynchronous version of g_subprocess_wait_check(). Collects the result of a previous call to g_subprocess_wait_check_async(). + %TRUE if successful, or %FALSE with @error set @@ -64535,6 +73534,7 @@ g_subprocess_wait_check_async(). Collects the result of a previous call to g_subprocess_wait_async(). + %TRUE if successful, or %FALSE with @error set @@ -64562,7 +73562,7 @@ g_subprocess_wait_async(). Flags to define the behaviour of a #GSubprocess. -Note that the default for stdin is to redirect from /dev/null. For +Note that the default for stdin is to redirect from `/dev/null`. For stdout and stderr the default are for them to inherit the corresponding descriptor from the calling process. @@ -64588,7 +73588,7 @@ example, you may not request both %G_SUBPROCESS_FLAGS_STDOUT_PIPE and silence the stdout of the spawned - process (ie: redirect to /dev/null). + process (ie: redirect to `/dev/null`). create a pipe for the stderr of the @@ -64597,7 +73597,7 @@ example, you may not request both %G_SUBPROCESS_FLAGS_STDOUT_PIPE and silence the stderr of the spawned - process (ie: redirect to /dev/null). + process (ie: redirect to `/dev/null`). merge the stderr of the spawned @@ -64626,6 +73626,7 @@ a similar configuration. The launcher is created with the default options. A copy of the environment of the calling process is made at the time of this call and will be used as the environment that the process is launched in. + @@ -64642,22 +73643,24 @@ environment of processes launched from this launcher. On UNIX, the returned string can be an arbitrary byte string. On Windows, it will be UTF-8. + - the value of the environment variable, %NULL if unset - + the value of the environment variable, + %NULL if unset + - a #GSubprocess + a #GSubprocessLauncher the environment variable to get - + - + Sets up a child setup function. The child setup function will be called after fork() but before @@ -64671,6 +73674,7 @@ given. %NULL can be given as @child_setup to disable the functionality. Child setup functions are only available on UNIX. + @@ -64699,17 +73703,18 @@ with. By default processes are launched with the current working directory of the launching process at the time of launch. + - a #GSubprocess + a #GSubprocessLauncher the cwd for launched processes - + @@ -64733,18 +73738,20 @@ etc.) before launching the subprocess. On UNIX, all strings in this array can be arbitrary byte strings. On Windows, they should be in UTF-8. + - a #GSubprocess + a #GSubprocessLauncher - the replacement environment + + the replacement environment - + @@ -64762,6 +73769,7 @@ handle a particular stdio stream (eg: specifying both You may also not set a flag that conflicts with a previous call to a function like g_subprocess_launcher_set_stdin_file_path() or g_subprocess_launcher_take_stdout_fd(). + @@ -64791,6 +73799,7 @@ You may not set a stderr file path if a stderr fd is already set or if the launcher flags contain any flags directing stderr elsewhere. This feature is only available on UNIX. + @@ -64801,7 +73810,7 @@ This feature is only available on UNIX. a filename or %NULL - + @@ -64816,6 +73825,7 @@ You may not set a stdin file path if a stdin fd is already set or if the launcher flags contain any flags directing stdin elsewhere. This feature is only available on UNIX. + @@ -64841,6 +73851,7 @@ You may not set a stdout file path if a stdout fd is already set or if the launcher flags contain any flags directing stdout elsewhere. This feature is only available on UNIX. + @@ -64851,7 +73862,7 @@ This feature is only available on UNIX. a filename or %NULL - + @@ -64862,21 +73873,23 @@ processes launched from this launcher. On UNIX, both the variable's name and value can be arbitrary byte strings, except that the variable's name cannot contain '='. On Windows, they should be in UTF-8. + - a #GSubprocess + a #GSubprocessLauncher - the environment variable to set, must not contain '=' - + the environment variable to set, + must not contain '=' + the new value for the variable - + whether to change the variable if it already exists @@ -64886,6 +73899,7 @@ On Windows, they should be in UTF-8. Creates a #GSubprocess given a provided varargs list of arguments. + A new #GSubprocess, or %NULL on error (and @error will be set) @@ -64911,6 +73925,7 @@ On Windows, they should be in UTF-8. Creates a #GSubprocess given a provided array of arguments. + A new #GSubprocess, or %NULL on error (and @error will be set) @@ -64922,8 +73937,8 @@ On Windows, they should be in UTF-8. Command line arguments - - + + @@ -64941,6 +73956,7 @@ descriptor in the child. An example use case is GNUPG, which has a command line argument --passphrase-fd providing a file descriptor number where it expects the passphrase to be written. + @@ -64976,6 +73992,7 @@ You may not set a stderr fd if a stderr file path is already set or if the launcher flags contain any flags directing stderr elsewhere. This feature is only available on UNIX. + @@ -65009,6 +74026,7 @@ You may not set a stdin fd if a stdin file path is already set or if the launcher flags contain any flags directing stdin elsewhere. This feature is only available on UNIX. + @@ -65041,6 +74059,7 @@ You may not set a stdout fd if a stdout file path is already set or if the launcher flags contain any flags directing stdout elsewhere. This feature is only available on UNIX. + @@ -65061,17 +74080,19 @@ processes launched from this launcher. On UNIX, the variable's name can be an arbitrary byte string not containing '='. On Windows, it should be in UTF-8. + - a #GSubprocess + a #GSubprocessLauncher - the environment variable to unset, must not contain '=' - + the environment variable to unset, + must not contain '=' + @@ -65079,21 +74100,318 @@ containing '='. On Windows, it should be in UTF-8. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Extension point for TLS functionality via #GTlsBackend. See [Extending GIO][extending-gio]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The purpose used to verify the client certificate in a TLS connection. Used by TLS servers. + The purpose used to verify the server certificate in a TLS connection. This is the most common purpose in use. Used by TLS clients. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A #GTask represents and manages a cancellable "task". @@ -65108,11 +74426,13 @@ task object around through your asynchronous operation. Eventually, you will call a method such as g_task_return_pointer() or g_task_return_error(), which will save the value you give it and then invoke the task's callback -function (waiting until the next iteration of the main -loop first, if necessary). The caller will pass the #GTask back -to the operation's finish function (as a #GAsyncResult), and -you can use g_task_propagate_pointer() or the like to extract -the return value. +function in the +[thread-default main context][g-main-context-push-thread-default] +where it was created (waiting until the next iteration of the main +loop first, if necessary). The caller will pass the #GTask back to +the operation's finish function (as a #GAsyncResult), and you can +use g_task_propagate_pointer() or the like to extract the +return value. Here is an example for using GTask as a GAsyncResult: |[<!-- language="C" --> @@ -65351,9 +74671,10 @@ Here is an example for chained asynchronous operations: ## Asynchronous operations from synchronous ones You can use g_task_run_in_thread() to turn a synchronous -operation into an asynchronous one, by running it in a thread -which will then dispatch the result back to the caller's -#GMainContext when it completes. +operation into an asynchronous one, by running it in a thread. +When it completes, the result will be dispatched to the +[thread-default main context][g-main-context-push-thread-default] +where the #GTask was created. Running a task in a thread: |[<!-- language="C" --> @@ -65565,7 +74886,7 @@ in several ways: whether the task's callback can be invoked directly, or if it needs to be sent to another #GMainContext, or delayed until the next iteration of the current #GMainContext.) -- The "finish" functions for #GTask-based operations are generally +- The "finish" functions for #GTask based operations are generally much simpler than #GSimpleAsyncResult ones, normally consisting of only a single call to g_task_propagate_pointer() or the like. Since g_task_propagate_pointer() "steals" the return value from @@ -65587,6 +74908,7 @@ in several ways: having come from the `_async()` wrapper function (for "short-circuit" results, such as when passing 0 to g_input_stream_read_async()). + Creates a #GTask acting on @source_object, which will eventually be @@ -65605,6 +74927,7 @@ simplified handling in cases where cancellation may imply that other objects that the task depends on have been destroyed. If you do not want this behavior, you can use g_task_set_check_cancellable() to change it. + a #GTask. @@ -65633,6 +74956,7 @@ g_task_set_check_cancellable() to change it. Checks that @result is a #GTask, and that @source_object is its source object (or that @source_object is %NULL and @result has no source object). This can be used in g_return_if_fail() checks. + %TRUE if @result and @source_object are valid, %FALSE if not @@ -65659,6 +74983,7 @@ check if the result there is tagged as having been created by the wrapper method, and deal with it appropriately if so. See also g_task_report_new_error(). + @@ -65696,6 +75021,7 @@ having been created by the wrapper method, and deal with it appropriately if so. See also g_task_report_error(). + @@ -65741,7 +75067,11 @@ to wait for a #GSource to trigger. Attaches @source to @task's #GMainContext with @task's [priority][io-priority], and sets @source's callback to @callback, with @task as the callback's `user_data`. +It will set the @source’s name to the task’s name (as set with +g_task_set_name()), if one has been set. + This takes a reference on @task until @source is destroyed. + @@ -65762,6 +75092,7 @@ This takes a reference on @task until @source is destroyed. Gets @task's #GCancellable + @task's #GCancellable @@ -65776,6 +75107,7 @@ This takes a reference on @task until @source is destroyed. Gets @task's check-cancellable flag. See g_task_set_check_cancellable() for more details. + @@ -65790,6 +75122,7 @@ g_task_set_check_cancellable() for more details. Gets the value of #GTask:completed. This changes from %FALSE to %TRUE after the task’s callback is invoked, and will return %FALSE if called from inside the callback. + %TRUE if the task has completed, %FALSE otherwise. @@ -65809,6 +75142,7 @@ at the point when @task was created). This will always return a non-%NULL value, even if the task's context is the default #GMainContext. + @task's #GMainContext @@ -65820,8 +75154,23 @@ context is the default #GMainContext. + + Gets @task’s name. See g_task_set_name(). + + + @task’s name, or %NULL + + + + + a #GTask + + + + Gets @task's priority + @task's priority @@ -65836,6 +75185,7 @@ context is the default #GMainContext. Gets @task's return-on-cancel flag. See g_task_set_return_on_cancel() for more details. + @@ -65849,7 +75199,8 @@ g_task_set_return_on_cancel() for more details. Gets the source object from @task. Like g_async_result_get_source_object(), but does not ref the object. - + + @task's source object, or %NULL @@ -65862,6 +75213,7 @@ g_async_result_get_source_object(), but does not ref the object. Gets @task's source tag. See g_task_set_source_tag(). + @task's source tag @@ -65875,6 +75227,7 @@ g_async_result_get_source_object(), but does not ref the object. Gets @task's `task_data`. + @task's `task_data`. @@ -65888,6 +75241,7 @@ g_async_result_get_source_object(), but does not ref the object. Tests if @task resulted in an error. + %TRUE if the task resulted in an error, %FALSE otherwise. @@ -65907,6 +75261,7 @@ instead return %FALSE and set @error. Since this method transfers ownership of the return value (or error) to the caller, you may only call it once. + the task result, or %FALSE on error @@ -65926,6 +75281,7 @@ instead return -1 and set @error. Since this method transfers ownership of the return value (or error) to the caller, you may only call it once. + the task result, or -1 on error @@ -65946,6 +75302,7 @@ instead return %NULL and set @error. Since this method transfers ownership of the return value (or error) to the caller, you may only call it once. + the task result, or %NULL on error @@ -65957,10 +75314,38 @@ error) to the caller, you may only call it once. + + Gets the result of @task as a #GValue, and transfers ownership of +that value to the caller. As with g_task_return_value(), this is +a generic low-level method; g_task_propagate_pointer() and the like +will usually be more useful for C code. + +If the task resulted in an error, or was cancelled, then this will +instead set @error and return %FALSE. + +Since this method transfers ownership of the return value (or +error) to the caller, you may only call it once. + + + %TRUE if @task succeeded, %FALSE on error. + + + + + a #GTask + + + + return location for the #GValue + + + + Sets @task's result to @result and completes the task (see g_task_return_pointer() for more discussion of exactly what this means). + @@ -65987,6 +75372,7 @@ Call g_error_copy() on the error if you need to keep a local copy as well. See also g_task_return_new_error(). + @@ -66006,6 +75392,7 @@ See also g_task_return_new_error(). @task's error accordingly and completes the task (see g_task_return_pointer() for more discussion of exactly what this means). + %TRUE if @task has been cancelled, %FALSE if not @@ -66021,6 +75408,7 @@ means). Sets @task's result to @result and completes the task (see g_task_return_pointer() for more discussion of exactly what this means). + @@ -66042,6 +75430,7 @@ g_task_return_pointer() for more discussion of exactly what this means). See also g_task_return_error(). + @@ -66087,6 +75476,7 @@ Note that since the task may be completed before returning from g_task_return_pointer(), you cannot assume that @result is still valid after calling this, unless you are still holding another reference on it. + @@ -66106,7 +75496,32 @@ reference on it. - + + Sets @task's result to @result (by copying it) and completes the task. + +If @result is %NULL then a #GValue of type #G_TYPE_POINTER +with a value of %NULL will be used for the result. + +This is a very generic low-level method intended primarily for use +by language bindings; for C code, g_task_return_pointer() and the +like will normally be much easier to use. + + + + + + + a #GTask + + + + the #GValue result of + a task function + + + + + Runs @task_func in another thread. When @task_func returns, @task's #GAsyncReadyCallback will be invoked in @task's #GMainContext. @@ -66119,6 +75534,7 @@ g_task_run_in_thread(), you should not assume that it will always do this. If you have a very large number of tasks to run, but don't want them to all run at once, you should only queue a limited number of them at a time. + @@ -66127,13 +75543,13 @@ number of them at a time. a #GTask - + a #GTaskThreadFunc - + Runs @task_func in another thread, and waits for it to return or be cancelled. You can use g_task_propagate_pointer(), etc, afterward to get the result of @task_func. @@ -66150,6 +75566,7 @@ g_task_run_in_thread_sync(), you should not assume that it will always do this. If you have a very large number of tasks to run, but don't want them to all run at once, you should only queue a limited number of them at a time. + @@ -66158,7 +75575,7 @@ limited number of them at a time. a #GTask - + a #GTaskThreadFunc @@ -66179,6 +75596,7 @@ via g_task_return_error_if_cancelled()). If you are using g_task_set_return_on_cancel() as well, then you must leave check-cancellable set %TRUE. + @@ -66194,6 +75612,31 @@ you must leave check-cancellable set %TRUE. + + Sets @task’s name, used in debugging and profiling. The name defaults to +%NULL. + +The task name should describe in a human readable way what the task does. +For example, ‘Open file’ or ‘Connect to network host’. It is used to set the +name of the #GSource used for idle completion of the task. + +This function may only be called before the @task is first used in a thread +other than the one it was constructed in. + + + + + + + a #GTask + + + + a human readable name for the task, or %NULL to unset it + + + + Sets @task's priority. If you do not call this, it will default to %G_PRIORITY_DEFAULT. @@ -66202,6 +75645,7 @@ This will affect the priority of #GSources created with g_task_attach_source() and the scheduling of tasks run in threads, and can also be explicitly retrieved later via g_task_get_priority(). + @@ -66245,6 +75689,7 @@ If the task's #GCancellable is already cancelled before you call g_task_run_in_thread()/g_task_run_in_thread_sync(), then the #GTaskThreadFunc will still be run (for consistency), but the task will also be completed right away. + %TRUE if @task's return-on-cancel flag was changed to match @return_on_cancel. %FALSE if @task has already been @@ -66270,6 +75715,7 @@ doing the tagging) and then later check it using g_task_get_source_tag() (or g_async_result_is_tagged()) in the task's "finish" function, to figure out if the response came from a particular place. + @@ -66286,6 +75732,7 @@ particular place. Sets @task's task data (freeing the existing task data, if any). + @@ -66318,6 +75765,7 @@ context as the task’s callback, immediately after that callback is invoke + The prototype for a task function to be run in a thread via @@ -66335,6 +75783,7 @@ g_task_set_return_on_cancel() for more details. Other than in that case, @task will be completed when the #GTaskThreadFunc returns, not when it calls a `g_task_return_` function. + @@ -66360,9 +75809,11 @@ Other than in that case, @task will be completed when the This is the subclass of #GSocketConnection that is created for TCP/IP sockets. + Checks if graceful disconnects are used. See g_tcp_connection_set_graceful_disconnect(). + %TRUE if graceful disconnect is used on close, %FALSE otherwise @@ -66384,6 +75835,7 @@ all the outstanding data to the other end, or get an error reported. However, it also means we have to wait for all the data to reach the other side and for it to acknowledge this by closing the socket, which may take a while. For this reason it is disabled by default. + @@ -66409,20 +75861,24 @@ take a while. For this reason it is disabled by default. + + - + A #GTcpWrapperConnection can be used to wrap a #GIOStream that is based on a #GSocket, but which is not actually a #GSocketConnection. This is used by #GSocketClient so that it can always return a #GSocketConnection, even when the connection it has actually created is not directly a #GSocketConnection. + Wraps @base_io_stream and @socket together as a #GSocketConnection. + the new #GSocketConnection. @@ -66440,6 +75896,7 @@ actually created is not directly a #GSocketConnection. Get's @conn's base #GIOStream + @conn's base #GIOStream @@ -66462,11 +75919,13 @@ actually created is not directly a #GSocketConnection. + + A helper class for testing code which uses D-Bus without touching the user's @@ -66543,6 +76002,7 @@ do the following in the directory holding schemas: ]| Create a new #GTestDBus object. + a new #GTestDBus. @@ -66561,6 +76021,7 @@ won't use user's session bus. This is useful for unit tests that want to verify behaviour when no session bus is running. It is not necessary to call this if unit test already calls g_test_dbus_up() before acquiring the session bus. + @@ -66568,6 +76029,7 @@ g_test_dbus_up() before acquiring the session bus. Add a path where dbus-daemon will look up .service files. This can't be called after g_test_dbus_up(). + @@ -66586,8 +76048,9 @@ called after g_test_dbus_up(). Stop the session bus started by g_test_dbus_up(). This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() -is destroyed. This is done to ensure that the next unit test won't get a +to be destroyed. This is done to ensure that the next unit test won't get a leaked singleton from this test. + @@ -66602,6 +76065,7 @@ leaked singleton from this test. Get the address on which dbus-daemon is running. If g_test_dbus_up() has not been called yet, %NULL is returned. This can be used with g_dbus_connection_new_for_address(). + the address of the bus, or %NULL. @@ -66615,6 +76079,7 @@ g_dbus_connection_new_for_address(). Get the flags of the #GTestDBus object. + the value of #GTestDBus:flags property @@ -66633,6 +76098,7 @@ Unlike g_test_dbus_down(), this won't verify the #GDBusConnection singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit tests wanting to verify behaviour after the session bus has been stopped can use this function but should still call g_test_dbus_down() when done. + @@ -66652,6 +76118,7 @@ g_test_dbus_down() must be called in its teardown callback. If this function is called from unit test's main(), then g_test_dbus_down() must be called after g_test_run(). + @@ -66681,9 +76148,11 @@ not provide actual pixmaps for icons, just the icon names. Ideally something like gtk_icon_theme_choose_icon() should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes. + Creates a new themed icon for @iconname. + a new #GThemedIcon. @@ -66697,6 +76166,7 @@ themes that inherit other themes. Creates a new themed icon for @iconnames. + a new #GThemedIcon @@ -66731,6 +76201,7 @@ const char *names[] = { icon1 = g_themed_icon_new_from_names (names, 4); icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio"); ]| + a new #GThemedIcon. @@ -66747,6 +76218,7 @@ icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio"); Note that doing so invalidates the hash computed by prior calls to g_icon_hash(). + @@ -66763,6 +76235,7 @@ to g_icon_hash(). Gets the names of icons from within @icon. + a list of icon names. @@ -66781,6 +76254,7 @@ to g_icon_hash(). Note that doing so invalidates the hash computed by prior calls to g_icon_hash(). + @@ -66825,6 +76299,7 @@ would become + A #GThreadedSocketService is a simple subclass of #GSocketService @@ -66842,9 +76317,11 @@ new connections when all threads are busy. As with #GSocketService, you may connect to #GThreadedSocketService::run, or subclass and override the default handler. + Creates a new #GThreadedSocketService with no listeners. Listeners must be added with one of the #GSocketListener "add" methods. + a new #GSocketService. @@ -66858,6 +76335,7 @@ must be added with one of the #GSocketListener "add" methods. + @@ -66904,11 +76382,13 @@ not return until the connection is closed. + + @@ -66927,6 +76407,7 @@ not return until the connection is closed. + @@ -66934,6 +76415,7 @@ not return until the connection is closed. + @@ -66941,6 +76423,7 @@ not return until the connection is closed. + @@ -66948,6 +76431,7 @@ not return until the connection is closed. + @@ -66955,6 +76439,7 @@ not return until the connection is closed. + @@ -66962,6 +76447,7 @@ not return until the connection is closed. + The client authentication mode for a #GTlsServerConnection. @@ -66977,8 +76463,10 @@ not return until the connection is closed. TLS (Transport Layer Security, aka SSL) and DTLS backend. + Gets the default #GTlsBackend for the system. + a #GTlsBackend @@ -66986,6 +76474,7 @@ not return until the connection is closed. Gets the default #GTlsDatabase used to verify TLS connections. + the default database, which should be unreffed when done. @@ -67001,6 +76490,7 @@ not return until the connection is closed. Checks if DTLS is supported. DTLS support may not be available even if TLS support is available, and vice-versa. + whether DTLS is supported @@ -67015,6 +76505,7 @@ support is available, and vice-versa. Checks if TLS is supported; if this returns %FALSE for the default #GTlsBackend, it means no "real" TLS backend is available. + whether or not TLS is supported @@ -67028,6 +76519,7 @@ support is available, and vice-versa. Gets the #GType of @backend's #GTlsCertificate implementation. + the #GType of @backend's #GTlsCertificate implementation. @@ -67042,6 +76534,7 @@ support is available, and vice-versa. Gets the #GType of @backend's #GTlsClientConnection implementation. + the #GType of @backend's #GTlsClientConnection implementation. @@ -67056,6 +76549,7 @@ support is available, and vice-versa. Gets the default #GTlsDatabase used to verify TLS connections. + the default database, which should be unreffed when done. @@ -67070,9 +76564,10 @@ support is available, and vice-versa. Gets the #GType of @backend’s #GDtlsClientConnection implementation. + the #GType of @backend’s #GDtlsClientConnection - implementation. + implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS. @@ -67084,9 +76579,10 @@ support is available, and vice-versa. Gets the #GType of @backend’s #GDtlsServerConnection implementation. + the #GType of @backend’s #GDtlsServerConnection - implementation. + implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS. @@ -67098,6 +76594,7 @@ support is available, and vice-versa. Gets the #GType of @backend's #GTlsFileDatabase implementation. + the #GType of backend's #GTlsFileDatabase implementation. @@ -67111,6 +76608,7 @@ support is available, and vice-versa. Gets the #GType of @backend's #GTlsServerConnection implementation. + the #GType of @backend's #GTlsServerConnection implementation. @@ -67123,9 +76621,34 @@ support is available, and vice-versa. + + Set the default #GTlsDatabase used to verify TLS connections + +Any subsequent call to g_tls_backend_get_default_database() will return +the database set in this call. Existing databases and connections are not +modified. + +Setting a %NULL default database will reset to using the system default +database as if g_tls_backend_set_default_database() had never been called. + + + + + + + the #GTlsBackend + + + + the #GTlsDatabase + + + + Checks if DTLS is supported. DTLS support may not be available even if TLS support is available, and vice-versa. + whether DTLS is supported @@ -67140,6 +76663,7 @@ support is available, and vice-versa. Checks if TLS is supported; if this returns %FALSE for the default #GTlsBackend, it means no "real" TLS backend is available. + whether or not TLS is supported @@ -67154,12 +76678,14 @@ support is available, and vice-versa. Provides an interface for describing TLS-related types. + The parent interface. + whether or not TLS is supported @@ -67174,6 +76700,7 @@ support is available, and vice-versa. + @@ -67181,6 +76708,7 @@ support is available, and vice-versa. + @@ -67188,6 +76716,7 @@ support is available, and vice-versa. + @@ -67195,6 +76724,7 @@ support is available, and vice-versa. + @@ -67202,6 +76732,7 @@ support is available, and vice-versa. + the default database, which should be unreffed when done. @@ -67217,6 +76748,7 @@ support is available, and vice-versa. + whether DTLS is supported @@ -67231,6 +76763,7 @@ support is available, and vice-versa. + @@ -67238,6 +76771,7 @@ support is available, and vice-versa. + @@ -67250,6 +76784,7 @@ This can represent either a certificate only (eg, the certificate received by a client from a server), or the combination of a certificate and a private key (which is needed when acting as a #GTlsServerConnection). + Creates a #GTlsCertificate from the PEM-encoded data in @file. The returned certificate will be the first certificate found in @file. As @@ -67264,6 +76799,7 @@ still be returned. If @file cannot be read or parsed, the function will return %NULL and set @error. Otherwise, this behaves like g_tls_certificate_new_from_pem(). + the new certificate, or %NULL on error @@ -67271,7 +76807,7 @@ g_tls_certificate_new_from_pem(). file containing a PEM-encoded certificate to import - + @@ -67290,6 +76826,7 @@ still be returned. If either file cannot be read or parsed, the function will return %NULL and set @error. Otherwise, this behaves like g_tls_certificate_new_from_pem(). + the new certificate, or %NULL on error @@ -67298,12 +76835,12 @@ g_tls_certificate_new_from_pem(). file containing one or more PEM-encoded certificates to import - + file containing a PEM-encoded private key to import - + @@ -67322,6 +76859,7 @@ file) and the #GTlsCertificate:issuer property of each certificate will be set accordingly if the verification succeeds. If any certificate in the chain cannot be verified, the first certificate in the file will still be returned. + the new certificate, or %NULL if @data is invalid @@ -67343,6 +76881,7 @@ data in @file. If @file cannot be read or parsed, the function will return %NULL and set @error. If @file does not contain any PEM-encoded certificates, this will return an empty list and not set @error. + a #GList containing #GTlsCertificate objects. You must free the list @@ -67354,7 +76893,7 @@ and its contents when you are done with it. file containing PEM-encoded certificates to import - + @@ -67378,6 +76917,7 @@ value. (All other #GTlsCertificateFlags values will always be set or unset as appropriate.) + the appropriate #GTlsCertificateFlags @@ -67399,6 +76939,7 @@ as appropriate.) Gets the #GTlsCertificate representing @cert's issuer, if known + The certificate of @cert's issuer, or %NULL if @cert is self-signed or signed with an unknown @@ -67418,6 +76959,7 @@ The raw DER byte data of the two certificates are checked for equality. This has the effect that two certificates may compare equal even if their #GTlsCertificate:issuer, #GTlsCertificate:private-key, or #GTlsCertificate:private-key-pem properties differ. + whether the same or not @@ -67453,6 +76995,7 @@ value. (All other #GTlsCertificateFlags values will always be set or unset as appropriate.) + the appropriate #GTlsCertificateFlags @@ -67477,7 +77020,7 @@ as appropriate.) This property and the #GTlsCertificate:certificate-pem property represent the same data, just in different forms. - + @@ -67504,7 +77047,7 @@ PKCS#8 format is supported since 2.32; earlier releases only support PKCS#1. You can use the `openssl rsa` tool to convert PKCS#8 keys to PKCS#1. - + @@ -67528,11 +77071,13 @@ tool to convert PKCS#8 keys to PKCS#1. + + the appropriate #GTlsCertificateFlags @@ -67554,7 +77099,7 @@ tool to convert PKCS#8 keys to PKCS#1. - + @@ -67598,6 +77143,7 @@ a particular certificate was rejected (eg, in + Flags for g_tls_interaction_request_certificate(), @@ -67610,6 +77156,7 @@ g_tls_interaction_invoke_request_certificate(). #GTlsClientConnection is the client-side subclass of #GTlsConnection, representing a client-side TLS connection. + Creates a new #GTlsClientConnection wrapping @base_io_stream (which @@ -67619,6 +77166,7 @@ communicate with the server identified by @server_identity. See the documentation for #GTlsConnection:base-io-stream for restrictions on when application code can run operations on the @base_io_stream after this function has returned. + the new #GTlsClientConnection, or %NULL on error @@ -67636,12 +77184,35 @@ this function has returned. - Copies session state from one connection to another. This is -not normally needed, but may be used when the same session -needs to be used between different endpoints as is required -by some protocols such as FTP over TLS. @source should have -already completed a handshake, and @conn should not have -completed a handshake. + Possibly copies session state from one connection to another, for use +in TLS session resumption. This is not normally needed, but may be +used when the same session needs to be used between different +endpoints, as is required by some protocols, such as FTP over TLS. +@source should have already completed a handshake and, since TLS 1.3, +it should have been used to read data at least once. @conn should not +have completed a handshake. + +It is not possible to know whether a call to this function will +actually do anything. Because session resumption is normally used +only for performance benefit, the TLS backend might not implement +this function. Even if implemented, it may not actually succeed in +allowing @conn to resume @source's TLS session, because the server +may not have sent a session resumption token to @source, or it may +refuse to accept the token from @conn. There is no way to know +whether a call to this function is actually successful. + +Using this function is not required to benefit from session +resumption. If the TLS backend supports session resumption, the +session will be resumed automatically if it is possible to do so +without weakening the privacy guarantees normally provided by TLS, +without need to call this function. For example, with TLS 1.3, +a session ticket will be automatically copied from any +#GTlsClientConnection that has previously received session tickets +from the server, provided a ticket is available that has not +previously been used for session resumption, since session ticket +reuse would be a privacy weakness. Using this function causes the +ticket to be copied without regard for privacy considerations. + @@ -67657,12 +77228,35 @@ completed a handshake. - Copies session state from one connection to another. This is -not normally needed, but may be used when the same session -needs to be used between different endpoints as is required -by some protocols such as FTP over TLS. @source should have -already completed a handshake, and @conn should not have -completed a handshake. + Possibly copies session state from one connection to another, for use +in TLS session resumption. This is not normally needed, but may be +used when the same session needs to be used between different +endpoints, as is required by some protocols, such as FTP over TLS. +@source should have already completed a handshake and, since TLS 1.3, +it should have been used to read data at least once. @conn should not +have completed a handshake. + +It is not possible to know whether a call to this function will +actually do anything. Because session resumption is normally used +only for performance benefit, the TLS backend might not implement +this function. Even if implemented, it may not actually succeed in +allowing @conn to resume @source's TLS session, because the server +may not have sent a session resumption token to @source, or it may +refuse to accept the token from @conn. There is no way to know +whether a call to this function is actually successful. + +Using this function is not required to benefit from session +resumption. If the TLS backend supports session resumption, the +session will be resumed automatically if it is possible to do so +without weakening the privacy guarantees normally provided by TLS, +without need to call this function. For example, with TLS 1.3, +a session ticket will be automatically copied from any +#GTlsClientConnection that has previously received session tickets +from the server, provided a ticket is available that has not +previously been used for session resumption, since session ticket +reuse would be a privacy weakness. Using this function causes the +ticket to be copied without regard for privacy considerations. + @@ -67685,13 +77279,14 @@ Otherwise, it will be %NULL. Each item in the list is a #GByteArray which contains the complete subject DN of the certificate authority. + the list of CA DNs. You should unref each element with g_byte_array_unref() and then the free the list with g_list_free(). - + @@ -67704,6 +77299,7 @@ the free the list with g_list_free(). Gets @conn's expected server identity + a #GSocketConnectable describing the expected server identity, or %NULL if the expected identity is not @@ -67717,12 +77313,13 @@ known. - - Gets whether @conn will use SSL 3.0 rather than the -highest-supported version of TLS; see -g_tls_client_connection_set_use_ssl3(). + + SSL 3.0 is no longer supported. See +g_tls_client_connection_set_use_ssl3() for details. + SSL 3.0 is insecure. + - whether @conn will use SSL 3.0 + %FALSE @@ -67734,6 +77331,7 @@ g_tls_client_connection_set_use_ssl3(). Gets @conn's validation flags + the validation flags @@ -67750,6 +77348,7 @@ g_tls_client_connection_set_use_ssl3(). servers on virtual hosts which certificate to present, and also to let @conn know what name to look for in the certificate when performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. + @@ -67764,12 +77363,19 @@ performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. - - If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than -trying to properly negotiate the right version of TLS or SSL to use. -This can be used when talking to servers that do not implement the -fallbacks correctly and which will therefore fail to handshake with -a "modern" TLS handshake attempt. + + Since GLib 2.42.1, SSL 3.0 is no longer supported. + +From GLib 2.42.1 through GLib 2.62, this function could be used to +force use of TLS 1.0, the lowest-supported TLS protocol version at +the time. In the past, this was needed to connect to broken TLS +servers that exhibited protocol version intolerance. Such servers +are no longer common, and using TLS 1.0 is no longer considered +acceptable. + +Since GLib 2.64, this function does nothing. + SSL 3.0 is insecure. + @@ -67779,7 +77385,7 @@ a "modern" TLS handshake attempt. - whether to use SSL 3.0 + a #gboolean, ignored @@ -67788,6 +77394,7 @@ a "modern" TLS handshake attempt. Sets @conn's validation flags, to override the default set of checks performed when validating a server certificate. By default, %G_TLS_CERTIFICATE_VALIDATE_ALL is used. + @@ -67831,17 +77438,10 @@ certificate we expect, which is useful for servers that serve virtual hosts. - - If %TRUE, tells the connection to use a fallback version of TLS -or SSL, rather than trying to negotiate the best version of TLS -to use. This can be used when talking to servers that don't -implement version negotiation correctly and therefore refuse to -handshake at all with a "modern" TLS handshake. - -Despite the property name, the fallback version is not -necessarily SSL 3.0; if SSL 3.0 has been disabled, the -#GTlsClientConnection will use the next highest available version -(normally TLS 1.0) as the fallback version. + + SSL 3.0 is no longer supported. See +g_tls_client_connection_set_use_ssl3() for details. + SSL 3.0 is insecure. @@ -67854,12 +77454,14 @@ overrides the default via #GTlsConnection::accept-certificate. vtable for a #GTlsClientConnection implementation. + The parent interface. + @@ -67883,7 +77485,9 @@ subclasses, #GTlsClientConnection and #GTlsServerConnection, implement client-side and server-side TLS, respectively. For DTLS (Datagram TLS) support, see #GDtlsConnection. + + @@ -67904,24 +77508,34 @@ For DTLS (Datagram TLS) support, see #GDtlsConnection. On the client side, it is never necessary to call this method; although the connection needs to perform a handshake after -connecting (or after sending a "STARTTLS"-type command) and may -need to rehandshake later if the server requests it, +connecting (or after sending a "STARTTLS"-type command), #GTlsConnection will handle this for you automatically when you try -to send or receive data on the connection. However, you can call -g_tls_connection_handshake() manually if you want to know for sure -whether the initial handshake succeeded or failed (as opposed to -just immediately trying to write to @conn's output stream, in which -case if it fails, it may not be possible to tell if it failed -before or after completing the handshake). +to send or receive data on the connection. You can call +g_tls_connection_handshake() manually if you want to know whether +the initial handshake succeeded or failed (as opposed to just +immediately trying to use @conn to read or write, in which case, +if it fails, it may not be possible to tell if it failed before or +after completing the handshake), but beware that servers may reject +client authentication after the handshake has completed, so a +successful handshake does not indicate the connection will be usable. Likewise, on the server side, although a handshake is necessary at the beginning of the communication, you do not need to call this function explicitly unless you want clearer error reporting. -However, you may call g_tls_connection_handshake() later on to -renegotiate parameters (encryption methods, etc) with the client. + +Previously, calling g_tls_connection_handshake() after the initial +handshake would trigger a rehandshake; however, this usage was +deprecated in GLib 2.60 because rehandshaking was removed from the +TLS protocol in TLS 1.3. Since GLib 2.64, calling this function after +the initial handshake will no longer do anything. + +When using a #GTlsConnection created by #GSocketClient, the +#GSocketClient performs the initial handshake, so calling this +function manually is not recommended. #GTlsConnection::accept_certificate may be emitted during the handshake. + success or failure @@ -67940,6 +77554,7 @@ handshake. Asynchronously performs a TLS handshake on @conn. See g_tls_connection_handshake() for more information. + @@ -67969,6 +77584,7 @@ g_tls_connection_handshake() for more information. Finish an asynchronous TLS handshake operation. See g_tls_connection_handshake() for more information. + %TRUE on success, %FALSE on failure, in which case @error will be set. @@ -67988,6 +77604,7 @@ case @error will be set. Used by #GTlsConnection implementations to emit the #GTlsConnection::accept-certificate signal. + %TRUE if one of the signal handlers has returned %TRUE to accept @peer_cert @@ -68011,6 +77628,7 @@ case @error will be set. Gets @conn's certificate, as set by g_tls_connection_set_certificate(). + @conn's certificate, or %NULL @@ -68025,6 +77643,7 @@ g_tls_connection_set_certificate(). Gets the certificate database that @conn uses to verify peer certificates. See g_tls_connection_set_database(). + the certificate database that @conn uses or %NULL @@ -68040,6 +77659,7 @@ peer certificates. See g_tls_connection_set_database(). Get the object that will be used to interact with the user. It will be used for things like prompting the user for passwords. If %NULL is returned, then no user interaction will occur for this connection. + The interaction object. @@ -68051,10 +77671,31 @@ no user interaction will occur for this connection. + + Gets the name of the application-layer protocol negotiated during +the handshake. + +If the peer did not use the ALPN extension, or did not advertise a +protocol that matched one of @conn's protocols, or the TLS backend +does not support ALPN, then this will be %NULL. See +g_tls_connection_set_advertised_protocols(). + + + the negotiated protocol, or %NULL + + + + + a #GTlsConnection + + + + Gets @conn's peer's certificate after the handshake has completed. (It is not set during the emission of #GTlsConnection::accept-certificate.) + @conn's peer's certificate, or %NULL @@ -68070,6 +77711,7 @@ no user interaction will occur for this connection. Gets the errors associated with validating @conn's peer's certificate, after the handshake has completed. (It is not set during the emission of #GTlsConnection::accept-certificate.) + @conn's peer's certificate errors @@ -68081,11 +77723,15 @@ during the emission of #GTlsConnection::accept-certificate.) - + Gets @conn rehandshaking mode. See g_tls_connection_set_rehandshake_mode() for details. + Changing the rehandshake mode is no longer + required for compatibility. Also, rehandshaking has been removed + from the TLS protocol in TLS 1.3. + - @conn's rehandshaking mode + %G_TLS_REHANDSHAKE_SAFELY @@ -68099,6 +77745,7 @@ g_tls_connection_set_rehandshake_mode() for details. Tests whether or not @conn expects a proper TLS close notification when the connection is closed. See g_tls_connection_set_require_close_notify() for details. + %TRUE if @conn requires a proper TLS close notification. @@ -68115,6 +77762,7 @@ notification. Gets whether @conn uses the system certificate database to verify peer certificates. See g_tls_connection_set_use_system_certdb(). Use g_tls_connection_get_database() instead + whether @conn uses the system certificate database @@ -68131,24 +77779,34 @@ peer certificates. See g_tls_connection_set_use_system_certdb(). On the client side, it is never necessary to call this method; although the connection needs to perform a handshake after -connecting (or after sending a "STARTTLS"-type command) and may -need to rehandshake later if the server requests it, +connecting (or after sending a "STARTTLS"-type command), #GTlsConnection will handle this for you automatically when you try -to send or receive data on the connection. However, you can call -g_tls_connection_handshake() manually if you want to know for sure -whether the initial handshake succeeded or failed (as opposed to -just immediately trying to write to @conn's output stream, in which -case if it fails, it may not be possible to tell if it failed -before or after completing the handshake). +to send or receive data on the connection. You can call +g_tls_connection_handshake() manually if you want to know whether +the initial handshake succeeded or failed (as opposed to just +immediately trying to use @conn to read or write, in which case, +if it fails, it may not be possible to tell if it failed before or +after completing the handshake), but beware that servers may reject +client authentication after the handshake has completed, so a +successful handshake does not indicate the connection will be usable. Likewise, on the server side, although a handshake is necessary at the beginning of the communication, you do not need to call this function explicitly unless you want clearer error reporting. -However, you may call g_tls_connection_handshake() later on to -renegotiate parameters (encryption methods, etc) with the client. + +Previously, calling g_tls_connection_handshake() after the initial +handshake would trigger a rehandshake; however, this usage was +deprecated in GLib 2.60 because rehandshaking was removed from the +TLS protocol in TLS 1.3. Since GLib 2.64, calling this function after +the initial handshake will no longer do anything. + +When using a #GTlsConnection created by #GSocketClient, the +#GSocketClient performs the initial handshake, so calling this +function manually is not recommended. #GTlsConnection::accept_certificate may be emitted during the handshake. + success or failure @@ -68167,6 +77825,7 @@ handshake. Asynchronously performs a TLS handshake on @conn. See g_tls_connection_handshake() for more information. + @@ -68196,6 +77855,7 @@ g_tls_connection_handshake() for more information. Finish an asynchronous TLS handshake operation. See g_tls_connection_handshake() for more information. + %TRUE on success, %FALSE on failure, in which case @error will be set. @@ -68212,6 +77872,35 @@ case @error will be set. + + Sets the list of application-layer protocols to advertise that the +caller is willing to speak on this connection. The +Application-Layer Protocol Negotiation (ALPN) extension will be +used to negotiate a compatible protocol with the peer; use +g_tls_connection_get_negotiated_protocol() to find the negotiated +protocol after the handshake. Specifying %NULL for the the value +of @protocols will disable ALPN negotiation. + +See [IANA TLS ALPN Protocol IDs](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) +for a list of registered protocol IDs. + + + + + + + a #GTlsConnection + + + + a %NULL-terminated + array of ALPN protocol names (eg, "http/1.1", "h2"), or %NULL + + + + + + This sets the certificate that @conn will present to its peer during the TLS handshake. For a #GTlsServerConnection, it is @@ -68231,6 +77920,7 @@ or without a certificate; in that case, if you don't provide a certificate, you can tell that the server requested one by the fact that g_tls_client_connection_get_accepted_cas() will return non-%NULL.) + @@ -68254,6 +77944,7 @@ peer certificate validation will always set the #GTlsConnection::accept-certificate will always be emitted on client-side connections, unless that bit is not set in #GTlsClientConnection:validation-flags). + @@ -68275,6 +77966,7 @@ for things like prompting the user for passwords. The @interaction argument will normally be a derived subclass of #GTlsInteraction. %NULL can also be provided if no user interaction should occur for this connection. + @@ -68289,27 +77981,15 @@ should occur for this connection. - - Sets how @conn behaves with respect to rehandshaking requests. - -%G_TLS_REHANDSHAKE_NEVER means that it will never agree to -rehandshake after the initial handshake is complete. (For a client, -this means it will refuse rehandshake requests from the server, and -for a server, this means it will close the connection with an error -if the client attempts to rehandshake.) - -%G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a -rehandshake only if the other end of the connection supports the -TLS `renegotiation_info` extension. This is the default behavior, -but means that rehandshaking will not work against older -implementations that do not support that extension. - -%G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow -rehandshaking even without the `renegotiation_info` extension. On -the server side in particular, this is not recommended, since it -leaves the server open to certain attacks. However, this mode is -necessary if you need to allow renegotiation with older client -software. + + Since GLib 2.64, changing the rehandshake mode is no longer supported +and will have no effect. With TLS 1.3, rehandshaking has been removed from +the TLS protocol, replaced by separate post-handshake authentication and +rekey operations. + Changing the rehandshake mode is no longer + required for compatibility. Also, rehandshaking has been removed + from the TLS protocol in TLS 1.3. + @@ -68352,6 +78032,7 @@ setting of this property. If you explicitly want to do an unclean close, you can close @conn's #GTlsConnection:base-io-stream rather than closing @conn itself, but note that this may only be done when no other operations are pending on @conn or the base I/O stream. + @@ -68375,6 +78056,7 @@ peer certificate validation will always set the client-side connections, unless that bit is not set in #GTlsClientConnection:validation-flags). Use g_tls_connection_set_database() instead + @@ -68389,6 +78071,14 @@ client-side connections, unless that bit is not set in + + The list of application-layer protocols that the connection +advertises that it is willing to speak. See +g_tls_connection_set_advertised_protocols(). + + + + The #GIOStream that the connection wraps. The connection holds a reference to this stream, and may run operations on the stream from other threads @@ -68414,6 +78104,11 @@ database need to interact with the user. This will be used to prompt the user for passwords where necessary. + + The application-layer protocol negotiated during the TLS +handshake. See g_tls_connection_get_negotiated_protocol(). + + The connection's peer's certificate, after the TLS handshake has completed and the certificate has been accepted. Note in @@ -68433,9 +78128,10 @@ it may not be if #GTlsClientConnection:validation-flags is not behavior. - + The rehandshaking mode. See g_tls_connection_set_rehandshake_mode(). + The rehandshake mode is ignored. @@ -68482,8 +78178,8 @@ the user before returning from the signal handler. If you want to let the user decide whether or not to accept the certificate, you would have to return %FALSE from the signal handler on the first attempt, and then after the connection attempt returns a -%G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if -the user decides to accept the certificate, remember that fact, +%G_TLS_ERROR_BAD_CERTIFICATE, you can interact with the user, and +if the user decides to accept the certificate, remember that fact, create a new connection, and return %TRUE from the signal handler the next time. @@ -68510,11 +78206,13 @@ no one else overrides it. + + @@ -68533,6 +78231,7 @@ no one else overrides it. + success or failure @@ -68551,6 +78250,7 @@ no one else overrides it. + @@ -68580,6 +78280,7 @@ no one else overrides it. + %TRUE on success, %FALSE on failure, in which case @error will be set. @@ -68598,20 +78299,25 @@ case @error will be set. - + + - #GTlsDatabase is used to lookup certificates and other information + #GTlsDatabase is used to look up certificates and other information from a certificate or key store. It is an abstract base class which TLS library specific subtypes override. +A #GTlsDatabase may be accessed from multiple threads by the TLS backend. +All implementations are required to be fully thread-safe. + Most common client applications will not directly interact with #GTlsDatabase. It is used internally by #GTlsConnection. + Create a handle string for the certificate. The database will only be able to create a handle for certificates that originate from the database. In @@ -68621,6 +78327,7 @@ will be returned. This handle should be stable across various instances of the application, and between applications. If a certificate is modified in the database, then it is not guaranteed that this handle will continue to point to it. + a newly allocated string containing the handle. @@ -68638,7 +78345,7 @@ handle. - Lookup a certificate by its handle. + Look up a certificate by its handle. The handle should have been created by calling g_tls_database_create_certificate_handle() on a #GTlsDatabase object of @@ -68650,6 +78357,7 @@ this database, then %NULL will be returned. This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform the lookup operation asynchronously. + a newly allocated #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -68679,8 +78387,9 @@ the lookup operation asynchronously. - Asynchronously lookup a certificate by its handle in the database. See + Asynchronously look up a certificate by its handle in the database. See g_tls_database_lookup_certificate_for_handle() for more information. + @@ -68717,10 +78426,11 @@ g_tls_database_lookup_certificate_for_handle() for more information. Finish an asynchronous lookup of a certificate by its handle. See -g_tls_database_lookup_certificate_handle() for more information. +g_tls_database_lookup_certificate_for_handle() for more information. If the handle is no longer valid, or does not point to a certificate in this database, then %NULL will be returned. + a newly allocated #GTlsCertificate object. Use g_object_unref() to release the certificate. @@ -68738,14 +78448,15 @@ Use g_object_unref() to release the certificate. - Lookup the issuer of @certificate in the database. + Look up the issuer of @certificate in the database. -The %issuer property +The #GTlsCertificate:issuer property of @certificate is not modified, and the two certificates are not hooked into a chain. This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform the lookup operation asynchronously. + a newly allocated issuer #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -68775,8 +78486,9 @@ or %NULL. Use g_object_unref() to release the certificate. - Asynchronously lookup the issuer of @certificate in the database. See + Asynchronously look up the issuer of @certificate in the database. See g_tls_database_lookup_certificate_issuer() for more information. + @@ -68814,6 +78526,7 @@ g_tls_database_lookup_certificate_issuer() for more information. Finish an asynchronous lookup issuer operation. See g_tls_database_lookup_certificate_issuer() for more information. + a newly allocated issuer #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -68831,10 +78544,11 @@ or %NULL. Use g_object_unref() to release the certificate. - Lookup certificates issued by this issuer in the database. + Look up certificates issued by this issuer in the database. This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform the lookup operation asynchronously. + a newly allocated list of #GTlsCertificate objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. @@ -68868,12 +78582,13 @@ objects. Use g_object_unref() on each certificate, and g_list_free() on the rele - Asynchronously lookup certificates issued by this issuer in the database. See + Asynchronously look up certificates issued by this issuer in the database. See g_tls_database_lookup_certificates_issued_by() for more information. The database may choose to hold a reference to the issuer byte array for the duration of of this asynchronous operation. The byte array should not be modified during this time. + @@ -68913,6 +78628,7 @@ this time. Finish an asynchronous lookup of certificates. See g_tls_database_lookup_certificates_issued_by() for more information. + a newly allocated list of #GTlsCertificate objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. @@ -68936,7 +78652,7 @@ objects. Use g_object_unref() on each certificate, and g_list_free() on the rele adding any missing certificates to the chain. @chain is a chain of #GTlsCertificate objects each pointing to the next -certificate in the chain by its %issuer property. The chain may initially +certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially consist of one or more certificates. After the verification process is complete, @chain may be modified by adding missing certificates, or removing extra certificates. If a certificate anchor was found, then it is added to @@ -68965,6 +78681,7 @@ but found to be invalid. This function can block, use g_tls_database_verify_chain_async() to perform the verification operation asynchronously. + the appropriate #GTlsCertificateFlags which represents the result of verification. @@ -69005,6 +78722,7 @@ result of verification. Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain. See g_tls_database_verify_chain() for more information. + @@ -69059,6 +78777,7 @@ before it completes) then the return value will be %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set accordingly. @error is not set when @chain is successfully analyzed but found to be invalid. + the appropriate #GTlsCertificateFlags which represents the result of verification. @@ -69084,6 +78803,7 @@ will be returned. This handle should be stable across various instances of the application, and between applications. If a certificate is modified in the database, then it is not guaranteed that this handle will continue to point to it. + a newly allocated string containing the handle. @@ -69101,7 +78821,7 @@ handle. - Lookup a certificate by its handle. + Look up a certificate by its handle. The handle should have been created by calling g_tls_database_create_certificate_handle() on a #GTlsDatabase object of @@ -69113,6 +78833,7 @@ this database, then %NULL will be returned. This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform the lookup operation asynchronously. + a newly allocated #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -69142,8 +78863,9 @@ the lookup operation asynchronously. - Asynchronously lookup a certificate by its handle in the database. See + Asynchronously look up a certificate by its handle in the database. See g_tls_database_lookup_certificate_for_handle() for more information. + @@ -69180,10 +78902,11 @@ g_tls_database_lookup_certificate_for_handle() for more information. Finish an asynchronous lookup of a certificate by its handle. See -g_tls_database_lookup_certificate_handle() for more information. +g_tls_database_lookup_certificate_for_handle() for more information. If the handle is no longer valid, or does not point to a certificate in this database, then %NULL will be returned. + a newly allocated #GTlsCertificate object. Use g_object_unref() to release the certificate. @@ -69201,14 +78924,15 @@ Use g_object_unref() to release the certificate. - Lookup the issuer of @certificate in the database. + Look up the issuer of @certificate in the database. -The %issuer property +The #GTlsCertificate:issuer property of @certificate is not modified, and the two certificates are not hooked into a chain. This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform the lookup operation asynchronously. + a newly allocated issuer #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -69238,8 +78962,9 @@ or %NULL. Use g_object_unref() to release the certificate. - Asynchronously lookup the issuer of @certificate in the database. See + Asynchronously look up the issuer of @certificate in the database. See g_tls_database_lookup_certificate_issuer() for more information. + @@ -69277,6 +79002,7 @@ g_tls_database_lookup_certificate_issuer() for more information. Finish an asynchronous lookup issuer operation. See g_tls_database_lookup_certificate_issuer() for more information. + a newly allocated issuer #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -69294,10 +79020,11 @@ or %NULL. Use g_object_unref() to release the certificate. - Lookup certificates issued by this issuer in the database. + Look up certificates issued by this issuer in the database. This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform the lookup operation asynchronously. + a newly allocated list of #GTlsCertificate objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. @@ -69331,12 +79058,13 @@ objects. Use g_object_unref() on each certificate, and g_list_free() on the rele - Asynchronously lookup certificates issued by this issuer in the database. See + Asynchronously look up certificates issued by this issuer in the database. See g_tls_database_lookup_certificates_issued_by() for more information. The database may choose to hold a reference to the issuer byte array for the duration of of this asynchronous operation. The byte array should not be modified during this time. + @@ -69376,6 +79104,7 @@ this time. Finish an asynchronous lookup of certificates. See g_tls_database_lookup_certificates_issued_by() for more information. + a newly allocated list of #GTlsCertificate objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. @@ -69399,7 +79128,7 @@ objects. Use g_object_unref() on each certificate, and g_list_free() on the rele adding any missing certificates to the chain. @chain is a chain of #GTlsCertificate objects each pointing to the next -certificate in the chain by its %issuer property. The chain may initially +certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially consist of one or more certificates. After the verification process is complete, @chain may be modified by adding missing certificates, or removing extra certificates. If a certificate anchor was found, then it is added to @@ -69428,6 +79157,7 @@ but found to be invalid. This function can block, use g_tls_database_verify_chain_async() to perform the verification operation asynchronously. + the appropriate #GTlsCertificateFlags which represents the result of verification. @@ -69468,6 +79198,7 @@ result of verification. Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain. See g_tls_database_verify_chain() for more information. + @@ -69522,6 +79253,7 @@ before it completes) then the return value will be %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set accordingly. @error is not set when @chain is successfully analyzed but found to be invalid. + the appropriate #GTlsCertificateFlags which represents the result of verification. @@ -69549,11 +79281,13 @@ result of verification. The class for #GTlsDatabase. Derived classes should implement the various virtual methods. _async and _finish methods have a default implementation that runs the corresponding sync method in a thread. + + the appropriate #GTlsCertificateFlags which represents the result of verification. @@ -69593,6 +79327,7 @@ result of verification. + @@ -69638,6 +79373,7 @@ result of verification. + the appropriate #GTlsCertificateFlags which represents the result of verification. @@ -69657,6 +79393,7 @@ result of verification. + a newly allocated string containing the handle. @@ -69676,6 +79413,7 @@ handle. + a newly allocated #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -69707,6 +79445,7 @@ handle. + @@ -69744,6 +79483,7 @@ handle. + a newly allocated #GTlsCertificate object. Use g_object_unref() to release the certificate. @@ -69763,6 +79503,7 @@ Use g_object_unref() to release the certificate. + a newly allocated issuer #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -69794,6 +79535,7 @@ or %NULL. Use g_object_unref() to release the certificate. + @@ -69831,6 +79573,7 @@ or %NULL. Use g_object_unref() to release the certificate. + a newly allocated issuer #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. @@ -69850,6 +79593,7 @@ or %NULL. Use g_object_unref() to release the certificate. + a newly allocated list of #GTlsCertificate objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. @@ -69885,6 +79629,7 @@ objects. Use g_object_unref() on each certificate, and g_list_free() on the rele + @@ -69924,6 +79669,7 @@ objects. Use g_object_unref() on each certificate, and g_list_free() on the rele + a newly allocated list of #GTlsCertificate objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. @@ -69944,13 +79690,13 @@ objects. Use g_object_unref() on each certificate, and g_list_free() on the rele - + - Flags for g_tls_database_lookup_certificate_handle(), + Flags for g_tls_database_lookup_certificate_for_handle(), g_tls_database_lookup_certificate_issuer(), and g_tls_database_lookup_certificates_issued_by(). @@ -69962,6 +79708,7 @@ and g_tls_database_lookup_certificates_issued_by(). + Flags for g_tls_database_verify_chain(). @@ -69979,7 +79726,8 @@ TLS-related routine. Miscellaneous TLS error - A certificate could not be parsed + The certificate presented could not + be parsed or failed validation. The TLS handshake failed because the @@ -69998,6 +79746,11 @@ TLS-related routine. The TLS connection was closed without proper notice, which may indicate an attack. See g_tls_connection_set_require_close_notify(). + + + The TLS handshake failed + because the client sent the fallback SCSV, indicating a protocol + downgrade attack. Since: 2.60 Gets the TLS error quark. @@ -70011,12 +79764,14 @@ TLS-related routine. #GTlsFileDatabase is implemented by #GTlsDatabase objects which load their certificate information from a file. It is an interface which TLS library specific subtypes implement. + Creates a new #GTlsFileDatabase which uses anchor certificate authorities in @anchors to verify certificate chains. The certificates in @anchors must be PEM encoded. + the new #GTlsFileDatabase, or %NULL on error @@ -70025,7 +79780,7 @@ The certificates in @anchors must be PEM encoded. filename of anchor certificate authorities. - + @@ -70039,12 +79794,13 @@ via the g_tls_database_verify_chain() operation. Provides an interface for #GTlsFileDatabase implementations. + The parent interface. - + @@ -70070,6 +79826,7 @@ like to support by overriding those virtual methods in their class initialization function. Any interactions not implemented will return %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method, it must also implement the corresponding finish method. + Run synchronous interaction to ask the user for a password. In general, g_tls_interaction_invoke_ask_password() should be used instead of this @@ -70084,6 +79841,7 @@ If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. + The status of the ask password interaction. @@ -70119,6 +79877,7 @@ contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. Certain implementations may not support immediate cancellation. + @@ -70155,6 +79914,7 @@ to g_tls_interaction_ask_password() will have its password filled in. If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. + The status of the ask password interaction. @@ -70187,6 +79947,7 @@ If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. + The status of the request certificate interaction. @@ -70219,6 +79980,7 @@ Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. @callback will be called when the operation completes. Alternatively the user may abort this certificate request, which will usually abort the TLS connection. + @@ -70250,7 +80012,7 @@ request, which will usually abort the TLS connection. - Complete an request certificate user interaction request. This should be once + Complete a request certificate user interaction request. This should be once the g_tls_interaction_request_certificate_async() completion callback is called. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection @@ -70260,6 +80022,7 @@ passed to g_tls_interaction_request_certificate_async() will have had its If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. + The status of the request certificate interaction. @@ -70289,6 +80052,7 @@ If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. + The status of the ask password interaction. @@ -70324,6 +80088,7 @@ contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. Certain implementations may not support immediate cancellation. + @@ -70360,6 +80125,7 @@ to g_tls_interaction_ask_password() will have its password filled in. If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. + The status of the ask password interaction. @@ -70395,6 +80161,7 @@ If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. + The status of the ask password interaction. @@ -70435,6 +80202,7 @@ If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. + The status of the certificate request interaction. @@ -70475,6 +80243,7 @@ If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may not support immediate cancellation. + The status of the request certificate interaction. @@ -70507,6 +80276,7 @@ Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. @callback will be called when the operation completes. Alternatively the user may abort this certificate request, which will usually abort the TLS connection. + @@ -70538,7 +80308,7 @@ request, which will usually abort the TLS connection. - Complete an request certificate user interaction request. This should be once + Complete a request certificate user interaction request. This should be once the g_tls_interaction_request_certificate_async() completion callback is called. If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection @@ -70548,6 +80318,7 @@ passed to g_tls_interaction_request_certificate_async() will have had its If the interaction is cancelled by the cancellation object, or by the user then %G_TLS_INTERACTION_FAILED will be returned with an error that contains a %G_IO_ERROR_CANCELLED error code. + The status of the request certificate interaction. @@ -70585,11 +80356,13 @@ and the asynchronous methods to display modeless dialogs. If the user cancels an interaction, then the result should be %G_TLS_INTERACTION_FAILED and the error should be set with a domain of %G_IO_ERROR and code of %G_IO_ERROR_CANCELLED. + + The status of the ask password interaction. @@ -70612,6 +80385,7 @@ If the user cancels an interaction, then the result should be + @@ -70641,6 +80415,7 @@ If the user cancels an interaction, then the result should be + The status of the ask password interaction. @@ -70659,6 +80434,7 @@ If the user cancels an interaction, then the result should be + The status of the request certificate interaction. @@ -70685,6 +80461,7 @@ If the user cancels an interaction, then the result should be + @@ -70718,6 +80495,7 @@ If the user cancels an interaction, then the result should be + The status of the request certificate interaction. @@ -70735,12 +80513,13 @@ If the user cancels an interaction, then the result should be - + + #GTlsInteractionResult is returned by various functions in #GTlsInteraction @@ -70760,8 +80539,10 @@ when finishing an interaction request. Holds a password used in TLS. + Create a new #GTlsPassword object. + The newly allocated password object @@ -70778,6 +80559,7 @@ when finishing an interaction request. + @@ -70793,6 +80575,7 @@ filled in with the length of the password value. (Note that the password value is not nul-terminated, so you can only pass %NULL for @length in contexts where you know the password will have a certain fixed length.) + The password value (owned by the password object). @@ -70818,6 +80601,7 @@ Specify the @length, for a non-nul-terminated password. Pass -1 as @length if using a nul-terminated password, and @length will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.) + @@ -70828,7 +80612,9 @@ considered part of the password in this case.) the value for the password - + + + the length of the password, or -1 @@ -70842,6 +80628,7 @@ considered part of the password in this case.) Get a description string about what the password will be used for. + The description of the password. @@ -70855,6 +80642,7 @@ considered part of the password in this case.) Get flags about the password. + The flags about the password. @@ -70872,6 +80660,7 @@ filled in with the length of the password value. (Note that the password value is not nul-terminated, so you can only pass %NULL for @length in contexts where you know the password will have a certain fixed length.) + The password value (owned by the password object). @@ -70891,6 +80680,7 @@ certain fixed length.) Get a user readable translated warning. Usually this warning is a representation of the password flags returned from g_tls_password_get_flags(). + The warning. @@ -70904,6 +80694,7 @@ g_tls_password_get_flags(). Set a description string about what the password will be used for. + @@ -70920,6 +80711,7 @@ g_tls_password_get_flags(). Set flags about the password. + @@ -70942,6 +80734,7 @@ Specify the @length, for a non-nul-terminated password. Pass -1 as @length if using a nul-terminated password, and @length will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.) + @@ -70952,7 +80745,9 @@ considered part of the password in this case.) the new password value - + + + the length of the password, or -1 @@ -70970,6 +80765,7 @@ Specify the @length, for a non-nul-terminated password. Pass -1 as @length if using a nul-terminated password, and @length will be calculated automatically. (Note that the terminating nul is not considered part of the password in this case.) + @@ -70980,7 +80776,9 @@ considered part of the password in this case.) the value for the password - + + + the length of the password, or -1 @@ -70996,6 +80794,7 @@ considered part of the password in this case.) Set a user readable translated warning. Usually this warning is a representation of the password flags returned from g_tls_password_get_flags(). + @@ -71028,11 +80827,13 @@ g_tls_password_get_flags(). Class structure for #GTlsPassword. + + The password value (owned by the password object). @@ -71051,6 +80852,7 @@ g_tls_password_get_flags(). + @@ -71061,7 +80863,9 @@ g_tls_password_get_flags(). the value for the password - + + + the length of the password, or -1 @@ -71076,6 +80880,7 @@ g_tls_password_get_flags(). + @@ -71087,7 +80892,7 @@ g_tls_password_get_flags(). - + @@ -71110,10 +80915,14 @@ g_tls_password_get_flags(). + - + When to allow rehandshaking. See g_tls_connection_set_rehandshake_mode(). + Changing the rehandshake mode is no longer + required for compatibility. Also, rehandshaking has been removed + from the TLS protocol in TLS 1.3. Never allow rehandshaking @@ -71127,6 +80936,7 @@ g_tls_connection_set_rehandshake_mode(). #GTlsServerConnection is the server-side subclass of #GTlsConnection, representing a server-side TLS connection. + Creates a new #GTlsServerConnection wrapping @base_io_stream (which @@ -71135,6 +80945,7 @@ must have pollable input and output streams). See the documentation for #GTlsConnection:base-io-stream for restrictions on when application code can run operations on the @base_io_stream after this function has returned. + the new #GTlsServerConnection, or %NULL on error @@ -71160,12 +80971,174 @@ rehandshake with a different mode from the initial handshake. vtable for a #GTlsServerConnection implementation. + The parent interface. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is the subclass of #GSocketConnection that is created for UNIX domain sockets. @@ -71175,6 +81148,7 @@ functionality like passing file descriptors. Note that `<gio/gunixconnection.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + Receives credentials from the sending end of the connection. The sending end has to call g_unix_connection_send_credentials() (or @@ -71184,8 +81158,17 @@ As well as reading the credentials this also reads (and discards) a single byte from the stream, as this is required for credentials passing to work on some implementations. +This method can be expected to be available on the following platforms: + +- Linux since GLib 2.26 +- FreeBSD since GLib 2.26 +- GNU/kFreeBSD since GLib 2.36 +- Solaris, Illumos and OpenSolaris since GLib 2.40 +- GNU/Hurd since GLib 2.40 + Other ways to exchange credentials with a foreign peer includes the #GUnixCredentialsMessage type and g_socket_get_credentials() function. + Received credentials on success (free with g_object_unref()), %NULL if @error is set. @@ -71210,6 +81193,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_unix_connection_receive_credentials_finish() to get the result of the operation. + @@ -71235,6 +81219,7 @@ g_unix_connection_receive_credentials_finish() to get the result of the operatio Finishes an asynchronous receive credentials operation started with g_unix_connection_receive_credentials_async(). + a #GCredentials, or %NULL on error. Free the returned object with g_object_unref(). @@ -71259,6 +81244,7 @@ to work. As well as reading the fd this also reads a single byte from the stream, as this is required for fd passing to work on some implementations. + a file descriptor on success, -1 on error. @@ -71284,8 +81270,17 @@ As well as sending the credentials this also writes a single NUL byte to the stream, as this is required for credentials passing to work on some implementations. +This method can be expected to be available on the following platforms: + +- Linux since GLib 2.26 +- FreeBSD since GLib 2.26 +- GNU/kFreeBSD since GLib 2.36 +- Solaris, Illumos and OpenSolaris since GLib 2.40 +- GNU/Hurd since GLib 2.40 + Other ways to exchange credentials with a foreign peer includes the #GUnixCredentialsMessage type and g_socket_get_credentials() function. + %TRUE on success, %FALSE if @error is set. @@ -71309,6 +81304,7 @@ the synchronous version of this call. When the operation is finished, @callback will be called. You can then call g_unix_connection_send_credentials_finish() to get the result of the operation. + @@ -71334,6 +81330,7 @@ g_unix_connection_send_credentials_finish() to get the result of the operation.< Finishes an asynchronous send credentials operation started with g_unix_connection_send_credentials_async(). + %TRUE if the operation was successful, otherwise %FALSE. @@ -71357,6 +81354,7 @@ to accept the file descriptor. As well as sending the fd this also writes a single byte to the stream, as this is required for fd passing to work on some implementations. + a %TRUE on success, %NULL on error. @@ -71384,11 +81382,13 @@ implementations. + + This #GSocketControlMessage contains a #GCredentials instance. It @@ -71402,8 +81402,10 @@ g_unix_connection_send_credentials() and g_unix_connection_receive_credentials(). To receive credentials of a foreign process connected to a socket, use g_socket_get_credentials(). + Creates a new #GUnixCredentialsMessage with credentials matching the current processes. + a new #GUnixCredentialsMessage @@ -71411,6 +81413,7 @@ g_socket_get_credentials(). Creates a new #GUnixCredentialsMessage holding @credentials. + a new #GUnixCredentialsMessage @@ -71424,6 +81427,7 @@ g_socket_get_credentials(). Checks if passing #GCredentials on a #GSocket is supported on this platform. + %TRUE if supported, %FALSE otherwise @@ -71431,6 +81435,7 @@ g_socket_get_credentials(). Gets the credentials stored in @message. + A #GCredentials instance. Do not free, it is owned by @message. @@ -71455,11 +81460,13 @@ g_socket_get_credentials(). Class structure for #GUnixCredentialsMessage. + + @@ -71467,6 +81474,7 @@ g_socket_get_credentials(). + @@ -71474,20 +81482,23 @@ g_socket_get_credentials(). + A #GUnixFDList contains a list of file descriptors. It owns the file descriptors that it contains, closing them when finalized. It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in -the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message() +the %G_SOCKET_FAMILY_UNIX family by using g_socket_send_message() and received using g_socket_receive_message(). Note that `<gio/gunixfdlist.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + Creates a new #GUnixFDList containing no file descriptors. + a new #GUnixFDList @@ -71502,6 +81513,7 @@ the caller. Each file descriptor in the array should be set to close-on-exec. If @n_fds is -1 then @fds must be terminated with -1. + a new #GUnixFDList @@ -71509,7 +81521,7 @@ If @n_fds is -1 then @fds must be terminated with -1. the initial list of file descriptors - + @@ -71532,6 +81544,7 @@ system-wide file descriptor limit. The index of the file descriptor in the list is returned. If you use this index with g_unix_fd_list_get() then you will receive back a duplicated copy of the same file descriptor. + the index of the appended fd in case of success, else -1 (and @error is set) @@ -71561,6 +81574,7 @@ when you are done. A possible cause of failure is exceeding the per-process or system-wide file descriptor limit. + the file descriptor, or -1 in case of error @@ -71579,6 +81593,7 @@ system-wide file descriptor limit. Gets the length of @list (ie: the number of file descriptors contained within). + the length of @list @@ -71604,10 +81619,11 @@ terminated with -1. This function never returns %NULL. In case there are no file descriptors contained in @list, an empty array is returned. + an array of file descriptors - + @@ -71642,6 +81658,7 @@ terminated with -1. This function never returns %NULL. In case there are no file descriptors contained in @list, an empty array is returned. + an array of file descriptors @@ -71669,11 +81686,13 @@ descriptors contained in @list, an empty array is returned. + + @@ -71681,6 +81700,7 @@ descriptors contained in @list, an empty array is returned. + @@ -71688,6 +81708,7 @@ descriptors contained in @list, an empty array is returned. + @@ -71695,6 +81716,7 @@ descriptors contained in @list, an empty array is returned. + @@ -71702,6 +81724,7 @@ descriptors contained in @list, an empty array is returned. + @@ -71709,12 +81732,13 @@ descriptors contained in @list, an empty array is returned. + This #GSocketControlMessage contains a #GUnixFDList. It may be sent using g_socket_send_message() and received using g_socket_receive_message() over UNIX sockets (ie: sockets in the -%G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied +%G_SOCKET_FAMILY_UNIX family). The file descriptors are copied between processes by the kernel. For an easier way to send and receive file descriptors over @@ -71724,9 +81748,11 @@ g_unix_connection_receive_fd(). Note that `<gio/gunixfdmessage.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + Creates a new #GUnixFDMessage containing an empty file descriptor list. + a new #GUnixFDMessage @@ -71734,6 +81760,7 @@ list. Creates a new #GUnixFDMessage containing @list. + a new #GUnixFDMessage @@ -71754,6 +81781,7 @@ when @message is finalized. A possible cause of failure is exceeding the per-process or system-wide file descriptor limit. + %TRUE in case of success, else %FALSE (and @error is set) @@ -71773,6 +81801,7 @@ system-wide file descriptor limit. Gets the #GUnixFDList contained in @message. This function does not return a reference to the caller, but the returned list is valid for the lifetime of @message. + the #GUnixFDList from @message @@ -71802,6 +81831,7 @@ terminated with -1. This function never returns %NULL. In case there are no file descriptors contained in @message, an empty array is returned. + an array of file descriptors @@ -71832,11 +81862,13 @@ descriptors contained in @message, an empty array is returned. + + @@ -71844,6 +81876,7 @@ descriptors contained in @message, an empty array is returned. + @@ -71851,6 +81884,7 @@ descriptors contained in @message, an empty array is returned. + #GUnixInputStream implements #GInputStream for reading from a UNIX @@ -71862,6 +81896,7 @@ to doing asynchronous I/O in another thread.) Note that `<gio/gunixinputstream.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + @@ -71869,6 +81904,7 @@ file when using it. If @close_fd is %TRUE, the file descriptor will be closed when the stream is closed. + a new #GUnixInputStream @@ -71887,6 +81923,7 @@ when the stream is closed. Returns whether the file descriptor of @stream will be closed when the stream is closed. + %TRUE if the file descriptor is closed when done @@ -71900,6 +81937,7 @@ closed when the stream is closed. Return the UNIX file descriptor that the stream reads from. + The file descriptor of @stream @@ -71914,6 +81952,7 @@ closed when the stream is closed. Sets whether the file descriptor of @stream shall be closed when the stream is closed. + @@ -71944,11 +81983,13 @@ when the stream is closed. + + @@ -71956,6 +81997,7 @@ when the stream is closed. + @@ -71963,6 +82005,7 @@ when the stream is closed. + @@ -71970,6 +82013,7 @@ when the stream is closed. + @@ -71977,6 +82021,7 @@ when the stream is closed. + @@ -71984,19 +82029,23 @@ when the stream is closed. + Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>). This corresponds roughly to a mtab entry. + Watches #GUnixMounts for changes. + Deprecated alias for g_unix_mount_monitor_get(). This function was never a true constructor, which is why it was renamed. Use g_unix_mount_monitor_get() instead. + a #GUnixMountMonitor. @@ -72012,6 +82061,7 @@ entries). You must only call g_object_unref() on the return value from under the same main context as you called this function. + the #GUnixMountMonitor. @@ -72026,6 +82076,7 @@ circumstances. Since @mount_monitor is a singleton, it also meant that calling this function would have side effects for other users of the monitor. This function does nothing. Don't call it. + @@ -72055,12 +82106,15 @@ the monitor. + Defines a Unix mount point (e.g. <filename>/dev</filename>). This corresponds roughly to a fstab entry. + Compares two unix mount points. + 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively. @@ -72079,6 +82133,7 @@ or less than @mount2, respectively. Makes a copy of @mount_point. + a new #GUnixMountPoint @@ -72092,6 +82147,7 @@ or less than @mount2, respectively. Frees a unix mount point. + @@ -72104,9 +82160,10 @@ or less than @mount2, respectively. Gets the device path for a unix mount point. + a string containing the device path. - + @@ -72117,6 +82174,7 @@ or less than @mount2, respectively. Gets the file system type for the mount point. + a string containing the file system type. @@ -72130,9 +82188,10 @@ or less than @mount2, respectively. Gets the mount path for a unix mount point. + a string containing the mount path. - + @@ -72143,6 +82202,7 @@ or less than @mount2, respectively. Gets the options for the mount point. + a string containing the options. @@ -72156,6 +82216,7 @@ or less than @mount2, respectively. Guesses whether a Unix mount point can be ejected. + %TRUE if @mount_point is deemed to be ejectable. @@ -72169,6 +82230,7 @@ or less than @mount2, respectively. Guesses the icon of a Unix mount point. + a #GIcon @@ -72183,6 +82245,7 @@ or less than @mount2, respectively. Guesses the name of a Unix mount point. The result is a translated string. + A newly allocated string that must be freed with g_free() @@ -72197,6 +82260,7 @@ The result is a translated string. Guesses the symbolic icon of a Unix mount point. + a #GIcon @@ -72210,6 +82274,7 @@ The result is a translated string. Checks if a unix mount point is a loopback device. + %TRUE if the mount point is a loopback. %FALSE otherwise. @@ -72223,6 +82288,7 @@ The result is a translated string. Checks if a unix mount point is read only. + %TRUE if a mount point is read only. @@ -72236,6 +82302,7 @@ The result is a translated string. Checks if a unix mount point is mountable by the user. + %TRUE if the mount point is user mountable. @@ -72258,6 +82325,7 @@ to doing asynchronous I/O in another thread.) Note that `<gio/gunixoutputstream.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + @@ -72265,6 +82333,7 @@ when using it. If @close_fd, is %TRUE, the file descriptor will be closed when the output stream is destroyed. + a new #GOutputStream @@ -72283,6 +82352,7 @@ the output stream is destroyed. Returns whether the file descriptor of @stream will be closed when the stream is closed. + %TRUE if the file descriptor is closed when done @@ -72296,6 +82366,7 @@ closed when the stream is closed. Return the UNIX file descriptor that the stream writes to. + The file descriptor of @stream @@ -72310,6 +82381,7 @@ closed when the stream is closed. Sets whether the file descriptor of @stream shall be closed when the stream is closed. + @@ -72340,11 +82412,13 @@ when the stream is closed. + + @@ -72352,6 +82426,7 @@ when the stream is closed. + @@ -72359,6 +82434,7 @@ when the stream is closed. + @@ -72366,6 +82442,7 @@ when the stream is closed. + @@ -72373,6 +82450,7 @@ when the stream is closed. + @@ -72380,6 +82458,7 @@ when the stream is closed. + Support for UNIX-domain (also known as local) sockets. @@ -72396,12 +82475,14 @@ to see if abstract names are supported. Note that `<gio/gunixsocketaddress.h>` belongs to the UNIX-specific GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file when using it. + Creates a new #GUnixSocketAddress for @path. To create abstract socket addresses, on systems that support that, use g_unix_socket_address_new_abstract(). + a new #GUnixSocketAddress @@ -72417,6 +82498,7 @@ use g_unix_socket_address_new_abstract(). Creates a new %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED #GUnixSocketAddress for @path. Use g_unix_socket_address_new_with_type(). + a new #GUnixSocketAddress @@ -72424,7 +82506,7 @@ use g_unix_socket_address_new_abstract(). the abstract name - + @@ -72466,6 +82548,7 @@ length of @path. when connecting to a server created by another process, you must use the appropriate type corresponding to how that process created its listening socket. + a new #GUnixSocketAddress @@ -72473,7 +82556,7 @@ its listening socket. the name - + @@ -72489,6 +82572,7 @@ its listening socket. Checks if abstract UNIX domain socket names are supported. + %TRUE if supported, %FALSE otherwise @@ -72496,6 +82580,7 @@ its listening socket. Gets @address's type. + a #GUnixSocketAddressType @@ -72510,6 +82595,7 @@ its listening socket. Tests if @address is abstract. Use g_unix_socket_address_get_address_type() + %TRUE if the address is abstract, %FALSE otherwise @@ -72528,6 +82614,7 @@ Guaranteed to be zero-terminated, but an abstract socket may contain embedded zeros, and thus you should use g_unix_socket_address_get_path_len() to get the true length of this string. + the path for @address @@ -72543,6 +82630,7 @@ of this string. Gets the length of @address's path. For details, see g_unix_socket_address_get_path(). + the length of the path @@ -72569,7 +82657,7 @@ abstract addresses. - + @@ -72580,11 +82668,13 @@ abstract addresses. + + The type of name used by a #GUnixSocketAddress. @@ -72617,52 +82707,119 @@ pass an appropriate smaller length to bind() or connect(). This is to the full length of a unix socket name + + + + + + + + + + + + + + Extension point for #GVfs functionality. See [Extending GIO][extending-gio]. + + + + + + + + + + + + + + + + + + + + + + The string used to obtain the volume class with g_volume_get_identifier(). -Known volume classes include `device` and `network`. Other classes may -be added in the future. +Known volume classes include `device`, `network`, and `loop`. Other +classes may be added in the future. This is intended to be used by applications to classify #GVolume instances into different sections - for example a file manager or file chooser can use this information to show `network` volumes under a "Network" heading and `device` volumes under a "Devices" heading. + - + The string used to obtain a Hal UDI with g_volume_get_identifier(). + Do not use, HAL is deprecated. + The string used to obtain a filesystem label with g_volume_get_identifier(). + The string used to obtain a NFS mount with g_volume_get_identifier(). + The string used to obtain a Unix device path with g_volume_get_identifier(). + The string used to obtain a UUID with g_volume_get_identifier(). + + + + + + + + + + + + + + + Extension point for volume monitor functionality. See [Extending GIO][extending-gio]. + + + + + + + + Entry point for using GIO functionality. + Gets the default #GVfs for the system. + a #GVfs. @@ -72670,12 +82827,14 @@ See [Extending GIO][extending-gio]. Gets the local #GVfs for the system. + a #GVfs. + @@ -72689,6 +82848,7 @@ See [Extending GIO][extending-gio]. + @@ -72703,6 +82863,7 @@ See [Extending GIO][extending-gio]. Gets a #GFile for @path. + a #GFile. Free the returned object with g_object_unref(). @@ -72725,6 +82886,7 @@ See [Extending GIO][extending-gio]. This operation never fails, but the returned object might not support any I/O operation if the URI is malformed or if the URI scheme is not supported. + a #GFile. Free the returned object with g_object_unref(). @@ -72743,6 +82905,7 @@ is malformed or if the URI scheme is not supported. Gets a list of URI schemes supported by @vfs. + a %NULL-terminated array of strings. The returned array belongs to GIO and must @@ -72760,6 +82923,7 @@ is malformed or if the URI scheme is not supported. Checks if the VFS is active. + %TRUE if construction of the @vfs was successful and it is now active. @@ -72773,6 +82937,7 @@ is malformed or if the URI scheme is not supported. + @@ -72804,6 +82969,7 @@ is malformed or if the URI scheme is not supported. + @@ -72820,6 +82986,7 @@ is malformed or if the URI scheme is not supported. + @@ -72833,6 +83000,7 @@ is malformed or if the URI scheme is not supported. + @@ -72858,6 +83026,7 @@ is malformed or if the URI scheme is not supported. This operation never fails, but the returned object might not support any I/O operations if the @parse_name cannot be parsed by the #GVfs module. + a #GFile for the given @parse_name. Free the returned object with g_object_unref(). @@ -72876,6 +83045,7 @@ be parsed by the #GVfs module. Gets a #GFile for @path. + a #GFile. Free the returned object with g_object_unref(). @@ -72898,6 +83068,7 @@ be parsed by the #GVfs module. This operation never fails, but the returned object might not support any I/O operation if the URI is malformed or if the URI scheme is not supported. + a #GFile. Free the returned object with g_object_unref(). @@ -72916,6 +83087,7 @@ is malformed or if the URI scheme is not supported. Gets a list of URI schemes supported by @vfs. + a %NULL-terminated array of strings. The returned array belongs to GIO and must @@ -72933,6 +83105,7 @@ is malformed or if the URI scheme is not supported. Checks if the VFS is active. + %TRUE if construction of the @vfs was successful and it is now active. @@ -72949,6 +83122,7 @@ is malformed or if the URI scheme is not supported. This operation never fails, but the returned object might not support any I/O operations if the @parse_name cannot be parsed by the #GVfs module. + a #GFile for the given @parse_name. Free the returned object with g_object_unref(). @@ -72986,6 +83160,7 @@ g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). It's an error to call this function twice with the same scheme. To unregister a custom URI scheme, use g_vfs_unregister_uri_scheme(). + %TRUE if @scheme was successfully registered, or %FALSE if a handler for @scheme already exists. @@ -73034,6 +83209,7 @@ a custom URI scheme, use g_vfs_unregister_uri_scheme(). Unregisters the URI handler for @scheme previously registered with g_vfs_register_uri_scheme(). + %TRUE if @scheme was successfully unregistered, or %FALSE if a handler for @scheme does not exist. @@ -73055,11 +83231,13 @@ g_vfs_register_uri_scheme(). + + %TRUE if construction of the @vfs was successful and it is now active. @@ -73075,6 +83253,7 @@ g_vfs_register_uri_scheme(). + a #GFile. Free the returned object with g_object_unref(). @@ -73094,6 +83273,7 @@ g_vfs_register_uri_scheme(). + a #GFile. Free the returned object with g_object_unref(). @@ -73113,6 +83293,7 @@ g_vfs_register_uri_scheme(). + a %NULL-terminated array of strings. The returned array belongs to GIO and must @@ -73131,6 +83312,7 @@ g_vfs_register_uri_scheme(). + a #GFile for the given @parse_name. Free the returned object with g_object_unref(). @@ -73150,6 +83332,7 @@ g_vfs_register_uri_scheme(). + @@ -73183,6 +83366,7 @@ g_vfs_register_uri_scheme(). + @@ -73198,6 +83382,7 @@ g_vfs_register_uri_scheme(). + @@ -73222,6 +83407,7 @@ g_vfs_register_uri_scheme(). + @@ -73237,6 +83423,7 @@ g_vfs_register_uri_scheme(). + @@ -73255,6 +83442,7 @@ g_vfs_register_uri_scheme(). + @@ -73270,6 +83458,7 @@ g_vfs_register_uri_scheme(). + @@ -73277,6 +83466,7 @@ g_vfs_register_uri_scheme(). + @@ -73284,6 +83474,7 @@ g_vfs_register_uri_scheme(). + @@ -73291,6 +83482,7 @@ g_vfs_register_uri_scheme(). + @@ -73298,6 +83490,7 @@ g_vfs_register_uri_scheme(). + @@ -73305,6 +83498,7 @@ g_vfs_register_uri_scheme(). + @@ -73318,6 +83512,7 @@ implementation. The client should return a reference to the new file that has been created for @uri, or %NULL to continue with the default implementation. + a #GFile for @identifier. @@ -73328,7 +83523,7 @@ created for @uri, or %NULL to continue with the default implementation. - the identifier to lookup a #GFile for. This can either + the identifier to look up a #GFile for. This can either be an URI or a parse name as returned by g_file_get_parse_name() @@ -73355,10 +83550,10 @@ starts since it's not desirable to put up a lot of dialogs asking for credentials. The callback will be fired when the operation has resolved (either -with success or failure), and a #GAsyncReady structure will be +with success or failure), and a #GAsyncResult instance will be passed to the callback. That callback should then call g_volume_mount_finish() with the #GVolume instance and the -#GAsyncReady data to see if the operation was completed +#GAsyncResult data to see if the operation was completed successfully. If an @error is present when g_volume_mount_finish() is called, then it will be filled with any error information. @@ -73371,7 +83566,7 @@ allows to obtain an 'identifier' for the volume. There can be different kinds of identifiers, such as Hal UDIs, filesystem labels, traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined strings as names for the different kinds of identifiers: -#G_VOLUME_IDENTIFIER_KIND_HAL_UDI, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. +#G_VOLUME_IDENTIFIER_KIND_UUID, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. Use g_volume_get_identifier() to obtain an identifier for a volume. @@ -73380,8 +83575,10 @@ when the gvfs hal volume monitor is in use. Other volume monitors will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE identifier, which can be used to obtain a hal device by means of libhal_manager_find_device_string_match(). + Checks if a volume can be ejected. + %TRUE if the @volume can be ejected. %FALSE otherwise @@ -73395,6 +83592,7 @@ libhal_manager_find_device_string_match(). Checks if a volume can be mounted. + %TRUE if the @volume can be mounted. %FALSE otherwise @@ -73407,6 +83605,7 @@ libhal_manager_find_device_string_match(). + @@ -73421,6 +83620,7 @@ libhal_manager_find_device_string_match(). finished by calling g_volume_eject_finish() with the @volume and #GAsyncResult returned in the @callback. Use g_volume_eject_with_operation() instead. + @@ -73451,6 +83651,7 @@ and #GAsyncResult returned in the @callback. Finishes ejecting a volume. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. Use g_volume_eject_with_operation_finish() instead. + %TRUE, %FALSE if operation failed @@ -73470,6 +83671,7 @@ and #GAsyncResult returned in the @callback. Ejects a volume. This is an asynchronous operation, and is finished by calling g_volume_eject_with_operation_finish() with the @volume and #GAsyncResult data returned in the @callback. + @@ -73504,6 +83706,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a volume. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the volume was successfully ejected. %FALSE otherwise @@ -73522,6 +83725,7 @@ and #GAsyncResult data returned in the @callback. Gets the kinds of [identifiers][volume-identifier] that @volume has. Use g_volume_get_identifier() to obtain the identifiers themselves. + a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() to free. @@ -73556,13 +83760,14 @@ other words, in code then the expression |[<!-- language="C" --> (g_file_has_prefix (volume_activation_root, mount_root) || - g_file_equal (volume_activation_root, mount_root)) + g_file_equal (volume_activation_root, mount_root)) ]| will always be %TRUE. Activation roots are typically used in #GVolumeMonitor implementations to find the underlying mount to shadow, see g_mount_is_shadowed() for more details. + the activation root of @volume or %NULL. Use g_object_unref() to free. @@ -73577,7 +83782,8 @@ g_mount_is_shadowed() for more details. Gets the drive for the @volume. - + + a #GDrive or %NULL if @volume is not associated with a drive. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -73592,6 +83798,7 @@ g_mount_is_shadowed() for more details. Gets the icon for @volume. + a #GIcon. The returned object should be unreffed with g_object_unref() @@ -73609,9 +83816,10 @@ g_mount_is_shadowed() for more details. Gets the identifier of the given kind for @volume. See the [introduction][volume-identifier] for more information about volume identifiers. - + + a newly allocated string containing the - requested identfier, or %NULL if the #GVolume + requested identifier, or %NULL if the #GVolume doesn't have this kind of identifier @@ -73628,7 +83836,8 @@ information about volume identifiers. Gets the mount for the @volume. - + + a #GMount or %NULL if @volume isn't mounted. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -73643,6 +83852,7 @@ information about volume identifiers. Gets the name of @volume. + the name for the given @volume. The returned string should be freed with g_free() when no longer needed. @@ -73657,7 +83867,8 @@ information about volume identifiers. Gets the sort key for @volume, if any. - + + Sorting key for @volume or %NULL if no such key is available @@ -73670,6 +83881,7 @@ information about volume identifiers. Gets the symbolic icon for @volume. + a #GIcon. The returned object should be unreffed with g_object_unref() @@ -73688,8 +83900,10 @@ information about volume identifiers. the file system UUID for the volume in question and should be considered an opaque string. Returns %NULL if there is no UUID available. - - the UUID for @volume or %NULL if no UUID can be computed. + + + the UUID for @volume or %NULL if no UUID + can be computed. The returned string should be freed with g_free() when no longer needed. @@ -73709,6 +83923,7 @@ If the mount operation succeeded, g_volume_get_mount() on @volume is guaranteed to return the mount right after calling this function; there's no need to listen for the 'mount-added' signal on #GVolumeMonitor. + %TRUE, %FALSE if operation failed @@ -73728,6 +83943,7 @@ function; there's no need to listen for the 'mount-added' signal on Mounts a volume. This is an asynchronous operation, and is finished by calling g_volume_mount_finish() with the @volume and #GAsyncResult returned in the @callback. + @@ -73759,6 +83975,7 @@ and #GAsyncResult returned in the @callback. + @@ -73770,6 +83987,7 @@ and #GAsyncResult returned in the @callback. Returns whether the volume should be automatically mounted. + %TRUE if the volume should be automatically mounted @@ -73783,6 +84001,7 @@ and #GAsyncResult returned in the @callback. Checks if a volume can be ejected. + %TRUE if the @volume can be ejected. %FALSE otherwise @@ -73796,6 +84015,7 @@ and #GAsyncResult returned in the @callback. Checks if a volume can be mounted. + %TRUE if the @volume can be mounted. %FALSE otherwise @@ -73812,6 +84032,7 @@ and #GAsyncResult returned in the @callback. finished by calling g_volume_eject_finish() with the @volume and #GAsyncResult returned in the @callback. Use g_volume_eject_with_operation() instead. + @@ -73842,6 +84063,7 @@ and #GAsyncResult returned in the @callback. Finishes ejecting a volume. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. Use g_volume_eject_with_operation_finish() instead. + %TRUE, %FALSE if operation failed @@ -73861,6 +84083,7 @@ and #GAsyncResult returned in the @callback. Ejects a volume. This is an asynchronous operation, and is finished by calling g_volume_eject_with_operation_finish() with the @volume and #GAsyncResult data returned in the @callback. + @@ -73895,6 +84118,7 @@ and #GAsyncResult data returned in the @callback. Finishes ejecting a volume. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned. + %TRUE if the volume was successfully ejected. %FALSE otherwise @@ -73913,6 +84137,7 @@ and #GAsyncResult data returned in the @callback. Gets the kinds of [identifiers][volume-identifier] that @volume has. Use g_volume_get_identifier() to obtain the identifiers themselves. + a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() to free. @@ -73947,13 +84172,14 @@ other words, in code then the expression |[<!-- language="C" --> (g_file_has_prefix (volume_activation_root, mount_root) || - g_file_equal (volume_activation_root, mount_root)) + g_file_equal (volume_activation_root, mount_root)) ]| will always be %TRUE. Activation roots are typically used in #GVolumeMonitor implementations to find the underlying mount to shadow, see g_mount_is_shadowed() for more details. + the activation root of @volume or %NULL. Use g_object_unref() to free. @@ -73968,7 +84194,8 @@ g_mount_is_shadowed() for more details. Gets the drive for the @volume. - + + a #GDrive or %NULL if @volume is not associated with a drive. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -73983,6 +84210,7 @@ g_mount_is_shadowed() for more details. Gets the icon for @volume. + a #GIcon. The returned object should be unreffed with g_object_unref() @@ -74000,9 +84228,10 @@ g_mount_is_shadowed() for more details. Gets the identifier of the given kind for @volume. See the [introduction][volume-identifier] for more information about volume identifiers. - + + a newly allocated string containing the - requested identfier, or %NULL if the #GVolume + requested identifier, or %NULL if the #GVolume doesn't have this kind of identifier @@ -74019,7 +84248,8 @@ information about volume identifiers. Gets the mount for the @volume. - + + a #GMount or %NULL if @volume isn't mounted. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -74034,6 +84264,7 @@ information about volume identifiers. Gets the name of @volume. + the name for the given @volume. The returned string should be freed with g_free() when no longer needed. @@ -74048,7 +84279,8 @@ information about volume identifiers. Gets the sort key for @volume, if any. - + + Sorting key for @volume or %NULL if no such key is available @@ -74061,6 +84293,7 @@ information about volume identifiers. Gets the symbolic icon for @volume. + a #GIcon. The returned object should be unreffed with g_object_unref() @@ -74079,8 +84312,10 @@ information about volume identifiers. the file system UUID for the volume in question and should be considered an opaque string. Returns %NULL if there is no UUID available. - - the UUID for @volume or %NULL if no UUID can be computed. + + + the UUID for @volume or %NULL if no UUID + can be computed. The returned string should be freed with g_free() when no longer needed. @@ -74096,6 +84331,7 @@ available. Mounts a volume. This is an asynchronous operation, and is finished by calling g_volume_mount_finish() with the @volume and #GAsyncResult returned in the @callback. + @@ -74134,6 +84370,7 @@ If the mount operation succeeded, g_volume_get_mount() on @volume is guaranteed to return the mount right after calling this function; there's no need to listen for the 'mount-added' signal on #GVolumeMonitor. + %TRUE, %FALSE if operation failed @@ -74151,6 +84388,7 @@ function; there's no need to listen for the 'mount-added' signal on Returns whether the volume should be automatically mounted. + %TRUE if the volume should be automatically mounted @@ -74179,12 +84417,14 @@ release them so the object can be finalized. Interface for implementing operations for mountable volumes. + The parent interface. + @@ -74197,6 +84437,7 @@ release them so the object can be finalized. + @@ -74209,6 +84450,7 @@ release them so the object can be finalized. + the name for the given @volume. The returned string should be freed with g_free() when no longer needed. @@ -74224,6 +84466,7 @@ release them so the object can be finalized. + a #GIcon. The returned object should be unreffed with g_object_unref() @@ -74240,8 +84483,10 @@ release them so the object can be finalized. - - the UUID for @volume or %NULL if no UUID can be computed. + + + the UUID for @volume or %NULL if no UUID + can be computed. The returned string should be freed with g_free() when no longer needed. @@ -74256,7 +84501,8 @@ release them so the object can be finalized. - + + a #GDrive or %NULL if @volume is not associated with a drive. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -74272,7 +84518,8 @@ release them so the object can be finalized. - + + a #GMount or %NULL if @volume isn't mounted. The returned object should be unreffed with g_object_unref() when no longer needed. @@ -74288,6 +84535,7 @@ release them so the object can be finalized. + %TRUE if the @volume can be mounted. %FALSE otherwise @@ -74302,6 +84550,7 @@ release them so the object can be finalized. + %TRUE if the @volume can be ejected. %FALSE otherwise @@ -74316,6 +84565,7 @@ release them so the object can be finalized. + @@ -74349,6 +84599,7 @@ release them so the object can be finalized. + %TRUE, %FALSE if operation failed @@ -74367,6 +84618,7 @@ release them so the object can be finalized. + @@ -74396,6 +84648,7 @@ release them so the object can be finalized. + %TRUE, %FALSE if operation failed @@ -74414,9 +84667,10 @@ release them so the object can be finalized. - + + a newly allocated string containing the - requested identfier, or %NULL if the #GVolume + requested identifier, or %NULL if the #GVolume doesn't have this kind of identifier @@ -74434,6 +84688,7 @@ release them so the object can be finalized. + a %NULL-terminated array of strings containing kinds of identifiers. Use g_strfreev() to free. @@ -74451,6 +84706,7 @@ release them so the object can be finalized. + %TRUE if the volume should be automatically mounted @@ -74465,6 +84721,7 @@ release them so the object can be finalized. + the activation root of @volume or %NULL. Use g_object_unref() to free. @@ -74480,6 +84737,7 @@ release them so the object can be finalized. + @@ -74514,6 +84772,7 @@ release them so the object can be finalized. + %TRUE if the volume was successfully ejected. %FALSE otherwise @@ -74532,7 +84791,8 @@ release them so the object can be finalized. - + + Sorting key for @volume or %NULL if no such key is available @@ -74546,6 +84806,7 @@ release them so the object can be finalized. + a #GIcon. The returned object should be unreffed with g_object_unref() @@ -74569,7 +84830,11 @@ would show in a sidebar. #GVolumeMonitor is not [thread-default-context aware][g-main-context-push-thread-default], and so should not be used other than from the main thread, with no -thread-default-context active. +thread-default-context active. + +In order to receive updates about volumes and mounts monitored through GVFS, +a main loop must be running. + This function should be called by any #GVolumeMonitor implementation when a new #GMount object is created that is not @@ -74582,7 +84847,7 @@ it in its g_mount_get_volume() implementation. The caller must also listen for the "removed" signal on the returned object and give up its reference when handling that signal -Similary, if implementing g_volume_monitor_adopt_orphan_mount(), +Similarly, if implementing g_volume_monitor_adopt_orphan_mount(), the implementor must take a reference to @mount and return it in its g_volume_get_mount() implemented. Also, the implementor must listen for the "unmounted" signal on @mount and give up its @@ -74604,6 +84869,7 @@ implementations should instead create shadow mounts with the URI of the mount they intend to adopt. See the proxy volume monitor in gvfs for an example of this. Also see g_mount_is_shadowed(), g_mount_shadow() and g_mount_unshadow() functions. + the #GVolume object that is the parent for @mount or %NULL if no wants to adopt the #GMount. @@ -74618,6 +84884,7 @@ if no wants to adopt the #GMount. Gets the volume monitor used by gio. + a reference to the #GVolumeMonitor used by gio. Call g_object_unref() when done with it. @@ -74625,6 +84892,7 @@ if no wants to adopt the #GMount. + @@ -74638,6 +84906,7 @@ if no wants to adopt the #GMount. + @@ -74651,6 +84920,7 @@ if no wants to adopt the #GMount. + @@ -74664,6 +84934,7 @@ if no wants to adopt the #GMount. + @@ -74677,6 +84948,7 @@ if no wants to adopt the #GMount. + @@ -74694,6 +84966,7 @@ if no wants to adopt the #GMount. The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + a #GList of connected #GDrive objects. @@ -74709,6 +84982,7 @@ its elements have been unreffed with g_object_unref(). Finds a #GMount object by its UUID (see g_mount_get_uuid()) + a #GMount or %NULL if no such mount is available. Free the returned object with g_object_unref(). @@ -74730,6 +85004,7 @@ its elements have been unreffed with g_object_unref(). The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + a #GList of #GMount objects. @@ -74745,6 +85020,7 @@ its elements have been unreffed with g_object_unref(). Finds a #GVolume object by its UUID (see g_volume_get_uuid()) + a #GVolume or %NULL if no such volume is available. Free the returned object with g_object_unref(). @@ -74766,6 +85042,7 @@ its elements have been unreffed with g_object_unref(). The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + a #GList of #GVolume objects. @@ -74780,6 +85057,7 @@ its elements have been unreffed with g_object_unref(). + @@ -74793,6 +85071,7 @@ its elements have been unreffed with g_object_unref(). + @@ -74806,6 +85085,7 @@ its elements have been unreffed with g_object_unref(). + @@ -74819,6 +85099,7 @@ its elements have been unreffed with g_object_unref(). + @@ -74832,6 +85113,7 @@ its elements have been unreffed with g_object_unref(). + @@ -74845,6 +85127,7 @@ its elements have been unreffed with g_object_unref(). + @@ -74858,6 +85141,7 @@ its elements have been unreffed with g_object_unref(). + @@ -74875,6 +85159,7 @@ its elements have been unreffed with g_object_unref(). The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + a #GList of connected #GDrive objects. @@ -74890,6 +85175,7 @@ its elements have been unreffed with g_object_unref(). Finds a #GMount object by its UUID (see g_mount_get_uuid()) + a #GMount or %NULL if no such mount is available. Free the returned object with g_object_unref(). @@ -74911,6 +85197,7 @@ its elements have been unreffed with g_object_unref(). The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + a #GList of #GMount objects. @@ -74926,6 +85213,7 @@ its elements have been unreffed with g_object_unref(). Finds a #GVolume object by its UUID (see g_volume_get_uuid()) + a #GVolume or %NULL if no such volume is available. Free the returned object with g_object_unref(). @@ -74947,6 +85235,7 @@ its elements have been unreffed with g_object_unref(). The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref(). + a #GList of #GVolume objects. @@ -75051,7 +85340,10 @@ its elements have been unreffed with g_object_unref(). - Emitted when a mount is about to be removed. + May be emitted when a mount is about to be removed. + +This signal depends on the backend and is only emitted if +GIO was used to unmount. @@ -75112,11 +85404,13 @@ its elements have been unreffed with g_object_unref(). + + @@ -75132,6 +85426,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75147,6 +85442,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75162,6 +85458,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75177,6 +85474,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75192,6 +85490,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75207,6 +85506,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75222,6 +85522,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75237,6 +85538,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75252,6 +85554,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75267,6 +85570,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75274,6 +85578,7 @@ its elements have been unreffed with g_object_unref(). + a #GList of connected #GDrive objects. @@ -75290,6 +85595,7 @@ its elements have been unreffed with g_object_unref(). + a #GList of #GVolume objects. @@ -75306,6 +85612,7 @@ its elements have been unreffed with g_object_unref(). + a #GList of #GMount objects. @@ -75322,6 +85629,7 @@ its elements have been unreffed with g_object_unref(). + a #GVolume or %NULL if no such volume is available. Free the returned object with g_object_unref(). @@ -75341,6 +85649,7 @@ its elements have been unreffed with g_object_unref(). + a #GMount or %NULL if no such mount is available. Free the returned object with g_object_unref(). @@ -75360,6 +85669,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75375,6 +85685,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75390,6 +85701,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75405,6 +85717,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75412,6 +85725,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75419,6 +85733,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75426,6 +85741,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75433,6 +85749,7 @@ its elements have been unreffed with g_object_unref(). + @@ -75440,17 +85757,62 @@ its elements have been unreffed with g_object_unref(). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Zlib decompression + Creates a new #GZlibCompressor. + a new #GZlibCompressor @@ -75468,6 +85830,7 @@ its elements have been unreffed with g_object_unref(). Returns the #GZlibCompressor:file-info property. + a #GFileInfo, or %NULL @@ -75488,6 +85851,7 @@ the GZIP header of the compressed data. Note: it is an error to call this function while a compression is in progress; it may only be called immediately after creation of @compressor, or after resetting it with g_converter_reset(). + @@ -75516,6 +85880,7 @@ and modification time from the file info to the GZIP header. + @@ -75535,9 +85900,11 @@ and #GZlibCompressor. Zlib decompression + Creates a new #GZlibDecompressor. + a new #GZlibDecompressor @@ -75555,6 +85922,7 @@ of compressed data processed by @compressor, or %NULL if @decompressor's #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP, or the header data was not fully processed yet, or it not present in the data stream at all. + a #GFileInfo, or %NULL @@ -75578,6 +85946,7 @@ fully processed, is not present at all, or the compressor's + @@ -75590,13 +85959,14 @@ plus '-' and '.'. The empty string is not a valid action name. It is an error to call this function with a non-utf8 @action_name. @action_name must not be %NULL. + %TRUE if @action_name is valid - an potential action name + a potential action name @@ -75626,6 +85996,7 @@ two sets of parens, for example: "app.action((1,2,3))". A string target can be specified this way as well: "app.action('target')". For strings, this third format must be used if * target value is empty or contains characters other than alphanumerics, '-' and '.'. + %TRUE if successful, else %FALSE with @error set @@ -75656,6 +86027,7 @@ and @target_value by that function. See that function for the types of strings that will be printed by this function. + a detailed format string @@ -75679,6 +86051,7 @@ Note that for @commandline, the quoting rules of the Exec key of the are applied. For example, if the @commandline contains percent-encoded URIs, the percent-character must be doubled in order to prevent it from being swallowed by Exec key unquoting. See the specification for exact quoting rules. + new #GAppInfo for given command. @@ -75686,7 +86059,7 @@ being swallowed by Exec key unquoting. See the specification for exact quoting r the commandline to use - + the application name, or %NULL to use @commandline @@ -75707,6 +86080,7 @@ For desktop files, this includes applications that have of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show(). The returned list does not include applications which have the `Hidden` key set. + a newly allocated #GList of references to #GAppInfos. @@ -75719,6 +86093,7 @@ the `Hidden` key set. including the recommended and fallback #GAppInfos. See g_app_info_get_recommended_for_type() and g_app_info_get_fallback_for_type(). + #GList of #GAppInfos for given @content_type or %NULL on error. @@ -75735,6 +86110,7 @@ g_app_info_get_fallback_for_type(). Gets the default #GAppInfo for a given content type. + #GAppInfo for given @content_type or %NULL on error. @@ -75757,6 +86133,7 @@ g_app_info_get_fallback_for_type(). the given URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip". + #GAppInfo for given @uri_scheme or %NULL on error. @@ -75772,6 +86149,7 @@ of the URI, up to but not including the ':', e.g. "http", Gets a list of fallback #GAppInfos for a given content type, i.e. those applications which claim to support the given content type by MIME type subclassing and not directly. + #GList of #GAppInfos for given @content_type or %NULL on error. @@ -75793,6 +86171,7 @@ and not by MIME type subclassing. Note that the first application of the list is the last used one, i.e. the last one for which g_app_info_set_as_last_used_for_type() has been called. + #GList of #GAppInfos for given @content_type or %NULL on error. @@ -75811,7 +86190,12 @@ called. Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if -required. +required. + +The D-Bus–activated applications don't have to be started if your application +terminates too soon after this function. To prevent this, use +g_app_info_launch_default_for_uri_async() instead. + %TRUE on success, %FALSE on error. @@ -75821,7 +86205,7 @@ required. the uri to show - + an optional #GAppLaunchContext @@ -75833,7 +86217,12 @@ required. This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser -dialog to the user. +dialog to the user. + +This is also useful if you want to be sure that the D-Bus–activated +applications are really started before termination and if you are interested +in receiving error information from their activation. + @@ -75842,14 +86231,16 @@ dialog to the user. the uri to show - + + an optional #GAppLaunchContext + a #GCancellable - a #GASyncReadyCallback to call when the request is done + a #GAsyncReadyCallback to call when the request is done @@ -75860,6 +86251,7 @@ dialog to the user. Finishes an asynchronous launch-default-for-uri operation. + %TRUE if the launch was successful, %FALSE if @error is set @@ -75877,6 +86269,7 @@ g_app_info_set_as_default_for_type(), g_app_info_set_as_default_for_extension(), g_app_info_add_supports_type() or g_app_info_remove_supports_type(). + @@ -75896,6 +86289,7 @@ then call g_async_initable_new_finish() to get the new object and check for any errors. Use g_object_new_with_properties() and g_async_initable_init_async() instead. See #GParameter for more information. + @@ -75937,8 +86331,9 @@ g_async_initable_init_async() instead. See #GParameter for more information. + @@ -75972,6 +86367,7 @@ g_dbus_connection_new_for_address(). Note that the returned #GDBusConnection object will (usually) have the #GDBusConnection:exit-on-close property set to %TRUE. + a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). @@ -76002,6 +86398,7 @@ g_dbus_connection_new_for_address(). Note that the returned #GDBusConnection object will (usually) have the #GDBusConnection:exit-on-close property set to %TRUE. + a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). @@ -76068,8 +86465,9 @@ This behavior makes it very simple to write applications that wants to [own names][gdbus-owning-names] and export objects. Simply register objects to be exported in @bus_acquired_handler and unregister the objects (if any) in @name_lost_handler. + - an identifier (never 0) that an be used with + an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name. @@ -76111,8 +86509,9 @@ unregister the objects (if any) in @name_lost_handler. Like g_bus_own_name() but takes a #GDBusConnection instead of a #GBusType. + - an identifier (never 0) that an be used with + an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name @@ -76150,8 +86549,9 @@ unregister the objects (if any) in @name_lost_handler. Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages. + - an identifier (never 0) that an be used with + an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name. @@ -76183,8 +86583,9 @@ callbacks for easier binding in other languages. Version of g_bus_own_name() using closures instead of callbacks for easier binding in other languages. + - an identifier (never 0) that an be used with + an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name. @@ -76219,7 +86620,15 @@ easier binding in other languages. - Stops owning a name. + Stops owning a name. + +Note that there may still be D-Bus traffic to process (relating to owning +and unowning the name) in the current thread-default #GMainContext after +this function has returned. You should continue to iterate the #GMainContext +until the #GDestroyNotify function passed to g_bus_own_name() is called, in +order to avoid memory leaks through callbacks queued on the #GMainContext +after it’s stopped being iterated. + @@ -76231,7 +86640,15 @@ easier binding in other languages. - Stops watching a name. + Stops watching a name. + +Note that there may still be D-Bus traffic to process (relating to watching +and unwatching the name) in the current thread-default #GMainContext after +this function has returned. You should continue to iterate the #GMainContext +until the #GDestroyNotify function passed to g_bus_watch_name() is called, in +order to avoid memory leaks through callbacks queued on the #GMainContext +after it’s stopped being iterated. + @@ -76245,7 +86662,7 @@ easier binding in other languages. Starts watching @name on the bus specified by @bus_type and calls @name_appeared_handler and @name_vanished_handler when the name is -known to have a owner respectively known to lose its +known to have an owner respectively known to lose its owner. Callbacks will be invoked in the [thread-default main context][g-main-context-push-thread-default] of the thread you are calling this function from. @@ -76272,8 +86689,9 @@ to take action when a certain [name exists][gdbus-watching-names]. Basically, the application should create object proxies in @name_appeared_handler and destroy them again (if any) in @name_vanished_handler. + - An identifier (never 0) that an be used with + An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name. @@ -76311,8 +86729,9 @@ g_bus_unwatch_name() to stop watching the name. Like g_bus_watch_name() but takes a #GDBusConnection instead of a #GBusType. + - An identifier (never 0) that an be used with + An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name. @@ -76350,8 +86769,9 @@ g_bus_unwatch_name() to stop watching the name. Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages. + - An identifier (never 0) that an be used with + An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name. @@ -76383,8 +86803,9 @@ to not exist or %NULL. Version of g_bus_watch_name() using closures instead of callbacks for easier binding in other languages. + - An identifier (never 0) that an be used with + An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name. @@ -76416,6 +86837,7 @@ to not exist or %NULL. Checks if a content type can be executable. Note that for instance things like text files can be executables (i.e. scripts and batch files). + %TRUE if the file type corresponds to a type that can be executable, %FALSE otherwise. @@ -76430,6 +86852,7 @@ things like text files can be executables (i.e. scripts and batch files). Compares two content types for equality. + %TRUE if the two strings are identical or equivalent, %FALSE otherwise. @@ -76448,6 +86871,7 @@ things like text files can be executables (i.e. scripts and batch files). Tries to find a content type based on the mime type name. + Newly allocated string with content type or %NULL. Free with g_free() @@ -76462,6 +86886,7 @@ things like text files can be executables (i.e. scripts and batch files). Gets the human readable description of the content type. + a short description of the content type @type. Free the returned string with g_free() @@ -76480,6 +86905,7 @@ things like text files can be executables (i.e. scripts and batch files). See the [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) specification for more on the generic icon name. + the registered generic icon name for the given @type, or %NULL if unknown. Free with g_free() @@ -76494,6 +86920,7 @@ specification for more on the generic icon name. Gets the icon for a content type. + #GIcon corresponding to the content type. Free the returned object with g_object_unref() @@ -76506,11 +86933,25 @@ specification for more on the generic icon name. + + Get the list of directories which MIME data is loaded from. See +g_content_type_set_mime_dirs() for details. + + + %NULL-terminated list of + directories to load MIME data from, including any `mime/` subdirectory, + and with the first directory to try listed first + + + + + Gets the mime type for the content type, if one is registered. + - the registered mime type for the given @type, - or %NULL if unknown. + the registered mime type for the + given @type, or %NULL if unknown; free with g_free(). @@ -76522,6 +86963,7 @@ specification for more on the generic icon name. Gets the symbolic icon for a content type. + symbolic #GIcon corresponding to the content type. Free the returned object with g_object_unref() @@ -76539,6 +86981,7 @@ specification for more on the generic icon name. uncertain, @result_uncertain will be set to %TRUE. Either @filename or @data may be %NULL, in which case the guess will be based solely on the other argument. + a string indicating a guessed content type for the given data. Free with g_free() @@ -76551,7 +86994,7 @@ on the other argument. a stream of data, or %NULL - + @@ -76579,6 +87022,7 @@ specification for more on x-content types. This function is useful in the implementation of g_mount_guess_content_type(). + an %NULL-terminated array of zero or more content types. Free with g_strfreev() @@ -76595,6 +87039,7 @@ g_mount_guess_content_type(). Determines if @type is a subset of @supertype. + %TRUE if @type is a kind of @supertype, %FALSE otherwise. @@ -76614,6 +87059,7 @@ g_mount_guess_content_type(). Determines if @type is a subset of @mime_type. Convenience wrapper around g_content_type_is_a(). + %TRUE if @type is a kind of @mime_type, %FALSE otherwise. @@ -76635,6 +87081,7 @@ Convenience wrapper around g_content_type_is_a(). On UNIX this is the "application/octet-stream" mimetype, while on win32 it is "*" and on OSX it is a dynamic type or octet-stream. + %TRUE if the type is the unknown type. @@ -76646,10 +87093,50 @@ or octet-stream. + + Set the list of directories used by GIO to load the MIME database. +If @dirs is %NULL, the directories used are the default: + + - the `mime` subdirectory of the directory in `$XDG_DATA_HOME` + - the `mime` subdirectory of every directory in `$XDG_DATA_DIRS` + +This function is intended to be used when writing tests that depend on +information stored in the MIME database, in order to control the data. + +Typically, in case your tests use %G_TEST_OPTION_ISOLATE_DIRS, but they +depend on the system’s MIME database, you should call this function +with @dirs set to %NULL before calling g_test_init(), for instance: + +|[<!-- language="C" --> + // Load MIME data from the system + g_content_type_set_mime_dirs (NULL); + // Isolate the environment + g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL); + + … + + return g_test_run (); +]| + + + + + + + %NULL-terminated list of + directories to load MIME data from, including any `mime/` subdirectory, + and with the first directory to try listed first + + + + + + Gets a list of strings containing all the registered content types known to the system. The list and its data should be freed using -g_list_free_full (list, g_free). +`g_list_free_full (list, g_free)`. + list of the registered content types @@ -76662,10 +87149,11 @@ g_list_free_full (list, g_free). Escape @string so it can appear in a D-Bus address as the value part of a key-value pair. -For instance, if @string is "/run/bus-for-:0", -this function would return "/run/bus-for-%3A0", +For instance, if @string is `/run/bus-for-:0`, +this function would return `/run/bus-for-%3A0`, which could be used in a D-Bus address like -"unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0". +`unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0`. + a copy of @string with all non-optionally-escaped bytes escaped @@ -76686,9 +87174,10 @@ platform specific mechanisms. The returned address will be in the [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + - a valid D-Bus address string for @bus_type or %NULL if - @error is set + a valid D-Bus address string for @bus_type or + %NULL if @error is set @@ -76714,6 +87203,7 @@ the operation. This is an asynchronous failable function. See g_dbus_address_get_stream_sync() for the synchronous version. + @@ -76738,6 +87228,7 @@ g_dbus_address_get_stream_sync() for the synchronous version. Finishes an operation started with g_dbus_address_get_stream(). + A #GIOStream or %NULL if @error is set. @@ -76761,6 +87252,7 @@ of the D-Bus authentication conversation. @address must be in the This is a synchronous failable function. See g_dbus_address_get_stream() for the asynchronous version. + A #GIOStream or %NULL if @error is set. @@ -76784,6 +87276,7 @@ g_dbus_address_get_stream() for the asynchronous version. Looks up the value of an annotation. The cost of this function is O(n) in number of annotations. + The value or %NULL if not found. Do not free, it is owned by @annotations. @@ -76813,6 +87306,7 @@ on the wire back to a #GError using g_dbus_error_new_for_dbus_error(). This function is typically only used in object mappings to put a #GError on the wire. Regular applications should not use it. + A D-Bus error name (never %NULL). Free with g_free(). @@ -76831,6 +87325,7 @@ This function is guaranteed to return a D-Bus error name for all #GErrors returned from functions handling remote method calls (e.g. g_dbus_connection_call_finish()) unless g_dbus_error_strip_remote_error() has been used on @error. + an allocated string or %NULL if the D-Bus error name could not be found. Free with g_free(). @@ -76846,6 +87341,7 @@ g_dbus_error_strip_remote_error() has been used on @error. Checks if @error represents an error received via D-Bus from a remote peer. If so, use g_dbus_error_get_remote_error() to get the name of the error. + %TRUE if @error represents an error from a remote peer, %FALSE otherwise. @@ -76885,6 +87381,7 @@ returned #GError using the g_dbus_error_get_remote_error() function This function is typically only used in object mappings to prepare #GError instances for applications. Regular applications should not use it. + An allocated #GError. Free with g_error_free(). @@ -76911,6 +87408,7 @@ it. This is typically done in the routine that returns the #GQuark for an error domain. + %TRUE if the association was created, %FALSE if it already exists. @@ -76918,7 +87416,7 @@ exists. - A #GQuark for a error domain. + A #GQuark for an error domain. @@ -76933,6 +87431,7 @@ exists. Helper function for associating a #GError error domain with D-Bus error names. + @@ -76947,7 +87446,9 @@ exists. A pointer to @num_entries #GDBusErrorEntry struct items. - + + + Number of items to register. @@ -76962,6 +87463,7 @@ message field in @error will correspond exactly to what was received on the wire. This is typically used when presenting errors to the end user. + %TRUE if information was stripped, %FALSE otherwise. @@ -76975,13 +87477,14 @@ This is typically used when presenting errors to the end user. Destroys an association previously set up with g_dbus_error_register_error(). + %TRUE if the association was destroyed, %FALSE if it wasn't found. - A #GQuark for a error domain. + A #GQuark for an error domain. @@ -77000,6 +87503,7 @@ e.g. g_dbus_connection_new(). See the D-Bus specification regarding what strings are valid D-Bus GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). + A valid D-Bus GUID. Free with g_free(). @@ -77034,6 +87538,7 @@ returned (e.g. 0 for scalar types, the empty string for string types, See the g_dbus_gvariant_to_gvalue() function for how to convert a #GVariant to a #GValue. + A #GVariant (never floating) of #GVariantType @type holding the data from @gvalue or %NULL in case of failure. Free with @@ -77063,6 +87568,7 @@ variant, tuple, dict entry) will be converted to a #GValue containing that The conversion never fails - a valid #GValue is always returned in @out_gvalue. + @@ -77084,6 +87590,7 @@ The conversion never fails - a valid #GValue is always returned in This doesn't check if @string is actually supported by #GDBusServer or #GDBusConnection - use g_dbus_is_supported_address() to do more checks. + %TRUE if @string is a valid D-Bus address, %FALSE otherwise. @@ -77100,6 +87607,7 @@ checks. See the D-Bus specification regarding what strings are valid D-Bus GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). + %TRUE if @string is a guid, %FALSE otherwise. @@ -77113,6 +87621,7 @@ GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). Checks if @string is a valid D-Bus interface name. + %TRUE if valid, %FALSE otherwise. @@ -77126,6 +87635,7 @@ GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). Checks if @string is a valid D-Bus member (e.g. signal or method) name. + %TRUE if valid, %FALSE otherwise. @@ -77139,6 +87649,7 @@ GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). Checks if @string is a valid D-Bus bus name (either unique or well-known). + %TRUE if valid, %FALSE otherwise. @@ -77155,6 +87666,7 @@ GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). transports in @string and that key/value pairs for each transport are valid. See the specification of the [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). + %TRUE if @string is a valid D-Bus address that is supported by this library, %FALSE if @error is set. @@ -77169,6 +87681,7 @@ supported by this library, %FALSE if @error is set. Checks if @string is a valid D-Bus unique bus name. + %TRUE if valid, %FALSE otherwise. @@ -77183,6 +87696,7 @@ supported by this library, %FALSE if @error is set. Creates a new #GDtlsClientConnection wrapping @base_socket which is assumed to communicate with the server identified by @server_identity. + the new #GDtlsClientConnection, or %NULL on error @@ -77201,6 +87715,7 @@ assumed to communicate with the server identified by @server_identity. Creates a new #GDtlsServerConnection wrapping @base_socket. + the new #GDtlsServerConnection, or %NULL on error @@ -77232,6 +87747,7 @@ the commandline. #GApplication also uses UTF-8 but g_application_command_line_create_file_for_arg() may be more useful for you there. It is also always possible to use this function with #GOptionContext arguments of type %G_OPTION_ARG_FILENAME. + a new #GFile. Free the returned object with g_object_unref(). @@ -77240,7 +87756,7 @@ for you there. It is also always possible to use this function with a command line string - + @@ -77256,6 +87772,7 @@ This is useful if the commandline argument was given in a context other than the invocation of the current process. See also g_application_command_line_create_file_for_arg(). + a new #GFile @@ -77263,11 +87780,11 @@ See also g_application_command_line_create_file_for_arg(). a command line string - + the current working directory of the commandline - + @@ -77275,6 +87792,7 @@ See also g_application_command_line_create_file_for_arg(). Constructs a #GFile for a given path. This operation never fails, but the returned object might not support any I/O operation if @path is malformed. + a new #GFile for the given @path. Free the returned object with g_object_unref(). @@ -77284,7 +87802,7 @@ operation if @path is malformed. a string containing a relative or absolute path. The string must be encoded in the glib filename encoding. - + @@ -77293,6 +87811,7 @@ operation if @path is malformed. fails, but the returned object might not support any I/O operation if @uri is malformed or if the uri type is not supported. + a new #GFile for the given @uri. Free the returned object with g_object_unref(). @@ -77316,6 +87835,7 @@ directory components. If it is %NULL, a default template is used. Unlike the other #GFile constructors, this will return %NULL if a temporary file could not be created. + a new #GFile. Free the returned object with g_object_unref(). @@ -77325,7 +87845,7 @@ a temporary file could not be created. Template for the file name, as in g_file_open_tmp(), or %NULL for a default template - + on return, a #GFileIOStream for the created file @@ -77338,6 +87858,7 @@ a temporary file could not be created. given by g_file_get_parse_name()). This operation never fails, but the returned object might not support any I/O operation if the @parse_name cannot be parsed. + a new #GFile. @@ -77351,6 +87872,7 @@ the @parse_name cannot be parsed. Deserializes a #GIcon previously serialized using g_icon_serialize(). + a #GIcon, or %NULL when deserialization fails. @@ -77364,6 +87886,7 @@ the @parse_name cannot be parsed. Gets a hash for an icon. + a #guint containing a hash for the @icon, suitable for use in a #GHashTable or similar data structure. @@ -77383,6 +87906,7 @@ use in a #GHashTable or similar data structure. If your application or library provides one or more #GIcon implementations you need to ensure that each #GType is registered with the type system prior to calling g_icon_new_for_string(). + An object implementing the #GIcon interface or %NULL if @error is set. @@ -77401,6 +87925,7 @@ similar to g_object_newv() but also initializes the object and returns %NULL, setting an error on failure. Use g_object_new_with_properties() and g_initable_init() instead. See #GParameter for more information. + a newly allocated #GObject, or %NULL on error @@ -77435,6 +87960,7 @@ specific value instead). As %errno is global and may be modified by intermediate function calls, you should save its value as soon as the call which sets it + #GIOErrorEnum value for the given errno.h error number. @@ -77459,6 +87985,7 @@ calls, you should save its value as soon as the call which sets it If @type has already been registered as an extension for this extension point, the existing #GIOExtension object is returned. + a #GIOExtension object for #GType @@ -77484,6 +88011,7 @@ extension point, the existing #GIOExtension object is returned. Looks up an existing extension point. + the #GIOExtensionPoint, or %NULL if there is no registered extension point with the given name. @@ -77498,6 +88026,7 @@ extension point, the existing #GIOExtension object is returned. Registers an extension point. + the new #GIOExtensionPoint. This object is owned by GIO and should not be freed. @@ -77516,6 +88045,7 @@ extension point, the existing #GIOExtension object is returned. If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules. + a list of #GIOModules loaded from the directory, @@ -77531,7 +88061,7 @@ which allows delayed/lazy loading of modules. pathname for a directory containing modules to load. - + @@ -77541,6 +88071,7 @@ which allows delayed/lazy loading of modules. If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules. + a list of #GIOModules loaded from the directory, @@ -77556,7 +88087,7 @@ which allows delayed/lazy loading of modules. pathname for a directory containing modules to load. - + a scope to use when scanning the modules. @@ -77576,6 +88107,7 @@ g_io_extension_point_get_extension_by_name(). If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory(). + @@ -77583,7 +88115,7 @@ use g_io_modules_load_all_in_directory(). pathname for a directory containing modules to scan. - + @@ -77599,6 +88131,7 @@ g_io_extension_point_get_extension_by_name(). If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory(). + @@ -77606,7 +88139,7 @@ use g_io_modules_load_all_in_directory(). pathname for a directory containing modules to scan. - + a scope to use when scanning the modules @@ -77622,6 +88155,7 @@ g_io_scheduler_push_job(). You should never call this function, since you don't know how other libraries in your program might be making use of gioscheduler. + @@ -77636,6 +88170,7 @@ If @cancellable is not %NULL, it can be used to cancel the I/O job by calling g_cancellable_cancel() or by calling g_io_scheduler_cancel_all_jobs(). use #GThreadPool or g_task_run_in_thread() + @@ -77707,7 +88242,13 @@ writable). There is no checking done for your key namespace clashing with the syntax of the key file format. For example, if you have '[' or ']' characters in your path names or '=' in your key names you may be in -trouble. +trouble. + +The backend reads default values from a keyfile called `defaults` in +the directory specified by the #GKeyfileSettingsBackend:defaults-dir property, +and a list of locked keys from a text file with the name `locks` in +the same location. + a keyfile-backed #GSettingsBackend @@ -77728,12 +88269,21 @@ trouble. + + Gets a reference to the default #GMemoryMonitor for the system. + + + a new reference to the default #GMemoryMonitor + + + Creates a memory-backed #GSettingsBackend. This backend allows changes to settings, but does not write them to any backing storage, so the next time you run your application, the memory backend will start out with the default values again. + a newly created #GSettingsBackend @@ -77741,6 +88291,7 @@ the memory backend will start out with the default values again. Gets the default #GNetworkMonitor for the system. + a #GNetworkMonitor @@ -77751,6 +88302,7 @@ the memory backend will start out with the default values again. calls WSAStartup()). GLib will call this itself if it is needed, so you only need to call it if you directly call system networking functions (without calling any GLib networking functions first). + @@ -77760,6 +88312,7 @@ functions (without calling any GLib networking functions first). This backend does not allow changes to settings, so all settings will always have their default values. + a newly created #GSettingsBackend @@ -77771,6 +88324,7 @@ implementations. Creates a new #GSource that expects a callback of type #GPollableSourceFunc. The new source does not actually do anything on its own; use g_source_add_child_source() to add other sources to it to cause it to trigger. + the new #GSource. @@ -77787,6 +88341,7 @@ sources to it to cause it to trigger. implementations. Creates a new #GSource, as with g_pollable_source_new(), but also attaching @child_source (with a dummy callback), and @cancellable, if they are non-%NULL. + the new #GSource. @@ -77817,6 +88372,7 @@ If @blocking is %FALSE, then @stream must be a #GPollableInputStream for which g_pollable_input_stream_can_poll() returns %TRUE, or else the behavior is undefined. If @blocking is %TRUE, then @stream does not need to be a #GPollableInputStream. + the number of bytes read, or -1 on error. @@ -77858,6 +88414,7 @@ If @blocking is %FALSE, then @stream must be a g_pollable_output_stream_can_poll() returns %TRUE or else the behavior is undefined. If @blocking is %TRUE, then @stream does not need to be a #GPollableOutputStream. + the number of bytes written, or -1 on error. @@ -77907,6 +88464,7 @@ As with g_pollable_stream_write(), if @blocking is %FALSE, then g_pollable_output_stream_can_poll() returns %TRUE or else the behavior is undefined. If @blocking is %TRUE, then @stream does not need to be a #GPollableOutputStream. + %TRUE on success, %FALSE if there was an error @@ -77943,8 +88501,9 @@ need to be a #GPollableOutputStream. - Lookup "gio-proxy" extension point for a proxy implementation that supports -specified protocol. + Find the `gio-proxy` extension point for a proxy implementation that supports +the specified protocol. + return a #GProxy or NULL if protocol is not supported. @@ -77959,6 +88518,7 @@ specified protocol. Gets the default #GProxyResolver for the system. + the default #GProxyResolver. @@ -77983,7 +88543,13 @@ specified protocol. you to query it for data. If you want to use this resource in the global resource namespace you need -to register it with g_resources_register(). +to register it with g_resources_register(). + +If @filename is empty or the data in it is corrupt, +%G_RESOURCE_ERROR_INTERNAL will be returned. If @filename doesn’t exist, or +there is an error in reading it, an error from g_mapped_file_new() will be +returned. + a new #GResource, or %NULL on error @@ -77991,7 +88557,7 @@ to register it with g_resources_register(). the path of a filename to load, in the GLib filename encoding - + @@ -78002,6 +88568,7 @@ The return result is a %NULL terminated list of strings which should be released with g_strfreev(). @lookup_flags controls the behaviour of the lookup. + an array of constant strings @@ -78024,6 +88591,7 @@ be released with g_strfreev(). globally registered resources and if found returns information about it. @lookup_flags controls the behaviour of the lookup. + %TRUE if the file was found. %FALSE if there were errors @@ -78064,6 +88632,7 @@ in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data. @lookup_flags controls the behaviour of the lookup. + #GBytes or %NULL on error. Free the returned object with g_bytes_unref() @@ -78086,6 +88655,7 @@ globally registered resources and returns a #GInputStream that lets you read the data. @lookup_flags controls the behaviour of the lookup. + #GInputStream or %NULL on error. Free the returned object with g_object_unref() @@ -78106,6 +88676,7 @@ that lets you read the data. Registers the resource with the process-global set of resources. Once a resource is registered the files in it can be accessed with the global resource lookup functions like g_resources_lookup_data(). + @@ -78118,6 +88689,7 @@ with the global resource lookup functions like g_resources_lookup_data(). Unregisters the resource from the process-global set of resources. + @@ -78142,7 +88714,8 @@ from different directories, depending on which directories were given in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all lookups performed against the default source should probably be done recursively. - + + the default schema source @@ -78152,6 +88725,7 @@ recursively. directly setting the contents of the #GAsyncResult with the given error information. Use g_task_report_error(). + @@ -78191,6 +88765,7 @@ information. g_simple_async_report_error_in_idle(), but takes a #GError rather than building a new one. Use g_task_report_error(). + @@ -78218,6 +88793,7 @@ than building a new one. g_simple_async_report_gerror_in_idle(), but takes over the caller's ownership of @error, so the caller does not have to free it any more. Use g_task_report_error(). + @@ -78242,6 +88818,7 @@ ownership of @error, so the caller does not have to free it any more. Sorts @targets in place according to the algorithm in RFC 2782. + the head of the sorted list. @@ -78259,6 +88836,7 @@ ownership of @error, so the caller does not have to free it any more. Gets the default #GTlsBackend for the system. + a #GTlsBackend @@ -78272,6 +88850,7 @@ communicate with the server identified by @server_identity. See the documentation for #GTlsConnection:base-io-stream for restrictions on when application code can run operations on the @base_io_stream after this function has returned. + the new #GTlsClientConnection, or %NULL on error @@ -78300,6 +88879,7 @@ this function has returned. in @anchors to verify certificate chains. The certificates in @anchors must be PEM encoded. + the new #GTlsFileDatabase, or %NULL on error @@ -78308,7 +88888,7 @@ The certificates in @anchors must be PEM encoded. filename of anchor certificate authorities. - + @@ -78319,6 +88899,7 @@ must have pollable input and output streams). See the documentation for #GTlsConnection:base-io-stream for restrictions on when application code can run operations on the @base_io_stream after this function has returned. + the new #GTlsServerConnection, or %NULL on error @@ -78340,6 +88921,7 @@ this function has returned. OS. This is primarily used for hiding mountable and mounted volumes that only are used in the OS and has little to no relevance to the casual user. + %TRUE if @mount_path is considered an implementation detail of the OS. @@ -78348,14 +88930,59 @@ casual user. a mount path, e.g. `/media/disk` or `/usr` - + + + + + + Determines if @device_path is considered a block device path which is only +used in implementation of the OS. This is primarily used for hiding +mounted volumes that are intended as APIs for programs to read, and system +administrators at a shell; rather than something that should, for example, +appear in a GUI. For example, the Linux `/proc` filesystem. + +The list of device paths considered ‘system’ ones may change over time. + + + %TRUE if @device_path is considered an implementation detail of + the OS. + + + + + a device path, e.g. `/dev/loop0` or `nfsd` + + + + + + Determines if @fs_type is considered a type of file system which is only +used in implementation of the OS. This is primarily used for hiding +mounted volumes that are intended as APIs for programs to read, and system +administrators at a shell; rather than something that should, for example, +appear in a GUI. For example, the Linux `/proc` filesystem. + +The list of file system types considered ‘system’ ones may change over time. + + + %TRUE if @fs_type is considered an implementation detail of the OS. + + + + + a file system type, e.g. `procfs` or `tmpfs` + Gets a #GUnixMountEntry for a given mount path. If @time_read is set, it will be filled with a unix timestamp for checking -if the mounts have changed since with g_unix_mounts_changed_since(). +if the mounts have changed since with g_unix_mounts_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + a #GUnixMountEntry. @@ -78363,7 +88990,7 @@ if the mounts have changed since with g_unix_mounts_changed_since(). path for a possible unix mount. - + guint64 to contain a timestamp. @@ -78373,6 +89000,7 @@ if the mounts have changed since with g_unix_mounts_changed_since(). Compares two unix mounts. + 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively. @@ -78391,6 +89019,7 @@ or less than @mount2, respectively. Makes a copy of @mount_entry. + a new #GUnixMountEntry @@ -78405,7 +89034,11 @@ or less than @mount2, respectively. Gets a #GUnixMountEntry for a given file path. If @time_read is set, it will be filled with a unix timestamp for checking -if the mounts have changed since with g_unix_mounts_changed_since(). +if the mounts have changed since with g_unix_mounts_changed_since(). + +If more mounts have the same mount path, the last matching mount +is returned. + a #GUnixMountEntry. @@ -78413,7 +89046,7 @@ if the mounts have changed since with g_unix_mounts_changed_since(). file path on some unix mount. - + guint64 to contain a timestamp. @@ -78423,6 +89056,7 @@ if the mounts have changed since with g_unix_mounts_changed_since(). Frees a unix mount. + @@ -78435,9 +89069,10 @@ if the mounts have changed since with g_unix_mounts_changed_since(). Gets the device path for a unix mount. + a string containing the device path. - + @@ -78448,6 +89083,7 @@ if the mounts have changed since with g_unix_mounts_changed_since(). Gets the filesystem type for the unix mount. + a string containing the file system type. @@ -78461,9 +89097,10 @@ if the mounts have changed since with g_unix_mounts_changed_since(). Gets the mount path for a unix mount. + the mount path for @mount_entry. - + @@ -78472,8 +89109,47 @@ if the mounts have changed since with g_unix_mounts_changed_since(). + + Gets a comma-separated list of mount options for the unix mount. For example, +`rw,relatime,seclabel,data=ordered`. + +This is similar to g_unix_mount_point_get_options(), but it takes +a #GUnixMountEntry as an argument. + + + a string containing the options, or %NULL if not +available. + + + + + a #GUnixMountEntry. + + + + + + Gets the root of the mount within the filesystem. This is useful e.g. for +mounts created by bind operation, or btrfs subvolumes. + +For example, the root path is equal to "/" for mount created by +"mount /dev/sda1 /mnt/foo" and "/bar" for +"mount --bind /mnt/foo/bar /mnt/bar". + + + a string containing the root, or %NULL if not supported. + + + + + a #GUnixMountEntry. + + + + Guesses whether a Unix mount can be ejected. + %TRUE if @mount_entry is deemed to be ejectable. @@ -78487,6 +89163,7 @@ if the mounts have changed since with g_unix_mounts_changed_since(). Guesses the icon of a Unix mount. + a #GIcon @@ -78501,6 +89178,7 @@ if the mounts have changed since with g_unix_mounts_changed_since(). Guesses the name of a Unix mount. The result is a translated string. + A newly allocated string that must be freed with g_free() @@ -78515,6 +89193,7 @@ The result is a translated string. Guesses whether a Unix mount should be displayed in the UI. + %TRUE if @mount_entry is deemed to be displayable. @@ -78528,6 +89207,7 @@ The result is a translated string. Guesses the symbolic icon of a Unix mount. + a #GIcon @@ -78541,6 +89221,7 @@ The result is a translated string. Checks if a unix mount is mounted read only. + %TRUE if @mount_entry is read only. @@ -78553,7 +89234,13 @@ The result is a translated string. - Checks if a unix mount is a system path. + Checks if a Unix mount is a system mount. This is the Boolean OR of +g_unix_is_system_fs_type(), g_unix_is_system_device_path() and +g_unix_is_mount_path_system_internal() on @mount_entry’s properties. + +The definition of what a ‘system’ mount entry is may change over time as new +file system types and device paths are ignored. + %TRUE if the unix mount is for a system path. @@ -78567,6 +89254,7 @@ The result is a translated string. Checks if the unix mount points have changed since a given unix time. + %TRUE if the mount points have changed since @time. @@ -78583,6 +89271,7 @@ The result is a translated string. If @time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mount_points_changed_since(). + a #GList of the UNIX mountpoints. @@ -78599,6 +89288,7 @@ g_unix_mount_points_changed_since(). Checks if the unix mounts have changed since a given unix time. + %TRUE if the mounts have changed since @time. @@ -78615,6 +89305,7 @@ g_unix_mount_points_changed_since(). If @time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mounts_changed_since(). + a #GList of the UNIX mounts.