From c4d74664f4f1805994670b3284695a0348bd5826 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Thu, 6 Apr 2023 12:01:00 +0200 Subject: glib-2.0: Add new symbols from 2.76 --- vapi/glib-2.0.vapi | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index c67fc3b99..014182e16 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -1582,6 +1582,9 @@ public class string { [CCode (cname = "g_utf8_to_ucs4_fast")] public string32 to_utf32_fast (long len = -1, out long items_written = null); + [Version (since = "2.76")] + [CCode (cname = "g_set_str")] + public static bool set_str (ref string str, string new_str); } [Compact] @@ -2507,6 +2510,8 @@ namespace GLib { public static void* try_realloc (void* mem, size_t n_bytes); public static void free (void* mem); + [Version (since = "2.76")] + public static void free_sized (void* mem, size_t size); public class MemVTable { } @@ -2544,6 +2549,8 @@ namespace GLib { public static void* alloc (size_t n_blocks, size_t n_blocks_bytes, size_t alignment); public static void* alloc0 (size_t n_blocks, size_t n_blocks_bytes, size_t alignment); public static void free (void* mem); + [Version (since = "2.74")] + public static void free_sized (void* mem, size_t alignment, size_t size); } [Version (since = "2.10")] @@ -3563,6 +3570,22 @@ namespace GLib { public const string SEARCHPATH_SEPARATOR_S; } + [Version (since = "2.76")] + [Compact] + [CCode (copy_function = "g_path_buf_copy", free_function = "g_path_buf_free")] + public class PathBuf { + public PathBuf (); + public PathBuf.from_path (string path); + public bool equal (PathBuf v2); + [DestroysInstance] + public string free_to_path (); + public bool pop (); + public unowned PathBuf push (string path); + public bool set_extension (string extension); + public bool set_filename (string file_name); + public string? to_path (); + } + namespace Bit { public static int nth_lsf (ulong mask, int nth_bit); public static int nth_msf (ulong mask, int nth_bit); @@ -4817,9 +4840,15 @@ namespace GLib { [Compact] [Version (since = "2.12")] +#if GLIB_2_76 + [CCode (copy_function = "g_bookmark_file_copy", free_function = "g_bookmark_file_free", type_id = "G_TYPE_BOOKMARK_FILE")] +#else [CCode (free_function = "g_bookmark_file_free")] +#endif public class BookmarkFile { public BookmarkFile (); + [Version (since = "2.76")] + public BookmarkFile copy (); public bool load_from_file (string file) throws BookmarkFileError, FileError; public bool load_from_data (string data, size_t length) throws BookmarkFileError; public bool load_from_data_dirs (string file, out string full_path) throws BookmarkFileError, FileError; @@ -5523,8 +5552,12 @@ namespace GLib { [Version (since = "2.40")] public (unowned K)[] get_keys_as_array (); #endif + [Version (since = "2.76")] + public GenericArray get_keys_as_ptr_array (); [Version (since = "2.14")] public List get_values (); + [Version (since = "2.76")] + public GenericArray get_values_as_ptr_array (); public void @foreach (HFunc func); [CCode (cname = "g_hash_table_foreach")] public void for_each (HFunc func); @@ -5534,6 +5567,10 @@ namespace GLib { public bool steal (K key); [Version (since = "2.12")] public void steal_all (); + [Version (since = "2.76")] + public GenericArray steal_all_keys (); + [Version (since = "2.76")] + public GenericArray steal_all_values (); [Version (since = "2.58")] public bool steal_extended (K lookup_key, out K stolen_key, out V stolen_value); [CCode (cname = "_vala_g_hash_table_take")] @@ -5710,6 +5747,9 @@ namespace GLib { [Version (since = "2.34")] public static Bytes free_to_bytes (owned StringBuilder str); + [Version (since = "2.76")] + [DestroysInstance] + public string free_and_steal (); } /* String Chunks */ @@ -5812,6 +5852,10 @@ namespace GLib { return compare_func ((G**) (*a), (G**) (*b)); }); } + [Version (since = "2.76")] + public void sort_values (GLib.CompareFunc compare_func); + [Version (since = "2.76")] + public void sort_values_with_data (GLib.CompareDataFunc compare_func); [Version (since = "2.64")] [CCode (array_length_type = "gsize")] public G[] steal (); @@ -6032,6 +6076,10 @@ namespace GLib { public G[] data; public Array (bool zero_terminated = true, bool clear = true, ulong element_size = sizeof (G)); + [Version (since = "2.76")] + public Array.take (owned G[] data, bool clear = true, size_t element_size = sizeof (G)); + [Version (since = "2.76")] + public Array.take_zero_terminated ([CCode (array_length = false, array_null_terminated = true)] owned G[] data, bool clear = true, size_t element_size = sizeof (G)); [CCode (cname = "g_array_sized_new")] public Array.sized (bool zero_terminated = true, bool clear = true, ulong element_size = sizeof (G), uint reserved_size = 0); public void append_val (owned G value); @@ -6305,6 +6353,8 @@ namespace GLib { public const uint @2_68; public const uint @2_70; public const uint @2_72; + public const uint @2_74; + public const uint @2_76; [CCode (cname = "glib_binary_age")] public const uint binary_age; -- cgit v1.2.1