1 /* 2 * Distributed under the Boost Software License, Version 1.0. 3 * (See accompanying file LICENSE_1_0.txt or copy at 4 * http://www.boost.org/LICENSE_1_0.txt) 5 */ 6 module glib.gbytes; 7 8 import glib.gtypes; 9 import glib.garray; 10 11 extern (C) { 12 13 GBytes * g_bytes_new (gconstpointer data, 14 gsize size); 15 16 17 GBytes * g_bytes_new_take (gpointer data, 18 gsize size); 19 20 21 GBytes * g_bytes_new_static (gconstpointer data, 22 gsize size); 23 24 25 GBytes * g_bytes_new_with_free_func (gconstpointer data, 26 gsize size, 27 GDestroyNotify free_func, 28 gpointer user_data); 29 30 31 GBytes * g_bytes_new_from_bytes (GBytes *bytes, 32 gsize offset, 33 gsize length); 34 35 36 gconstpointer g_bytes_get_data (GBytes *bytes, 37 gsize *size); 38 39 40 gsize g_bytes_get_size (GBytes *bytes); 41 42 43 GBytes * g_bytes_ref (GBytes *bytes); 44 45 46 void g_bytes_unref (GBytes *bytes); 47 48 49 gpointer g_bytes_unref_to_data (GBytes *bytes, 50 gsize *size); 51 52 53 GByteArray * g_bytes_unref_to_array (GBytes *bytes); 54 55 56 guint g_bytes_hash (gconstpointer bytes); 57 58 59 gboolean g_bytes_equal (gconstpointer bytes1, 60 gconstpointer bytes2); 61 62 63 gint g_bytes_compare (gconstpointer bytes1, 64 gconstpointer bytes2); 65 66 } 67