A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.
1 '' FreeBASIC binding for glib-2.44.1 2 '' 3 '' based on the C header files: 4 '' GLIB - Library of useful routines for C programming 5 '' Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 6 '' 7 '' This library is free software; you can redistribute it and/or 8 '' modify it under the terms of the GNU Lesser General Public 9 '' License as published by the Free Software Foundation; either 10 '' version 2 of the License, or (at your option) any later version. 11 '' 12 '' This library is distributed in the hope that it will be useful, 13 '' but WITHOUT ANY WARRANTY; without even the implied warranty of 14 '' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 '' Lesser General Public License for more details. 16 '' 17 '' You should have received a copy of the GNU Lesser General Public 18 '' License along with this library; if not, see <http://www.gnu.org/licenses/>. 19 '' 20 '' translated to FreeBASIC by: 21 '' (C) 2011, 2012 Thomas[ dot ]Freiherr[ at ]gmx[ dot ]net 22 '' Copyright © 2015 FreeBASIC development team 23 24 #pragma once 25 26 #inclib "glib-2.0" 27 28 #ifdef __FB_WIN32__ 29 #inclib "gthread-2.0" 30 #endif 31 32 #include once "crt/long.bi" 33 #include once "crt/longdouble.bi" 34 #include once "glibconfig.bi" 35 #include once "crt/time.bi" 36 #include once "crt/stdarg.bi" 37 38 #ifdef __FB_UNIX__ 39 #include once "crt/sys/types.bi" 40 #include once "crt/pthread.bi" 41 #endif 42 43 '' The following symbols have been renamed: 44 '' constant TRUE => CTRUE 45 '' procedure g_atomic_int_get => g_atomic_int_get_ 46 '' procedure g_atomic_int_set => g_atomic_int_set_ 47 '' procedure g_atomic_int_inc => g_atomic_int_inc_ 48 '' procedure g_atomic_int_dec_and_test => g_atomic_int_dec_and_test_ 49 '' procedure g_atomic_int_compare_and_exchange => g_atomic_int_compare_and_exchange_ 50 '' procedure g_atomic_int_add => g_atomic_int_add_ 51 '' procedure g_atomic_int_and => g_atomic_int_and_ 52 '' procedure g_atomic_int_or => g_atomic_int_or_ 53 '' procedure g_atomic_int_xor => g_atomic_int_xor_ 54 '' procedure g_atomic_pointer_get => g_atomic_pointer_get_ 55 '' procedure g_atomic_pointer_set => g_atomic_pointer_set_ 56 '' procedure g_atomic_pointer_compare_and_exchange => g_atomic_pointer_compare_and_exchange_ 57 '' procedure g_atomic_pointer_add => g_atomic_pointer_add_ 58 '' procedure g_atomic_pointer_and => g_atomic_pointer_and_ 59 '' procedure g_atomic_pointer_or => g_atomic_pointer_or_ 60 '' procedure g_atomic_pointer_xor => g_atomic_pointer_xor_ 61 '' #ifdef __FB_WIN32__ 62 '' procedure g_atexit => g_atexit_ 63 '' procedure g_filename_to_utf8 => g_filename_to_utf8_ 64 '' procedure g_filename_from_utf8 => g_filename_from_utf8_ 65 '' procedure g_filename_from_uri => g_filename_from_uri_ 66 '' procedure g_filename_to_uri => g_filename_to_uri_ 67 '' #endif 68 '' constant G_DATE_DAY => G_DATE_DAY_ 69 '' constant G_DATE_MONTH => G_DATE_MONTH_ 70 '' constant G_DATE_YEAR => G_DATE_YEAR_ 71 '' #ifdef __FB_WIN32__ 72 '' procedure g_dir_open => g_dir_open_ 73 '' procedure g_dir_read_name => g_dir_read_name_ 74 '' procedure g_getenv => g_getenv_ 75 '' procedure g_setenv => g_setenv_ 76 '' procedure g_unsetenv => g_unsetenv_ 77 '' procedure g_file_test => g_file_test_ 78 '' procedure g_file_get_contents => g_file_get_contents_ 79 '' procedure g_mkstemp => g_mkstemp_ 80 '' procedure g_file_open_tmp => g_file_open_tmp_ 81 '' procedure g_get_current_dir => g_get_current_dir_ 82 '' #endif 83 '' procedure g_steal_pointer => g_steal_pointer_ 84 '' procedure g_source_remove => g_source_remove_ 85 '' #ifdef __FB_WIN32__ 86 '' procedure g_io_channel_new_file => g_io_channel_new_file_ 87 '' #endif 88 '' #define G_QUEUE_INIT => G_QUEUE_INIT_ 89 '' #define G_CSET_A_2_Z => G_CSET_A_2_Z_ 90 '' #ifdef __FB_WIN32__ 91 '' procedure g_spawn_async => g_spawn_async_ 92 '' procedure g_spawn_async_with_pipes => g_spawn_async_with_pipes_ 93 '' procedure g_spawn_sync => g_spawn_sync_ 94 '' procedure g_spawn_command_line_sync => g_spawn_command_line_sync_ 95 '' procedure g_spawn_command_line_async => g_spawn_command_line_async_ 96 '' #endif 97 '' variable glib_major_version => glib_major_version_ 98 '' variable glib_minor_version => glib_minor_version_ 99 '' variable glib_micro_version => glib_micro_version_ 100 '' procedure glib_check_version => glib_check_version_ 101 '' #define G_STATIC_MUTEX_INIT => G_STATIC_MUTEX_INIT_ 102 '' #define G_STATIC_REC_MUTEX_INIT => G_STATIC_REC_MUTEX_INIT_ 103 '' #define G_STATIC_RW_LOCK_INIT => G_STATIC_RW_LOCK_INIT_ 104 '' #define G_STATIC_PRIVATE_INIT => G_STATIC_PRIVATE_INIT_ 105 106 #ifdef __FB_WIN32__ 107 #pragma push(msbitfields) 108 #endif 109 110 extern "C" 111 112 #define __G_LIB_H__ 113 #define __GLIB_H_INSIDE__ 114 #define __G_ALLOCA_H__ 115 #define __G_TYPES_H__ 116 #define __G_MACROS_H__ 117 #define G_GNUC_FUNCTION "" 118 #define G_GNUC_PRETTY_FUNCTION "" 119 #define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG(macro_or_string) 120 #define G_STRINGIFY_ARG(contents) #contents 121 #define G_PASTE_ARGS(identifier1, identifier2) identifier1##identifier2 122 #define G_PASTE(identifier1, identifier2) G_PASTE_ARGS(identifier1, identifier2) 123 #define G_STATIC_ASSERT(expr) #assert expr 124 #define G_STRLOC __FILE__ ":" G_STRINGIFY(__LINE__) 125 #define G_STRFUNC cptr(const zstring ptr, __func__) 126 #ifndef NULL 127 const NULL = 0 128 #endif 129 #ifndef FALSE 130 const FALSE = 0 131 #endif 132 #ifndef CTRUE 133 const CTRUE = 1 134 #endif 135 #ifndef TRUE 136 const TRUE = 1 137 #endif 138 #undef MAX 139 #define MAX(a, b) iif((a) > (b), (a), (b)) 140 #undef MIN 141 #define MIN(a, b) iif((a) < (b), (a), (b)) 142 #undef CLAMP 143 #define CLAMP(x, low, high) iif((x) > (high), (high), iif((x) < (low), (low), (x))) 144 #define G_N_ELEMENTS(arr) (ubound(arr) - lbound(array) + 1) 145 #define GPOINTER_TO_SIZE(p) cast(gsize, (p)) 146 #define GSIZE_TO_POINTER(s) cast(gpointer, cast(gsize, (s))) 147 #define G_STRUCT_OFFSET(struct_type, member) cast(glong, offsetof(struct_type, member)) 148 #define G_STRUCT_MEMBER_P(struct_p, struct_offset) cast(gpointer, cptr(guint8 ptr, (struct_p)) + cast(glong, (struct_offset))) 149 #define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) (*cptr(member_type ptr, G_STRUCT_MEMBER_P((struct_p), (struct_offset)))) 150 #define G_LIKELY(expr) (expr) 151 #define G_UNLIKELY(expr) (expr) 152 #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName 153 #define _GLIB_AUTOPTR_TYPENAME(TypeName) TypeName##_autoptr 154 #define _GLIB_AUTO_FUNC_NAME(TypeName) glib_auto_cleanup_##TypeName 155 #macro _GLIB_DEFINE_AUTOPTR_CHAINUP(ModuleObjName, ParentName) 156 extern "C" 157 type _GLIB_AUTOPTR_TYPENAME(ModuleObjName) as ModuleObjName ptr 158 private sub _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName)(byval _ptr as ModuleObjName ptr ptr) 159 _GLIB_AUTOPTR_FUNC_NAME(ParentName)(cptr(ParentName ptr ptr, _ptr)) 160 end sub 161 end extern 162 #endmacro 163 #macro G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func) 164 extern "C" 165 type _GLIB_AUTOPTR_TYPENAME(TypeName) as TypeName ptr 166 private sub _GLIB_AUTOPTR_FUNC_NAME(TypeName)(byval _ptr as TypeName ptr ptr) 167 if *_ptr then 168 func(*_ptr) 169 end if 170 end sub 171 end extern 172 #endmacro 173 #macro G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func) 174 extern "C" 175 private sub _GLIB_AUTO_FUNC_NAME(TypeName)(byval _ptr as TypeName ptr) 176 func(_ptr) 177 end sub 178 end extern 179 #endmacro 180 #macro G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none) 181 extern "C" 182 private sub _GLIB_AUTO_FUNC_NAME(TypeName)(byval _ptr as TypeName ptr) 183 if *_ptr <> none 184 func(*_ptr) 185 end if 186 end sub 187 end extern 188 #endmacro 189 #define __G_VERSION_MACROS_H__ 190 #define G_ENCODE_VERSION(major, minor) (((major) shl 16) or ((minor) shl 8)) 191 #define GLIB_VERSION_2_26 G_ENCODE_VERSION(2, 26) 192 #define GLIB_VERSION_2_28 G_ENCODE_VERSION(2, 28) 193 #define GLIB_VERSION_2_30 G_ENCODE_VERSION(2, 30) 194 #define GLIB_VERSION_2_32 G_ENCODE_VERSION(2, 32) 195 #define GLIB_VERSION_2_34 G_ENCODE_VERSION(2, 34) 196 #define GLIB_VERSION_2_36 G_ENCODE_VERSION(2, 36) 197 #define GLIB_VERSION_2_38 G_ENCODE_VERSION(2, 38) 198 #define GLIB_VERSION_2_40 G_ENCODE_VERSION(2, 40) 199 #define GLIB_VERSION_2_42 G_ENCODE_VERSION(2, 42) 200 #define GLIB_VERSION_CUR_STABLE G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION) 201 #define GLIB_VERSION_PREV_STABLE G_ENCODE_VERSION(GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 2) 202 #define GLIB_VERSION_2_44 G_ENCODE_VERSION(2, 44) 203 #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_CUR_STABLE 204 #undef GLIB_VERSION_MAX_ALLOWED 205 #define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_CUR_STABLE 206 #define GLIB_AVAILABLE_IN_ALL _GLIB_EXTERN 207 #define GLIB_DEPRECATED_IN_2_44 GLIB_DEPRECATED 208 #define GLIB_DEPRECATED_IN_2_44_FOR(f) GLIB_DEPRECATED_FOR(f) 209 #define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN 210 211 type gchar as zstring 212 type gshort as short 213 type glong as clong 214 type gint as long 215 type gboolean as gint 216 type guchar as ubyte 217 type gushort as ushort 218 type gulong as culong 219 type guint as ulong 220 type gfloat as single 221 type gdouble as double 222 223 const G_MININT8 = cast(gint8, &h80) 224 const G_MAXINT8 = cast(gint8, &h7f) 225 const G_MAXUINT8 = cast(guint8, &hff) 226 const G_MININT16 = cast(gint16, &h8000) 227 const G_MAXINT16 = cast(gint16, &h7fff) 228 const G_MAXUINT16 = cast(guint16, &hffff) 229 const G_MININT32 = cast(gint32, &h80000000) 230 const G_MAXINT32 = cast(gint32, &h7fffffff) 231 const G_MAXUINT32 = cast(guint32, &hffffffff) 232 #define G_MININT64 cast(gint64, G_GINT64_CONSTANT(&h8000000000000000)) 233 #define G_MAXINT64 G_GINT64_CONSTANT(&h7fffffffffffffff) 234 #define G_MAXUINT64 G_GINT64_CONSTANT(&hffffffffffffffffu) 235 236 type gpointer as any ptr 237 type gconstpointer as const any ptr 238 type GCompareFunc as function(byval a as gconstpointer, byval b as gconstpointer) as gint 239 type GCompareDataFunc as function(byval a as gconstpointer, byval b as gconstpointer, byval user_data as gpointer) as gint 240 type GEqualFunc as function(byval a as gconstpointer, byval b as gconstpointer) as gboolean 241 type GDestroyNotify as sub(byval data as gpointer) 242 type GFunc as sub(byval data as gpointer, byval user_data as gpointer) 243 type GHashFunc as function(byval key as gconstpointer) as guint 244 type GHFunc as sub(byval key as gpointer, byval value as gpointer, byval user_data as gpointer) 245 type GFreeFunc as sub(byval data as gpointer) 246 type GTranslateFunc as function(byval str as const gchar ptr, byval data as gpointer) as const gchar ptr 247 248 const G_E = 2.7182818284590452353602874713526624977572470937000 249 const G_LN2 = 0.69314718055994530941723212145817656807550013436026 250 const G_LN10 = 2.3025850929940456840179914546843642076011014886288 251 const G_PI = 3.1415926535897932384626433832795028841971693993751 252 const G_PI_2 = 1.5707963267948966192313216916397514420985846996876 253 const G_PI_4 = 0.78539816339744830961566084581987572104929234984378 254 const G_SQRT2 = 1.4142135623730950488016887242096980785696718753769 255 const G_LITTLE_ENDIAN = 1234 256 const G_BYTE_ORDER = G_LITTLE_ENDIAN 257 const G_BIG_ENDIAN = 4321 258 const G_PDP_ENDIAN = 3412 259 #define GUINT16_SWAP_LE_BE_CONSTANT(val) cast(guint16, cast(guint16, cast(guint16, (val)) shr 8) or cast(guint16, cast(guint16, (val)) shl 8)) 260 #define GUINT32_SWAP_LE_BE_CONSTANT(val) cast(guint32, ((((cast(guint32, (val)) and cast(guint32, &h000000ffu)) shl 24) or ((cast(guint32, (val)) and cast(guint32, &h0000ff00u)) shl 8)) or ((cast(guint32, (val)) and cast(guint32, &h00ff0000u)) shr 8)) or ((cast(guint32, (val)) and cast(guint32, &hff000000u)) shr 24)) 261 #define GUINT64_SWAP_LE_BE_CONSTANT(val) cast(guint64, ((((((((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&h00000000000000ffu))) shl 56) or ((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&h000000000000ff00u))) shl 40)) or ((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&h0000000000ff0000u))) shl 24)) or ((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&h00000000ff000000u))) shl 8)) or ((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&h000000ff00000000u))) shr 8)) or ((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&h0000ff0000000000u))) shr 24)) or ((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&h00ff000000000000u))) shr 40)) or ((cast(guint64, (val)) and cast(guint64, G_GINT64_CONSTANT(&hff00000000000000u))) shr 56)) 262 #define GUINT16_SWAP_LE_BE(val) GUINT16_SWAP_LE_BE_CONSTANT(val) 263 #define GUINT32_SWAP_LE_BE(val) GUINT32_SWAP_LE_BE_CONSTANT(val) 264 #define GUINT64_SWAP_LE_BE(val) GUINT64_SWAP_LE_BE_CONSTANT(val) 265 #define GUINT16_SWAP_LE_PDP(val) cast(guint16, (val)) 266 #define GUINT16_SWAP_BE_PDP(val) GUINT16_SWAP_LE_BE(val) 267 #define GUINT32_SWAP_LE_PDP(val) cast(guint32, ((cast(guint32, (val)) and cast(guint32, &h0000ffffu)) shl 16) or ((cast(guint32, (val)) and cast(guint32, &hffff0000u)) shr 16)) 268 #define GUINT32_SWAP_BE_PDP(val) cast(guint32, ((cast(guint32, (val)) and cast(guint32, &h00ff00ffu)) shl 8) or ((cast(guint32, (val)) and cast(guint32, &hff00ff00u)) shr 8)) 269 #define GINT16_FROM_LE(val) GINT16_TO_LE(val) 270 #define GUINT16_FROM_LE(val) GUINT16_TO_LE(val) 271 #define GINT16_FROM_BE(val) GINT16_TO_BE(val) 272 #define GUINT16_FROM_BE(val) GUINT16_TO_BE(val) 273 #define GINT32_FROM_LE(val) GINT32_TO_LE(val) 274 #define GUINT32_FROM_LE(val) GUINT32_TO_LE(val) 275 #define GINT32_FROM_BE(val) GINT32_TO_BE(val) 276 #define GUINT32_FROM_BE(val) GUINT32_TO_BE(val) 277 #define GINT64_FROM_LE(val) GINT64_TO_LE(val) 278 #define GUINT64_FROM_LE(val) GUINT64_TO_LE(val) 279 #define GINT64_FROM_BE(val) GINT64_TO_BE(val) 280 #define GUINT64_FROM_BE(val) GUINT64_TO_BE(val) 281 #define GLONG_FROM_LE(val) GLONG_TO_LE(val) 282 #define GULONG_FROM_LE(val) GULONG_TO_LE(val) 283 #define GLONG_FROM_BE(val) GLONG_TO_BE(val) 284 #define GULONG_FROM_BE(val) GULONG_TO_BE(val) 285 #define GINT_FROM_LE(val) GINT_TO_LE(val) 286 #define GUINT_FROM_LE(val) GUINT_TO_LE(val) 287 #define GINT_FROM_BE(val) GINT_TO_BE(val) 288 #define GUINT_FROM_BE(val) GUINT_TO_BE(val) 289 #define GSIZE_FROM_LE(val) GSIZE_TO_LE(val) 290 #define GSSIZE_FROM_LE(val) GSSIZE_TO_LE(val) 291 #define GSIZE_FROM_BE(val) GSIZE_TO_BE(val) 292 #define GSSIZE_FROM_BE(val) GSSIZE_TO_BE(val) 293 #define g_ntohl(val) GUINT32_FROM_BE(val) 294 #define g_ntohs(val) GUINT16_FROM_BE(val) 295 #define g_htonl(val) GUINT32_TO_BE(val) 296 #define g_htons(val) GUINT16_TO_BE(val) 297 type GDoubleIEEE754 as _GDoubleIEEE754 298 type GFloatIEEE754 as _GFloatIEEE754 299 const G_IEEE754_FLOAT_BIAS = 127 300 const G_IEEE754_DOUBLE_BIAS = 1023 301 const G_LOG_2_BASE_10 = 0.30102999566398119521 302 303 type _GFloatIEEE754_mpn 304 mantissa : 23 as guint 305 biased_exponent : 8 as guint 306 sign : 1 as guint 307 end type 308 309 union _GFloatIEEE754 310 v_float as gfloat 311 mpn as _GFloatIEEE754_mpn 312 end union 313 314 type _GDoubleIEEE754_mpn 315 mantissa_low : 32 as guint 316 mantissa_high : 20 as guint 317 biased_exponent : 11 as guint 318 sign : 1 as guint 319 end type 320 321 union _GDoubleIEEE754 322 v_double as gdouble 323 mpn as _GDoubleIEEE754_mpn 324 end union 325 326 type GTimeVal as _GTimeVal 327 328 type _GTimeVal 329 tv_sec as glong 330 tv_usec as glong 331 end type 332 333 #define g_alloca(size) alloca(size) 334 #define g_newa(struct_type, n_structs) cptr(struct_type ptr, g_alloca(sizeof(struct_type) * cast(gsize, (n_structs)))) 335 #define __G_ARRAY_H__ 336 337 type GBytes as _GBytes 338 type GArray as _GArray 339 type GByteArray as _GByteArray 340 type GPtrArray as _GPtrArray 341 342 type _GArray 343 data as gchar ptr 344 len as guint 345 end type 346 347 type _GByteArray 348 data as guint8 ptr 349 len as guint 350 end type 351 352 type _GPtrArray 353 pdata as gpointer ptr 354 len as guint 355 end type 356 357 #define g_array_append_val(a, v) g_array_append_vals(a, @(v), 1) 358 #define g_array_prepend_val(a, v) g_array_prepend_vals(a, @(v), 1) 359 #define g_array_insert_val(a, i, v) g_array_insert_vals(a, i, @(v), 1) 360 #define g_array_index(a, t, i) cptr(t ptr, cptr(any ptr, (a)->data))[(i)] 361 362 declare function g_array_new(byval zero_terminated as gboolean, byval clear_ as gboolean, byval element_size as guint) as GArray ptr 363 declare function g_array_sized_new(byval zero_terminated as gboolean, byval clear_ as gboolean, byval element_size as guint, byval reserved_size as guint) as GArray ptr 364 declare function g_array_free(byval array as GArray ptr, byval free_segment as gboolean) as gchar ptr 365 declare function g_array_ref(byval array as GArray ptr) as GArray ptr 366 declare sub g_array_unref(byval array as GArray ptr) 367 declare function g_array_get_element_size(byval array as GArray ptr) as guint 368 declare function g_array_append_vals(byval array as GArray ptr, byval data as gconstpointer, byval len as guint) as GArray ptr 369 declare function g_array_prepend_vals(byval array as GArray ptr, byval data as gconstpointer, byval len as guint) as GArray ptr 370 declare function g_array_insert_vals(byval array as GArray ptr, byval index_ as guint, byval data as gconstpointer, byval len as guint) as GArray ptr 371 declare function g_array_set_size(byval array as GArray ptr, byval length as guint) as GArray ptr 372 declare function g_array_remove_index(byval array as GArray ptr, byval index_ as guint) as GArray ptr 373 declare function g_array_remove_index_fast(byval array as GArray ptr, byval index_ as guint) as GArray ptr 374 declare function g_array_remove_range(byval array as GArray ptr, byval index_ as guint, byval length as guint) as GArray ptr 375 declare sub g_array_sort(byval array as GArray ptr, byval compare_func as GCompareFunc) 376 declare sub g_array_sort_with_data(byval array as GArray ptr, byval compare_func as GCompareDataFunc, byval user_data as gpointer) 377 declare sub g_array_set_clear_func(byval array as GArray ptr, byval clear_func as GDestroyNotify) 378 #define g_ptr_array_index(array, index_) (array)->pdata[index_] 379 declare function g_ptr_array_new() as GPtrArray ptr 380 declare function g_ptr_array_new_with_free_func(byval element_free_func as GDestroyNotify) as GPtrArray ptr 381 declare function g_ptr_array_sized_new(byval reserved_size as guint) as GPtrArray ptr 382 declare function g_ptr_array_new_full(byval reserved_size as guint, byval element_free_func as GDestroyNotify) as GPtrArray ptr 383 declare function g_ptr_array_free(byval array as GPtrArray ptr, byval free_seg as gboolean) as gpointer ptr 384 declare function g_ptr_array_ref(byval array as GPtrArray ptr) as GPtrArray ptr 385 declare sub g_ptr_array_unref(byval array as GPtrArray ptr) 386 declare sub g_ptr_array_set_free_func(byval array as GPtrArray ptr, byval element_free_func as GDestroyNotify) 387 declare sub g_ptr_array_set_size(byval array as GPtrArray ptr, byval length as gint) 388 declare function g_ptr_array_remove_index(byval array as GPtrArray ptr, byval index_ as guint) as gpointer 389 declare function g_ptr_array_remove_index_fast(byval array as GPtrArray ptr, byval index_ as guint) as gpointer 390 declare function g_ptr_array_remove(byval array as GPtrArray ptr, byval data as gpointer) as gboolean 391 declare function g_ptr_array_remove_fast(byval array as GPtrArray ptr, byval data as gpointer) as gboolean 392 declare function g_ptr_array_remove_range(byval array as GPtrArray ptr, byval index_ as guint, byval length as guint) as GPtrArray ptr 393 declare sub g_ptr_array_add(byval array as GPtrArray ptr, byval data as gpointer) 394 declare sub g_ptr_array_insert(byval array as GPtrArray ptr, byval index_ as gint, byval data as gpointer) 395 declare sub g_ptr_array_sort(byval array as GPtrArray ptr, byval compare_func as GCompareFunc) 396 declare sub g_ptr_array_sort_with_data(byval array as GPtrArray ptr, byval compare_func as GCompareDataFunc, byval user_data as gpointer) 397 declare sub g_ptr_array_foreach(byval array as GPtrArray ptr, byval func as GFunc, byval user_data as gpointer) 398 declare function g_byte_array_new() as GByteArray ptr 399 declare function g_byte_array_new_take(byval data as guint8 ptr, byval len as gsize) as GByteArray ptr 400 declare function g_byte_array_sized_new(byval reserved_size as guint) as GByteArray ptr 401 declare function g_byte_array_free(byval array as GByteArray ptr, byval free_segment as gboolean) as guint8 ptr 402 declare function g_byte_array_free_to_bytes(byval array as GByteArray ptr) as GBytes ptr 403 declare function g_byte_array_ref(byval array as GByteArray ptr) as GByteArray ptr 404 declare sub g_byte_array_unref(byval array as GByteArray ptr) 405 declare function g_byte_array_append(byval array as GByteArray ptr, byval data as const guint8 ptr, byval len as guint) as GByteArray ptr 406 declare function g_byte_array_prepend(byval array as GByteArray ptr, byval data as const guint8 ptr, byval len as guint) as GByteArray ptr 407 declare function g_byte_array_set_size(byval array as GByteArray ptr, byval length as guint) as GByteArray ptr 408 declare function g_byte_array_remove_index(byval array as GByteArray ptr, byval index_ as guint) as GByteArray ptr 409 declare function g_byte_array_remove_index_fast(byval array as GByteArray ptr, byval index_ as guint) as GByteArray ptr 410 declare function g_byte_array_remove_range(byval array as GByteArray ptr, byval index_ as guint, byval length as guint) as GByteArray ptr 411 declare sub g_byte_array_sort(byval array as GByteArray ptr, byval compare_func as GCompareFunc) 412 declare sub g_byte_array_sort_with_data(byval array as GByteArray ptr, byval compare_func as GCompareDataFunc, byval user_data as gpointer) 413 414 #define __G_ASYNCQUEUE_H__ 415 #define __G_THREAD_H__ 416 #define __G_ATOMIC_H__ 417 418 declare function g_atomic_int_get_ alias "g_atomic_int_get"(byval atomic as const gint ptr) as gint 419 declare sub g_atomic_int_set_ alias "g_atomic_int_set"(byval atomic as gint ptr, byval newval as gint) 420 declare sub g_atomic_int_inc_ alias "g_atomic_int_inc"(byval atomic as gint ptr) 421 declare function g_atomic_int_dec_and_test_ alias "g_atomic_int_dec_and_test"(byval atomic as gint ptr) as gboolean 422 declare function g_atomic_int_compare_and_exchange_ alias "g_atomic_int_compare_and_exchange"(byval atomic as gint ptr, byval oldval as gint, byval newval as gint) as gboolean 423 declare function g_atomic_int_add_ alias "g_atomic_int_add"(byval atomic as gint ptr, byval val as gint) as gint 424 declare function g_atomic_int_and_ alias "g_atomic_int_and"(byval atomic as guint ptr, byval val as guint) as guint 425 declare function g_atomic_int_or_ alias "g_atomic_int_or"(byval atomic as guint ptr, byval val as guint) as guint 426 declare function g_atomic_int_xor_ alias "g_atomic_int_xor"(byval atomic as guint ptr, byval val as guint) as guint 427 declare function g_atomic_pointer_get_ alias "g_atomic_pointer_get"(byval atomic as const any ptr) as gpointer 428 declare sub g_atomic_pointer_set_ alias "g_atomic_pointer_set"(byval atomic as any ptr, byval newval as gpointer) 429 declare function g_atomic_pointer_compare_and_exchange_ alias "g_atomic_pointer_compare_and_exchange"(byval atomic as any ptr, byval oldval as gpointer, byval newval as gpointer) as gboolean 430 declare function g_atomic_pointer_add_ alias "g_atomic_pointer_add"(byval atomic as any ptr, byval val as gssize) as gssize 431 declare function g_atomic_pointer_and_ alias "g_atomic_pointer_and"(byval atomic as any ptr, byval val as gsize) as gsize 432 declare function g_atomic_pointer_or_ alias "g_atomic_pointer_or"(byval atomic as any ptr, byval val as gsize) as gsize 433 declare function g_atomic_pointer_xor_ alias "g_atomic_pointer_xor"(byval atomic as any ptr, byval val as gsize) as gsize 434 declare function g_atomic_int_exchange_and_add(byval atomic as gint ptr, byval val as gint) as gint 435 436 #define g_atomic_int_get(atomic) g_atomic_int_get_(cptr(gint ptr, (atomic))) 437 #define g_atomic_int_set(atomic, newval) g_atomic_int_set_(cptr(gint ptr, (atomic)), cast(gint, (newval))) 438 #define g_atomic_int_compare_and_exchange(atomic, oldval, newval) g_atomic_int_compare_and_exchange_(cptr(gint ptr, (atomic)), (oldval), (newval)) 439 #define g_atomic_int_add(atomic, val) g_atomic_int_add_(cptr(gint ptr, (atomic)), (val)) 440 #define g_atomic_int_and(atomic, val) g_atomic_int_and_(cptr(guint ptr, (atomic)), (val)) 441 #define g_atomic_int_or(atomic, val) g_atomic_int_or_(cptr(guint ptr, (atomic)), (val)) 442 #define g_atomic_int_xor(atomic, val) g_atomic_int_xor_(cptr(guint ptr, (atomic)), (val)) 443 #define g_atomic_int_inc(atomic) g_atomic_int_inc_(cptr(gint ptr, (atomic))) 444 #define g_atomic_int_dec_and_test(atomic) g_atomic_int_dec_and_test_(cptr(gint ptr, (atomic))) 445 #define g_atomic_pointer_get(atomic) g_atomic_pointer_get_(atomic) 446 #define g_atomic_pointer_set(atomic, newval) g_atomic_pointer_set_((atomic), cast(gpointer, (newval))) 447 #define g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) g_atomic_pointer_compare_and_exchange_((atomic), cast(gpointer, (oldval)), cast(gpointer, (newval))) 448 #define g_atomic_pointer_add(atomic, val) g_atomic_pointer_add_((atomic), cast(gssize, (val))) 449 #define g_atomic_pointer_and(atomic, val) g_atomic_pointer_and_((atomic), cast(gsize, (val))) 450 #define g_atomic_pointer_or(atomic, val) g_atomic_pointer_or_((atomic), cast(gsize, (val))) 451 #define g_atomic_pointer_xor(atomic, val) g_atomic_pointer_xor_((atomic), cast(gsize, (val))) 452 #define __G_ERROR_H__ 453 #define __G_QUARK_H__ 454 type GQuark as guint32 455 456 declare function g_quark_try_string(byval string as const gchar ptr) as GQuark 457 declare function g_quark_from_static_string(byval string as const gchar ptr) as GQuark 458 declare function g_quark_from_string(byval string as const gchar ptr) as GQuark 459 declare function g_quark_to_string(byval quark as GQuark) as const gchar ptr 460 declare function g_intern_string(byval string as const gchar ptr) as const gchar ptr 461 declare function g_intern_static_string(byval string as const gchar ptr) as const gchar ptr 462 type GError as _GError 463 464 type _GError 465 domain as GQuark 466 code as gint 467 message as gchar ptr 468 end type 469 470 declare function g_error_new(byval domain as GQuark, byval code as gint, byval format as const gchar ptr, ...) as GError ptr 471 declare function g_error_new_literal(byval domain as GQuark, byval code as gint, byval message as const gchar ptr) as GError ptr 472 declare function g_error_new_valist(byval domain as GQuark, byval code as gint, byval format as const gchar ptr, byval args as va_list) as GError ptr 473 declare sub g_error_free(byval error as GError ptr) 474 declare function g_error_copy(byval error as const GError ptr) as GError ptr 475 declare function g_error_matches(byval error as const GError ptr, byval domain as GQuark, byval code as gint) as gboolean 476 declare sub g_set_error(byval err as GError ptr ptr, byval domain as GQuark, byval code as gint, byval format as const gchar ptr, ...) 477 declare sub g_set_error_literal(byval err as GError ptr ptr, byval domain as GQuark, byval code as gint, byval message as const gchar ptr) 478 declare sub g_propagate_error(byval dest as GError ptr ptr, byval src as GError ptr) 479 declare sub g_clear_error(byval err as GError ptr ptr) 480 declare sub g_prefix_error(byval err as GError ptr ptr, byval format as const gchar ptr, ...) 481 declare sub g_propagate_prefixed_error(byval dest as GError ptr ptr, byval src as GError ptr, byval format as const gchar ptr, ...) 482 #define __G_UTILS_H__ 483 declare function g_get_user_name() as const gchar ptr 484 declare function g_get_real_name() as const gchar ptr 485 declare function g_get_home_dir() as const gchar ptr 486 declare function g_get_tmp_dir() as const gchar ptr 487 declare function g_get_host_name() as const gchar ptr 488 declare function g_get_prgname() as const gchar ptr 489 declare sub g_set_prgname(byval prgname as const gchar ptr) 490 declare function g_get_application_name() as const gchar ptr 491 declare sub g_set_application_name(byval application_name as const gchar ptr) 492 declare sub g_reload_user_special_dirs_cache() 493 declare function g_get_user_data_dir() as const gchar ptr 494 declare function g_get_user_config_dir() as const gchar ptr 495 declare function g_get_user_cache_dir() as const gchar ptr 496 declare function g_get_system_data_dirs() as const gchar const ptr ptr 497 498 #ifdef __FB_WIN32__ 499 declare function g_win32_get_system_data_dirs_for_module(byval address_of_function as sub()) as const gchar const ptr ptr 500 #endif 501 502 declare function g_get_system_config_dirs() as const gchar const ptr ptr 503 declare function g_get_user_runtime_dir() as const gchar ptr 504 505 type GUserDirectory as long 506 enum 507 G_USER_DIRECTORY_DESKTOP 508 G_USER_DIRECTORY_DOCUMENTS 509 G_USER_DIRECTORY_DOWNLOAD 510 G_USER_DIRECTORY_MUSIC 511 G_USER_DIRECTORY_PICTURES 512 G_USER_DIRECTORY_PUBLIC_SHARE 513 G_USER_DIRECTORY_TEMPLATES 514 G_USER_DIRECTORY_VIDEOS 515 G_USER_N_DIRECTORIES 516 end enum 517 518 declare function g_get_user_special_dir(byval directory as GUserDirectory) as const gchar ptr 519 type GDebugKey as _GDebugKey 520 521 type _GDebugKey 522 key as const gchar ptr 523 value as guint 524 end type 525 526 declare function g_parse_debug_string(byval string as const gchar ptr, byval keys as const GDebugKey ptr, byval nkeys as guint) as guint 527 declare function g_snprintf(byval string as gchar ptr, byval n as gulong, byval format as const gchar ptr, ...) as gint 528 declare function g_vsnprintf(byval string as gchar ptr, byval n as gulong, byval format as const gchar ptr, byval args as va_list) as gint 529 declare sub g_nullify_pointer(byval nullify_location as gpointer ptr) 530 531 type GFormatSizeFlags as long 532 enum 533 G_FORMAT_SIZE_DEFAULT = 0 534 G_FORMAT_SIZE_LONG_FORMAT = 1 shl 0 535 G_FORMAT_SIZE_IEC_UNITS = 1 shl 1 536 end enum 537 538 declare function g_format_size_full(byval size as guint64, byval flags as GFormatSizeFlags) as gchar ptr 539 declare function g_format_size(byval size as guint64) as gchar ptr 540 declare function g_format_size_for_display(byval size as goffset) as gchar ptr 541 type GVoidFunc as sub() 542 543 #ifdef __FB_UNIX__ 544 declare sub g_atexit(byval func as GVoidFunc) 545 #else 546 declare sub g_atexit_ alias "g_atexit"(byval func as GVoidFunc) 547 #define g_atexit(func) atexit(func) 548 #endif 549 550 declare function g_find_program_in_path(byval program as const gchar ptr) as gchar ptr 551 declare function g_bit_nth_lsf(byval mask as gulong, byval nth_bit as gint) as gint 552 declare function g_bit_nth_msf(byval mask as gulong, byval nth_bit as gint) as gint 553 declare function g_bit_storage(byval number as gulong) as guint 554 555 #if defined(__FB_WIN32__) or defined(__FB_CYGWIN__) 556 #macro G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) 557 dim shared dll_name as zstring ptr 558 function DllMain stdcall alias "DllMain"(byval hinstDLL as HINSTANCE, byval fdwReason as DWORD, byval lpvReserved as LPVOID) as BOOL 559 dim wcbfr as wstring * 1000 560 dim tem as zstring ptr 561 select case fdwReason 562 case DLL_PROCESS_ATTACH 563 GetModuleFileNameW(cast(HMODULE, hinstDLL), wcbfr, 1000) 564 tem = g_utf16_to_utf8(wcbfr, -1, NULL, NULL, NULL) 565 dll_name = g_path_get_basename(tem) 566 g_free(tem) 567 end select 568 return CTRUE 569 end function 570 #endmacro 571 #else 572 #define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) 573 #endif 574 575 #define G_THREAD_ERROR g_thread_error_quark() 576 declare function g_thread_error_quark() as GQuark 577 578 type GThreadError as long 579 enum 580 G_THREAD_ERROR_AGAIN 581 end enum 582 583 type GThreadFunc as function(byval data as gpointer) as gpointer 584 type GThread as _GThread 585 type GMutex as _GMutex 586 type GRecMutex as _GRecMutex 587 type GRWLock as _GRWLock 588 type GCond as _GCond 589 type GPrivate as _GPrivate 590 type GOnce as _GOnce 591 592 union _GMutex 593 p as gpointer 594 i(0 to 1) as guint 595 end union 596 597 type _GRWLock 598 p as gpointer 599 i(0 to 1) as guint 600 end type 601 602 type _GCond 603 p as gpointer 604 i(0 to 1) as guint 605 end type 606 607 type _GRecMutex 608 p as gpointer 609 i(0 to 1) as guint 610 end type 611 612 #define G_PRIVATE_INIT(notify) (NULL, (notify), (NULL, NULL)) 613 614 type _GPrivate 615 p as gpointer 616 notify as GDestroyNotify 617 future(0 to 1) as gpointer 618 end type 619 620 type GOnceStatus as long 621 enum 622 G_ONCE_STATUS_NOTCALLED 623 G_ONCE_STATUS_PROGRESS 624 G_ONCE_STATUS_READY 625 end enum 626 627 #define G_ONCE_INIT (G_ONCE_STATUS_NOTCALLED, NULL) 628 629 type _GOnce 630 status as GOnceStatus 631 retval as gpointer 632 end type 633 634 #define G_LOCK_NAME(name) g__##name##_lock 635 #define G_LOCK(name) g_mutex_lock(@G_LOCK_NAME(name)) 636 #define G_UNLOCK(name) g_mutex_unlock(@G_LOCK_NAME(name)) 637 #define G_TRYLOCK(name) g_mutex_trylock(@G_LOCK_NAME(name)) 638 639 declare function g_thread_ref(byval thread as GThread ptr) as GThread ptr 640 declare sub g_thread_unref(byval thread as GThread ptr) 641 declare function g_thread_new(byval name as const gchar ptr, byval func as GThreadFunc, byval data as gpointer) as GThread ptr 642 declare function g_thread_try_new(byval name as const gchar ptr, byval func as GThreadFunc, byval data as gpointer, byval error as GError ptr ptr) as GThread ptr 643 declare function g_thread_self() as GThread ptr 644 declare sub g_thread_exit(byval retval as gpointer) 645 declare function g_thread_join(byval thread as GThread ptr) as gpointer 646 declare sub g_thread_yield() 647 declare sub g_mutex_init(byval mutex as GMutex ptr) 648 declare sub g_mutex_clear(byval mutex as GMutex ptr) 649 declare sub g_mutex_lock(byval mutex as GMutex ptr) 650 declare function g_mutex_trylock(byval mutex as GMutex ptr) as gboolean 651 declare sub g_mutex_unlock(byval mutex as GMutex ptr) 652 declare sub g_rw_lock_init(byval rw_lock as GRWLock ptr) 653 declare sub g_rw_lock_clear(byval rw_lock as GRWLock ptr) 654 declare sub g_rw_lock_writer_lock(byval rw_lock as GRWLock ptr) 655 declare function g_rw_lock_writer_trylock(byval rw_lock as GRWLock ptr) as gboolean 656 declare sub g_rw_lock_writer_unlock(byval rw_lock as GRWLock ptr) 657 declare sub g_rw_lock_reader_lock(byval rw_lock as GRWLock ptr) 658 declare function g_rw_lock_reader_trylock(byval rw_lock as GRWLock ptr) as gboolean 659 declare sub g_rw_lock_reader_unlock(byval rw_lock as GRWLock ptr) 660 declare sub g_rec_mutex_init(byval rec_mutex as GRecMutex ptr) 661 declare sub g_rec_mutex_clear(byval rec_mutex as GRecMutex ptr) 662 declare sub g_rec_mutex_lock(byval rec_mutex as GRecMutex ptr) 663 declare function g_rec_mutex_trylock(byval rec_mutex as GRecMutex ptr) as gboolean 664 declare sub g_rec_mutex_unlock(byval rec_mutex as GRecMutex ptr) 665 declare sub g_cond_init(byval cond as GCond ptr) 666 declare sub g_cond_clear(byval cond as GCond ptr) 667 declare sub g_cond_wait(byval cond as GCond ptr, byval mutex as GMutex ptr) 668 declare sub g_cond_signal(byval cond as GCond ptr) 669 declare sub g_cond_broadcast(byval cond as GCond ptr) 670 declare function g_cond_wait_until(byval cond as GCond ptr, byval mutex as GMutex ptr, byval end_time as gint64) as gboolean 671 declare function g_private_get(byval key as GPrivate ptr) as gpointer 672 declare sub g_private_set(byval key as GPrivate ptr, byval value as gpointer) 673 declare sub g_private_replace(byval key as GPrivate ptr, byval value as gpointer) 674 declare function g_once_impl(byval once as GOnce ptr, byval func as GThreadFunc, byval arg as gpointer) as gpointer 675 declare function g_once_init_enter(byval location as any ptr) as gboolean 676 declare sub g_once_init_leave(byval location as any ptr, byval result as gsize) 677 #define g_once(once, func, arg) iif((once)->status = G_ONCE_STATUS_READY, (once)->retval, g_once_impl((once), (func), (arg))) 678 declare function g_get_num_processors() as guint 679 type GMutexLocker as any 680 681 private function g_mutex_locker_new(byval mutex as GMutex ptr) as GMutexLocker ptr 682 g_mutex_lock(mutex) 683 return cptr(GMutexLocker ptr, mutex) 684 end function 685 686 private sub g_mutex_locker_free(byval locker as GMutexLocker ptr) 687 g_mutex_unlock(cptr(GMutex ptr, locker)) 688 end sub 689 690 type GAsyncQueue as _GAsyncQueue 691 declare function g_async_queue_new() as GAsyncQueue ptr 692 declare function g_async_queue_new_full(byval item_free_func as GDestroyNotify) as GAsyncQueue ptr 693 declare sub g_async_queue_lock(byval queue as GAsyncQueue ptr) 694 declare sub g_async_queue_unlock(byval queue as GAsyncQueue ptr) 695 declare function g_async_queue_ref(byval queue as GAsyncQueue ptr) as GAsyncQueue ptr 696 declare sub g_async_queue_unref(byval queue as GAsyncQueue ptr) 697 declare sub g_async_queue_ref_unlocked(byval queue as GAsyncQueue ptr) 698 declare sub g_async_queue_unref_and_unlock(byval queue as GAsyncQueue ptr) 699 declare sub g_async_queue_push(byval queue as GAsyncQueue ptr, byval data as gpointer) 700 declare sub g_async_queue_push_unlocked(byval queue as GAsyncQueue ptr, byval data as gpointer) 701 declare sub g_async_queue_push_sorted(byval queue as GAsyncQueue ptr, byval data as gpointer, byval func as GCompareDataFunc, byval user_data as gpointer) 702 declare sub g_async_queue_push_sorted_unlocked(byval queue as GAsyncQueue ptr, byval data as gpointer, byval func as GCompareDataFunc, byval user_data as gpointer) 703 declare function g_async_queue_pop(byval queue as GAsyncQueue ptr) as gpointer 704 declare function g_async_queue_pop_unlocked(byval queue as GAsyncQueue ptr) as gpointer 705 declare function g_async_queue_try_pop(byval queue as GAsyncQueue ptr) as gpointer 706 declare function g_async_queue_try_pop_unlocked(byval queue as GAsyncQueue ptr) as gpointer 707 declare function g_async_queue_timeout_pop(byval queue as GAsyncQueue ptr, byval timeout as guint64) as gpointer 708 declare function g_async_queue_timeout_pop_unlocked(byval queue as GAsyncQueue ptr, byval timeout as guint64) as gpointer 709 declare function g_async_queue_length(byval queue as GAsyncQueue ptr) as gint 710 declare function g_async_queue_length_unlocked(byval queue as GAsyncQueue ptr) as gint 711 declare sub g_async_queue_sort(byval queue as GAsyncQueue ptr, byval func as GCompareDataFunc, byval user_data as gpointer) 712 declare sub g_async_queue_sort_unlocked(byval queue as GAsyncQueue ptr, byval func as GCompareDataFunc, byval user_data as gpointer) 713 declare function g_async_queue_timed_pop(byval queue as GAsyncQueue ptr, byval end_time as GTimeVal ptr) as gpointer 714 declare function g_async_queue_timed_pop_unlocked(byval queue as GAsyncQueue ptr, byval end_time as GTimeVal ptr) as gpointer 715 #define __G_BACKTRACE_H__ 716 declare sub g_on_error_query(byval prg_name as const gchar ptr) 717 declare sub g_on_error_stack_trace(byval prg_name as const gchar ptr) 718 #define __G_BASE64_H__ 719 declare function g_base64_encode_step(byval in as const guchar ptr, byval len as gsize, byval break_lines as gboolean, byval out as gchar ptr, byval state as gint ptr, byval save as gint ptr) as gsize 720 declare function g_base64_encode_close(byval break_lines as gboolean, byval out as gchar ptr, byval state as gint ptr, byval save as gint ptr) as gsize 721 declare function g_base64_encode(byval data as const guchar ptr, byval len as gsize) as gchar ptr 722 declare function g_base64_decode_step(byval in as const gchar ptr, byval len as gsize, byval out as guchar ptr, byval state as gint ptr, byval save as guint ptr) as gsize 723 declare function g_base64_decode(byval text as const gchar ptr, byval out_len as gsize ptr) as guchar ptr 724 declare function g_base64_decode_inplace(byval text as gchar ptr, byval out_len as gsize ptr) as guchar ptr 725 #define __G_BITLOCK_H__ 726 declare sub g_bit_lock(byval address as gint ptr, byval lock_bit as gint) 727 declare function g_bit_trylock(byval address as gint ptr, byval lock_bit as gint) as gboolean 728 declare sub g_bit_unlock(byval address as gint ptr, byval lock_bit as gint) 729 declare sub g_pointer_bit_lock(byval address as any ptr, byval lock_bit as gint) 730 declare function g_pointer_bit_trylock(byval address as any ptr, byval lock_bit as gint) as gboolean 731 declare sub g_pointer_bit_unlock(byval address as any ptr, byval lock_bit as gint) 732 #define __G_BOOKMARK_FILE_H__ 733 #define G_BOOKMARK_FILE_ERROR g_bookmark_file_error_quark() 734 735 type GBookmarkFileError as long 736 enum 737 G_BOOKMARK_FILE_ERROR_INVALID_URI 738 G_BOOKMARK_FILE_ERROR_INVALID_VALUE 739 G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED 740 G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND 741 G_BOOKMARK_FILE_ERROR_READ 742 G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING 743 G_BOOKMARK_FILE_ERROR_WRITE 744 G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND 745 end enum 746 747 declare function g_bookmark_file_error_quark() as GQuark 748 type GBookmarkFile as _GBookmarkFile 749 declare function g_bookmark_file_new() as GBookmarkFile ptr 750 declare sub g_bookmark_file_free(byval bookmark as GBookmarkFile ptr) 751 declare function g_bookmark_file_load_from_file(byval bookmark as GBookmarkFile ptr, byval filename as const gchar ptr, byval error as GError ptr ptr) as gboolean 752 declare function g_bookmark_file_load_from_data(byval bookmark as GBookmarkFile ptr, byval data as const gchar ptr, byval length as gsize, byval error as GError ptr ptr) as gboolean 753 declare function g_bookmark_file_load_from_data_dirs(byval bookmark as GBookmarkFile ptr, byval file as const gchar ptr, byval full_path as gchar ptr ptr, byval error as GError ptr ptr) as gboolean 754 declare function g_bookmark_file_to_data(byval bookmark as GBookmarkFile ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gchar ptr 755 declare function g_bookmark_file_to_file(byval bookmark as GBookmarkFile ptr, byval filename as const gchar ptr, byval error as GError ptr ptr) as gboolean 756 declare sub g_bookmark_file_set_title(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval title as const gchar ptr) 757 declare function g_bookmark_file_get_title(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 758 declare sub g_bookmark_file_set_description(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval description as const gchar ptr) 759 declare function g_bookmark_file_get_description(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 760 declare sub g_bookmark_file_set_mime_type(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval mime_type as const gchar ptr) 761 declare function g_bookmark_file_get_mime_type(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 762 declare sub g_bookmark_file_set_groups(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval groups as const gchar ptr ptr, byval length as gsize) 763 declare sub g_bookmark_file_add_group(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval group as const gchar ptr) 764 declare function g_bookmark_file_has_group(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval group as const gchar ptr, byval error as GError ptr ptr) as gboolean 765 declare function g_bookmark_file_get_groups(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gchar ptr ptr 766 declare sub g_bookmark_file_add_application(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval name as const gchar ptr, byval exec as const gchar ptr) 767 declare function g_bookmark_file_has_application(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval name as const gchar ptr, byval error as GError ptr ptr) as gboolean 768 declare function g_bookmark_file_get_applications(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gchar ptr ptr 769 declare function g_bookmark_file_set_app_info(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval name as const gchar ptr, byval exec as const gchar ptr, byval count as gint, byval stamp as time_t, byval error as GError ptr ptr) as gboolean 770 declare function g_bookmark_file_get_app_info(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval name as const gchar ptr, byval exec as gchar ptr ptr, byval count as guint ptr, byval stamp as time_t ptr, byval error as GError ptr ptr) as gboolean 771 declare sub g_bookmark_file_set_is_private(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval is_private as gboolean) 772 declare function g_bookmark_file_get_is_private(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as gboolean 773 declare sub g_bookmark_file_set_icon(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval href as const gchar ptr, byval mime_type as const gchar ptr) 774 declare function g_bookmark_file_get_icon(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval href as gchar ptr ptr, byval mime_type as gchar ptr ptr, byval error as GError ptr ptr) as gboolean 775 declare sub g_bookmark_file_set_added(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval added as time_t) 776 declare function g_bookmark_file_get_added(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as time_t 777 declare sub g_bookmark_file_set_modified(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval modified as time_t) 778 declare function g_bookmark_file_get_modified(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as time_t 779 declare sub g_bookmark_file_set_visited(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval visited as time_t) 780 declare function g_bookmark_file_get_visited(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as time_t 781 declare function g_bookmark_file_has_item(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr) as gboolean 782 declare function g_bookmark_file_get_size(byval bookmark as GBookmarkFile ptr) as gint 783 declare function g_bookmark_file_get_uris(byval bookmark as GBookmarkFile ptr, byval length as gsize ptr) as gchar ptr ptr 784 declare function g_bookmark_file_remove_group(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval group as const gchar ptr, byval error as GError ptr ptr) as gboolean 785 declare function g_bookmark_file_remove_application(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval name as const gchar ptr, byval error as GError ptr ptr) as gboolean 786 declare function g_bookmark_file_remove_item(byval bookmark as GBookmarkFile ptr, byval uri as const gchar ptr, byval error as GError ptr ptr) as gboolean 787 declare function g_bookmark_file_move_item(byval bookmark as GBookmarkFile ptr, byval old_uri as const gchar ptr, byval new_uri as const gchar ptr, byval error as GError ptr ptr) as gboolean 788 #define __G_BYTES_H__ 789 declare function g_bytes_new(byval data as gconstpointer, byval size as gsize) as GBytes ptr 790 declare function g_bytes_new_take(byval data as gpointer, byval size as gsize) as GBytes ptr 791 declare function g_bytes_new_static(byval data as gconstpointer, byval size as gsize) as GBytes ptr 792 declare function g_bytes_new_with_free_func(byval data as gconstpointer, byval size as gsize, byval free_func as GDestroyNotify, byval user_data as gpointer) as GBytes ptr 793 declare function g_bytes_new_from_bytes(byval bytes as GBytes ptr, byval offset as gsize, byval length as gsize) as GBytes ptr 794 declare function g_bytes_get_data(byval bytes as GBytes ptr, byval size as gsize ptr) as gconstpointer 795 declare function g_bytes_get_size(byval bytes as GBytes ptr) as gsize 796 declare function g_bytes_ref(byval bytes as GBytes ptr) as GBytes ptr 797 declare sub g_bytes_unref(byval bytes as GBytes ptr) 798 declare function g_bytes_unref_to_data(byval bytes as GBytes ptr, byval size as gsize ptr) as gpointer 799 declare function g_bytes_unref_to_array(byval bytes as GBytes ptr) as GByteArray ptr 800 declare function g_bytes_hash(byval bytes as gconstpointer) as guint 801 declare function g_bytes_equal(byval bytes1 as gconstpointer, byval bytes2 as gconstpointer) as gboolean 802 declare function g_bytes_compare(byval bytes1 as gconstpointer, byval bytes2 as gconstpointer) as gint 803 #define __G_CHARSET_H__ 804 declare function g_get_charset(byval charset as const zstring ptr ptr) as gboolean 805 declare function g_get_codeset() as gchar ptr 806 declare function g_get_language_names() as const gchar const ptr ptr 807 declare function g_get_locale_variants(byval locale as const gchar ptr) as gchar ptr ptr 808 #define __G_CHECKSUM_H__ 809 810 type GChecksumType as long 811 enum 812 G_CHECKSUM_MD5 813 G_CHECKSUM_SHA1 814 G_CHECKSUM_SHA256 815 G_CHECKSUM_SHA512 816 end enum 817 818 type GChecksum as _GChecksum 819 declare function g_checksum_type_get_length(byval checksum_type as GChecksumType) as gssize 820 declare function g_checksum_new(byval checksum_type as GChecksumType) as GChecksum ptr 821 declare sub g_checksum_reset(byval checksum as GChecksum ptr) 822 declare function g_checksum_copy(byval checksum as const GChecksum ptr) as GChecksum ptr 823 declare sub g_checksum_free(byval checksum as GChecksum ptr) 824 declare sub g_checksum_update(byval checksum as GChecksum ptr, byval data as const guchar ptr, byval length as gssize) 825 declare function g_checksum_get_string(byval checksum as GChecksum ptr) as const gchar ptr 826 declare sub g_checksum_get_digest(byval checksum as GChecksum ptr, byval buffer as guint8 ptr, byval digest_len as gsize ptr) 827 declare function g_compute_checksum_for_data(byval checksum_type as GChecksumType, byval data as const guchar ptr, byval length as gsize) as gchar ptr 828 declare function g_compute_checksum_for_string(byval checksum_type as GChecksumType, byval str as const gchar ptr, byval length as gssize) as gchar ptr 829 declare function g_compute_checksum_for_bytes(byval checksum_type as GChecksumType, byval data as GBytes ptr) as gchar ptr 830 #define __G_CONVERT_H__ 831 832 type GConvertError as long 833 enum 834 G_CONVERT_ERROR_NO_CONVERSION 835 G_CONVERT_ERROR_ILLEGAL_SEQUENCE 836 G_CONVERT_ERROR_FAILED 837 G_CONVERT_ERROR_PARTIAL_INPUT 838 G_CONVERT_ERROR_BAD_URI 839 G_CONVERT_ERROR_NOT_ABSOLUTE_PATH 840 G_CONVERT_ERROR_NO_MEMORY 841 end enum 842 843 #define G_CONVERT_ERROR g_convert_error_quark() 844 declare function g_convert_error_quark() as GQuark 845 type GIConv as _GIConv ptr 846 declare function g_iconv_open(byval to_codeset as const gchar ptr, byval from_codeset as const gchar ptr) as GIConv 847 declare function g_iconv(byval converter as GIConv, byval inbuf as gchar ptr ptr, byval inbytes_left as gsize ptr, byval outbuf as gchar ptr ptr, byval outbytes_left as gsize ptr) as gsize 848 declare function g_iconv_close(byval converter as GIConv) as gint 849 declare function g_convert(byval str as const gchar ptr, byval len as gssize, byval to_codeset as const gchar ptr, byval from_codeset as const gchar ptr, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 850 declare function g_convert_with_iconv(byval str as const gchar ptr, byval len as gssize, byval converter as GIConv, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 851 declare function g_convert_with_fallback(byval str as const gchar ptr, byval len as gssize, byval to_codeset as const gchar ptr, byval from_codeset as const gchar ptr, byval fallback as const gchar ptr, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 852 declare function g_locale_to_utf8(byval opsysstring as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 853 declare function g_locale_from_utf8(byval utf8string as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 854 855 #ifdef __FB_UNIX__ 856 declare function g_filename_to_utf8(byval opsysstring as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 857 declare function g_filename_from_utf8(byval utf8string as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 858 declare function g_filename_from_uri(byval uri as const gchar ptr, byval hostname as gchar ptr ptr, byval error as GError ptr ptr) as gchar ptr 859 declare function g_filename_to_uri(byval filename as const gchar ptr, byval hostname as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 860 #else 861 declare function g_filename_to_utf8_ alias "g_filename_to_utf8"(byval opsysstring as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 862 declare function g_filename_from_utf8_ alias "g_filename_from_utf8"(byval utf8string as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 863 declare function g_filename_from_uri_ alias "g_filename_from_uri"(byval uri as const gchar ptr, byval hostname as gchar ptr ptr, byval error as GError ptr ptr) as gchar ptr 864 declare function g_filename_to_uri_ alias "g_filename_to_uri"(byval filename as const gchar ptr, byval hostname as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 865 #endif 866 867 declare function g_filename_display_name(byval filename as const gchar ptr) as gchar ptr 868 declare function g_get_filename_charsets(byval charsets as const gchar ptr ptr ptr) as gboolean 869 declare function g_filename_display_basename(byval filename as const gchar ptr) as gchar ptr 870 declare function g_uri_list_extract_uris(byval uri_list as const gchar ptr) as gchar ptr ptr 871 872 #ifdef __FB_WIN32__ 873 declare function g_filename_to_utf8_utf8(byval opsysstring as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 874 declare function g_filename_to_utf8 alias "g_filename_to_utf8_utf8"(byval opsysstring as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 875 declare function g_filename_from_utf8_utf8(byval utf8string as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 876 declare function g_filename_from_utf8 alias "g_filename_from_utf8_utf8"(byval utf8string as const gchar ptr, byval len as gssize, byval bytes_read as gsize ptr, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as gchar ptr 877 declare function g_filename_from_uri_utf8(byval uri as const gchar ptr, byval hostname as gchar ptr ptr, byval error as GError ptr ptr) as gchar ptr 878 declare function g_filename_from_uri alias "g_filename_from_uri_utf8"(byval uri as const gchar ptr, byval hostname as gchar ptr ptr, byval error as GError ptr ptr) as gchar ptr 879 declare function g_filename_to_uri_utf8(byval filename as const gchar ptr, byval hostname as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 880 declare function g_filename_to_uri alias "g_filename_to_uri_utf8"(byval filename as const gchar ptr, byval hostname as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 881 #endif 882 883 #define __G_DATASET_H__ 884 type GData as _GData 885 type GDataForeachFunc as sub(byval key_id as GQuark, byval data as gpointer, byval user_data as gpointer) 886 declare sub g_datalist_init(byval datalist as GData ptr ptr) 887 declare sub g_datalist_clear(byval datalist as GData ptr ptr) 888 declare function g_datalist_id_get_data(byval datalist as GData ptr ptr, byval key_id as GQuark) as gpointer 889 declare sub g_datalist_id_set_data_full(byval datalist as GData ptr ptr, byval key_id as GQuark, byval data as gpointer, byval destroy_func as GDestroyNotify) 890 type GDuplicateFunc as function(byval data as gpointer, byval user_data as gpointer) as gpointer 891 declare function g_datalist_id_dup_data(byval datalist as GData ptr ptr, byval key_id as GQuark, byval dup_func as GDuplicateFunc, byval user_data as gpointer) as gpointer 892 declare function g_datalist_id_replace_data(byval datalist as GData ptr ptr, byval key_id as GQuark, byval oldval as gpointer, byval newval as gpointer, byval destroy as GDestroyNotify, byval old_destroy as GDestroyNotify ptr) as gboolean 893 declare function g_datalist_id_remove_no_notify(byval datalist as GData ptr ptr, byval key_id as GQuark) as gpointer 894 declare sub g_datalist_foreach(byval datalist as GData ptr ptr, byval func as GDataForeachFunc, byval user_data as gpointer) 895 const G_DATALIST_FLAGS_MASK = &h3 896 declare sub g_datalist_set_flags(byval datalist as GData ptr ptr, byval flags as guint) 897 declare sub g_datalist_unset_flags(byval datalist as GData ptr ptr, byval flags as guint) 898 declare function g_datalist_get_flags(byval datalist as GData ptr ptr) as guint 899 900 #define g_datalist_id_set_data(dl, q, d) g_datalist_id_set_data_full((dl), (q), (d), NULL) 901 #define g_datalist_id_remove_data(dl, q) g_datalist_id_set_data((dl), (q), NULL) 902 #define g_datalist_set_data_full(dl, k, d, f) g_datalist_id_set_data_full((dl), g_quark_from_string(k), (d), (f)) 903 #define g_datalist_remove_no_notify(dl, k) g_datalist_id_remove_no_notify((dl), g_quark_try_string(k)) 904 #define g_datalist_set_data(dl, k, d) g_datalist_set_data_full((dl), (k), (d), NULL) 905 #define g_datalist_remove_data(dl, k) g_datalist_id_set_data((dl), g_quark_try_string(k), NULL) 906 907 declare sub g_dataset_destroy(byval dataset_location as gconstpointer) 908 declare function g_dataset_id_get_data(byval dataset_location as gconstpointer, byval key_id as GQuark) as gpointer 909 declare function g_datalist_get_data(byval datalist as GData ptr ptr, byval key as const gchar ptr) as gpointer 910 declare sub g_dataset_id_set_data_full(byval dataset_location as gconstpointer, byval key_id as GQuark, byval data as gpointer, byval destroy_func as GDestroyNotify) 911 declare function g_dataset_id_remove_no_notify(byval dataset_location as gconstpointer, byval key_id as GQuark) as gpointer 912 declare sub g_dataset_foreach(byval dataset_location as gconstpointer, byval func as GDataForeachFunc, byval user_data as gpointer) 913 914 #define g_dataset_id_set_data(l, k, d) g_dataset_id_set_data_full((l), (k), (d), NULL) 915 #define g_dataset_id_remove_data(l, k) g_dataset_id_set_data((l), (k), NULL) 916 #define g_dataset_get_data(l, k) g_dataset_id_get_data((l), g_quark_try_string(k)) 917 #define g_dataset_set_data_full(l, k, d, f) g_dataset_id_set_data_full((l), g_quark_from_string(k), (d), (f)) 918 #define g_dataset_remove_no_notify(l, k) g_dataset_id_remove_no_notify((l), g_quark_try_string(k)) 919 #define g_dataset_set_data(l, k, d) g_dataset_set_data_full((l), (k), (d), NULL) 920 #define g_dataset_remove_data(l, k) g_dataset_id_set_data((l), g_quark_try_string(k), NULL) 921 #define __G_DATE_H__ 922 923 type GTime as gint32 924 type GDateYear as guint16 925 type GDateDay as guint8 926 type GDate as _GDate 927 928 type GDateDMY as long 929 enum 930 G_DATE_DAY_ = 0 931 G_DATE_MONTH_ = 1 932 G_DATE_YEAR_ = 2 933 end enum 934 935 type GDateWeekday as long 936 enum 937 G_DATE_BAD_WEEKDAY = 0 938 G_DATE_MONDAY = 1 939 G_DATE_TUESDAY = 2 940 G_DATE_WEDNESDAY = 3 941 G_DATE_THURSDAY = 4 942 G_DATE_FRIDAY = 5 943 G_DATE_SATURDAY = 6 944 G_DATE_SUNDAY = 7 945 end enum 946 947 type GDateMonth as long 948 enum 949 G_DATE_BAD_MONTH = 0 950 G_DATE_JANUARY = 1 951 G_DATE_FEBRUARY = 2 952 G_DATE_MARCH = 3 953 G_DATE_APRIL = 4 954 G_DATE_MAY = 5 955 G_DATE_JUNE = 6 956 G_DATE_JULY = 7 957 G_DATE_AUGUST = 8 958 G_DATE_SEPTEMBER = 9 959 G_DATE_OCTOBER = 10 960 G_DATE_NOVEMBER = 11 961 G_DATE_DECEMBER = 12 962 end enum 963 964 const G_DATE_BAD_JULIAN = 0u 965 const G_DATE_BAD_DAY = 0u 966 const G_DATE_BAD_YEAR = 0u 967 968 type _GDate 969 julian_days : 32 as guint 970 julian : 1 as guint 971 dmy : 1 as guint 972 day : 6 as guint 973 month : 4 as guint 974 year : 16 as guint 975 end type 976 977 declare function g_date_new() as GDate ptr 978 declare function g_date_new_dmy(byval day as GDateDay, byval month as GDateMonth, byval year as GDateYear) as GDate ptr 979 declare function g_date_new_julian(byval julian_day as guint32) as GDate ptr 980 declare sub g_date_free(byval date as GDate ptr) 981 declare function g_date_valid(byval date as const GDate ptr) as gboolean 982 declare function g_date_valid_day(byval day as GDateDay) as gboolean 983 declare function g_date_valid_month(byval month as GDateMonth) as gboolean 984 declare function g_date_valid_year(byval year as GDateYear) as gboolean 985 declare function g_date_valid_weekday(byval weekday as GDateWeekday) as gboolean 986 declare function g_date_valid_julian(byval julian_date as guint32) as gboolean 987 declare function g_date_valid_dmy(byval day as GDateDay, byval month as GDateMonth, byval year as GDateYear) as gboolean 988 declare function g_date_get_weekday(byval date as const GDate ptr) as GDateWeekday 989 declare function g_date_get_month(byval date as const GDate ptr) as GDateMonth 990 declare function g_date_get_year(byval date as const GDate ptr) as GDateYear 991 declare function g_date_get_day(byval date as const GDate ptr) as GDateDay 992 declare function g_date_get_julian(byval date as const GDate ptr) as guint32 993 declare function g_date_get_day_of_year(byval date as const GDate ptr) as guint 994 declare function g_date_get_monday_week_of_year(byval date as const GDate ptr) as guint 995 declare function g_date_get_sunday_week_of_year(byval date as const GDate ptr) as guint 996 declare function g_date_get_iso8601_week_of_year(byval date as const GDate ptr) as guint 997 declare sub g_date_clear(byval date as GDate ptr, byval n_dates as guint) 998 declare sub g_date_set_parse(byval date as GDate ptr, byval str as const gchar ptr) 999 declare sub g_date_set_time_t(byval date as GDate ptr, byval timet as time_t) 1000 declare sub g_date_set_time_val(byval date as GDate ptr, byval timeval as GTimeVal ptr) 1001 declare sub g_date_set_time(byval date as GDate ptr, byval time_ as GTime) 1002 declare sub g_date_set_month(byval date as GDate ptr, byval month as GDateMonth) 1003 declare sub g_date_set_day(byval date as GDate ptr, byval day as GDateDay) 1004 declare sub g_date_set_year(byval date as GDate ptr, byval year as GDateYear) 1005 declare sub g_date_set_dmy(byval date as GDate ptr, byval day as GDateDay, byval month as GDateMonth, byval y as GDateYear) 1006 declare sub g_date_set_julian(byval date as GDate ptr, byval julian_date as guint32) 1007 declare function g_date_is_first_of_month(byval date as const GDate ptr) as gboolean 1008 declare function g_date_is_last_of_month(byval date as const GDate ptr) as gboolean 1009 declare sub g_date_add_days(byval date as GDate ptr, byval n_days as guint) 1010 declare sub g_date_subtract_days(byval date as GDate ptr, byval n_days as guint) 1011 declare sub g_date_add_months(byval date as GDate ptr, byval n_months as guint) 1012 declare sub g_date_subtract_months(byval date as GDate ptr, byval n_months as guint) 1013 declare sub g_date_add_years(byval date as GDate ptr, byval n_years as guint) 1014 declare sub g_date_subtract_years(byval date as GDate ptr, byval n_years as guint) 1015 declare function g_date_is_leap_year(byval year as GDateYear) as gboolean 1016 declare function g_date_get_days_in_month(byval month as GDateMonth, byval year as GDateYear) as guint8 1017 declare function g_date_get_monday_weeks_in_year(byval year as GDateYear) as guint8 1018 declare function g_date_get_sunday_weeks_in_year(byval year as GDateYear) as guint8 1019 declare function g_date_days_between(byval date1 as const GDate ptr, byval date2 as const GDate ptr) as gint 1020 declare function g_date_compare(byval lhs as const GDate ptr, byval rhs as const GDate ptr) as gint 1021 declare sub g_date_to_struct_tm(byval date as const GDate ptr, byval tm as tm ptr) 1022 declare sub g_date_clamp(byval date as GDate ptr, byval min_date as const GDate ptr, byval max_date as const GDate ptr) 1023 declare sub g_date_order(byval date1 as GDate ptr, byval date2 as GDate ptr) 1024 declare function g_date_strftime(byval s as gchar ptr, byval slen as gsize, byval format as const gchar ptr, byval date as const GDate ptr) as gsize 1025 declare function g_date_weekday alias "g_date_get_weekday"(byval date as const GDate ptr) as GDateWeekday 1026 declare function g_date_month alias "g_date_get_month"(byval date as const GDate ptr) as GDateMonth 1027 declare function g_date_year alias "g_date_get_year"(byval date as const GDate ptr) as GDateYear 1028 declare function g_date_day alias "g_date_get_day"(byval date as const GDate ptr) as GDateDay 1029 declare function g_date_julian alias "g_date_get_julian"(byval date as const GDate ptr) as guint32 1030 declare function g_date_day_of_year alias "g_date_get_day_of_year"(byval date as const GDate ptr) as guint 1031 declare function g_date_monday_week_of_year alias "g_date_get_monday_week_of_year"(byval date as const GDate ptr) as guint 1032 declare function g_date_sunday_week_of_year alias "g_date_get_sunday_week_of_year"(byval date as const GDate ptr) as guint 1033 declare function g_date_days_in_month alias "g_date_get_days_in_month"(byval month as GDateMonth, byval year as GDateYear) as guint8 1034 declare function g_date_monday_weeks_in_year alias "g_date_get_monday_weeks_in_year"(byval year as GDateYear) as guint8 1035 declare function g_date_sunday_weeks_in_year alias "g_date_get_sunday_weeks_in_year"(byval year as GDateYear) as guint8 1036 #define __G_DATE_TIME_H__ 1037 #define __G_TIME_ZONE_H__ 1038 type GTimeZone as _GTimeZone 1039 1040 type GTimeType as long 1041 enum 1042 G_TIME_TYPE_STANDARD 1043 G_TIME_TYPE_DAYLIGHT 1044 G_TIME_TYPE_UNIVERSAL 1045 end enum 1046 1047 declare function g_time_zone_new(byval identifier as const gchar ptr) as GTimeZone ptr 1048 declare function g_time_zone_new_utc() as GTimeZone ptr 1049 declare function g_time_zone_new_local() as GTimeZone ptr 1050 declare function g_time_zone_ref(byval tz as GTimeZone ptr) as GTimeZone ptr 1051 declare sub g_time_zone_unref(byval tz as GTimeZone ptr) 1052 declare function g_time_zone_find_interval(byval tz as GTimeZone ptr, byval type as GTimeType, byval time_ as gint64) as gint 1053 declare function g_time_zone_adjust_time(byval tz as GTimeZone ptr, byval type as GTimeType, byval time_ as gint64 ptr) as gint 1054 declare function g_time_zone_get_abbreviation(byval tz as GTimeZone ptr, byval interval as gint) as const gchar ptr 1055 declare function g_time_zone_get_offset(byval tz as GTimeZone ptr, byval interval as gint) as gint32 1056 declare function g_time_zone_is_dst(byval tz as GTimeZone ptr, byval interval as gint) as gboolean 1057 1058 #define G_TIME_SPAN_DAY G_GINT64_CONSTANT(86400000000) 1059 #define G_TIME_SPAN_HOUR G_GINT64_CONSTANT(3600000000) 1060 #define G_TIME_SPAN_MINUTE G_GINT64_CONSTANT(60000000) 1061 #define G_TIME_SPAN_SECOND G_GINT64_CONSTANT(1000000) 1062 #define G_TIME_SPAN_MILLISECOND G_GINT64_CONSTANT(1000) 1063 type GTimeSpan as gint64 1064 type GDateTime as _GDateTime 1065 1066 declare sub g_date_time_unref(byval datetime as GDateTime ptr) 1067 declare function g_date_time_ref(byval datetime as GDateTime ptr) as GDateTime ptr 1068 declare function g_date_time_new_now(byval tz as GTimeZone ptr) as GDateTime ptr 1069 declare function g_date_time_new_now_local() as GDateTime ptr 1070 declare function g_date_time_new_now_utc() as GDateTime ptr 1071 declare function g_date_time_new_from_unix_local(byval t as gint64) as GDateTime ptr 1072 declare function g_date_time_new_from_unix_utc(byval t as gint64) as GDateTime ptr 1073 declare function g_date_time_new_from_timeval_local(byval tv as const GTimeVal ptr) as GDateTime ptr 1074 declare function g_date_time_new_from_timeval_utc(byval tv as const GTimeVal ptr) as GDateTime ptr 1075 declare function g_date_time_new(byval tz as GTimeZone ptr, byval year as gint, byval month as gint, byval day as gint, byval hour as gint, byval minute as gint, byval seconds as gdouble) as GDateTime ptr 1076 declare function g_date_time_new_local(byval year as gint, byval month as gint, byval day as gint, byval hour as gint, byval minute as gint, byval seconds as gdouble) as GDateTime ptr 1077 declare function g_date_time_new_utc(byval year as gint, byval month as gint, byval day as gint, byval hour as gint, byval minute as gint, byval seconds as gdouble) as GDateTime ptr 1078 declare function g_date_time_add(byval datetime as GDateTime ptr, byval timespan as GTimeSpan) as GDateTime ptr 1079 declare function g_date_time_add_years(byval datetime as GDateTime ptr, byval years as gint) as GDateTime ptr 1080 declare function g_date_time_add_months(byval datetime as GDateTime ptr, byval months as gint) as GDateTime ptr 1081 declare function g_date_time_add_weeks(byval datetime as GDateTime ptr, byval weeks as gint) as GDateTime ptr 1082 declare function g_date_time_add_days(byval datetime as GDateTime ptr, byval days as gint) as GDateTime ptr 1083 declare function g_date_time_add_hours(byval datetime as GDateTime ptr, byval hours as gint) as GDateTime ptr 1084 declare function g_date_time_add_minutes(byval datetime as GDateTime ptr, byval minutes as gint) as GDateTime ptr 1085 declare function g_date_time_add_seconds(byval datetime as GDateTime ptr, byval seconds as gdouble) as GDateTime ptr 1086 declare function g_date_time_add_full(byval datetime as GDateTime ptr, byval years as gint, byval months as gint, byval days as gint, byval hours as gint, byval minutes as gint, byval seconds as gdouble) as GDateTime ptr 1087 declare function g_date_time_compare(byval dt1 as gconstpointer, byval dt2 as gconstpointer) as gint 1088 declare function g_date_time_difference(byval end as GDateTime ptr, byval begin as GDateTime ptr) as GTimeSpan 1089 declare function g_date_time_hash(byval datetime as gconstpointer) as guint 1090 declare function g_date_time_equal(byval dt1 as gconstpointer, byval dt2 as gconstpointer) as gboolean 1091 declare sub g_date_time_get_ymd(byval datetime as GDateTime ptr, byval year as gint ptr, byval month as gint ptr, byval day as gint ptr) 1092 declare function g_date_time_get_year(byval datetime as GDateTime ptr) as gint 1093 declare function g_date_time_get_month(byval datetime as GDateTime ptr) as gint 1094 declare function g_date_time_get_day_of_month(byval datetime as GDateTime ptr) as gint 1095 declare function g_date_time_get_week_numbering_year(byval datetime as GDateTime ptr) as gint 1096 declare function g_date_time_get_week_of_year(byval datetime as GDateTime ptr) as gint 1097 declare function g_date_time_get_day_of_week(byval datetime as GDateTime ptr) as gint 1098 declare function g_date_time_get_day_of_year(byval datetime as GDateTime ptr) as gint 1099 declare function g_date_time_get_hour(byval datetime as GDateTime ptr) as gint 1100 declare function g_date_time_get_minute(byval datetime as GDateTime ptr) as gint 1101 declare function g_date_time_get_second(byval datetime as GDateTime ptr) as gint 1102 declare function g_date_time_get_microsecond(byval datetime as GDateTime ptr) as gint 1103 declare function g_date_time_get_seconds(byval datetime as GDateTime ptr) as gdouble 1104 declare function g_date_time_to_unix(byval datetime as GDateTime ptr) as gint64 1105 declare function g_date_time_to_timeval(byval datetime as GDateTime ptr, byval tv as GTimeVal ptr) as gboolean 1106 declare function g_date_time_get_utc_offset(byval datetime as GDateTime ptr) as GTimeSpan 1107 declare function g_date_time_get_timezone_abbreviation(byval datetime as GDateTime ptr) as const gchar ptr 1108 declare function g_date_time_is_daylight_savings(byval datetime as GDateTime ptr) as gboolean 1109 declare function g_date_time_to_timezone(byval datetime as GDateTime ptr, byval tz as GTimeZone ptr) as GDateTime ptr 1110 declare function g_date_time_to_local(byval datetime as GDateTime ptr) as GDateTime ptr 1111 declare function g_date_time_to_utc(byval datetime as GDateTime ptr) as GDateTime ptr 1112 declare function g_date_time_format(byval datetime as GDateTime ptr, byval format as const gchar ptr) as gchar ptr 1113 #define __G_DIR_H__ 1114 type GDir as _GDir 1115 1116 #ifdef __FB_UNIX__ 1117 declare function g_dir_open(byval path as const gchar ptr, byval flags as guint, byval error as GError ptr ptr) as GDir ptr 1118 declare function g_dir_read_name(byval dir as GDir ptr) as const gchar ptr 1119 #else 1120 declare function g_dir_open_ alias "g_dir_open"(byval path as const gchar ptr, byval flags as guint, byval error as GError ptr ptr) as GDir ptr 1121 declare function g_dir_read_name_ alias "g_dir_read_name"(byval dir as GDir ptr) as const gchar ptr 1122 #endif 1123 1124 declare sub g_dir_rewind(byval dir as GDir ptr) 1125 declare sub g_dir_close(byval dir as GDir ptr) 1126 1127 #ifdef __FB_WIN32__ 1128 declare function g_dir_open_utf8(byval path as const gchar ptr, byval flags as guint, byval error as GError ptr ptr) as GDir ptr 1129 declare function g_dir_open alias "g_dir_open_utf8"(byval path as const gchar ptr, byval flags as guint, byval error as GError ptr ptr) as GDir ptr 1130 declare function g_dir_read_name_utf8(byval dir as GDir ptr) as const gchar ptr 1131 declare function g_dir_read_name alias "g_dir_read_name_utf8"(byval dir as GDir ptr) as const gchar ptr 1132 #endif 1133 1134 #define __G_ENVIRON_H__ 1135 1136 #ifdef __FB_UNIX__ 1137 declare function g_getenv(byval variable as const gchar ptr) as const gchar ptr 1138 declare function g_setenv(byval variable as const gchar ptr, byval value as const gchar ptr, byval overwrite as gboolean) as gboolean 1139 declare sub g_unsetenv(byval variable as const gchar ptr) 1140 #else 1141 declare function g_getenv_ alias "g_getenv"(byval variable as const gchar ptr) as const gchar ptr 1142 declare function g_setenv_ alias "g_setenv"(byval variable as const gchar ptr, byval value as const gchar ptr, byval overwrite as gboolean) as gboolean 1143 declare sub g_unsetenv_ alias "g_unsetenv"(byval variable as const gchar ptr) 1144 #endif 1145 1146 declare function g_listenv() as gchar ptr ptr 1147 declare function g_get_environ() as gchar ptr ptr 1148 declare function g_environ_getenv(byval envp as gchar ptr ptr, byval variable as const gchar ptr) as const gchar ptr 1149 declare function g_environ_setenv(byval envp as gchar ptr ptr, byval variable as const gchar ptr, byval value as const gchar ptr, byval overwrite as gboolean) as gchar ptr ptr 1150 declare function g_environ_unsetenv(byval envp as gchar ptr ptr, byval variable as const gchar ptr) as gchar ptr ptr 1151 1152 #ifdef __FB_WIN32__ 1153 declare function g_getenv_utf8(byval variable as const gchar ptr) as const gchar ptr 1154 declare function g_getenv alias "g_getenv_utf8"(byval variable as const gchar ptr) as const gchar ptr 1155 declare function g_setenv_utf8(byval variable as const gchar ptr, byval value as const gchar ptr, byval overwrite as gboolean) as gboolean 1156 declare function g_setenv alias "g_setenv_utf8"(byval variable as const gchar ptr, byval value as const gchar ptr, byval overwrite as gboolean) as gboolean 1157 declare sub g_unsetenv_utf8(byval variable as const gchar ptr) 1158 declare sub g_unsetenv alias "g_unsetenv_utf8"(byval variable as const gchar ptr) 1159 #endif 1160 1161 #define __G_FILEUTILS_H__ 1162 #define G_FILE_ERROR g_file_error_quark() 1163 1164 type GFileError as long 1165 enum 1166 G_FILE_ERROR_EXIST 1167 G_FILE_ERROR_ISDIR 1168 G_FILE_ERROR_ACCES 1169 G_FILE_ERROR_NAMETOOLONG 1170 G_FILE_ERROR_NOENT 1171 G_FILE_ERROR_NOTDIR 1172 G_FILE_ERROR_NXIO 1173 G_FILE_ERROR_NODEV 1174 G_FILE_ERROR_ROFS 1175 G_FILE_ERROR_TXTBSY 1176 G_FILE_ERROR_FAULT 1177 G_FILE_ERROR_LOOP 1178 G_FILE_ERROR_NOSPC 1179 G_FILE_ERROR_NOMEM 1180 G_FILE_ERROR_MFILE 1181 G_FILE_ERROR_NFILE 1182 G_FILE_ERROR_BADF 1183 G_FILE_ERROR_INVAL 1184 G_FILE_ERROR_PIPE 1185 G_FILE_ERROR_AGAIN 1186 G_FILE_ERROR_INTR 1187 G_FILE_ERROR_IO 1188 G_FILE_ERROR_PERM 1189 G_FILE_ERROR_NOSYS 1190 G_FILE_ERROR_FAILED 1191 end enum 1192 1193 type GFileTest as long 1194 enum 1195 G_FILE_TEST_IS_REGULAR = 1 shl 0 1196 G_FILE_TEST_IS_SYMLINK = 1 shl 1 1197 G_FILE_TEST_IS_DIR = 1 shl 2 1198 G_FILE_TEST_IS_EXECUTABLE = 1 shl 3 1199 G_FILE_TEST_EXISTS = 1 shl 4 1200 end enum 1201 1202 declare function g_file_error_quark() as GQuark 1203 declare function g_file_error_from_errno(byval err_no as gint) as GFileError 1204 1205 #ifdef __FB_UNIX__ 1206 declare function g_file_test(byval filename as const gchar ptr, byval test as GFileTest) as gboolean 1207 declare function g_file_get_contents(byval filename as const gchar ptr, byval contents as gchar ptr ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gboolean 1208 #else 1209 declare function g_file_test_ alias "g_file_test"(byval filename as const gchar ptr, byval test as GFileTest) as gboolean 1210 declare function g_file_get_contents_ alias "g_file_get_contents"(byval filename as const gchar ptr, byval contents as gchar ptr ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gboolean 1211 #endif 1212 1213 declare function g_file_set_contents(byval filename as const gchar ptr, byval contents as const gchar ptr, byval length as gssize, byval error as GError ptr ptr) as gboolean 1214 declare function g_file_read_link(byval filename as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 1215 declare function g_mkdtemp(byval tmpl as gchar ptr) as gchar ptr 1216 declare function g_mkdtemp_full(byval tmpl as gchar ptr, byval mode as gint) as gchar ptr 1217 1218 #ifdef __FB_UNIX__ 1219 declare function g_mkstemp(byval tmpl as gchar ptr) as gint 1220 #else 1221 declare function g_mkstemp_ alias "g_mkstemp"(byval tmpl as gchar ptr) as gint 1222 #endif 1223 1224 declare function g_mkstemp_full(byval tmpl as gchar ptr, byval flags as gint, byval mode as gint) as gint 1225 1226 #ifdef __FB_UNIX__ 1227 declare function g_file_open_tmp(byval tmpl as const gchar ptr, byval name_used as gchar ptr ptr, byval error as GError ptr ptr) as gint 1228 #else 1229 declare function g_file_open_tmp_ alias "g_file_open_tmp"(byval tmpl as const gchar ptr, byval name_used as gchar ptr ptr, byval error as GError ptr ptr) as gint 1230 #endif 1231 1232 declare function g_dir_make_tmp(byval tmpl as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 1233 declare function g_build_path(byval separator as const gchar ptr, byval first_element as const gchar ptr, ...) as gchar ptr 1234 declare function g_build_pathv(byval separator as const gchar ptr, byval args as gchar ptr ptr) as gchar ptr 1235 declare function g_build_filename(byval first_element as const gchar ptr, ...) as gchar ptr 1236 declare function g_build_filenamev(byval args as gchar ptr ptr) as gchar ptr 1237 declare function g_mkdir_with_parents(byval pathname as const gchar ptr, byval mode as gint) as gint 1238 1239 #ifdef __FB_UNIX__ 1240 #define G_DIR_SEPARATOR asc("/") 1241 #define G_DIR_SEPARATOR_S "/" 1242 #define G_IS_DIR_SEPARATOR(c) ((c) = G_DIR_SEPARATOR) 1243 #define G_SEARCHPATH_SEPARATOR asc(":") 1244 #define G_SEARCHPATH_SEPARATOR_S ":" 1245 #else 1246 #define G_DIR_SEPARATOR asc(!"\\") 1247 #define G_DIR_SEPARATOR_S !"\\" 1248 #define G_IS_DIR_SEPARATOR(c) (((c) = G_DIR_SEPARATOR) orelse ((c) = asc("/"))) 1249 #define G_SEARCHPATH_SEPARATOR asc(";") 1250 #define G_SEARCHPATH_SEPARATOR_S ";" 1251 #endif 1252 1253 declare function g_path_is_absolute(byval file_name as const gchar ptr) as gboolean 1254 declare function g_path_skip_root(byval file_name as const gchar ptr) as const gchar ptr 1255 declare function g_basename(byval file_name as const gchar ptr) as const gchar ptr 1256 1257 #ifdef __FB_UNIX__ 1258 declare function g_get_current_dir() as gchar ptr 1259 #else 1260 declare function g_get_current_dir_ alias "g_get_current_dir"() as gchar ptr 1261 #endif 1262 1263 declare function g_path_get_basename(byval file_name as const gchar ptr) as gchar ptr 1264 declare function g_path_get_dirname(byval file_name as const gchar ptr) as gchar ptr 1265 declare function g_dirname alias "g_path_get_dirname"(byval file_name as const gchar ptr) as gchar ptr 1266 1267 #ifdef __FB_WIN32__ 1268 declare function g_file_test_utf8(byval filename as const gchar ptr, byval test as GFileTest) as gboolean 1269 declare function g_file_test alias "g_file_test_utf8"(byval filename as const gchar ptr, byval test as GFileTest) as gboolean 1270 declare function g_file_get_contents_utf8(byval filename as const gchar ptr, byval contents as gchar ptr ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gboolean 1271 declare function g_file_get_contents alias "g_file_get_contents_utf8"(byval filename as const gchar ptr, byval contents as gchar ptr ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gboolean 1272 declare function g_mkstemp_utf8(byval tmpl as gchar ptr) as gint 1273 declare function g_mkstemp alias "g_mkstemp_utf8"(byval tmpl as gchar ptr) as gint 1274 declare function g_file_open_tmp_utf8(byval tmpl as const gchar ptr, byval name_used as gchar ptr ptr, byval error as GError ptr ptr) as gint 1275 declare function g_file_open_tmp alias "g_file_open_tmp_utf8"(byval tmpl as const gchar ptr, byval name_used as gchar ptr ptr, byval error as GError ptr ptr) as gint 1276 declare function g_get_current_dir_utf8() as gchar ptr 1277 declare function g_get_current_dir alias "g_get_current_dir_utf8"() as gchar ptr 1278 #endif 1279 1280 #define __G_GETTEXT_H__ 1281 declare function g_strip_context(byval msgid as const gchar ptr, byval msgval as const gchar ptr) as const gchar ptr 1282 declare function g_dgettext(byval domain as const gchar ptr, byval msgid as const gchar ptr) as const gchar ptr 1283 declare function g_dcgettext(byval domain as const gchar ptr, byval msgid as const gchar ptr, byval category as gint) as const gchar ptr 1284 declare function g_dngettext(byval domain as const gchar ptr, byval msgid as const gchar ptr, byval msgid_plural as const gchar ptr, byval n as gulong) as const gchar ptr 1285 declare function g_dpgettext(byval domain as const gchar ptr, byval msgctxtid as const gchar ptr, byval msgidoffset as gsize) as const gchar ptr 1286 declare function g_dpgettext2(byval domain as const gchar ptr, byval context as const gchar ptr, byval msgid as const gchar ptr) as const gchar ptr 1287 1288 #define __G_HASH_H__ 1289 #define __G_LIST_H__ 1290 #define __G_MEM_H__ 1291 type GMemVTable as _GMemVTable 1292 1293 #if defined(__FB_WIN32__) and defined(__FB_64BIT__) 1294 const G_MEM_ALIGN = GLIB_SIZEOF_VOID_P 1295 #else 1296 const G_MEM_ALIGN = GLIB_SIZEOF_LONG 1297 #endif 1298 1299 declare sub g_free(byval mem as gpointer) 1300 declare sub g_clear_pointer(byval pp as gpointer ptr, byval destroy as GDestroyNotify) 1301 declare function g_malloc(byval n_bytes as gsize) as gpointer 1302 declare function g_malloc0(byval n_bytes as gsize) as gpointer 1303 declare function g_realloc(byval mem as gpointer, byval n_bytes as gsize) as gpointer 1304 declare function g_try_malloc(byval n_bytes as gsize) as gpointer 1305 declare function g_try_malloc0(byval n_bytes as gsize) as gpointer 1306 declare function g_try_realloc(byval mem as gpointer, byval n_bytes as gsize) as gpointer 1307 declare function g_malloc_n(byval n_blocks as gsize, byval n_block_bytes as gsize) as gpointer 1308 declare function g_malloc0_n(byval n_blocks as gsize, byval n_block_bytes as gsize) as gpointer 1309 declare function g_realloc_n(byval mem as gpointer, byval n_blocks as gsize, byval n_block_bytes as gsize) as gpointer 1310 declare function g_try_malloc_n(byval n_blocks as gsize, byval n_block_bytes as gsize) as gpointer 1311 declare function g_try_malloc0_n(byval n_blocks as gsize, byval n_block_bytes as gsize) as gpointer 1312 declare function g_try_realloc_n(byval mem as gpointer, byval n_blocks as gsize, byval n_block_bytes as gsize) as gpointer 1313 1314 private function g_steal_pointer_ alias "g_steal_pointer"(byval pp as gpointer) as gpointer 1315 dim ptr_ as gpointer ptr = cptr(gpointer ptr, pp) 1316 dim ref as gpointer 1317 ref = *ptr_ 1318 (*ptr_) = cptr(any ptr, 0) 1319 return ref 1320 end function 1321 1322 #define g_steal_pointer(pp) iif(0, *(pp), g_steal_pointer_(pp)) 1323 #define _G_NEW(struct_type, n_structs, func) cptr(struct_type ptr, g_##func##_n((n_structs), sizeof(struct_type))) 1324 #define _G_RENEW(struct_type, mem, n_structs, func) cptr(struct_type ptr, g_##func##_n(mem, (n_structs), sizeof(struct_type))) 1325 #define g_new(struct_type, n_structs) _G_NEW(struct_type, n_structs, malloc) 1326 #define g_new0(struct_type, n_structs) _G_NEW(struct_type, n_structs, malloc0) 1327 #define g_renew(struct_type, mem, n_structs) _G_RENEW(struct_type, mem, n_structs, realloc) 1328 #define g_try_new(struct_type, n_structs) _G_NEW(struct_type, n_structs, try_malloc) 1329 #define g_try_new0(struct_type, n_structs) _G_NEW(struct_type, n_structs, try_malloc0) 1330 #define g_try_renew(struct_type, mem, n_structs) _G_RENEW(struct_type, mem, n_structs, try_realloc) 1331 1332 type _GMemVTable 1333 malloc as function(byval n_bytes as gsize) as gpointer 1334 realloc as function(byval mem as gpointer, byval n_bytes as gsize) as gpointer 1335 free as sub(byval mem as gpointer) 1336 calloc as function(byval n_blocks as gsize, byval n_block_bytes as gsize) as gpointer 1337 try_malloc as function(byval n_bytes as gsize) as gpointer 1338 try_realloc as function(byval mem as gpointer, byval n_bytes as gsize) as gpointer 1339 end type 1340 1341 declare sub g_mem_set_vtable(byval vtable as GMemVTable ptr) 1342 declare function g_mem_is_system_malloc() as gboolean 1343 1344 #if (defined(__FB_WIN32__) and (not defined(GLIB_STATIC_COMPILATION))) or defined(__FB_CYGWIN__) 1345 extern import g_mem_gc_friendly as gboolean 1346 extern import glib_mem_profiler_table as GMemVTable ptr 1347 #else 1348 extern g_mem_gc_friendly as gboolean 1349 extern glib_mem_profiler_table as GMemVTable ptr 1350 #endif 1351 1352 declare sub g_mem_profile() 1353 #define __G_NODE_H__ 1354 type GNode as _GNode 1355 1356 type GTraverseFlags as long 1357 enum 1358 G_TRAVERSE_LEAVES = 1 shl 0 1359 G_TRAVERSE_NON_LEAVES = 1 shl 1 1360 G_TRAVERSE_ALL = G_TRAVERSE_LEAVES or G_TRAVERSE_NON_LEAVES 1361 G_TRAVERSE_MASK = &h03 1362 G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES 1363 G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES 1364 end enum 1365 1366 type GTraverseType as long 1367 enum 1368 G_IN_ORDER 1369 G_PRE_ORDER 1370 G_POST_ORDER 1371 G_LEVEL_ORDER 1372 end enum 1373 1374 type GNodeTraverseFunc as function(byval node as GNode ptr, byval data as gpointer) as gboolean 1375 type GNodeForeachFunc as sub(byval node as GNode ptr, byval data as gpointer) 1376 type GCopyFunc as function(byval src as gconstpointer, byval data as gpointer) as gpointer 1377 1378 type _GNode 1379 data as gpointer 1380 next as GNode ptr 1381 prev as GNode ptr 1382 parent as GNode ptr 1383 children as GNode ptr 1384 end type 1385 1386 #define G_NODE_IS_ROOT(node) (((cptr(GNode ptr, (node))->parent = NULL) andalso (cptr(GNode ptr, (node))->prev = NULL)) andalso (cptr(GNode ptr, (node))->next = NULL)) 1387 #define G_NODE_IS_LEAF(node) (cptr(GNode ptr, (node))->children = NULL) 1388 declare function g_node_new(byval data as gpointer) as GNode ptr 1389 declare sub g_node_destroy(byval root as GNode ptr) 1390 declare sub g_node_unlink(byval node as GNode ptr) 1391 declare function g_node_copy_deep(byval node as GNode ptr, byval copy_func as GCopyFunc, byval data as gpointer) as GNode ptr 1392 declare function g_node_copy(byval node as GNode ptr) as GNode ptr 1393 declare function g_node_insert(byval parent as GNode ptr, byval position as gint, byval node as GNode ptr) as GNode ptr 1394 declare function g_node_insert_before(byval parent as GNode ptr, byval sibling as GNode ptr, byval node as GNode ptr) as GNode ptr 1395 declare function g_node_insert_after(byval parent as GNode ptr, byval sibling as GNode ptr, byval node as GNode ptr) as GNode ptr 1396 declare function g_node_prepend(byval parent as GNode ptr, byval node as GNode ptr) as GNode ptr 1397 declare function g_node_n_nodes(byval root as GNode ptr, byval flags as GTraverseFlags) as guint 1398 declare function g_node_get_root(byval node as GNode ptr) as GNode ptr 1399 declare function g_node_is_ancestor(byval node as GNode ptr, byval descendant as GNode ptr) as gboolean 1400 declare function g_node_depth(byval node as GNode ptr) as guint 1401 declare function g_node_find(byval root as GNode ptr, byval order as GTraverseType, byval flags as GTraverseFlags, byval data as gpointer) as GNode ptr 1402 1403 #define g_node_append(parent, node) g_node_insert_before((parent), NULL, (node)) 1404 #define g_node_insert_data(parent, position, data) g_node_insert((parent), (position), g_node_new(data)) 1405 #define g_node_insert_data_after(parent, sibling, data) g_node_insert_after((parent), (sibling), g_node_new(data)) 1406 #define g_node_insert_data_before(parent, sibling, data) g_node_insert_before((parent), (sibling), g_node_new(data)) 1407 #define g_node_prepend_data(parent, data) g_node_prepend((parent), g_node_new(data)) 1408 #define g_node_append_data(parent, data) g_node_insert_before((parent), NULL, g_node_new(data)) 1409 1410 declare sub g_node_traverse(byval root as GNode ptr, byval order as GTraverseType, byval flags as GTraverseFlags, byval max_depth as gint, byval func as GNodeTraverseFunc, byval data as gpointer) 1411 declare function g_node_max_height(byval root as GNode ptr) as guint 1412 declare sub g_node_children_foreach(byval node as GNode ptr, byval flags as GTraverseFlags, byval func as GNodeForeachFunc, byval data as gpointer) 1413 declare sub g_node_reverse_children(byval node as GNode ptr) 1414 declare function g_node_n_children(byval node as GNode ptr) as guint 1415 declare function g_node_nth_child(byval node as GNode ptr, byval n as guint) as GNode ptr 1416 declare function g_node_last_child(byval node as GNode ptr) as GNode ptr 1417 declare function g_node_find_child(byval node as GNode ptr, byval flags as GTraverseFlags, byval data as gpointer) as GNode ptr 1418 declare function g_node_child_position(byval node as GNode ptr, byval child as GNode ptr) as gint 1419 declare function g_node_child_index(byval node as GNode ptr, byval data as gpointer) as gint 1420 declare function g_node_first_sibling(byval node as GNode ptr) as GNode ptr 1421 declare function g_node_last_sibling(byval node as GNode ptr) as GNode ptr 1422 1423 #define g_node_prev_sibling(node) iif((node), cptr(GNode ptr, (node))->prev, NULL) 1424 #define g_node_next_sibling(node) iif((node), cptr(GNode ptr, (node))->next, NULL) 1425 #define g_node_first_child(node) iif((node), cptr(GNode ptr, (node))->children, NULL) 1426 type GList as _GList 1427 1428 type _GList 1429 data as gpointer 1430 next as GList ptr 1431 prev as GList ptr 1432 end type 1433 1434 declare function g_list_alloc() as GList ptr 1435 declare sub g_list_free(byval list as GList ptr) 1436 declare sub g_list_free_1(byval list as GList ptr) 1437 declare sub g_list_free1 alias "g_list_free_1"(byval list as GList ptr) 1438 declare sub g_list_free_full(byval list as GList ptr, byval free_func as GDestroyNotify) 1439 declare function g_list_append(byval list as GList ptr, byval data as gpointer) as GList ptr 1440 declare function g_list_prepend(byval list as GList ptr, byval data as gpointer) as GList ptr 1441 declare function g_list_insert(byval list as GList ptr, byval data as gpointer, byval position as gint) as GList ptr 1442 declare function g_list_insert_sorted(byval list as GList ptr, byval data as gpointer, byval func as GCompareFunc) as GList ptr 1443 declare function g_list_insert_sorted_with_data(byval list as GList ptr, byval data as gpointer, byval func as GCompareDataFunc, byval user_data as gpointer) as GList ptr 1444 declare function g_list_insert_before(byval list as GList ptr, byval sibling as GList ptr, byval data as gpointer) as GList ptr 1445 declare function g_list_concat(byval list1 as GList ptr, byval list2 as GList ptr) as GList ptr 1446 declare function g_list_remove(byval list as GList ptr, byval data as gconstpointer) as GList ptr 1447 declare function g_list_remove_all(byval list as GList ptr, byval data as gconstpointer) as GList ptr 1448 declare function g_list_remove_link(byval list as GList ptr, byval llink as GList ptr) as GList ptr 1449 declare function g_list_delete_link(byval list as GList ptr, byval link_ as GList ptr) as GList ptr 1450 declare function g_list_reverse(byval list as GList ptr) as GList ptr 1451 declare function g_list_copy(byval list as GList ptr) as GList ptr 1452 declare function g_list_copy_deep(byval list as GList ptr, byval func as GCopyFunc, byval user_data as gpointer) as GList ptr 1453 declare function g_list_nth(byval list as GList ptr, byval n as guint) as GList ptr 1454 declare function g_list_nth_prev(byval list as GList ptr, byval n as guint) as GList ptr 1455 declare function g_list_find(byval list as GList ptr, byval data as gconstpointer) as GList ptr 1456 declare function g_list_find_custom(byval list as GList ptr, byval data as gconstpointer, byval func as GCompareFunc) as GList ptr 1457 declare function g_list_position(byval list as GList ptr, byval llink as GList ptr) as gint 1458 declare function g_list_index(byval list as GList ptr, byval data as gconstpointer) as gint 1459 declare function g_list_last(byval list as GList ptr) as GList ptr 1460 declare function g_list_first(byval list as GList ptr) as GList ptr 1461 declare function g_list_length(byval list as GList ptr) as guint 1462 declare sub g_list_foreach(byval list as GList ptr, byval func as GFunc, byval user_data as gpointer) 1463 declare function g_list_sort(byval list as GList ptr, byval compare_func as GCompareFunc) as GList ptr 1464 declare function g_list_sort_with_data(byval list as GList ptr, byval compare_func as GCompareDataFunc, byval user_data as gpointer) as GList ptr 1465 declare function g_list_nth_data(byval list as GList ptr, byval n as guint) as gpointer 1466 #define g_list_previous(list) iif((list), cptr(GList ptr, (list))->prev, NULL) 1467 #define g_list_next(list) iif((list), cptr(GList ptr, (list))->next, NULL) 1468 1469 type GHashTable as _GHashTable 1470 type GHRFunc as function(byval key as gpointer, byval value as gpointer, byval user_data as gpointer) as gboolean 1471 type GHashTableIter as _GHashTableIter 1472 1473 type _GHashTableIter 1474 dummy1 as gpointer 1475 dummy2 as gpointer 1476 dummy3 as gpointer 1477 dummy4 as long 1478 dummy5 as gboolean 1479 dummy6 as gpointer 1480 end type 1481 1482 declare function g_hash_table_new(byval hash_func as GHashFunc, byval key_equal_func as GEqualFunc) as GHashTable ptr 1483 declare function g_hash_table_new_full(byval hash_func as GHashFunc, byval key_equal_func as GEqualFunc, byval key_destroy_func as GDestroyNotify, byval value_destroy_func as GDestroyNotify) as GHashTable ptr 1484 declare sub g_hash_table_destroy(byval hash_table as GHashTable ptr) 1485 declare function g_hash_table_insert(byval hash_table as GHashTable ptr, byval key as gpointer, byval value as gpointer) as gboolean 1486 declare function g_hash_table_replace(byval hash_table as GHashTable ptr, byval key as gpointer, byval value as gpointer) as gboolean 1487 declare function g_hash_table_add(byval hash_table as GHashTable ptr, byval key as gpointer) as gboolean 1488 declare function g_hash_table_remove(byval hash_table as GHashTable ptr, byval key as gconstpointer) as gboolean 1489 declare sub g_hash_table_remove_all(byval hash_table as GHashTable ptr) 1490 declare function g_hash_table_steal(byval hash_table as GHashTable ptr, byval key as gconstpointer) as gboolean 1491 declare sub g_hash_table_steal_all(byval hash_table as GHashTable ptr) 1492 declare function g_hash_table_lookup(byval hash_table as GHashTable ptr, byval key as gconstpointer) as gpointer 1493 declare function g_hash_table_contains(byval hash_table as GHashTable ptr, byval key as gconstpointer) as gboolean 1494 declare function g_hash_table_lookup_extended(byval hash_table as GHashTable ptr, byval lookup_key as gconstpointer, byval orig_key as gpointer ptr, byval value as gpointer ptr) as gboolean 1495 declare sub g_hash_table_foreach(byval hash_table as GHashTable ptr, byval func as GHFunc, byval user_data as gpointer) 1496 declare function g_hash_table_find(byval hash_table as GHashTable ptr, byval predicate as GHRFunc, byval user_data as gpointer) as gpointer 1497 declare function g_hash_table_foreach_remove(byval hash_table as GHashTable ptr, byval func as GHRFunc, byval user_data as gpointer) as guint 1498 declare function g_hash_table_foreach_steal(byval hash_table as GHashTable ptr, byval func as GHRFunc, byval user_data as gpointer) as guint 1499 declare function g_hash_table_size(byval hash_table as GHashTable ptr) as guint 1500 declare function g_hash_table_get_keys(byval hash_table as GHashTable ptr) as GList ptr 1501 declare function g_hash_table_get_values(byval hash_table as GHashTable ptr) as GList ptr 1502 declare function g_hash_table_get_keys_as_array(byval hash_table as GHashTable ptr, byval length as guint ptr) as gpointer ptr 1503 declare sub g_hash_table_iter_init(byval iter as GHashTableIter ptr, byval hash_table as GHashTable ptr) 1504 declare function g_hash_table_iter_next(byval iter as GHashTableIter ptr, byval key as gpointer ptr, byval value as gpointer ptr) as gboolean 1505 declare function g_hash_table_iter_get_hash_table(byval iter as GHashTableIter ptr) as GHashTable ptr 1506 declare sub g_hash_table_iter_remove(byval iter as GHashTableIter ptr) 1507 declare sub g_hash_table_iter_replace(byval iter as GHashTableIter ptr, byval value as gpointer) 1508 declare sub g_hash_table_iter_steal(byval iter as GHashTableIter ptr) 1509 declare function g_hash_table_ref(byval hash_table as GHashTable ptr) as GHashTable ptr 1510 declare sub g_hash_table_unref(byval hash_table as GHashTable ptr) 1511 #define g_hash_table_freeze(hash_table) 0 1512 #define g_hash_table_thaw(hash_table) 0 1513 declare function g_str_equal(byval v1 as gconstpointer, byval v2 as gconstpointer) as gboolean 1514 declare function g_str_hash(byval v as gconstpointer) as guint 1515 declare function g_int_equal(byval v1 as gconstpointer, byval v2 as gconstpointer) as gboolean 1516 declare function g_int_hash(byval v as gconstpointer) as guint 1517 declare function g_int64_equal(byval v1 as gconstpointer, byval v2 as gconstpointer) as gboolean 1518 declare function g_int64_hash(byval v as gconstpointer) as guint 1519 declare function g_double_equal(byval v1 as gconstpointer, byval v2 as gconstpointer) as gboolean 1520 declare function g_double_hash(byval v as gconstpointer) as guint 1521 declare function g_direct_hash(byval v as gconstpointer) as guint 1522 declare function g_direct_equal(byval v1 as gconstpointer, byval v2 as gconstpointer) as gboolean 1523 #define __G_HMAC_H__ 1524 type GHmac as _GHmac 1525 declare function g_hmac_new(byval digest_type as GChecksumType, byval key as const guchar ptr, byval key_len as gsize) as GHmac ptr 1526 declare function g_hmac_copy(byval hmac as const GHmac ptr) as GHmac ptr 1527 declare function g_hmac_ref(byval hmac as GHmac ptr) as GHmac ptr 1528 declare sub g_hmac_unref(byval hmac as GHmac ptr) 1529 declare sub g_hmac_update(byval hmac as GHmac ptr, byval data as const guchar ptr, byval length as gssize) 1530 declare function g_hmac_get_string(byval hmac as GHmac ptr) as const gchar ptr 1531 declare sub g_hmac_get_digest(byval hmac as GHmac ptr, byval buffer as guint8 ptr, byval digest_len as gsize ptr) 1532 declare function g_compute_hmac_for_data(byval digest_type as GChecksumType, byval key as const guchar ptr, byval key_len as gsize, byval data as const guchar ptr, byval length as gsize) as gchar ptr 1533 declare function g_compute_hmac_for_string(byval digest_type as GChecksumType, byval key as const guchar ptr, byval key_len as gsize, byval str as const gchar ptr, byval length as gssize) as gchar ptr 1534 #define __G_HOOK_H__ 1535 1536 type GHook as _GHook 1537 type GHookList as _GHookList 1538 type GHookCompareFunc as function(byval new_hook as GHook ptr, byval sibling as GHook ptr) as gint 1539 type GHookFindFunc as function(byval hook as GHook ptr, byval data as gpointer) as gboolean 1540 type GHookMarshaller as sub(byval hook as GHook ptr, byval marshal_data as gpointer) 1541 type GHookCheckMarshaller as function(byval hook as GHook ptr, byval marshal_data as gpointer) as gboolean 1542 type GHookFunc as sub(byval data as gpointer) 1543 type GHookCheckFunc as function(byval data as gpointer) as gboolean 1544 type GHookFinalizeFunc as sub(byval hook_list as GHookList ptr, byval hook as GHook ptr) 1545 1546 type GHookFlagMask as long 1547 enum 1548 G_HOOK_FLAG_ACTIVE = 1 shl 0 1549 G_HOOK_FLAG_IN_CALL = 1 shl 1 1550 G_HOOK_FLAG_MASK = &h0f 1551 end enum 1552 1553 const G_HOOK_FLAG_USER_SHIFT = 4 1554 1555 type _GHookList 1556 seq_id as gulong 1557 hook_size : 16 as guint 1558 is_setup : 1 as guint 1559 hooks as GHook ptr 1560 dummy3 as gpointer 1561 finalize_hook as GHookFinalizeFunc 1562 dummy(0 to 1) as gpointer 1563 end type 1564 1565 type _GHook 1566 data as gpointer 1567 next as GHook ptr 1568 prev as GHook ptr 1569 ref_count as guint 1570 hook_id as gulong 1571 flags as guint 1572 func as gpointer 1573 destroy as GDestroyNotify 1574 end type 1575 1576 #define G_HOOK(hook) cptr(GHook ptr, (hook)) 1577 #define G_HOOK_FLAGS(hook) G_HOOK(hook)->flags 1578 #define G_HOOK_ACTIVE(hook) ((G_HOOK_FLAGS(hook) and G_HOOK_FLAG_ACTIVE) <> 0) 1579 #define G_HOOK_IN_CALL(hook) ((G_HOOK_FLAGS(hook) and G_HOOK_FLAG_IN_CALL) <> 0) 1580 #define G_HOOK_IS_VALID(hook) ((G_HOOK(hook)->hook_id <> 0) andalso (G_HOOK_FLAGS(hook) and G_HOOK_FLAG_ACTIVE)) 1581 #define G_HOOK_IS_UNLINKED(hook) ((((G_HOOK(hook)->next = NULL) andalso (G_HOOK(hook)->prev = NULL)) andalso (G_HOOK(hook)->hook_id = 0)) andalso (G_HOOK(hook)->ref_count = 0)) 1582 1583 declare sub g_hook_list_init(byval hook_list as GHookList ptr, byval hook_size as guint) 1584 declare sub g_hook_list_clear(byval hook_list as GHookList ptr) 1585 declare function g_hook_alloc(byval hook_list as GHookList ptr) as GHook ptr 1586 declare sub g_hook_free(byval hook_list as GHookList ptr, byval hook as GHook ptr) 1587 declare function g_hook_ref(byval hook_list as GHookList ptr, byval hook as GHook ptr) as GHook ptr 1588 declare sub g_hook_unref(byval hook_list as GHookList ptr, byval hook as GHook ptr) 1589 declare function g_hook_destroy(byval hook_list as GHookList ptr, byval hook_id as gulong) as gboolean 1590 declare sub g_hook_destroy_link(byval hook_list as GHookList ptr, byval hook as GHook ptr) 1591 declare sub g_hook_prepend(byval hook_list as GHookList ptr, byval hook as GHook ptr) 1592 declare sub g_hook_insert_before(byval hook_list as GHookList ptr, byval sibling as GHook ptr, byval hook as GHook ptr) 1593 declare sub g_hook_insert_sorted(byval hook_list as GHookList ptr, byval hook as GHook ptr, byval func as GHookCompareFunc) 1594 declare function g_hook_get(byval hook_list as GHookList ptr, byval hook_id as gulong) as GHook ptr 1595 declare function g_hook_find(byval hook_list as GHookList ptr, byval need_valids as gboolean, byval func as GHookFindFunc, byval data as gpointer) as GHook ptr 1596 declare function g_hook_find_data(byval hook_list as GHookList ptr, byval need_valids as gboolean, byval data as gpointer) as GHook ptr 1597 declare function g_hook_find_func(byval hook_list as GHookList ptr, byval need_valids as gboolean, byval func as gpointer) as GHook ptr 1598 declare function g_hook_find_func_data(byval hook_list as GHookList ptr, byval need_valids as gboolean, byval func as gpointer, byval data as gpointer) as GHook ptr 1599 declare function g_hook_first_valid(byval hook_list as GHookList ptr, byval may_be_in_call as gboolean) as GHook ptr 1600 declare function g_hook_next_valid(byval hook_list as GHookList ptr, byval hook as GHook ptr, byval may_be_in_call as gboolean) as GHook ptr 1601 declare function g_hook_compare_ids(byval new_hook as GHook ptr, byval sibling as GHook ptr) as gint 1602 #define g_hook_append(hook_list, hook) g_hook_insert_before((hook_list), NULL, (hook)) 1603 declare sub g_hook_list_invoke(byval hook_list as GHookList ptr, byval may_recurse as gboolean) 1604 declare sub g_hook_list_invoke_check(byval hook_list as GHookList ptr, byval may_recurse as gboolean) 1605 declare sub g_hook_list_marshal(byval hook_list as GHookList ptr, byval may_recurse as gboolean, byval marshaller as GHookMarshaller, byval marshal_data as gpointer) 1606 declare sub g_hook_list_marshal_check(byval hook_list as GHookList ptr, byval may_recurse as gboolean, byval marshaller as GHookCheckMarshaller, byval marshal_data as gpointer) 1607 #define __G_HOST_UTILS_H__ 1608 declare function g_hostname_is_non_ascii(byval hostname as const gchar ptr) as gboolean 1609 declare function g_hostname_is_ascii_encoded(byval hostname as const gchar ptr) as gboolean 1610 declare function g_hostname_is_ip_address(byval hostname as const gchar ptr) as gboolean 1611 declare function g_hostname_to_ascii(byval hostname as const gchar ptr) as gchar ptr 1612 declare function g_hostname_to_unicode(byval hostname as const gchar ptr) as gchar ptr 1613 1614 #define __G_IOCHANNEL_H__ 1615 #define __G_MAIN_H__ 1616 #define __G_POLL_H__ 1617 type GPollFD as _GPollFD 1618 type GPollFunc as function(byval ufds as GPollFD ptr, byval nfsd as guint, byval timeout_ as gint) as gint 1619 1620 type _GPollFD 1621 #if defined(__FB_WIN32__) and defined(__FB_64BIT__) 1622 fd as gint64 1623 #else 1624 fd as gint 1625 #endif 1626 1627 events as gushort 1628 revents as gushort 1629 end type 1630 1631 #ifdef __FB_UNIX__ 1632 #define G_POLLFD_FORMAT "%d" 1633 #elseif defined(__FB_WIN32__) and (not defined(__FB_64BIT__)) 1634 #define G_POLLFD_FORMAT "%#x" 1635 #else 1636 #define G_POLLFD_FORMAT "%#I64x" 1637 #endif 1638 1639 declare function g_poll(byval fds as GPollFD ptr, byval nfds as guint, byval timeout as gint) as gint 1640 #define __G_SLIST_H__ 1641 type GSList as _GSList 1642 1643 type _GSList 1644 data as gpointer 1645 next as GSList ptr 1646 end type 1647 1648 declare function g_slist_alloc() as GSList ptr 1649 declare sub g_slist_free(byval list as GSList ptr) 1650 declare sub g_slist_free_1(byval list as GSList ptr) 1651 declare sub g_slist_free1 alias "g_slist_free_1"(byval list as GSList ptr) 1652 declare sub g_slist_free_full(byval list as GSList ptr, byval free_func as GDestroyNotify) 1653 declare function g_slist_append(byval list as GSList ptr, byval data as gpointer) as GSList ptr 1654 declare function g_slist_prepend(byval list as GSList ptr, byval data as gpointer) as GSList ptr 1655 declare function g_slist_insert(byval list as GSList ptr, byval data as gpointer, byval position as gint) as GSList ptr 1656 declare function g_slist_insert_sorted(byval list as GSList ptr, byval data as gpointer, byval func as GCompareFunc) as GSList ptr 1657 declare function g_slist_insert_sorted_with_data(byval list as GSList ptr, byval data as gpointer, byval func as GCompareDataFunc, byval user_data as gpointer) as GSList ptr 1658 declare function g_slist_insert_before(byval slist as GSList ptr, byval sibling as GSList ptr, byval data as gpointer) as GSList ptr 1659 declare function g_slist_concat(byval list1 as GSList ptr, byval list2 as GSList ptr) as GSList ptr 1660 declare function g_slist_remove(byval list as GSList ptr, byval data as gconstpointer) as GSList ptr 1661 declare function g_slist_remove_all(byval list as GSList ptr, byval data as gconstpointer) as GSList ptr 1662 declare function g_slist_remove_link(byval list as GSList ptr, byval link_ as GSList ptr) as GSList ptr 1663 declare function g_slist_delete_link(byval list as GSList ptr, byval link_ as GSList ptr) as GSList ptr 1664 declare function g_slist_reverse(byval list as GSList ptr) as GSList ptr 1665 declare function g_slist_copy(byval list as GSList ptr) as GSList ptr 1666 declare function g_slist_copy_deep(byval list as GSList ptr, byval func as GCopyFunc, byval user_data as gpointer) as GSList ptr 1667 declare function g_slist_nth(byval list as GSList ptr, byval n as guint) as GSList ptr 1668 declare function g_slist_find(byval list as GSList ptr, byval data as gconstpointer) as GSList ptr 1669 declare function g_slist_find_custom(byval list as GSList ptr, byval data as gconstpointer, byval func as GCompareFunc) as GSList ptr 1670 declare function g_slist_position(byval list as GSList ptr, byval llink as GSList ptr) as gint 1671 declare function g_slist_index(byval list as GSList ptr, byval data as gconstpointer) as gint 1672 declare function g_slist_last(byval list as GSList ptr) as GSList ptr 1673 declare function g_slist_length(byval list as GSList ptr) as guint 1674 declare sub g_slist_foreach(byval list as GSList ptr, byval func as GFunc, byval user_data as gpointer) 1675 declare function g_slist_sort(byval list as GSList ptr, byval compare_func as GCompareFunc) as GSList ptr 1676 declare function g_slist_sort_with_data(byval list as GSList ptr, byval compare_func as GCompareDataFunc, byval user_data as gpointer) as GSList ptr 1677 declare function g_slist_nth_data(byval list as GSList ptr, byval n as guint) as gpointer 1678 #define g_slist_next(slist) iif((slist), cptr(GSList ptr, (slist))->next, NULL) 1679 1680 type GIOCondition as long 1681 enum 1682 G_IO_IN = 1 1683 G_IO_OUT = 4 1684 G_IO_PRI = 2 1685 G_IO_ERR = 8 1686 G_IO_HUP = 16 1687 G_IO_NVAL = 32 1688 end enum 1689 1690 type GMainContext as _GMainContext 1691 type GMainLoop as _GMainLoop 1692 type GSource as _GSource 1693 type GSourcePrivate as _GSourcePrivate 1694 type GSourceCallbackFuncs as _GSourceCallbackFuncs 1695 type GSourceFuncs as _GSourceFuncs 1696 type GSourceFunc as function(byval user_data as gpointer) as gboolean 1697 type GChildWatchFunc as sub(byval pid as GPid, byval status as gint, byval user_data as gpointer) 1698 1699 type _GSource 1700 callback_data as gpointer 1701 callback_funcs as GSourceCallbackFuncs ptr 1702 source_funcs as const GSourceFuncs ptr 1703 ref_count as guint 1704 context as GMainContext ptr 1705 priority as gint 1706 flags as guint 1707 source_id as guint 1708 poll_fds as GSList ptr 1709 prev as GSource ptr 1710 next as GSource ptr 1711 name as zstring ptr 1712 priv as GSourcePrivate ptr 1713 end type 1714 1715 type _GSourceCallbackFuncs 1716 ref as sub(byval cb_data as gpointer) 1717 unref as sub(byval cb_data as gpointer) 1718 get as sub(byval cb_data as gpointer, byval source as GSource ptr, byval func as GSourceFunc ptr, byval data as gpointer ptr) 1719 end type 1720 1721 type GSourceDummyMarshal as sub() 1722 1723 type _GSourceFuncs 1724 prepare as function(byval source as GSource ptr, byval timeout_ as gint ptr) as gboolean 1725 check as function(byval source as GSource ptr) as gboolean 1726 dispatch as function(byval source as GSource ptr, byval callback as GSourceFunc, byval user_data as gpointer) as gboolean 1727 finalize as sub(byval source as GSource ptr) 1728 closure_callback as GSourceFunc 1729 closure_marshal as GSourceDummyMarshal 1730 end type 1731 1732 const G_PRIORITY_HIGH = -100 1733 const G_PRIORITY_DEFAULT = 0 1734 const G_PRIORITY_HIGH_IDLE = 100 1735 const G_PRIORITY_DEFAULT_IDLE = 200 1736 const G_PRIORITY_LOW = 300 1737 const G_SOURCE_REMOVE = FALSE 1738 const G_SOURCE_CONTINUE = CTRUE 1739 1740 declare function g_main_context_new() as GMainContext ptr 1741 declare function g_main_context_ref(byval context as GMainContext ptr) as GMainContext ptr 1742 declare sub g_main_context_unref(byval context as GMainContext ptr) 1743 declare function g_main_context_default() as GMainContext ptr 1744 declare function g_main_context_iteration(byval context as GMainContext ptr, byval may_block as gboolean) as gboolean 1745 declare function g_main_context_pending(byval context as GMainContext ptr) as gboolean 1746 declare function g_main_context_find_source_by_id(byval context as GMainContext ptr, byval source_id as guint) as GSource ptr 1747 declare function g_main_context_find_source_by_user_data(byval context as GMainContext ptr, byval user_data as gpointer) as GSource ptr 1748 declare function g_main_context_find_source_by_funcs_user_data(byval context as GMainContext ptr, byval funcs as GSourceFuncs ptr, byval user_data as gpointer) as GSource ptr 1749 declare sub g_main_context_wakeup(byval context as GMainContext ptr) 1750 declare function g_main_context_acquire(byval context as GMainContext ptr) as gboolean 1751 declare sub g_main_context_release(byval context as GMainContext ptr) 1752 declare function g_main_context_is_owner(byval context as GMainContext ptr) as gboolean 1753 declare function g_main_context_wait(byval context as GMainContext ptr, byval cond as GCond ptr, byval mutex as GMutex ptr) as gboolean 1754 declare function g_main_context_prepare(byval context as GMainContext ptr, byval priority as gint ptr) as gboolean 1755 declare function g_main_context_query(byval context as GMainContext ptr, byval max_priority as gint, byval timeout_ as gint ptr, byval fds as GPollFD ptr, byval n_fds as gint) as gint 1756 declare function g_main_context_check(byval context as GMainContext ptr, byval max_priority as gint, byval fds as GPollFD ptr, byval n_fds as gint) as gint 1757 declare sub g_main_context_dispatch(byval context as GMainContext ptr) 1758 declare sub g_main_context_set_poll_func(byval context as GMainContext ptr, byval func as GPollFunc) 1759 declare function g_main_context_get_poll_func(byval context as GMainContext ptr) as GPollFunc 1760 declare sub g_main_context_add_poll(byval context as GMainContext ptr, byval fd as GPollFD ptr, byval priority as gint) 1761 declare sub g_main_context_remove_poll(byval context as GMainContext ptr, byval fd as GPollFD ptr) 1762 declare function g_main_depth() as gint 1763 declare function g_main_current_source() as GSource ptr 1764 declare sub g_main_context_push_thread_default(byval context as GMainContext ptr) 1765 declare sub g_main_context_pop_thread_default(byval context as GMainContext ptr) 1766 declare function g_main_context_get_thread_default() as GMainContext ptr 1767 declare function g_main_context_ref_thread_default() as GMainContext ptr 1768 declare function g_main_loop_new(byval context as GMainContext ptr, byval is_running as gboolean) as GMainLoop ptr 1769 declare sub g_main_loop_run(byval loop as GMainLoop ptr) 1770 declare sub g_main_loop_quit(byval loop as GMainLoop ptr) 1771 declare function g_main_loop_ref(byval loop as GMainLoop ptr) as GMainLoop ptr 1772 declare sub g_main_loop_unref(byval loop as GMainLoop ptr) 1773 declare function g_main_loop_is_running(byval loop as GMainLoop ptr) as gboolean 1774 declare function g_main_loop_get_context(byval loop as GMainLoop ptr) as GMainContext ptr 1775 declare function g_source_new(byval source_funcs as GSourceFuncs ptr, byval struct_size as guint) as GSource ptr 1776 declare function g_source_ref(byval source as GSource ptr) as GSource ptr 1777 declare sub g_source_unref(byval source as GSource ptr) 1778 declare function g_source_attach(byval source as GSource ptr, byval context as GMainContext ptr) as guint 1779 declare sub g_source_destroy(byval source as GSource ptr) 1780 declare sub g_source_set_priority(byval source as GSource ptr, byval priority as gint) 1781 declare function g_source_get_priority(byval source as GSource ptr) as gint 1782 declare sub g_source_set_can_recurse(byval source as GSource ptr, byval can_recurse as gboolean) 1783 declare function g_source_get_can_recurse(byval source as GSource ptr) as gboolean 1784 declare function g_source_get_id(byval source as GSource ptr) as guint 1785 declare function g_source_get_context(byval source as GSource ptr) as GMainContext ptr 1786 declare sub g_source_set_callback(byval source as GSource ptr, byval func as GSourceFunc, byval data as gpointer, byval notify as GDestroyNotify) 1787 declare sub g_source_set_funcs(byval source as GSource ptr, byval funcs as GSourceFuncs ptr) 1788 declare function g_source_is_destroyed(byval source as GSource ptr) as gboolean 1789 declare sub g_source_set_name(byval source as GSource ptr, byval name as const zstring ptr) 1790 declare function g_source_get_name(byval source as GSource ptr) as const zstring ptr 1791 declare sub g_source_set_name_by_id(byval tag as guint, byval name as const zstring ptr) 1792 declare sub g_source_set_ready_time(byval source as GSource ptr, byval ready_time as gint64) 1793 declare function g_source_get_ready_time(byval source as GSource ptr) as gint64 1794 1795 #ifdef __FB_UNIX__ 1796 declare function g_source_add_unix_fd(byval source as GSource ptr, byval fd as gint, byval events as GIOCondition) as gpointer 1797 declare sub g_source_modify_unix_fd(byval source as GSource ptr, byval tag as gpointer, byval new_events as GIOCondition) 1798 declare sub g_source_remove_unix_fd(byval source as GSource ptr, byval tag as gpointer) 1799 declare function g_source_query_unix_fd(byval source as GSource ptr, byval tag as gpointer) as GIOCondition 1800 #endif 1801 1802 declare sub g_source_set_callback_indirect(byval source as GSource ptr, byval callback_data as gpointer, byval callback_funcs as GSourceCallbackFuncs ptr) 1803 declare sub g_source_add_poll(byval source as GSource ptr, byval fd as GPollFD ptr) 1804 declare sub g_source_remove_poll(byval source as GSource ptr, byval fd as GPollFD ptr) 1805 declare sub g_source_add_child_source(byval source as GSource ptr, byval child_source as GSource ptr) 1806 declare sub g_source_remove_child_source(byval source as GSource ptr, byval child_source as GSource ptr) 1807 declare sub g_source_get_current_time(byval source as GSource ptr, byval timeval as GTimeVal ptr) 1808 declare function g_source_get_time(byval source as GSource ptr) as gint64 1809 declare function g_idle_source_new() as GSource ptr 1810 declare function g_child_watch_source_new(byval pid as GPid) as GSource ptr 1811 declare function g_timeout_source_new(byval interval as guint) as GSource ptr 1812 declare function g_timeout_source_new_seconds(byval interval as guint) as GSource ptr 1813 declare sub g_get_current_time(byval result as GTimeVal ptr) 1814 declare function g_get_monotonic_time() as gint64 1815 declare function g_get_real_time() as gint64 1816 declare function g_source_remove_ alias "g_source_remove"(byval tag as guint) as gboolean 1817 declare function g_source_remove_by_user_data(byval user_data as gpointer) as gboolean 1818 declare function g_source_remove_by_funcs_user_data(byval funcs as GSourceFuncs ptr, byval user_data as gpointer) as gboolean 1819 declare function g_timeout_add_full(byval priority as gint, byval interval as guint, byval function as GSourceFunc, byval data as gpointer, byval notify as GDestroyNotify) as guint 1820 declare function g_timeout_add(byval interval as guint, byval function as GSourceFunc, byval data as gpointer) as guint 1821 declare function g_timeout_add_seconds_full(byval priority as gint, byval interval as guint, byval function as GSourceFunc, byval data as gpointer, byval notify as GDestroyNotify) as guint 1822 declare function g_timeout_add_seconds(byval interval as guint, byval function as GSourceFunc, byval data as gpointer) as guint 1823 declare function g_child_watch_add_full(byval priority as gint, byval pid as GPid, byval function as GChildWatchFunc, byval data as gpointer, byval notify as GDestroyNotify) as guint 1824 declare function g_child_watch_add(byval pid as GPid, byval function as GChildWatchFunc, byval data as gpointer) as guint 1825 declare function g_idle_add(byval function as GSourceFunc, byval data as gpointer) as guint 1826 declare function g_idle_add_full(byval priority as gint, byval function as GSourceFunc, byval data as gpointer, byval notify as GDestroyNotify) as guint 1827 declare function g_idle_remove_by_data(byval data as gpointer) as gboolean 1828 declare sub g_main_context_invoke_full(byval context as GMainContext ptr, byval priority as gint, byval function as GSourceFunc, byval data as gpointer, byval notify as GDestroyNotify) 1829 declare sub g_main_context_invoke(byval context as GMainContext ptr, byval function as GSourceFunc, byval data as gpointer) 1830 1831 #if defined(__FB_DARWIN__) or (defined(__FB_WIN32__) and defined(GLIB_STATIC_COMPILATION)) or defined(__FB_LINUX__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__) 1832 extern g_timeout_funcs as GSourceFuncs 1833 extern g_child_watch_funcs as GSourceFuncs 1834 extern g_idle_funcs as GSourceFuncs 1835 #endif 1836 1837 #if defined(__FB_DARWIN__) or defined(__FB_LINUX__) or defined(__FB_FREEBSD__) or defined(__FB_OPENBSD__) or defined(__FB_NETBSD__) 1838 extern g_unix_signal_funcs as GSourceFuncs 1839 extern g_unix_fd_source_funcs as GSourceFuncs 1840 #elseif (defined(__FB_WIN32__) and (not defined(GLIB_STATIC_COMPILATION))) or defined(__FB_CYGWIN__) 1841 extern import g_timeout_funcs as GSourceFuncs 1842 extern import g_child_watch_funcs as GSourceFuncs 1843 extern import g_idle_funcs as GSourceFuncs 1844 #endif 1845 1846 #ifdef __FB_CYGWIN__ 1847 extern import g_unix_signal_funcs as GSourceFuncs 1848 extern import g_unix_fd_source_funcs as GSourceFuncs 1849 #endif 1850 1851 #define __G_STRING_H__ 1852 #define __G_UNICODE_H__ 1853 type gunichar as guint32 1854 type gunichar2 as guint16 1855 1856 type GUnicodeType as long 1857 enum 1858 G_UNICODE_CONTROL 1859 G_UNICODE_FORMAT 1860 G_UNICODE_UNASSIGNED 1861 G_UNICODE_PRIVATE_USE 1862 G_UNICODE_SURROGATE 1863 G_UNICODE_LOWERCASE_LETTER 1864 G_UNICODE_MODIFIER_LETTER 1865 G_UNICODE_OTHER_LETTER 1866 G_UNICODE_TITLECASE_LETTER 1867 G_UNICODE_UPPERCASE_LETTER 1868 G_UNICODE_SPACING_MARK 1869 G_UNICODE_ENCLOSING_MARK 1870 G_UNICODE_NON_SPACING_MARK 1871 G_UNICODE_DECIMAL_NUMBER 1872 G_UNICODE_LETTER_NUMBER 1873 G_UNICODE_OTHER_NUMBER 1874 G_UNICODE_CONNECT_PUNCTUATION 1875 G_UNICODE_DASH_PUNCTUATION 1876 G_UNICODE_CLOSE_PUNCTUATION 1877 G_UNICODE_FINAL_PUNCTUATION 1878 G_UNICODE_INITIAL_PUNCTUATION 1879 G_UNICODE_OTHER_PUNCTUATION 1880 G_UNICODE_OPEN_PUNCTUATION 1881 G_UNICODE_CURRENCY_SYMBOL 1882 G_UNICODE_MODIFIER_SYMBOL 1883 G_UNICODE_MATH_SYMBOL 1884 G_UNICODE_OTHER_SYMBOL 1885 G_UNICODE_LINE_SEPARATOR 1886 G_UNICODE_PARAGRAPH_SEPARATOR 1887 G_UNICODE_SPACE_SEPARATOR 1888 end enum 1889 1890 const G_UNICODE_COMBINING_MARK = G_UNICODE_SPACING_MARK 1891 1892 type GUnicodeBreakType as long 1893 enum 1894 G_UNICODE_BREAK_MANDATORY 1895 G_UNICODE_BREAK_CARRIAGE_RETURN 1896 G_UNICODE_BREAK_LINE_FEED 1897 G_UNICODE_BREAK_COMBINING_MARK 1898 G_UNICODE_BREAK_SURROGATE 1899 G_UNICODE_BREAK_ZERO_WIDTH_SPACE 1900 G_UNICODE_BREAK_INSEPARABLE 1901 G_UNICODE_BREAK_NON_BREAKING_GLUE 1902 G_UNICODE_BREAK_CONTINGENT 1903 G_UNICODE_BREAK_SPACE 1904 G_UNICODE_BREAK_AFTER 1905 G_UNICODE_BREAK_BEFORE 1906 G_UNICODE_BREAK_BEFORE_AND_AFTER 1907 G_UNICODE_BREAK_HYPHEN 1908 G_UNICODE_BREAK_NON_STARTER 1909 G_UNICODE_BREAK_OPEN_PUNCTUATION 1910 G_UNICODE_BREAK_CLOSE_PUNCTUATION 1911 G_UNICODE_BREAK_QUOTATION 1912 G_UNICODE_BREAK_EXCLAMATION 1913 G_UNICODE_BREAK_IDEOGRAPHIC 1914 G_UNICODE_BREAK_NUMERIC 1915 G_UNICODE_BREAK_INFIX_SEPARATOR 1916 G_UNICODE_BREAK_SYMBOL 1917 G_UNICODE_BREAK_ALPHABETIC 1918 G_UNICODE_BREAK_PREFIX 1919 G_UNICODE_BREAK_POSTFIX 1920 G_UNICODE_BREAK_COMPLEX_CONTEXT 1921 G_UNICODE_BREAK_AMBIGUOUS 1922 G_UNICODE_BREAK_UNKNOWN 1923 G_UNICODE_BREAK_NEXT_LINE 1924 G_UNICODE_BREAK_WORD_JOINER 1925 G_UNICODE_BREAK_HANGUL_L_JAMO 1926 G_UNICODE_BREAK_HANGUL_V_JAMO 1927 G_UNICODE_BREAK_HANGUL_T_JAMO 1928 G_UNICODE_BREAK_HANGUL_LV_SYLLABLE 1929 G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE 1930 G_UNICODE_BREAK_CLOSE_PARANTHESIS 1931 G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER 1932 G_UNICODE_BREAK_HEBREW_LETTER 1933 G_UNICODE_BREAK_REGIONAL_INDICATOR 1934 end enum 1935 1936 type GUnicodeScript as long 1937 enum 1938 G_UNICODE_SCRIPT_INVALID_CODE = -1 1939 G_UNICODE_SCRIPT_COMMON = 0 1940 G_UNICODE_SCRIPT_INHERITED 1941 G_UNICODE_SCRIPT_ARABIC 1942 G_UNICODE_SCRIPT_ARMENIAN 1943 G_UNICODE_SCRIPT_BENGALI 1944 G_UNICODE_SCRIPT_BOPOMOFO 1945 G_UNICODE_SCRIPT_CHEROKEE 1946 G_UNICODE_SCRIPT_COPTIC 1947 G_UNICODE_SCRIPT_CYRILLIC 1948 G_UNICODE_SCRIPT_DESERET 1949 G_UNICODE_SCRIPT_DEVANAGARI 1950 G_UNICODE_SCRIPT_ETHIOPIC 1951 G_UNICODE_SCRIPT_GEORGIAN 1952 G_UNICODE_SCRIPT_GOTHIC 1953 G_UNICODE_SCRIPT_GREEK 1954 G_UNICODE_SCRIPT_GUJARATI 1955 G_UNICODE_SCRIPT_GURMUKHI 1956 G_UNICODE_SCRIPT_HAN 1957 G_UNICODE_SCRIPT_HANGUL 1958 G_UNICODE_SCRIPT_HEBREW 1959 G_UNICODE_SCRIPT_HIRAGANA 1960 G_UNICODE_SCRIPT_KANNADA 1961 G_UNICODE_SCRIPT_KATAKANA 1962 G_UNICODE_SCRIPT_KHMER 1963 G_UNICODE_SCRIPT_LAO 1964 G_UNICODE_SCRIPT_LATIN 1965 G_UNICODE_SCRIPT_MALAYALAM 1966 G_UNICODE_SCRIPT_MONGOLIAN 1967 G_UNICODE_SCRIPT_MYANMAR 1968 G_UNICODE_SCRIPT_OGHAM 1969 G_UNICODE_SCRIPT_OLD_ITALIC 1970 G_UNICODE_SCRIPT_ORIYA 1971 G_UNICODE_SCRIPT_RUNIC 1972 G_UNICODE_SCRIPT_SINHALA 1973 G_UNICODE_SCRIPT_SYRIAC 1974 G_UNICODE_SCRIPT_TAMIL 1975 G_UNICODE_SCRIPT_TELUGU 1976 G_UNICODE_SCRIPT_THAANA 1977 G_UNICODE_SCRIPT_THAI 1978 G_UNICODE_SCRIPT_TIBETAN 1979 G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL 1980 G_UNICODE_SCRIPT_YI 1981 G_UNICODE_SCRIPT_TAGALOG 1982 G_UNICODE_SCRIPT_HANUNOO 1983 G_UNICODE_SCRIPT_BUHID 1984 G_UNICODE_SCRIPT_TAGBANWA 1985 G_UNICODE_SCRIPT_BRAILLE 1986 G_UNICODE_SCRIPT_CYPRIOT 1987 G_UNICODE_SCRIPT_LIMBU 1988 G_UNICODE_SCRIPT_OSMANYA 1989 G_UNICODE_SCRIPT_SHAVIAN 1990 G_UNICODE_SCRIPT_LINEAR_B 1991 G_UNICODE_SCRIPT_TAI_LE 1992 G_UNICODE_SCRIPT_UGARITIC 1993 G_UNICODE_SCRIPT_NEW_TAI_LUE 1994 G_UNICODE_SCRIPT_BUGINESE 1995 G_UNICODE_SCRIPT_GLAGOLITIC 1996 G_UNICODE_SCRIPT_TIFINAGH 1997 G_UNICODE_SCRIPT_SYLOTI_NAGRI 1998 G_UNICODE_SCRIPT_OLD_PERSIAN 1999 G_UNICODE_SCRIPT_KHAROSHTHI 2000 G_UNICODE_SCRIPT_UNKNOWN 2001 G_UNICODE_SCRIPT_BALINESE 2002 G_UNICODE_SCRIPT_CUNEIFORM 2003 G_UNICODE_SCRIPT_PHOENICIAN 2004 G_UNICODE_SCRIPT_PHAGS_PA 2005 G_UNICODE_SCRIPT_NKO 2006 G_UNICODE_SCRIPT_KAYAH_LI 2007 G_UNICODE_SCRIPT_LEPCHA 2008 G_UNICODE_SCRIPT_REJANG 2009 G_UNICODE_SCRIPT_SUNDANESE 2010 G_UNICODE_SCRIPT_SAURASHTRA 2011 G_UNICODE_SCRIPT_CHAM 2012 G_UNICODE_SCRIPT_OL_CHIKI 2013 G_UNICODE_SCRIPT_VAI 2014 G_UNICODE_SCRIPT_CARIAN 2015 G_UNICODE_SCRIPT_LYCIAN 2016 G_UNICODE_SCRIPT_LYDIAN 2017 G_UNICODE_SCRIPT_AVESTAN 2018 G_UNICODE_SCRIPT_BAMUM 2019 G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS 2020 G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC 2021 G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI 2022 G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN 2023 G_UNICODE_SCRIPT_JAVANESE 2024 G_UNICODE_SCRIPT_KAITHI 2025 G_UNICODE_SCRIPT_LISU 2026 G_UNICODE_SCRIPT_MEETEI_MAYEK 2027 G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN 2028 G_UNICODE_SCRIPT_OLD_TURKIC 2029 G_UNICODE_SCRIPT_SAMARITAN 2030 G_UNICODE_SCRIPT_TAI_THAM 2031 G_UNICODE_SCRIPT_TAI_VIET 2032 G_UNICODE_SCRIPT_BATAK 2033 G_UNICODE_SCRIPT_BRAHMI 2034 G_UNICODE_SCRIPT_MANDAIC 2035 G_UNICODE_SCRIPT_CHAKMA 2036 G_UNICODE_SCRIPT_MEROITIC_CURSIVE 2037 G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS 2038 G_UNICODE_SCRIPT_MIAO 2039 G_UNICODE_SCRIPT_SHARADA 2040 G_UNICODE_SCRIPT_SORA_SOMPENG 2041 G_UNICODE_SCRIPT_TAKRI 2042 G_UNICODE_SCRIPT_BASSA_VAH 2043 G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN 2044 G_UNICODE_SCRIPT_DUPLOYAN 2045 G_UNICODE_SCRIPT_ELBASAN 2046 G_UNICODE_SCRIPT_GRANTHA 2047 G_UNICODE_SCRIPT_KHOJKI 2048 G_UNICODE_SCRIPT_KHUDAWADI 2049 G_UNICODE_SCRIPT_LINEAR_A 2050 G_UNICODE_SCRIPT_MAHAJANI 2051 G_UNICODE_SCRIPT_MANICHAEAN 2052 G_UNICODE_SCRIPT_MENDE_KIKAKUI 2053 G_UNICODE_SCRIPT_MODI 2054 G_UNICODE_SCRIPT_MRO 2055 G_UNICODE_SCRIPT_NABATAEAN 2056 G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN 2057 G_UNICODE_SCRIPT_OLD_PERMIC 2058 G_UNICODE_SCRIPT_PAHAWH_HMONG 2059 G_UNICODE_SCRIPT_PALMYRENE 2060 G_UNICODE_SCRIPT_PAU_CIN_HAU 2061 G_UNICODE_SCRIPT_PSALTER_PAHLAVI 2062 G_UNICODE_SCRIPT_SIDDHAM 2063 G_UNICODE_SCRIPT_TIRHUTA 2064 G_UNICODE_SCRIPT_WARANG_CITI 2065 end enum 2066 2067 declare function g_unicode_script_to_iso15924(byval script as GUnicodeScript) as guint32 2068 declare function g_unicode_script_from_iso15924(byval iso15924 as guint32) as GUnicodeScript 2069 declare function g_unichar_isalnum(byval c as gunichar) as gboolean 2070 declare function g_unichar_isalpha(byval c as gunichar) as gboolean 2071 declare function g_unichar_iscntrl(byval c as gunichar) as gboolean 2072 declare function g_unichar_isdigit(byval c as gunichar) as gboolean 2073 declare function g_unichar_isgraph(byval c as gunichar) as gboolean 2074 declare function g_unichar_islower(byval c as gunichar) as gboolean 2075 declare function g_unichar_isprint(byval c as gunichar) as gboolean 2076 declare function g_unichar_ispunct(byval c as gunichar) as gboolean 2077 declare function g_unichar_isspace(byval c as gunichar) as gboolean 2078 declare function g_unichar_isupper(byval c as gunichar) as gboolean 2079 declare function g_unichar_isxdigit(byval c as gunichar) as gboolean 2080 declare function g_unichar_istitle(byval c as gunichar) as gboolean 2081 declare function g_unichar_isdefined(byval c as gunichar) as gboolean 2082 declare function g_unichar_iswide(byval c as gunichar) as gboolean 2083 declare function g_unichar_iswide_cjk(byval c as gunichar) as gboolean 2084 declare function g_unichar_iszerowidth(byval c as gunichar) as gboolean 2085 declare function g_unichar_ismark(byval c as gunichar) as gboolean 2086 declare function g_unichar_toupper(byval c as gunichar) as gunichar 2087 declare function g_unichar_tolower(byval c as gunichar) as gunichar 2088 declare function g_unichar_totitle(byval c as gunichar) as gunichar 2089 declare function g_unichar_digit_value(byval c as gunichar) as gint 2090 declare function g_unichar_xdigit_value(byval c as gunichar) as gint 2091 declare function g_unichar_type(byval c as gunichar) as GUnicodeType 2092 declare function g_unichar_break_type(byval c as gunichar) as GUnicodeBreakType 2093 declare function g_unichar_combining_class(byval uc as gunichar) as gint 2094 declare function g_unichar_get_mirror_char(byval ch as gunichar, byval mirrored_ch as gunichar ptr) as gboolean 2095 declare function g_unichar_get_script(byval ch as gunichar) as GUnicodeScript 2096 declare function g_unichar_validate(byval ch as gunichar) as gboolean 2097 declare function g_unichar_compose(byval a as gunichar, byval b as gunichar, byval ch as gunichar ptr) as gboolean 2098 declare function g_unichar_decompose(byval ch as gunichar, byval a as gunichar ptr, byval b as gunichar ptr) as gboolean 2099 declare function g_unichar_fully_decompose(byval ch as gunichar, byval compat as gboolean, byval result as gunichar ptr, byval result_len as gsize) as gsize 2100 const G_UNICHAR_MAX_DECOMPOSITION_LENGTH = 18 2101 declare sub g_unicode_canonical_ordering(byval string as gunichar ptr, byval len as gsize) 2102 declare function g_unicode_canonical_decomposition(byval ch as gunichar, byval result_len as gsize ptr) as gunichar ptr 2103 2104 #if (defined(__FB_WIN32__) and (not defined(GLIB_STATIC_COMPILATION))) or defined(__FB_CYGWIN__) 2105 extern import g_utf8_skip as const gchar const ptr 2106 #else 2107 extern g_utf8_skip as const gchar const ptr 2108 #endif 2109 2110 #define g_utf8_next_char(p) cptr(zstring ptr, (p) + g_utf8_skip[(*cptr(const guchar ptr, (p)))]) 2111 declare function g_utf8_get_char(byval p as const gchar ptr) as gunichar 2112 declare function g_utf8_get_char_validated(byval p as const gchar ptr, byval max_len as gssize) as gunichar 2113 declare function g_utf8_offset_to_pointer(byval str as const gchar ptr, byval offset as glong) as gchar ptr 2114 declare function g_utf8_pointer_to_offset(byval str as const gchar ptr, byval pos as const gchar ptr) as glong 2115 declare function g_utf8_prev_char(byval p as const gchar ptr) as gchar ptr 2116 declare function g_utf8_find_next_char(byval p as const gchar ptr, byval end as const gchar ptr) as gchar ptr 2117 declare function g_utf8_find_prev_char(byval str as const gchar ptr, byval p as const gchar ptr) as gchar ptr 2118 declare function g_utf8_strlen(byval p as const gchar ptr, byval max as gssize) as glong 2119 declare function g_utf8_substring(byval str as const gchar ptr, byval start_pos as glong, byval end_pos as glong) as gchar ptr 2120 declare function g_utf8_strncpy(byval dest as gchar ptr, byval src as const gchar ptr, byval n as gsize) as gchar ptr 2121 declare function g_utf8_strchr(byval p as const gchar ptr, byval len as gssize, byval c as gunichar) as gchar ptr 2122 declare function g_utf8_strrchr(byval p as const gchar ptr, byval len as gssize, byval c as gunichar) as gchar ptr 2123 declare function g_utf8_strreverse(byval str as const gchar ptr, byval len as gssize) as gchar ptr 2124 declare function g_utf8_to_utf16(byval str as const gchar ptr, byval len as glong, byval items_read as glong ptr, byval items_written as glong ptr, byval error as GError ptr ptr) as gunichar2 ptr 2125 declare function g_utf8_to_ucs4(byval str as const gchar ptr, byval len as glong, byval items_read as glong ptr, byval items_written as glong ptr, byval error as GError ptr ptr) as gunichar ptr 2126 declare function g_utf8_to_ucs4_fast(byval str as const gchar ptr, byval len as glong, byval items_written as glong ptr) as gunichar ptr 2127 declare function g_utf16_to_ucs4(byval str as const gunichar2 ptr, byval len as glong, byval items_read as glong ptr, byval items_written as glong ptr, byval error as GError ptr ptr) as gunichar ptr 2128 declare function g_utf16_to_utf8(byval str as const gunichar2 ptr, byval len as glong, byval items_read as glong ptr, byval items_written as glong ptr, byval error as GError ptr ptr) as gchar ptr 2129 declare function g_ucs4_to_utf16(byval str as const gunichar ptr, byval len as glong, byval items_read as glong ptr, byval items_written as glong ptr, byval error as GError ptr ptr) as gunichar2 ptr 2130 declare function g_ucs4_to_utf8(byval str as const gunichar ptr, byval len as glong, byval items_read as glong ptr, byval items_written as glong ptr, byval error as GError ptr ptr) as gchar ptr 2131 declare function g_unichar_to_utf8(byval c as gunichar, byval outbuf as gchar ptr) as gint 2132 declare function g_utf8_validate(byval str as const gchar ptr, byval max_len as gssize, byval end as const gchar ptr ptr) as gboolean 2133 declare function g_utf8_strup(byval str as const gchar ptr, byval len as gssize) as gchar ptr 2134 declare function g_utf8_strdown(byval str as const gchar ptr, byval len as gssize) as gchar ptr 2135 declare function g_utf8_casefold(byval str as const gchar ptr, byval len as gssize) as gchar ptr 2136 2137 type GNormalizeMode as long 2138 enum 2139 G_NORMALIZE_DEFAULT 2140 G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT 2141 G_NORMALIZE_DEFAULT_COMPOSE 2142 G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE 2143 G_NORMALIZE_ALL 2144 G_NORMALIZE_NFKD = G_NORMALIZE_ALL 2145 G_NORMALIZE_ALL_COMPOSE 2146 G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE 2147 end enum 2148 2149 declare function g_utf8_normalize(byval str as const gchar ptr, byval len as gssize, byval mode as GNormalizeMode) as gchar ptr 2150 declare function g_utf8_collate(byval str1 as const gchar ptr, byval str2 as const gchar ptr) as gint 2151 declare function g_utf8_collate_key(byval str as const gchar ptr, byval len as gssize) as gchar ptr 2152 declare function g_utf8_collate_key_for_filename(byval str as const gchar ptr, byval len as gssize) as gchar ptr 2153 declare function _g_utf8_make_valid(byval name as const gchar ptr) as gchar ptr 2154 type GString as _GString 2155 2156 type _GString 2157 str as gchar ptr 2158 len as gsize 2159 allocated_len as gsize 2160 end type 2161 2162 declare function g_string_new(byval init as const gchar ptr) as GString ptr 2163 declare function g_string_new_len(byval init as const gchar ptr, byval len as gssize) as GString ptr 2164 declare function g_string_sized_new(byval dfl_size as gsize) as GString ptr 2165 declare function g_string_free(byval string as GString ptr, byval free_segment as gboolean) as gchar ptr 2166 declare function g_string_free_to_bytes(byval string as GString ptr) as GBytes ptr 2167 declare function g_string_equal(byval v as const GString ptr, byval v2 as const GString ptr) as gboolean 2168 declare function g_string_hash(byval str as const GString ptr) as guint 2169 declare function g_string_assign(byval string as GString ptr, byval rval as const gchar ptr) as GString ptr 2170 declare function g_string_truncate(byval string as GString ptr, byval len as gsize) as GString ptr 2171 declare function g_string_set_size(byval string as GString ptr, byval len as gsize) as GString ptr 2172 declare function g_string_insert_len(byval string as GString ptr, byval pos as gssize, byval val as const gchar ptr, byval len as gssize) as GString ptr 2173 declare function g_string_append(byval string as GString ptr, byval val as const gchar ptr) as GString ptr 2174 declare function g_string_append_len(byval string as GString ptr, byval val as const gchar ptr, byval len as gssize) as GString ptr 2175 declare function g_string_append_c(byval string as GString ptr, byval c as byte) as GString ptr 2176 declare function g_string_append_unichar(byval string as GString ptr, byval wc as gunichar) as GString ptr 2177 declare function g_string_prepend(byval string as GString ptr, byval val as const gchar ptr) as GString ptr 2178 declare function g_string_prepend_c(byval string as GString ptr, byval c as byte) as GString ptr 2179 declare function g_string_prepend_unichar(byval string as GString ptr, byval wc as gunichar) as GString ptr 2180 declare function g_string_prepend_len(byval string as GString ptr, byval val as const gchar ptr, byval len as gssize) as GString ptr 2181 declare function g_string_insert(byval string as GString ptr, byval pos as gssize, byval val as const gchar ptr) as GString ptr 2182 declare function g_string_insert_c(byval string as GString ptr, byval pos as gssize, byval c as byte) as GString ptr 2183 declare function g_string_insert_unichar(byval string as GString ptr, byval pos as gssize, byval wc as gunichar) as GString ptr 2184 declare function g_string_overwrite(byval string as GString ptr, byval pos as gsize, byval val as const gchar ptr) as GString ptr 2185 declare function g_string_overwrite_len(byval string as GString ptr, byval pos as gsize, byval val as const gchar ptr, byval len as gssize) as GString ptr 2186 declare function g_string_erase(byval string as GString ptr, byval pos as gssize, byval len as gssize) as GString ptr 2187 declare function g_string_ascii_down(byval string as GString ptr) as GString ptr 2188 declare function g_string_ascii_up(byval string as GString ptr) as GString ptr 2189 declare sub g_string_vprintf(byval string as GString ptr, byval format as const gchar ptr, byval args as va_list) 2190 declare sub g_string_printf(byval string as GString ptr, byval format as const gchar ptr, ...) 2191 declare sub g_string_append_vprintf(byval string as GString ptr, byval format as const gchar ptr, byval args as va_list) 2192 declare sub g_string_append_printf(byval string as GString ptr, byval format as const gchar ptr, ...) 2193 declare function g_string_append_uri_escaped(byval string as GString ptr, byval unescaped as const gchar ptr, byval reserved_chars_allowed as const gchar ptr, byval allow_utf8 as gboolean) as GString ptr 2194 declare function g_string_down(byval string as GString ptr) as GString ptr 2195 declare function g_string_up(byval string as GString ptr) as GString ptr 2196 declare sub g_string_sprintf alias "g_string_printf"(byval string as GString ptr, byval format as const gchar ptr, ...) 2197 declare sub g_string_sprintfa alias "g_string_append_printf"(byval string as GString ptr, byval format as const gchar ptr, ...) 2198 type GIOChannel as _GIOChannel 2199 type GIOFuncs as _GIOFuncs 2200 2201 type GIOError as long 2202 enum 2203 G_IO_ERROR_NONE 2204 G_IO_ERROR_AGAIN 2205 G_IO_ERROR_INVAL 2206 G_IO_ERROR_UNKNOWN 2207 end enum 2208 2209 #define G_IO_CHANNEL_ERROR g_io_channel_error_quark() 2210 2211 type GIOChannelError as long 2212 enum 2213 G_IO_CHANNEL_ERROR_FBIG 2214 G_IO_CHANNEL_ERROR_INVAL 2215 G_IO_CHANNEL_ERROR_IO 2216 G_IO_CHANNEL_ERROR_ISDIR 2217 G_IO_CHANNEL_ERROR_NOSPC 2218 G_IO_CHANNEL_ERROR_NXIO 2219 G_IO_CHANNEL_ERROR_OVERFLOW 2220 G_IO_CHANNEL_ERROR_PIPE 2221 G_IO_CHANNEL_ERROR_FAILED 2222 end enum 2223 2224 type GIOStatus as long 2225 enum 2226 G_IO_STATUS_ERROR 2227 G_IO_STATUS_NORMAL 2228 G_IO_STATUS_EOF 2229 G_IO_STATUS_AGAIN 2230 end enum 2231 2232 type GSeekType as long 2233 enum 2234 G_SEEK_CUR 2235 G_SEEK_SET 2236 G_SEEK_END 2237 end enum 2238 2239 type GIOFlags as long 2240 enum 2241 G_IO_FLAG_APPEND = 1 shl 0 2242 G_IO_FLAG_NONBLOCK = 1 shl 1 2243 G_IO_FLAG_IS_READABLE = 1 shl 2 2244 G_IO_FLAG_IS_WRITABLE = 1 shl 3 2245 G_IO_FLAG_IS_WRITEABLE = 1 shl 3 2246 G_IO_FLAG_IS_SEEKABLE = 1 shl 4 2247 G_IO_FLAG_MASK = (1 shl 5) - 1 2248 G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK 2249 G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND or G_IO_FLAG_NONBLOCK 2250 end enum 2251 2252 type _GIOChannel 2253 ref_count as gint 2254 funcs as GIOFuncs ptr 2255 encoding as gchar ptr 2256 read_cd as GIConv 2257 write_cd as GIConv 2258 line_term as gchar ptr 2259 line_term_len as guint 2260 buf_size as gsize 2261 read_buf as GString ptr 2262 encoded_read_buf as GString ptr 2263 write_buf as GString ptr 2264 partial_write_buf as zstring * 6 2265 use_buffer : 1 as guint 2266 do_encode : 1 as guint 2267 close_on_unref : 1 as guint 2268 is_readable : 1 as guint 2269 is_writeable : 1 as guint 2270 is_seekable : 1 as guint 2271 reserved1 as gpointer 2272 reserved2 as gpointer 2273 end type 2274 2275 type GIOFunc as function(byval source as GIOChannel ptr, byval condition as GIOCondition, byval data as gpointer) as gboolean 2276 2277 type _GIOFuncs 2278 io_read as function(byval channel as GIOChannel ptr, byval buf as gchar ptr, byval count as gsize, byval bytes_read as gsize ptr, byval err as GError ptr ptr) as GIOStatus 2279 io_write as function(byval channel as GIOChannel ptr, byval buf as const gchar ptr, byval count as gsize, byval bytes_written as gsize ptr, byval err as GError ptr ptr) as GIOStatus 2280 io_seek as function(byval channel as GIOChannel ptr, byval offset as gint64, byval type as GSeekType, byval err as GError ptr ptr) as GIOStatus 2281 io_close as function(byval channel as GIOChannel ptr, byval err as GError ptr ptr) as GIOStatus 2282 io_create_watch as function(byval channel as GIOChannel ptr, byval condition as GIOCondition) as GSource ptr 2283 io_free as sub(byval channel as GIOChannel ptr) 2284 io_set_flags as function(byval channel as GIOChannel ptr, byval flags as GIOFlags, byval err as GError ptr ptr) as GIOStatus 2285 io_get_flags as function(byval channel as GIOChannel ptr) as GIOFlags 2286 end type 2287 2288 declare sub g_io_channel_init(byval channel as GIOChannel ptr) 2289 declare function g_io_channel_ref(byval channel as GIOChannel ptr) as GIOChannel ptr 2290 declare sub g_io_channel_unref(byval channel as GIOChannel ptr) 2291 declare function g_io_channel_read(byval channel as GIOChannel ptr, byval buf as gchar ptr, byval count as gsize, byval bytes_read as gsize ptr) as GIOError 2292 declare function g_io_channel_write(byval channel as GIOChannel ptr, byval buf as const gchar ptr, byval count as gsize, byval bytes_written as gsize ptr) as GIOError 2293 declare function g_io_channel_seek(byval channel as GIOChannel ptr, byval offset as gint64, byval type as GSeekType) as GIOError 2294 declare sub g_io_channel_close(byval channel as GIOChannel ptr) 2295 declare function g_io_channel_shutdown(byval channel as GIOChannel ptr, byval flush as gboolean, byval err as GError ptr ptr) as GIOStatus 2296 declare function g_io_add_watch_full(byval channel as GIOChannel ptr, byval priority as gint, byval condition as GIOCondition, byval func as GIOFunc, byval user_data as gpointer, byval notify as GDestroyNotify) as guint 2297 declare function g_io_create_watch(byval channel as GIOChannel ptr, byval condition as GIOCondition) as GSource ptr 2298 declare function g_io_add_watch(byval channel as GIOChannel ptr, byval condition as GIOCondition, byval func as GIOFunc, byval user_data as gpointer) as guint 2299 declare sub g_io_channel_set_buffer_size(byval channel as GIOChannel ptr, byval size as gsize) 2300 declare function g_io_channel_get_buffer_size(byval channel as GIOChannel ptr) as gsize 2301 declare function g_io_channel_get_buffer_condition(byval channel as GIOChannel ptr) as GIOCondition 2302 declare function g_io_channel_set_flags(byval channel as GIOChannel ptr, byval flags as GIOFlags, byval error as GError ptr ptr) as GIOStatus 2303 declare function g_io_channel_get_flags(byval channel as GIOChannel ptr) as GIOFlags 2304 declare sub g_io_channel_set_line_term(byval channel as GIOChannel ptr, byval line_term as const gchar ptr, byval length as gint) 2305 declare function g_io_channel_get_line_term(byval channel as GIOChannel ptr, byval length as gint ptr) as const gchar ptr 2306 declare sub g_io_channel_set_buffered(byval channel as GIOChannel ptr, byval buffered as gboolean) 2307 declare function g_io_channel_get_buffered(byval channel as GIOChannel ptr) as gboolean 2308 declare function g_io_channel_set_encoding(byval channel as GIOChannel ptr, byval encoding as const gchar ptr, byval error as GError ptr ptr) as GIOStatus 2309 declare function g_io_channel_get_encoding(byval channel as GIOChannel ptr) as const gchar ptr 2310 declare sub g_io_channel_set_close_on_unref(byval channel as GIOChannel ptr, byval do_close as gboolean) 2311 declare function g_io_channel_get_close_on_unref(byval channel as GIOChannel ptr) as gboolean 2312 declare function g_io_channel_flush(byval channel as GIOChannel ptr, byval error as GError ptr ptr) as GIOStatus 2313 declare function g_io_channel_read_line(byval channel as GIOChannel ptr, byval str_return as gchar ptr ptr, byval length as gsize ptr, byval terminator_pos as gsize ptr, byval error as GError ptr ptr) as GIOStatus 2314 declare function g_io_channel_read_line_string(byval channel as GIOChannel ptr, byval buffer as GString ptr, byval terminator_pos as gsize ptr, byval error as GError ptr ptr) as GIOStatus 2315 declare function g_io_channel_read_to_end(byval channel as GIOChannel ptr, byval str_return as gchar ptr ptr, byval length as gsize ptr, byval error as GError ptr ptr) as GIOStatus 2316 declare function g_io_channel_read_chars(byval channel as GIOChannel ptr, byval buf as gchar ptr, byval count as gsize, byval bytes_read as gsize ptr, byval error as GError ptr ptr) as GIOStatus 2317 declare function g_io_channel_read_unichar(byval channel as GIOChannel ptr, byval thechar as gunichar ptr, byval error as GError ptr ptr) as GIOStatus 2318 declare function g_io_channel_write_chars(byval channel as GIOChannel ptr, byval buf as const gchar ptr, byval count as gssize, byval bytes_written as gsize ptr, byval error as GError ptr ptr) as GIOStatus 2319 declare function g_io_channel_write_unichar(byval channel as GIOChannel ptr, byval thechar as gunichar, byval error as GError ptr ptr) as GIOStatus 2320 declare function g_io_channel_seek_position(byval channel as GIOChannel ptr, byval offset as gint64, byval type as GSeekType, byval error as GError ptr ptr) as GIOStatus 2321 2322 #ifdef __FB_UNIX__ 2323 declare function g_io_channel_new_file(byval filename as const gchar ptr, byval mode as const gchar ptr, byval error as GError ptr ptr) as GIOChannel ptr 2324 #else 2325 declare function g_io_channel_new_file_ alias "g_io_channel_new_file"(byval filename as const gchar ptr, byval mode as const gchar ptr, byval error as GError ptr ptr) as GIOChannel ptr 2326 #endif 2327 2328 declare function g_io_channel_error_quark() as GQuark 2329 declare function g_io_channel_error_from_errno(byval en as gint) as GIOChannelError 2330 declare function g_io_channel_unix_new(byval fd as long) as GIOChannel ptr 2331 declare function g_io_channel_unix_get_fd(byval channel as GIOChannel ptr) as gint 2332 2333 #if (defined(__FB_WIN32__) and (not defined(GLIB_STATIC_COMPILATION))) or defined(__FB_CYGWIN__) 2334 extern import g_io_watch_funcs as GSourceFuncs 2335 #else 2336 extern g_io_watch_funcs as GSourceFuncs 2337 #endif 2338 2339 #ifdef __FB_WIN32__ 2340 const G_WIN32_MSG_HANDLE = 19981206 2341 declare sub g_io_channel_win32_make_pollfd(byval channel as GIOChannel ptr, byval condition as GIOCondition, byval fd as GPollFD ptr) 2342 declare function g_io_channel_win32_poll(byval fds as GPollFD ptr, byval n_fds as gint, byval timeout_ as gint) as gint 2343 2344 #ifdef __FB_64BIT__ 2345 declare function g_io_channel_win32_new_messages(byval hwnd as gsize) as GIOChannel ptr 2346 #else 2347 declare function g_io_channel_win32_new_messages(byval hwnd as guint) as GIOChannel ptr 2348 #endif 2349 2350 declare function g_io_channel_win32_new_fd(byval fd as gint) as GIOChannel ptr 2351 declare function g_io_channel_win32_get_fd(byval channel as GIOChannel ptr) as gint 2352 declare function g_io_channel_win32_new_socket(byval socket as gint) as GIOChannel ptr 2353 declare function g_io_channel_win32_new_stream_socket(byval socket as gint) as GIOChannel ptr 2354 declare sub g_io_channel_win32_set_debug(byval channel as GIOChannel ptr, byval flag as gboolean) 2355 declare function g_io_channel_new_file_utf8(byval filename as const gchar ptr, byval mode as const gchar ptr, byval error as GError ptr ptr) as GIOChannel ptr 2356 declare function g_io_channel_new_file alias "g_io_channel_new_file_utf8"(byval filename as const gchar ptr, byval mode as const gchar ptr, byval error as GError ptr ptr) as GIOChannel ptr 2357 #endif 2358 2359 #define __G_KEY_FILE_H__ 2360 2361 type GKeyFileError as long 2362 enum 2363 G_KEY_FILE_ERROR_UNKNOWN_ENCODING 2364 G_KEY_FILE_ERROR_PARSE 2365 G_KEY_FILE_ERROR_NOT_FOUND 2366 G_KEY_FILE_ERROR_KEY_NOT_FOUND 2367 G_KEY_FILE_ERROR_GROUP_NOT_FOUND 2368 G_KEY_FILE_ERROR_INVALID_VALUE 2369 end enum 2370 2371 #define G_KEY_FILE_ERROR g_key_file_error_quark() 2372 declare function g_key_file_error_quark() as GQuark 2373 type GKeyFile as _GKeyFile 2374 2375 type GKeyFileFlags as long 2376 enum 2377 G_KEY_FILE_NONE = 0 2378 G_KEY_FILE_KEEP_COMMENTS = 1 shl 0 2379 G_KEY_FILE_KEEP_TRANSLATIONS = 1 shl 1 2380 end enum 2381 2382 declare function g_key_file_new() as GKeyFile ptr 2383 declare function g_key_file_ref(byval key_file as GKeyFile ptr) as GKeyFile ptr 2384 declare sub g_key_file_unref(byval key_file as GKeyFile ptr) 2385 declare sub g_key_file_free(byval key_file as GKeyFile ptr) 2386 declare sub g_key_file_set_list_separator(byval key_file as GKeyFile ptr, byval separator as byte) 2387 declare function g_key_file_load_from_file(byval key_file as GKeyFile ptr, byval file as const gchar ptr, byval flags as GKeyFileFlags, byval error as GError ptr ptr) as gboolean 2388 declare function g_key_file_load_from_data(byval key_file as GKeyFile ptr, byval data as const gchar ptr, byval length as gsize, byval flags as GKeyFileFlags, byval error as GError ptr ptr) as gboolean 2389 declare function g_key_file_load_from_dirs(byval key_file as GKeyFile ptr, byval file as const gchar ptr, byval search_dirs as const gchar ptr ptr, byval full_path as gchar ptr ptr, byval flags as GKeyFileFlags, byval error as GError ptr ptr) as gboolean 2390 declare function g_key_file_load_from_data_dirs(byval key_file as GKeyFile ptr, byval file as const gchar ptr, byval full_path as gchar ptr ptr, byval flags as GKeyFileFlags, byval error as GError ptr ptr) as gboolean 2391 declare function g_key_file_to_data(byval key_file as GKeyFile ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gchar ptr 2392 declare function g_key_file_save_to_file(byval key_file as GKeyFile ptr, byval filename as const gchar ptr, byval error as GError ptr ptr) as gboolean 2393 declare function g_key_file_get_start_group(byval key_file as GKeyFile ptr) as gchar ptr 2394 declare function g_key_file_get_groups(byval key_file as GKeyFile ptr, byval length as gsize ptr) as gchar ptr ptr 2395 declare function g_key_file_get_keys(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gchar ptr ptr 2396 declare function g_key_file_has_group(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr) as gboolean 2397 declare function g_key_file_has_key(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gboolean 2398 declare function g_key_file_get_value(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 2399 declare sub g_key_file_set_value(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval value as const gchar ptr) 2400 declare function g_key_file_get_string(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 2401 declare sub g_key_file_set_string(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval string as const gchar ptr) 2402 declare function g_key_file_get_locale_string(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval locale as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 2403 declare sub g_key_file_set_locale_string(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval locale as const gchar ptr, byval string as const gchar ptr) 2404 declare function g_key_file_get_boolean(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gboolean 2405 declare sub g_key_file_set_boolean(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval value as gboolean) 2406 declare function g_key_file_get_integer(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gint 2407 declare sub g_key_file_set_integer(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval value as gint) 2408 declare function g_key_file_get_int64(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gint64 2409 declare sub g_key_file_set_int64(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval value as gint64) 2410 declare function g_key_file_get_uint64(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as guint64 2411 declare sub g_key_file_set_uint64(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval value as guint64) 2412 declare function g_key_file_get_double(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gdouble 2413 declare sub g_key_file_set_double(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval value as gdouble) 2414 declare function g_key_file_get_string_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gchar ptr ptr 2415 declare sub g_key_file_set_string_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval list as const gchar const ptr ptr, byval length as gsize) 2416 declare function g_key_file_get_locale_string_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval locale as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gchar ptr ptr 2417 declare sub g_key_file_set_locale_string_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval locale as const gchar ptr, byval list as const gchar const ptr ptr, byval length as gsize) 2418 declare function g_key_file_get_boolean_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gboolean ptr 2419 declare sub g_key_file_set_boolean_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval list as gboolean ptr, byval length as gsize) 2420 declare function g_key_file_get_integer_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gint ptr 2421 declare sub g_key_file_set_double_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval list as gdouble ptr, byval length as gsize) 2422 declare function g_key_file_get_double_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval length as gsize ptr, byval error as GError ptr ptr) as gdouble ptr 2423 declare sub g_key_file_set_integer_list(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval list as gint ptr, byval length as gsize) 2424 declare function g_key_file_set_comment(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval comment as const gchar ptr, byval error as GError ptr ptr) as gboolean 2425 declare function g_key_file_get_comment(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 2426 declare function g_key_file_remove_comment(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gboolean 2427 declare function g_key_file_remove_key(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval key as const gchar ptr, byval error as GError ptr ptr) as gboolean 2428 declare function g_key_file_remove_group(byval key_file as GKeyFile ptr, byval group_name as const gchar ptr, byval error as GError ptr ptr) as gboolean 2429 2430 #define G_KEY_FILE_DESKTOP_GROUP "Desktop Entry" 2431 #define G_KEY_FILE_DESKTOP_KEY_TYPE "Type" 2432 #define G_KEY_FILE_DESKTOP_KEY_VERSION "Version" 2433 #define G_KEY_FILE_DESKTOP_KEY_NAME "Name" 2434 #define G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME "GenericName" 2435 #define G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY "NoDisplay" 2436 #define G_KEY_FILE_DESKTOP_KEY_COMMENT "Comment" 2437 #define G_KEY_FILE_DESKTOP_KEY_ICON "Icon" 2438 #define G_KEY_FILE_DESKTOP_KEY_HIDDEN "Hidden" 2439 #define G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN "OnlyShowIn" 2440 #define G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN "NotShowIn" 2441 #define G_KEY_FILE_DESKTOP_KEY_TRY_EXEC "TryExec" 2442 #define G_KEY_FILE_DESKTOP_KEY_EXEC "Exec" 2443 #define G_KEY_FILE_DESKTOP_KEY_PATH "Path" 2444 #define G_KEY_FILE_DESKTOP_KEY_TERMINAL "Terminal" 2445 #define G_KEY_FILE_DESKTOP_KEY_MIME_TYPE "MimeType" 2446 #define G_KEY_FILE_DESKTOP_KEY_CATEGORIES "Categories" 2447 #define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "StartupNotify" 2448 #define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass" 2449 #define G_KEY_FILE_DESKTOP_KEY_URL "URL" 2450 #define G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE "DBusActivatable" 2451 #define G_KEY_FILE_DESKTOP_KEY_ACTIONS "Actions" 2452 #define G_KEY_FILE_DESKTOP_TYPE_APPLICATION "Application" 2453 #define G_KEY_FILE_DESKTOP_TYPE_LINK "Link" 2454 #define G_KEY_FILE_DESKTOP_TYPE_DIRECTORY "Directory" 2455 #define __G_MAPPED_FILE_H__ 2456 type GMappedFile as _GMappedFile 2457 2458 declare function g_mapped_file_new(byval filename as const gchar ptr, byval writable as gboolean, byval error as GError ptr ptr) as GMappedFile ptr 2459 declare function g_mapped_file_new_from_fd(byval fd as gint, byval writable as gboolean, byval error as GError ptr ptr) as GMappedFile ptr 2460 declare function g_mapped_file_get_length(byval file as GMappedFile ptr) as gsize 2461 declare function g_mapped_file_get_contents(byval file as GMappedFile ptr) as gchar ptr 2462 declare function g_mapped_file_get_bytes(byval file as GMappedFile ptr) as GBytes ptr 2463 declare function g_mapped_file_ref(byval file as GMappedFile ptr) as GMappedFile ptr 2464 declare sub g_mapped_file_unref(byval file as GMappedFile ptr) 2465 declare sub g_mapped_file_free(byval file as GMappedFile ptr) 2466 #define __G_MARKUP_H__ 2467 2468 type GMarkupError as long 2469 enum 2470 G_MARKUP_ERROR_BAD_UTF8 2471 G_MARKUP_ERROR_EMPTY 2472 G_MARKUP_ERROR_PARSE 2473 G_MARKUP_ERROR_UNKNOWN_ELEMENT 2474 G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE 2475 G_MARKUP_ERROR_INVALID_CONTENT 2476 G_MARKUP_ERROR_MISSING_ATTRIBUTE 2477 end enum 2478 2479 #define G_MARKUP_ERROR g_markup_error_quark() 2480 declare function g_markup_error_quark() as GQuark 2481 2482 type GMarkupParseFlags as long 2483 enum 2484 G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 shl 0 2485 G_MARKUP_TREAT_CDATA_AS_TEXT = 1 shl 1 2486 G_MARKUP_PREFIX_ERROR_POSITION = 1 shl 2 2487 G_MARKUP_IGNORE_QUALIFIED = 1 shl 3 2488 end enum 2489 2490 type GMarkupParseContext as _GMarkupParseContext 2491 type GMarkupParser as _GMarkupParser 2492 2493 type _GMarkupParser 2494 start_element as sub(byval context as GMarkupParseContext ptr, byval element_name as const gchar ptr, byval attribute_names as const gchar ptr ptr, byval attribute_values as const gchar ptr ptr, byval user_data as gpointer, byval error as GError ptr ptr) 2495 end_element as sub(byval context as GMarkupParseContext ptr, byval element_name as const gchar ptr, byval user_data as gpointer, byval error as GError ptr ptr) 2496 text as sub(byval context as GMarkupParseContext ptr, byval text as const gchar ptr, byval text_len as gsize, byval user_data as gpointer, byval error as GError ptr ptr) 2497 passthrough as sub(byval context as GMarkupParseContext ptr, byval passthrough_text as const gchar ptr, byval text_len as gsize, byval user_data as gpointer, byval error as GError ptr ptr) 2498 error as sub(byval context as GMarkupParseContext ptr, byval error as GError ptr, byval user_data as gpointer) 2499 end type 2500 2501 declare function g_markup_parse_context_new(byval parser as const GMarkupParser ptr, byval flags as GMarkupParseFlags, byval user_data as gpointer, byval user_data_dnotify as GDestroyNotify) as GMarkupParseContext ptr 2502 declare function g_markup_parse_context_ref(byval context as GMarkupParseContext ptr) as GMarkupParseContext ptr 2503 declare sub g_markup_parse_context_unref(byval context as GMarkupParseContext ptr) 2504 declare sub g_markup_parse_context_free(byval context as GMarkupParseContext ptr) 2505 declare function g_markup_parse_context_parse(byval context as GMarkupParseContext ptr, byval text as const gchar ptr, byval text_len as gssize, byval error as GError ptr ptr) as gboolean 2506 declare sub g_markup_parse_context_push(byval context as GMarkupParseContext ptr, byval parser as const GMarkupParser ptr, byval user_data as gpointer) 2507 declare function g_markup_parse_context_pop(byval context as GMarkupParseContext ptr) as gpointer 2508 declare function g_markup_parse_context_end_parse(byval context as GMarkupParseContext ptr, byval error as GError ptr ptr) as gboolean 2509 declare function g_markup_parse_context_get_element(byval context as GMarkupParseContext ptr) as const gchar ptr 2510 declare function g_markup_parse_context_get_element_stack(byval context as GMarkupParseContext ptr) as const GSList ptr 2511 declare sub g_markup_parse_context_get_position(byval context as GMarkupParseContext ptr, byval line_number as gint ptr, byval char_number as gint ptr) 2512 declare function g_markup_parse_context_get_user_data(byval context as GMarkupParseContext ptr) as gpointer 2513 declare function g_markup_escape_text(byval text as const gchar ptr, byval length as gssize) as gchar ptr 2514 declare function g_markup_printf_escaped(byval format as const zstring ptr, ...) as gchar ptr 2515 declare function g_markup_vprintf_escaped(byval format as const zstring ptr, byval args as va_list) as gchar ptr 2516 2517 type GMarkupCollectType as long 2518 enum 2519 G_MARKUP_COLLECT_INVALID 2520 G_MARKUP_COLLECT_STRING 2521 G_MARKUP_COLLECT_STRDUP 2522 G_MARKUP_COLLECT_BOOLEAN 2523 G_MARKUP_COLLECT_TRISTATE 2524 G_MARKUP_COLLECT_OPTIONAL = 1 shl 16 2525 end enum 2526 2527 declare function g_markup_collect_attributes(byval element_name as const gchar ptr, byval attribute_names as const gchar ptr ptr, byval attribute_values as const gchar ptr ptr, byval error as GError ptr ptr, byval first_type as GMarkupCollectType, byval first_attr as const gchar ptr, ...) as gboolean 2528 #define __G_MESSAGES_H__ 2529 declare function g_printf_string_upper_bound(byval format as const gchar ptr, byval args as va_list) as gsize 2530 const G_LOG_LEVEL_USER_SHIFT = 8 2531 2532 type GLogLevelFlags as long 2533 enum 2534 G_LOG_FLAG_RECURSION = 1 shl 0 2535 G_LOG_FLAG_FATAL = 1 shl 1 2536 G_LOG_LEVEL_ERROR = 1 shl 2 2537 G_LOG_LEVEL_CRITICAL = 1 shl 3 2538 G_LOG_LEVEL_WARNING = 1 shl 4 2539 G_LOG_LEVEL_MESSAGE = 1 shl 5 2540 G_LOG_LEVEL_INFO = 1 shl 6 2541 G_LOG_LEVEL_DEBUG = 1 shl 7 2542 G_LOG_LEVEL_MASK = not (G_LOG_FLAG_RECURSION or G_LOG_FLAG_FATAL) 2543 end enum 2544 2545 const G_LOG_FATAL_MASK = G_LOG_FLAG_RECURSION or G_LOG_LEVEL_ERROR 2546 type GLogFunc as sub(byval log_domain as const gchar ptr, byval log_level as GLogLevelFlags, byval message as const gchar ptr, byval user_data as gpointer) 2547 declare function g_log_set_handler(byval log_domain as const gchar ptr, byval log_levels as GLogLevelFlags, byval log_func as GLogFunc, byval user_data as gpointer) as guint 2548 declare sub g_log_remove_handler(byval log_domain as const gchar ptr, byval handler_id as guint) 2549 declare sub g_log_default_handler(byval log_domain as const gchar ptr, byval log_level as GLogLevelFlags, byval message as const gchar ptr, byval unused_data as gpointer) 2550 declare function g_log_set_default_handler(byval log_func as GLogFunc, byval user_data as gpointer) as GLogFunc 2551 declare sub g_log(byval log_domain as const gchar ptr, byval log_level as GLogLevelFlags, byval format as const gchar ptr, ...) 2552 declare sub g_logv(byval log_domain as const gchar ptr, byval log_level as GLogLevelFlags, byval format as const gchar ptr, byval args as va_list) 2553 declare function g_log_set_fatal_mask(byval log_domain as const gchar ptr, byval fatal_mask as GLogLevelFlags) as GLogLevelFlags 2554 declare function g_log_set_always_fatal(byval fatal_mask as GLogLevelFlags) as GLogLevelFlags 2555 declare sub _g_log_fallback_handler(byval log_domain as const gchar ptr, byval log_level as GLogLevelFlags, byval message as const gchar ptr, byval unused_data as gpointer) 2556 declare sub g_return_if_fail_warning(byval log_domain as const zstring ptr, byval pretty_function as const zstring ptr, byval expression as const zstring ptr) 2557 declare sub g_warn_message(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr, byval warnexpr as const zstring ptr) 2558 declare sub g_assert_warning(byval log_domain as const zstring ptr, byval file as const zstring ptr, byval line as const long, byval pretty_function as const zstring ptr, byval expression as const zstring ptr) 2559 2560 const G_LOG_DOMAIN = cptr(gchar ptr, 0) 2561 #define g_error(__VA_ARGS__...) scope : g_log(G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, __VA_ARGS__) : end scope 2562 #define g_message(__VA_ARGS__...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, __VA_ARGS__) 2563 #define g_critical(__VA_ARGS__...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, __VA_ARGS__) 2564 #define g_warning(__VA_ARGS__...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, __VA_ARGS__) 2565 #define g_info(__VA_ARGS__...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__) 2566 #define g_debug(__VA_ARGS__...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, __VA_ARGS__) 2567 type GPrintFunc as sub(byval string as const gchar ptr) 2568 2569 declare sub g_print(byval format as const gchar ptr, ...) 2570 declare function g_set_print_handler(byval func as GPrintFunc) as GPrintFunc 2571 declare sub g_printerr(byval format as const gchar ptr, ...) 2572 declare function g_set_printerr_handler(byval func as GPrintFunc) as GPrintFunc 2573 2574 #define g_warn_if_reached() scope : g_warn_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL) : end scope 2575 #macro g_warn_if_fail(expr) 2576 if G_LIKELY(expr) then 2577 else 2578 g_warn_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #expr) 2579 end if 2580 #endmacro 2581 #macro g_return_if_fail(expr) 2582 if G_LIKELY(expr) then 2583 else 2584 g_return_if_fail_warning(G_LOG_DOMAIN, G_STRFUNC, #expr) 2585 return 2586 end if 2587 #endmacro 2588 #macro g_return_val_if_fail(expr, val) 2589 if G_LIKELY(expr) then 2590 else 2591 g_return_if_fail_warning(G_LOG_DOMAIN, G_STRFUNC, #expr) 2592 return (val) 2593 end if 2594 #endmacro 2595 #macro g_return_if_reached() 2596 scope 2597 g_log(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "file %s: line %d (%s): should not be reached", __FILE__, __LINE__, G_STRFUNC) 2598 return 2599 end scope 2600 #endmacro 2601 #macro g_return_val_if_reached(val) 2602 scope 2603 g_log(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "file %s: line %d (%s): should not be reached", __FILE__, __LINE__, G_STRFUNC) 2604 return (val) 2605 end scope 2606 #endmacro 2607 #define __G_OPTION_H__ 2608 2609 type GOptionContext as _GOptionContext 2610 type GOptionGroup as _GOptionGroup 2611 type GOptionEntry as _GOptionEntry 2612 2613 type GOptionFlags as long 2614 enum 2615 G_OPTION_FLAG_NONE = 0 2616 G_OPTION_FLAG_HIDDEN = 1 shl 0 2617 G_OPTION_FLAG_IN_MAIN = 1 shl 1 2618 G_OPTION_FLAG_REVERSE = 1 shl 2 2619 G_OPTION_FLAG_NO_ARG = 1 shl 3 2620 G_OPTION_FLAG_FILENAME = 1 shl 4 2621 G_OPTION_FLAG_OPTIONAL_ARG = 1 shl 5 2622 G_OPTION_FLAG_NOALIAS = 1 shl 6 2623 end enum 2624 2625 type GOptionArg as long 2626 enum 2627 G_OPTION_ARG_NONE 2628 G_OPTION_ARG_STRING 2629 G_OPTION_ARG_INT 2630 G_OPTION_ARG_CALLBACK 2631 G_OPTION_ARG_FILENAME 2632 G_OPTION_ARG_STRING_ARRAY 2633 G_OPTION_ARG_FILENAME_ARRAY 2634 G_OPTION_ARG_DOUBLE 2635 G_OPTION_ARG_INT64 2636 end enum 2637 2638 type GOptionArgFunc as function(byval option_name as const gchar ptr, byval value as const gchar ptr, byval data as gpointer, byval error as GError ptr ptr) as gboolean 2639 type GOptionParseFunc as function(byval context as GOptionContext ptr, byval group as GOptionGroup ptr, byval data as gpointer, byval error as GError ptr ptr) as gboolean 2640 type GOptionErrorFunc as sub(byval context as GOptionContext ptr, byval group as GOptionGroup ptr, byval data as gpointer, byval error as GError ptr ptr) 2641 #define G_OPTION_ERROR g_option_error_quark() 2642 2643 type GOptionError as long 2644 enum 2645 G_OPTION_ERROR_UNKNOWN_OPTION 2646 G_OPTION_ERROR_BAD_VALUE 2647 G_OPTION_ERROR_FAILED 2648 end enum 2649 2650 declare function g_option_error_quark() as GQuark 2651 2652 type _GOptionEntry 2653 long_name as const gchar ptr 2654 short_name as byte 2655 flags as gint 2656 arg as GOptionArg 2657 arg_data as gpointer 2658 description as const gchar ptr 2659 arg_description as const gchar ptr 2660 end type 2661 2662 #define G_OPTION_REMAINING "" 2663 declare function g_option_context_new(byval parameter_string as const gchar ptr) as GOptionContext ptr 2664 declare sub g_option_context_set_summary(byval context as GOptionContext ptr, byval summary as const gchar ptr) 2665 declare function g_option_context_get_summary(byval context as GOptionContext ptr) as const gchar ptr 2666 declare sub g_option_context_set_description(byval context as GOptionContext ptr, byval description as const gchar ptr) 2667 declare function g_option_context_get_description(byval context as GOptionContext ptr) as const gchar ptr 2668 declare sub g_option_context_free(byval context as GOptionContext ptr) 2669 declare sub g_option_context_set_help_enabled(byval context as GOptionContext ptr, byval help_enabled as gboolean) 2670 declare function g_option_context_get_help_enabled(byval context as GOptionContext ptr) as gboolean 2671 declare sub g_option_context_set_ignore_unknown_options(byval context as GOptionContext ptr, byval ignore_unknown as gboolean) 2672 declare function g_option_context_get_ignore_unknown_options(byval context as GOptionContext ptr) as gboolean 2673 declare sub g_option_context_set_strict_posix(byval context as GOptionContext ptr, byval strict_posix as gboolean) 2674 declare function g_option_context_get_strict_posix(byval context as GOptionContext ptr) as gboolean 2675 declare sub g_option_context_add_main_entries(byval context as GOptionContext ptr, byval entries as const GOptionEntry ptr, byval translation_domain as const gchar ptr) 2676 declare function g_option_context_parse(byval context as GOptionContext ptr, byval argc as gint ptr, byval argv as gchar ptr ptr ptr, byval error as GError ptr ptr) as gboolean 2677 declare function g_option_context_parse_strv(byval context as GOptionContext ptr, byval arguments as gchar ptr ptr ptr, byval error as GError ptr ptr) as gboolean 2678 declare sub g_option_context_set_translate_func(byval context as GOptionContext ptr, byval func as GTranslateFunc, byval data as gpointer, byval destroy_notify as GDestroyNotify) 2679 declare sub g_option_context_set_translation_domain(byval context as GOptionContext ptr, byval domain as const gchar ptr) 2680 declare sub g_option_context_add_group(byval context as GOptionContext ptr, byval group as GOptionGroup ptr) 2681 declare sub g_option_context_set_main_group(byval context as GOptionContext ptr, byval group as GOptionGroup ptr) 2682 declare function g_option_context_get_main_group(byval context as GOptionContext ptr) as GOptionGroup ptr 2683 declare function g_option_context_get_help(byval context as GOptionContext ptr, byval main_help as gboolean, byval group as GOptionGroup ptr) as gchar ptr 2684 declare function g_option_group_new(byval name as const gchar ptr, byval description as const gchar ptr, byval help_description as const gchar ptr, byval user_data as gpointer, byval destroy as GDestroyNotify) as GOptionGroup ptr 2685 declare sub g_option_group_set_parse_hooks(byval group as GOptionGroup ptr, byval pre_parse_func as GOptionParseFunc, byval post_parse_func as GOptionParseFunc) 2686 declare sub g_option_group_set_error_hook(byval group as GOptionGroup ptr, byval error_func as GOptionErrorFunc) 2687 declare sub g_option_group_free(byval group as GOptionGroup ptr) 2688 declare function g_option_group_ref(byval group as GOptionGroup ptr) as GOptionGroup ptr 2689 declare sub g_option_group_unref(byval group as GOptionGroup ptr) 2690 declare sub g_option_group_add_entries(byval group as GOptionGroup ptr, byval entries as const GOptionEntry ptr) 2691 declare sub g_option_group_set_translate_func(byval group as GOptionGroup ptr, byval func as GTranslateFunc, byval data as gpointer, byval destroy_notify as GDestroyNotify) 2692 declare sub g_option_group_set_translation_domain(byval group as GOptionGroup ptr, byval domain as const gchar ptr) 2693 #define __G_PATTERN_H__ 2694 type GPatternSpec as _GPatternSpec 2695 declare function g_pattern_spec_new(byval pattern as const gchar ptr) as GPatternSpec ptr 2696 declare sub g_pattern_spec_free(byval pspec as GPatternSpec ptr) 2697 declare function g_pattern_spec_equal(byval pspec1 as GPatternSpec ptr, byval pspec2 as GPatternSpec ptr) as gboolean 2698 declare function g_pattern_match(byval pspec as GPatternSpec ptr, byval string_length as guint, byval string as const gchar ptr, byval string_reversed as const gchar ptr) as gboolean 2699 declare function g_pattern_match_string(byval pspec as GPatternSpec ptr, byval string as const gchar ptr) as gboolean 2700 declare function g_pattern_match_simple(byval pattern as const gchar ptr, byval string as const gchar ptr) as gboolean 2701 #define __G_PRIMES_H__ 2702 declare function g_spaced_primes_closest(byval num as guint) as guint 2703 #define __G_QSORT_H__ 2704 declare sub g_qsort_with_data(byval pbase as gconstpointer, byval total_elems as gint, byval size as gsize, byval compare_func as GCompareDataFunc, byval user_data as gpointer) 2705 #define __G_QUEUE_H__ 2706 type GQueue as _GQueue 2707 2708 type _GQueue 2709 head as GList ptr 2710 tail as GList ptr 2711 length as guint 2712 end type 2713 2714 #define G_QUEUE_INIT_ (NULL, NULL, 0) 2715 declare function g_queue_new() as GQueue ptr 2716 declare sub g_queue_free(byval queue as GQueue ptr) 2717 declare sub g_queue_free_full(byval queue as GQueue ptr, byval free_func as GDestroyNotify) 2718 declare sub g_queue_init(byval queue as GQueue ptr) 2719 declare sub g_queue_clear(byval queue as GQueue ptr) 2720 declare function g_queue_is_empty(byval queue as GQueue ptr) as gboolean 2721 declare function g_queue_get_length(byval queue as GQueue ptr) as guint 2722 declare sub g_queue_reverse(byval queue as GQueue ptr) 2723 declare function g_queue_copy(byval queue as GQueue ptr) as GQueue ptr 2724 declare sub g_queue_foreach(byval queue as GQueue ptr, byval func as GFunc, byval user_data as gpointer) 2725 declare function g_queue_find(byval queue as GQueue ptr, byval data as gconstpointer) as GList ptr 2726 declare function g_queue_find_custom(byval queue as GQueue ptr, byval data as gconstpointer, byval func as GCompareFunc) as GList ptr 2727 declare sub g_queue_sort(byval queue as GQueue ptr, byval compare_func as GCompareDataFunc, byval user_data as gpointer) 2728 declare sub g_queue_push_head(byval queue as GQueue ptr, byval data as gpointer) 2729 declare sub g_queue_push_tail(byval queue as GQueue ptr, byval data as gpointer) 2730 declare sub g_queue_push_nth(byval queue as GQueue ptr, byval data as gpointer, byval n as gint) 2731 declare function g_queue_pop_head(byval queue as GQueue ptr) as gpointer 2732 declare function g_queue_pop_tail(byval queue as GQueue ptr) as gpointer 2733 declare function g_queue_pop_nth(byval queue as GQueue ptr, byval n as guint) as gpointer 2734 declare function g_queue_peek_head(byval queue as GQueue ptr) as gpointer 2735 declare function g_queue_peek_tail(byval queue as GQueue ptr) as gpointer 2736 declare function g_queue_peek_nth(byval queue as GQueue ptr, byval n as guint) as gpointer 2737 declare function g_queue_index(byval queue as GQueue ptr, byval data as gconstpointer) as gint 2738 declare function g_queue_remove(byval queue as GQueue ptr, byval data as gconstpointer) as gboolean 2739 declare function g_queue_remove_all(byval queue as GQueue ptr, byval data as gconstpointer) as guint 2740 declare sub g_queue_insert_before(byval queue as GQueue ptr, byval sibling as GList ptr, byval data as gpointer) 2741 declare sub g_queue_insert_after(byval queue as GQueue ptr, byval sibling as GList ptr, byval data as gpointer) 2742 declare sub g_queue_insert_sorted(byval queue as GQueue ptr, byval data as gpointer, byval func as GCompareDataFunc, byval user_data as gpointer) 2743 declare sub g_queue_push_head_link(byval queue as GQueue ptr, byval link_ as GList ptr) 2744 declare sub g_queue_push_tail_link(byval queue as GQueue ptr, byval link_ as GList ptr) 2745 declare sub g_queue_push_nth_link(byval queue as GQueue ptr, byval n as gint, byval link_ as GList ptr) 2746 declare function g_queue_pop_head_link(byval queue as GQueue ptr) as GList ptr 2747 declare function g_queue_pop_tail_link(byval queue as GQueue ptr) as GList ptr 2748 declare function g_queue_pop_nth_link(byval queue as GQueue ptr, byval n as guint) as GList ptr 2749 declare function g_queue_peek_head_link(byval queue as GQueue ptr) as GList ptr 2750 declare function g_queue_peek_tail_link(byval queue as GQueue ptr) as GList ptr 2751 declare function g_queue_peek_nth_link(byval queue as GQueue ptr, byval n as guint) as GList ptr 2752 declare function g_queue_link_index(byval queue as GQueue ptr, byval link_ as GList ptr) as gint 2753 declare sub g_queue_unlink(byval queue as GQueue ptr, byval link_ as GList ptr) 2754 declare sub g_queue_delete_link(byval queue as GQueue ptr, byval link_ as GList ptr) 2755 #define __G_RAND_H__ 2756 type GRand as _GRand 2757 declare function g_rand_new_with_seed(byval seed as guint32) as GRand ptr 2758 declare function g_rand_new_with_seed_array(byval seed as const guint32 ptr, byval seed_length as guint) as GRand ptr 2759 declare function g_rand_new() as GRand ptr 2760 declare sub g_rand_free(byval rand_ as GRand ptr) 2761 declare function g_rand_copy(byval rand_ as GRand ptr) as GRand ptr 2762 declare sub g_rand_set_seed(byval rand_ as GRand ptr, byval seed as guint32) 2763 declare sub g_rand_set_seed_array(byval rand_ as GRand ptr, byval seed as const guint32 ptr, byval seed_length as guint) 2764 #define g_rand_boolean(rand_) ((g_rand_int(rand_) and (1 shl 15)) <> 0) 2765 declare function g_rand_int(byval rand_ as GRand ptr) as guint32 2766 declare function g_rand_int_range(byval rand_ as GRand ptr, byval begin as gint32, byval end as gint32) as gint32 2767 declare function g_rand_double(byval rand_ as GRand ptr) as gdouble 2768 declare function g_rand_double_range(byval rand_ as GRand ptr, byval begin as gdouble, byval end as gdouble) as gdouble 2769 declare sub g_random_set_seed(byval seed as guint32) 2770 #define g_random_boolean() ((g_random_int() and (1 shl 15)) <> 0) 2771 declare function g_random_int() as guint32 2772 declare function g_random_int_range(byval begin as gint32, byval end as gint32) as gint32 2773 declare function g_random_double() as gdouble 2774 declare function g_random_double_range(byval begin as gdouble, byval end as gdouble) as gdouble 2775 #define __G_REGEX_H__ 2776 2777 type GRegexError as long 2778 enum 2779 G_REGEX_ERROR_COMPILE 2780 G_REGEX_ERROR_OPTIMIZE 2781 G_REGEX_ERROR_REPLACE 2782 G_REGEX_ERROR_MATCH 2783 G_REGEX_ERROR_INTERNAL 2784 G_REGEX_ERROR_STRAY_BACKSLASH = 101 2785 G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102 2786 G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103 2787 G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104 2788 G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105 2789 G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106 2790 G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107 2791 G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108 2792 G_REGEX_ERROR_NOTHING_TO_REPEAT = 109 2793 G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112 2794 G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113 2795 G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114 2796 G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115 2797 G_REGEX_ERROR_UNTERMINATED_COMMENT = 118 2798 G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120 2799 G_REGEX_ERROR_MEMORY_ERROR = 121 2800 G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125 2801 G_REGEX_ERROR_MALFORMED_CONDITION = 126 2802 G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127 2803 G_REGEX_ERROR_ASSERTION_EXPECTED = 128 2804 G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130 2805 G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131 2806 G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134 2807 G_REGEX_ERROR_INVALID_CONDITION = 135 2808 G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136 2809 G_REGEX_ERROR_INFINITE_LOOP = 140 2810 G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142 2811 G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143 2812 G_REGEX_ERROR_MALFORMED_PROPERTY = 146 2813 G_REGEX_ERROR_UNKNOWN_PROPERTY = 147 2814 G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148 2815 G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149 2816 G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151 2817 G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154 2818 G_REGEX_ERROR_DEFINE_REPETION = 155 2819 G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156 2820 G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157 2821 G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE = 158 2822 G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159 2823 G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB = 160 2824 G_REGEX_ERROR_NUMBER_TOO_BIG = 161 2825 G_REGEX_ERROR_MISSING_SUBPATTERN_NAME = 162 2826 G_REGEX_ERROR_MISSING_DIGIT = 163 2827 G_REGEX_ERROR_INVALID_DATA_CHARACTER = 164 2828 G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME = 165 2829 G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166 2830 G_REGEX_ERROR_INVALID_CONTROL_CHAR = 168 2831 G_REGEX_ERROR_MISSING_NAME = 169 2832 G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS = 171 2833 G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES = 172 2834 G_REGEX_ERROR_NAME_TOO_LONG = 175 2835 G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE = 176 2836 end enum 2837 2838 #define G_REGEX_ERROR g_regex_error_quark() 2839 declare function g_regex_error_quark() as GQuark 2840 2841 type GRegexCompileFlags as long 2842 enum 2843 G_REGEX_CASELESS = 1 shl 0 2844 G_REGEX_MULTILINE = 1 shl 1 2845 G_REGEX_DOTALL = 1 shl 2 2846 G_REGEX_EXTENDED = 1 shl 3 2847 G_REGEX_ANCHORED = 1 shl 4 2848 G_REGEX_DOLLAR_ENDONLY = 1 shl 5 2849 G_REGEX_UNGREEDY = 1 shl 9 2850 G_REGEX_RAW = 1 shl 11 2851 G_REGEX_NO_AUTO_CAPTURE = 1 shl 12 2852 G_REGEX_OPTIMIZE = 1 shl 13 2853 G_REGEX_FIRSTLINE = 1 shl 18 2854 G_REGEX_DUPNAMES = 1 shl 19 2855 G_REGEX_NEWLINE_CR = 1 shl 20 2856 G_REGEX_NEWLINE_LF = 1 shl 21 2857 G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR or G_REGEX_NEWLINE_LF 2858 G_REGEX_NEWLINE_ANYCRLF = G_REGEX_NEWLINE_CR or (1 shl 22) 2859 G_REGEX_BSR_ANYCRLF = 1 shl 23 2860 G_REGEX_JAVASCRIPT_COMPAT = 1 shl 25 2861 end enum 2862 2863 type GRegexMatchFlags as long 2864 enum 2865 G_REGEX_MATCH_ANCHORED = 1 shl 4 2866 G_REGEX_MATCH_NOTBOL = 1 shl 7 2867 G_REGEX_MATCH_NOTEOL = 1 shl 8 2868 G_REGEX_MATCH_NOTEMPTY = 1 shl 10 2869 G_REGEX_MATCH_PARTIAL = 1 shl 15 2870 G_REGEX_MATCH_NEWLINE_CR = 1 shl 20 2871 G_REGEX_MATCH_NEWLINE_LF = 1 shl 21 2872 G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR or G_REGEX_MATCH_NEWLINE_LF 2873 G_REGEX_MATCH_NEWLINE_ANY = 1 shl 22 2874 G_REGEX_MATCH_NEWLINE_ANYCRLF = G_REGEX_MATCH_NEWLINE_CR or G_REGEX_MATCH_NEWLINE_ANY 2875 G_REGEX_MATCH_BSR_ANYCRLF = 1 shl 23 2876 G_REGEX_MATCH_BSR_ANY = 1 shl 24 2877 G_REGEX_MATCH_PARTIAL_SOFT = G_REGEX_MATCH_PARTIAL 2878 G_REGEX_MATCH_PARTIAL_HARD = 1 shl 27 2879 G_REGEX_MATCH_NOTEMPTY_ATSTART = 1 shl 28 2880 end enum 2881 2882 type GRegex as _GRegex 2883 type GMatchInfo as _GMatchInfo 2884 type GRegexEvalCallback as function(byval match_info as const GMatchInfo ptr, byval result as GString ptr, byval user_data as gpointer) as gboolean 2885 2886 declare function g_regex_new(byval pattern as const gchar ptr, byval compile_options as GRegexCompileFlags, byval match_options as GRegexMatchFlags, byval error as GError ptr ptr) as GRegex ptr 2887 declare function g_regex_ref(byval regex as GRegex ptr) as GRegex ptr 2888 declare sub g_regex_unref(byval regex as GRegex ptr) 2889 declare function g_regex_get_pattern(byval regex as const GRegex ptr) as const gchar ptr 2890 declare function g_regex_get_max_backref(byval regex as const GRegex ptr) as gint 2891 declare function g_regex_get_capture_count(byval regex as const GRegex ptr) as gint 2892 declare function g_regex_get_has_cr_or_lf(byval regex as const GRegex ptr) as gboolean 2893 declare function g_regex_get_max_lookbehind(byval regex as const GRegex ptr) as gint 2894 declare function g_regex_get_string_number(byval regex as const GRegex ptr, byval name as const gchar ptr) as gint 2895 declare function g_regex_escape_string(byval string as const gchar ptr, byval length as gint) as gchar ptr 2896 declare function g_regex_escape_nul(byval string as const gchar ptr, byval length as gint) as gchar ptr 2897 declare function g_regex_get_compile_flags(byval regex as const GRegex ptr) as GRegexCompileFlags 2898 declare function g_regex_get_match_flags(byval regex as const GRegex ptr) as GRegexMatchFlags 2899 declare function g_regex_match_simple(byval pattern as const gchar ptr, byval string as const gchar ptr, byval compile_options as GRegexCompileFlags, byval match_options as GRegexMatchFlags) as gboolean 2900 declare function g_regex_match(byval regex as const GRegex ptr, byval string as const gchar ptr, byval match_options as GRegexMatchFlags, byval match_info as GMatchInfo ptr ptr) as gboolean 2901 declare function g_regex_match_full(byval regex as const GRegex ptr, byval string as const gchar ptr, byval string_len as gssize, byval start_position as gint, byval match_options as GRegexMatchFlags, byval match_info as GMatchInfo ptr ptr, byval error as GError ptr ptr) as gboolean 2902 declare function g_regex_match_all(byval regex as const GRegex ptr, byval string as const gchar ptr, byval match_options as GRegexMatchFlags, byval match_info as GMatchInfo ptr ptr) as gboolean 2903 declare function g_regex_match_all_full(byval regex as const GRegex ptr, byval string as const gchar ptr, byval string_len as gssize, byval start_position as gint, byval match_options as GRegexMatchFlags, byval match_info as GMatchInfo ptr ptr, byval error as GError ptr ptr) as gboolean 2904 declare function g_regex_split_simple(byval pattern as const gchar ptr, byval string as const gchar ptr, byval compile_options as GRegexCompileFlags, byval match_options as GRegexMatchFlags) as gchar ptr ptr 2905 declare function g_regex_split(byval regex as const GRegex ptr, byval string as const gchar ptr, byval match_options as GRegexMatchFlags) as gchar ptr ptr 2906 declare function g_regex_split_full(byval regex as const GRegex ptr, byval string as const gchar ptr, byval string_len as gssize, byval start_position as gint, byval match_options as GRegexMatchFlags, byval max_tokens as gint, byval error as GError ptr ptr) as gchar ptr ptr 2907 declare function g_regex_replace(byval regex as const GRegex ptr, byval string as const gchar ptr, byval string_len as gssize, byval start_position as gint, byval replacement as const gchar ptr, byval match_options as GRegexMatchFlags, byval error as GError ptr ptr) as gchar ptr 2908 declare function g_regex_replace_literal(byval regex as const GRegex ptr, byval string as const gchar ptr, byval string_len as gssize, byval start_position as gint, byval replacement as const gchar ptr, byval match_options as GRegexMatchFlags, byval error as GError ptr ptr) as gchar ptr 2909 declare function g_regex_replace_eval(byval regex as const GRegex ptr, byval string as const gchar ptr, byval string_len as gssize, byval start_position as gint, byval match_options as GRegexMatchFlags, byval eval as GRegexEvalCallback, byval user_data as gpointer, byval error as GError ptr ptr) as gchar ptr 2910 declare function g_regex_check_replacement(byval replacement as const gchar ptr, byval has_references as gboolean ptr, byval error as GError ptr ptr) as gboolean 2911 declare function g_match_info_get_regex(byval match_info as const GMatchInfo ptr) as GRegex ptr 2912 declare function g_match_info_get_string(byval match_info as const GMatchInfo ptr) as const gchar ptr 2913 declare function g_match_info_ref(byval match_info as GMatchInfo ptr) as GMatchInfo ptr 2914 declare sub g_match_info_unref(byval match_info as GMatchInfo ptr) 2915 declare sub g_match_info_free(byval match_info as GMatchInfo ptr) 2916 declare function g_match_info_next(byval match_info as GMatchInfo ptr, byval error as GError ptr ptr) as gboolean 2917 declare function g_match_info_matches(byval match_info as const GMatchInfo ptr) as gboolean 2918 declare function g_match_info_get_match_count(byval match_info as const GMatchInfo ptr) as gint 2919 declare function g_match_info_is_partial_match(byval match_info as const GMatchInfo ptr) as gboolean 2920 declare function g_match_info_expand_references(byval match_info as const GMatchInfo ptr, byval string_to_expand as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 2921 declare function g_match_info_fetch(byval match_info as const GMatchInfo ptr, byval match_num as gint) as gchar ptr 2922 declare function g_match_info_fetch_pos(byval match_info as const GMatchInfo ptr, byval match_num as gint, byval start_pos as gint ptr, byval end_pos as gint ptr) as gboolean 2923 declare function g_match_info_fetch_named(byval match_info as const GMatchInfo ptr, byval name as const gchar ptr) as gchar ptr 2924 declare function g_match_info_fetch_named_pos(byval match_info as const GMatchInfo ptr, byval name as const gchar ptr, byval start_pos as gint ptr, byval end_pos as gint ptr) as gboolean 2925 declare function g_match_info_fetch_all(byval match_info as const GMatchInfo ptr) as gchar ptr ptr 2926 #define __G_SCANNER_H__ 2927 2928 type GScanner as _GScanner 2929 type GScannerConfig as _GScannerConfig 2930 type GTokenValue as _GTokenValue 2931 type GScannerMsgFunc as sub(byval scanner as GScanner ptr, byval message as gchar ptr, byval error as gboolean) 2932 2933 #define G_CSET_A_2_Z_ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 2934 #define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz" 2935 #define G_CSET_DIGITS "0123456789" 2936 #define G_CSET_LATINC !"\192\193\194\195\196\197\198" !"\199\200\201\202\203\204\205\206\207\208" !"\209\210\211\212\213\214" !"\216\217\218\219\220\221\222" 2937 #define G_CSET_LATINS !"\223\224\225\226\227\228\229\230" !"\231\232\233\234\235\236\237\238\239\240" !"\241\242\243\244\245\246" !"\248\249\250\251\252\253\254\255" 2938 2939 type GErrorType as long 2940 enum 2941 G_ERR_UNKNOWN 2942 G_ERR_UNEXP_EOF 2943 G_ERR_UNEXP_EOF_IN_STRING 2944 G_ERR_UNEXP_EOF_IN_COMMENT 2945 G_ERR_NON_DIGIT_IN_CONST 2946 G_ERR_DIGIT_RADIX 2947 G_ERR_FLOAT_RADIX 2948 G_ERR_FLOAT_MALFORMED 2949 end enum 2950 2951 type GTokenType as long 2952 enum 2953 G_TOKEN_EOF = 0 2954 G_TOKEN_LEFT_PAREN = asc("(") 2955 G_TOKEN_RIGHT_PAREN = asc(")") 2956 G_TOKEN_LEFT_CURLY = asc("{") 2957 G_TOKEN_RIGHT_CURLY = asc("}") 2958 G_TOKEN_LEFT_BRACE = asc("[") 2959 G_TOKEN_RIGHT_BRACE = asc("]") 2960 G_TOKEN_EQUAL_SIGN = asc("=") 2961 G_TOKEN_COMMA = asc(",") 2962 G_TOKEN_NONE = 256 2963 G_TOKEN_ERROR 2964 G_TOKEN_CHAR 2965 G_TOKEN_BINARY 2966 G_TOKEN_OCTAL 2967 G_TOKEN_INT 2968 G_TOKEN_HEX 2969 G_TOKEN_FLOAT 2970 G_TOKEN_STRING 2971 G_TOKEN_SYMBOL 2972 G_TOKEN_IDENTIFIER 2973 G_TOKEN_IDENTIFIER_NULL 2974 G_TOKEN_COMMENT_SINGLE 2975 G_TOKEN_COMMENT_MULTI 2976 G_TOKEN_LAST 2977 end enum 2978 2979 union _GTokenValue 2980 v_symbol as gpointer 2981 v_identifier as gchar ptr 2982 v_binary as gulong 2983 v_octal as gulong 2984 v_int as gulong 2985 v_int64 as guint64 2986 v_float as gdouble 2987 v_hex as gulong 2988 v_string as gchar ptr 2989 v_comment as gchar ptr 2990 v_char as guchar 2991 v_error as guint 2992 end union 2993 2994 type _GScannerConfig 2995 cset_skip_characters as gchar ptr 2996 cset_identifier_first as gchar ptr 2997 cset_identifier_nth as gchar ptr 2998 cpair_comment_single as gchar ptr 2999 case_sensitive : 1 as guint 3000 skip_comment_multi : 1 as guint 3001 skip_comment_single : 1 as guint 3002 scan_comment_multi : 1 as guint 3003 scan_identifier : 1 as guint 3004 scan_identifier_1char : 1 as guint 3005 scan_identifier_NULL : 1 as guint 3006 scan_symbols : 1 as guint 3007 scan_binary : 1 as guint 3008 scan_octal : 1 as guint 3009 scan_float : 1 as guint 3010 scan_hex : 1 as guint 3011 scan_hex_dollar : 1 as guint 3012 scan_string_sq : 1 as guint 3013 scan_string_dq : 1 as guint 3014 numbers_2_int : 1 as guint 3015 int_2_float : 1 as guint 3016 identifier_2_string : 1 as guint 3017 char_2_token : 1 as guint 3018 symbol_2_token : 1 as guint 3019 scope_0_fallback : 1 as guint 3020 store_int64 : 1 as guint 3021 padding_dummy as guint 3022 end type 3023 3024 type _GScanner 3025 user_data as gpointer 3026 max_parse_errors as guint 3027 parse_errors as guint 3028 input_name as const gchar ptr 3029 qdata as GData ptr 3030 config as GScannerConfig ptr 3031 token as GTokenType 3032 value as GTokenValue 3033 line as guint 3034 position as guint 3035 next_token as GTokenType 3036 next_value as GTokenValue 3037 next_line as guint 3038 next_position as guint 3039 symbol_table as GHashTable ptr 3040 input_fd as gint 3041 text as const gchar ptr 3042 text_end as const gchar ptr 3043 buffer as gchar ptr 3044 scope_id as guint 3045 msg_handler as GScannerMsgFunc 3046 end type 3047 3048 declare function g_scanner_new(byval config_templ as const GScannerConfig ptr) as GScanner ptr 3049 declare sub g_scanner_destroy(byval scanner as GScanner ptr) 3050 declare sub g_scanner_input_file(byval scanner as GScanner ptr, byval input_fd as gint) 3051 declare sub g_scanner_sync_file_offset(byval scanner as GScanner ptr) 3052 declare sub g_scanner_input_text(byval scanner as GScanner ptr, byval text as const gchar ptr, byval text_len as guint) 3053 declare function g_scanner_get_next_token(byval scanner as GScanner ptr) as GTokenType 3054 declare function g_scanner_peek_next_token(byval scanner as GScanner ptr) as GTokenType 3055 declare function g_scanner_cur_token(byval scanner as GScanner ptr) as GTokenType 3056 declare function g_scanner_cur_value(byval scanner as GScanner ptr) as GTokenValue 3057 declare function g_scanner_cur_line(byval scanner as GScanner ptr) as guint 3058 declare function g_scanner_cur_position(byval scanner as GScanner ptr) as guint 3059 declare function g_scanner_eof(byval scanner as GScanner ptr) as gboolean 3060 declare function g_scanner_set_scope(byval scanner as GScanner ptr, byval scope_id as guint) as guint 3061 declare sub g_scanner_scope_add_symbol(byval scanner as GScanner ptr, byval scope_id as guint, byval symbol as const gchar ptr, byval value as gpointer) 3062 declare sub g_scanner_scope_remove_symbol(byval scanner as GScanner ptr, byval scope_id as guint, byval symbol as const gchar ptr) 3063 declare function g_scanner_scope_lookup_symbol(byval scanner as GScanner ptr, byval scope_id as guint, byval symbol as const gchar ptr) as gpointer 3064 declare sub g_scanner_scope_foreach_symbol(byval scanner as GScanner ptr, byval scope_id as guint, byval func as GHFunc, byval user_data as gpointer) 3065 declare function g_scanner_lookup_symbol(byval scanner as GScanner ptr, byval symbol as const gchar ptr) as gpointer 3066 declare sub g_scanner_unexp_token(byval scanner as GScanner ptr, byval expected_token as GTokenType, byval identifier_spec as const gchar ptr, byval symbol_spec as const gchar ptr, byval symbol_name as const gchar ptr, byval message as const gchar ptr, byval is_error as gint) 3067 declare sub g_scanner_error(byval scanner as GScanner ptr, byval format as const gchar ptr, ...) 3068 declare sub g_scanner_warn(byval scanner as GScanner ptr, byval format as const gchar ptr, ...) 3069 3070 #define g_scanner_add_symbol(scanner, symbol, value) scope : g_scanner_scope_add_symbol((scanner), 0, (symbol), (value)) : end scope 3071 #define g_scanner_remove_symbol(scanner, symbol) scope : g_scanner_scope_remove_symbol((scanner), 0, (symbol)) : end scope 3072 #define g_scanner_foreach_symbol(scanner, func, data) scope : g_scanner_scope_foreach_symbol((scanner), 0, (func), (data)) : end scope 3073 #define g_scanner_freeze_symbol_table(scanner) 0 3074 #define g_scanner_thaw_symbol_table(scanner) 0 3075 #define __G_SEQUENCE_H__ 3076 3077 type GSequence as _GSequence 3078 type GSequenceIter as _GSequenceNode 3079 type GSequenceIterCompareFunc as function(byval a as GSequenceIter ptr, byval b as GSequenceIter ptr, byval data as gpointer) as gint 3080 3081 declare function g_sequence_new(byval data_destroy as GDestroyNotify) as GSequence ptr 3082 declare sub g_sequence_free(byval seq as GSequence ptr) 3083 declare function g_sequence_get_length(byval seq as GSequence ptr) as gint 3084 declare sub g_sequence_foreach(byval seq as GSequence ptr, byval func as GFunc, byval user_data as gpointer) 3085 declare sub g_sequence_foreach_range(byval begin as GSequenceIter ptr, byval end as GSequenceIter ptr, byval func as GFunc, byval user_data as gpointer) 3086 declare sub g_sequence_sort(byval seq as GSequence ptr, byval cmp_func as GCompareDataFunc, byval cmp_data as gpointer) 3087 declare sub g_sequence_sort_iter(byval seq as GSequence ptr, byval cmp_func as GSequenceIterCompareFunc, byval cmp_data as gpointer) 3088 declare function g_sequence_get_begin_iter(byval seq as GSequence ptr) as GSequenceIter ptr 3089 declare function g_sequence_get_end_iter(byval seq as GSequence ptr) as GSequenceIter ptr 3090 declare function g_sequence_get_iter_at_pos(byval seq as GSequence ptr, byval pos as gint) as GSequenceIter ptr 3091 declare function g_sequence_append(byval seq as GSequence ptr, byval data as gpointer) as GSequenceIter ptr 3092 declare function g_sequence_prepend(byval seq as GSequence ptr, byval data as gpointer) as GSequenceIter ptr 3093 declare function g_sequence_insert_before(byval iter as GSequenceIter ptr, byval data as gpointer) as GSequenceIter ptr 3094 declare sub g_sequence_move(byval src as GSequenceIter ptr, byval dest as GSequenceIter ptr) 3095 declare sub g_sequence_swap(byval a as GSequenceIter ptr, byval b as GSequenceIter ptr) 3096 declare function g_sequence_insert_sorted(byval seq as GSequence ptr, byval data as gpointer, byval cmp_func as GCompareDataFunc, byval cmp_data as gpointer) as GSequenceIter ptr 3097 declare function g_sequence_insert_sorted_iter(byval seq as GSequence ptr, byval data as gpointer, byval iter_cmp as GSequenceIterCompareFunc, byval cmp_data as gpointer) as GSequenceIter ptr 3098 declare sub g_sequence_sort_changed(byval iter as GSequenceIter ptr, byval cmp_func as GCompareDataFunc, byval cmp_data as gpointer) 3099 declare sub g_sequence_sort_changed_iter(byval iter as GSequenceIter ptr, byval iter_cmp as GSequenceIterCompareFunc, byval cmp_data as gpointer) 3100 declare sub g_sequence_remove(byval iter as GSequenceIter ptr) 3101 declare sub g_sequence_remove_range(byval begin as GSequenceIter ptr, byval end as GSequenceIter ptr) 3102 declare sub g_sequence_move_range(byval dest as GSequenceIter ptr, byval begin as GSequenceIter ptr, byval end as GSequenceIter ptr) 3103 declare function g_sequence_search(byval seq as GSequence ptr, byval data as gpointer, byval cmp_func as GCompareDataFunc, byval cmp_data as gpointer) as GSequenceIter ptr 3104 declare function g_sequence_search_iter(byval seq as GSequence ptr, byval data as gpointer, byval iter_cmp as GSequenceIterCompareFunc, byval cmp_data as gpointer) as GSequenceIter ptr 3105 declare function g_sequence_lookup(byval seq as GSequence ptr, byval data as gpointer, byval cmp_func as GCompareDataFunc, byval cmp_data as gpointer) as GSequenceIter ptr 3106 declare function g_sequence_lookup_iter(byval seq as GSequence ptr, byval data as gpointer, byval iter_cmp as GSequenceIterCompareFunc, byval cmp_data as gpointer) as GSequenceIter ptr 3107 declare function g_sequence_get(byval iter as GSequenceIter ptr) as gpointer 3108 declare sub g_sequence_set(byval iter as GSequenceIter ptr, byval data as gpointer) 3109 declare function g_sequence_iter_is_begin(byval iter as GSequenceIter ptr) as gboolean 3110 declare function g_sequence_iter_is_end(byval iter as GSequenceIter ptr) as gboolean 3111 declare function g_sequence_iter_next(byval iter as GSequenceIter ptr) as GSequenceIter ptr 3112 declare function g_sequence_iter_prev(byval iter as GSequenceIter ptr) as GSequenceIter ptr 3113 declare function g_sequence_iter_get_position(byval iter as GSequenceIter ptr) as gint 3114 declare function g_sequence_iter_move(byval iter as GSequenceIter ptr, byval delta as gint) as GSequenceIter ptr 3115 declare function g_sequence_iter_get_sequence(byval iter as GSequenceIter ptr) as GSequence ptr 3116 declare function g_sequence_iter_compare(byval a as GSequenceIter ptr, byval b as GSequenceIter ptr) as gint 3117 declare function g_sequence_range_get_midpoint(byval begin as GSequenceIter ptr, byval end as GSequenceIter ptr) as GSequenceIter ptr 3118 #define __G_SHELL_H__ 3119 #define G_SHELL_ERROR g_shell_error_quark() 3120 3121 type GShellError as long 3122 enum 3123 G_SHELL_ERROR_BAD_QUOTING 3124 G_SHELL_ERROR_EMPTY_STRING 3125 G_SHELL_ERROR_FAILED 3126 end enum 3127 3128 declare function g_shell_error_quark() as GQuark 3129 declare function g_shell_quote(byval unquoted_string as const gchar ptr) as gchar ptr 3130 declare function g_shell_unquote(byval quoted_string as const gchar ptr, byval error as GError ptr ptr) as gchar ptr 3131 declare function g_shell_parse_argv(byval command_line as const gchar ptr, byval argcp as gint ptr, byval argvp as gchar ptr ptr ptr, byval error as GError ptr ptr) as gboolean 3132 #define __G_SLICE_H__ 3133 declare function g_slice_alloc(byval block_size as gsize) as gpointer 3134 declare function g_slice_alloc0(byval block_size as gsize) as gpointer 3135 declare function g_slice_copy(byval block_size as gsize, byval mem_block as gconstpointer) as gpointer 3136 declare sub g_slice_free1(byval block_size as gsize, byval mem_block as gpointer) 3137 declare sub g_slice_free_chain_with_offset(byval block_size as gsize, byval mem_chain as gpointer, byval next_offset as gsize) 3138 3139 #define g_slice_new(type) cptr(type ptr, g_slice_alloc(sizeof(type))) 3140 #define g_slice_new0(type) cptr(type ptr, g_slice_alloc0(sizeof(type))) 3141 #define g_slice_dup(type, mem) cptr(type ptr, g_slice_copy(sizeof(type), (mem))) 3142 #define g_slice_free(type, mem) scope : g_slice_free1(sizeof(type), (mem)) : end scope 3143 #define g_slice_free_chain(type, mem_chain, next) scope : g_slice_free_chain_with_offset(sizeof(type), (mem_chain), G_STRUCT_OFFSET(type, next)) : end scope 3144 3145 type GSliceConfig as long 3146 enum 3147 G_SLICE_CONFIG_ALWAYS_MALLOC = 1 3148 G_SLICE_CONFIG_BYPASS_MAGAZINES 3149 G_SLICE_CONFIG_WORKING_SET_MSECS 3150 G_SLICE_CONFIG_COLOR_INCREMENT 3151 G_SLICE_CONFIG_CHUNK_SIZES 3152 G_SLICE_CONFIG_CONTENTION_COUNTER 3153 end enum 3154 3155 declare sub g_slice_set_config(byval ckey as GSliceConfig, byval value as gint64) 3156 declare function g_slice_get_config(byval ckey as GSliceConfig) as gint64 3157 declare function g_slice_get_config_state(byval ckey as GSliceConfig, byval address as gint64, byval n_values as guint ptr) as gint64 ptr 3158 #define __G_SPAWN_H__ 3159 #define G_SPAWN_ERROR g_spawn_error_quark() 3160 3161 type GSpawnError as long 3162 enum 3163 G_SPAWN_ERROR_FORK 3164 G_SPAWN_ERROR_READ 3165 G_SPAWN_ERROR_CHDIR 3166 G_SPAWN_ERROR_ACCES 3167 G_SPAWN_ERROR_PERM 3168 G_SPAWN_ERROR_TOO_BIG 3169 G_SPAWN_ERROR_2BIG = G_SPAWN_ERROR_TOO_BIG 3170 G_SPAWN_ERROR_NOEXEC 3171 G_SPAWN_ERROR_NAMETOOLONG 3172 G_SPAWN_ERROR_NOENT 3173 G_SPAWN_ERROR_NOMEM 3174 G_SPAWN_ERROR_NOTDIR 3175 G_SPAWN_ERROR_LOOP 3176 G_SPAWN_ERROR_TXTBUSY 3177 G_SPAWN_ERROR_IO 3178 G_SPAWN_ERROR_NFILE 3179 G_SPAWN_ERROR_MFILE 3180 G_SPAWN_ERROR_INVAL 3181 G_SPAWN_ERROR_ISDIR 3182 G_SPAWN_ERROR_LIBBAD 3183 G_SPAWN_ERROR_FAILED 3184 end enum 3185 3186 #define G_SPAWN_EXIT_ERROR g_spawn_exit_error_quark() 3187 type GSpawnChildSetupFunc as sub(byval user_data as gpointer) 3188 3189 type GSpawnFlags as long 3190 enum 3191 G_SPAWN_DEFAULT = 0 3192 G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 shl 0 3193 G_SPAWN_DO_NOT_REAP_CHILD = 1 shl 1 3194 G_SPAWN_SEARCH_PATH = 1 shl 2 3195 G_SPAWN_STDOUT_TO_DEV_NULL = 1 shl 3 3196 G_SPAWN_STDERR_TO_DEV_NULL = 1 shl 4 3197 G_SPAWN_CHILD_INHERITS_STDIN = 1 shl 5 3198 G_SPAWN_FILE_AND_ARGV_ZERO = 1 shl 6 3199 G_SPAWN_SEARCH_PATH_FROM_ENVP = 1 shl 7 3200 G_SPAWN_CLOEXEC_PIPES = 1 shl 8 3201 end enum 3202 3203 declare function g_spawn_error_quark() as GQuark 3204 declare function g_spawn_exit_error_quark() as GQuark 3205 3206 #ifdef __FB_UNIX__ 3207 declare function g_spawn_async(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval error as GError ptr ptr) as gboolean 3208 declare function g_spawn_async_with_pipes(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval standard_input as gint ptr, byval standard_output as gint ptr, byval standard_error as gint ptr, byval error as GError ptr ptr) as gboolean 3209 declare function g_spawn_sync(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3210 declare function g_spawn_command_line_sync(byval command_line as const gchar ptr, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3211 declare function g_spawn_command_line_async(byval command_line as const gchar ptr, byval error as GError ptr ptr) as gboolean 3212 #else 3213 declare function g_spawn_async_ alias "g_spawn_async"(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval error as GError ptr ptr) as gboolean 3214 declare function g_spawn_async_with_pipes_ alias "g_spawn_async_with_pipes"(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval standard_input as gint ptr, byval standard_output as gint ptr, byval standard_error as gint ptr, byval error as GError ptr ptr) as gboolean 3215 declare function g_spawn_sync_ alias "g_spawn_sync"(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3216 declare function g_spawn_command_line_sync_ alias "g_spawn_command_line_sync"(byval command_line as const gchar ptr, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3217 declare function g_spawn_command_line_async_ alias "g_spawn_command_line_async"(byval command_line as const gchar ptr, byval error as GError ptr ptr) as gboolean 3218 #endif 3219 3220 declare function g_spawn_check_exit_status(byval exit_status as gint, byval error as GError ptr ptr) as gboolean 3221 declare sub g_spawn_close_pid(byval pid as GPid) 3222 3223 #ifdef __FB_WIN32__ 3224 declare function g_spawn_async_utf8(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval error as GError ptr ptr) as gboolean 3225 declare function g_spawn_async alias "g_spawn_async_utf8"(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval error as GError ptr ptr) as gboolean 3226 declare function g_spawn_async_with_pipes_utf8(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval standard_input as gint ptr, byval standard_output as gint ptr, byval standard_error as gint ptr, byval error as GError ptr ptr) as gboolean 3227 declare function g_spawn_async_with_pipes alias "g_spawn_async_with_pipes_utf8"(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval child_pid as GPid ptr, byval standard_input as gint ptr, byval standard_output as gint ptr, byval standard_error as gint ptr, byval error as GError ptr ptr) as gboolean 3228 declare function g_spawn_sync_utf8(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3229 declare function g_spawn_sync alias "g_spawn_sync_utf8"(byval working_directory as const gchar ptr, byval argv as gchar ptr ptr, byval envp as gchar ptr ptr, byval flags as GSpawnFlags, byval child_setup as GSpawnChildSetupFunc, byval user_data as gpointer, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3230 declare function g_spawn_command_line_sync_utf8(byval command_line as const gchar ptr, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3231 declare function g_spawn_command_line_sync alias "g_spawn_command_line_sync_utf8"(byval command_line as const gchar ptr, byval standard_output as gchar ptr ptr, byval standard_error as gchar ptr ptr, byval exit_status as gint ptr, byval error as GError ptr ptr) as gboolean 3232 declare function g_spawn_command_line_async_utf8(byval command_line as const gchar ptr, byval error as GError ptr ptr) as gboolean 3233 declare function g_spawn_command_line_async alias "g_spawn_command_line_async_utf8"(byval command_line as const gchar ptr, byval error as GError ptr ptr) as gboolean 3234 #endif 3235 3236 #define __G_STRFUNCS_H__ 3237 3238 type GAsciiType as long 3239 enum 3240 G_ASCII_ALNUM = 1 shl 0 3241 G_ASCII_ALPHA = 1 shl 1 3242 G_ASCII_CNTRL = 1 shl 2 3243 G_ASCII_DIGIT = 1 shl 3 3244 G_ASCII_GRAPH = 1 shl 4 3245 G_ASCII_LOWER = 1 shl 5 3246 G_ASCII_PRINT = 1 shl 6 3247 G_ASCII_PUNCT = 1 shl 7 3248 G_ASCII_SPACE = 1 shl 8 3249 G_ASCII_UPPER = 1 shl 9 3250 G_ASCII_XDIGIT = 1 shl 10 3251 end enum 3252 3253 #if (defined(__FB_WIN32__) and (not defined(GLIB_STATIC_COMPILATION))) or defined(__FB_CYGWIN__) 3254 extern import g_ascii_table as const guint16 const ptr 3255 #else 3256 extern g_ascii_table as const guint16 const ptr 3257 #endif 3258 3259 #define g_ascii_isalnum(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_ALNUM) <> 0) 3260 #define g_ascii_isalpha(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_ALPHA) <> 0) 3261 #define g_ascii_iscntrl(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_CNTRL) <> 0) 3262 #define g_ascii_isdigit(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_DIGIT) <> 0) 3263 #define g_ascii_isgraph(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_GRAPH) <> 0) 3264 #define g_ascii_islower(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_LOWER) <> 0) 3265 #define g_ascii_isprint(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_PRINT) <> 0) 3266 #define g_ascii_ispunct(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_PUNCT) <> 0) 3267 #define g_ascii_isspace(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_SPACE) <> 0) 3268 #define g_ascii_isupper(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_UPPER) <> 0) 3269 #define g_ascii_isxdigit(c) ((g_ascii_table[cast(guchar, (c))] and G_ASCII_XDIGIT) <> 0) 3270 3271 declare function g_ascii_tolower(byval c as byte) as byte 3272 declare function g_ascii_toupper(byval c as byte) as byte 3273 declare function g_ascii_digit_value(byval c as byte) as gint 3274 declare function g_ascii_xdigit_value(byval c as byte) as gint 3275 #define G_STR_DELIMITERS "_-|> <." 3276 declare function g_strdelimit(byval string as gchar ptr, byval delimiters as const gchar ptr, byval new_delimiter as byte) as gchar ptr 3277 declare function g_strcanon(byval string as gchar ptr, byval valid_chars as const gchar ptr, byval substitutor as byte) as gchar ptr 3278 declare function g_strerror(byval errnum as gint) as const gchar ptr 3279 declare function g_strsignal(byval signum as gint) as const gchar ptr 3280 declare function g_strreverse(byval string as gchar ptr) as gchar ptr 3281 declare function g_strlcpy(byval dest as gchar ptr, byval src as const gchar ptr, byval dest_size as gsize) as gsize 3282 declare function g_strlcat(byval dest as gchar ptr, byval src as const gchar ptr, byval dest_size as gsize) as gsize 3283 declare function g_strstr_len(byval haystack as const gchar ptr, byval haystack_len as gssize, byval needle as const gchar ptr) as gchar ptr 3284 declare function g_strrstr(byval haystack as const gchar ptr, byval needle as const gchar ptr) as gchar ptr 3285 declare function g_strrstr_len(byval haystack as const gchar ptr, byval haystack_len as gssize, byval needle as const gchar ptr) as gchar ptr 3286 declare function g_str_has_suffix(byval str as const gchar ptr, byval suffix as const gchar ptr) as gboolean 3287 declare function g_str_has_prefix(byval str as const gchar ptr, byval prefix as const gchar ptr) as gboolean 3288 declare function g_strtod(byval nptr as const gchar ptr, byval endptr as gchar ptr ptr) as gdouble 3289 declare function g_ascii_strtod(byval nptr as const gchar ptr, byval endptr as gchar ptr ptr) as gdouble 3290 declare function g_ascii_strtoull(byval nptr as const gchar ptr, byval endptr as gchar ptr ptr, byval base as guint) as guint64 3291 declare function g_ascii_strtoll(byval nptr as const gchar ptr, byval endptr as gchar ptr ptr, byval base as guint) as gint64 3292 const G_ASCII_DTOSTR_BUF_SIZE = 29 + 10 3293 declare function g_ascii_dtostr(byval buffer as gchar ptr, byval buf_len as gint, byval d as gdouble) as gchar ptr 3294 declare function g_ascii_formatd(byval buffer as gchar ptr, byval buf_len as gint, byval format as const gchar ptr, byval d as gdouble) as gchar ptr 3295 declare function g_strchug(byval string as gchar ptr) as gchar ptr 3296 declare function g_strchomp(byval string as gchar ptr) as gchar ptr 3297 #define g_strstrip(string) g_strchomp(g_strchug(string)) 3298 declare function g_ascii_strcasecmp(byval s1 as const gchar ptr, byval s2 as const gchar ptr) as gint 3299 declare function g_ascii_strncasecmp(byval s1 as const gchar ptr, byval s2 as const gchar ptr, byval n as gsize) as gint 3300 declare function g_ascii_strdown(byval str as const gchar ptr, byval len as gssize) as gchar ptr 3301 declare function g_ascii_strup(byval str as const gchar ptr, byval len as gssize) as gchar ptr 3302 declare function g_str_is_ascii(byval str as const gchar ptr) as gboolean 3303 declare function g_strcasecmp(byval s1 as const gchar ptr, byval s2 as const gchar ptr) as gint 3304 declare function g_strncasecmp(byval s1 as const gchar ptr, byval s2 as const gchar ptr, byval n as guint) as gint 3305 declare function g_strdown(byval string as gchar ptr) as gchar ptr 3306 declare function g_strup(byval string as gchar ptr) as gchar ptr 3307 declare function g_strdup(byval str as const gchar ptr) as gchar ptr 3308 declare function g_strdup_printf(byval format as const gchar ptr, ...) as gchar ptr 3309 declare function g_strdup_vprintf(byval format as const gchar ptr, byval args as va_list) as gchar ptr 3310 declare function g_strndup(byval str as const gchar ptr, byval n as gsize) as gchar ptr 3311 declare function g_strnfill(byval length as gsize, byval fill_char as byte) as gchar ptr 3312 declare function g_strconcat(byval string1 as const gchar ptr, ...) as gchar ptr 3313 declare function g_strjoin(byval separator as const gchar ptr, ...) as gchar ptr 3314 declare function g_strcompress(byval source as const gchar ptr) as gchar ptr 3315 declare function g_strescape(byval source as const gchar ptr, byval exceptions as const gchar ptr) as gchar ptr 3316 declare function g_memdup(byval mem as gconstpointer, byval byte_size as guint) as gpointer 3317 declare function g_strsplit(byval string as const gchar ptr, byval delimiter as const gchar ptr, byval max_tokens as gint) as gchar ptr ptr 3318 declare function g_strsplit_set(byval string as const gchar ptr, byval delimiters as const gchar ptr, byval max_tokens as gint) as gchar ptr ptr 3319 declare function g_strjoinv(byval separator as const gchar ptr, byval str_array as gchar ptr ptr) as gchar ptr 3320 declare sub g_strfreev(byval str_array as gchar ptr ptr) 3321 declare function g_strdupv(byval str_array as gchar ptr ptr) as gchar ptr ptr 3322 declare function g_strv_length(byval str_array as gchar ptr ptr) as guint 3323 declare function g_stpcpy(byval dest as gchar ptr, byval src as const zstring ptr) as gchar ptr 3324 declare function g_str_to_ascii(byval str as const gchar ptr, byval from_locale as const gchar ptr) as gchar ptr 3325 declare function g_str_tokenize_and_fold(byval string as const gchar ptr, byval translit_locale as const gchar ptr, byval ascii_alternates as gchar ptr ptr ptr) as gchar ptr ptr 3326 declare function g_str_match_string(byval search_term as const gchar ptr, byval potential_hit as const gchar ptr, byval accept_alternates as gboolean) as gboolean 3327 declare function g_strv_contains(byval strv as const gchar const ptr ptr, byval str as const gchar ptr) as gboolean 3328 #define __G_STRINGCHUNK_H__ 3329 type GStringChunk as _GStringChunk 3330 declare function g_string_chunk_new(byval size as gsize) as GStringChunk ptr 3331 declare sub g_string_chunk_free(byval chunk as GStringChunk ptr) 3332 declare sub g_string_chunk_clear(byval chunk as GStringChunk ptr) 3333 declare function g_string_chunk_insert(byval chunk as GStringChunk ptr, byval string as const gchar ptr) as gchar ptr 3334 declare function g_string_chunk_insert_len(byval chunk as GStringChunk ptr, byval string as const gchar ptr, byval len as gssize) as gchar ptr 3335 declare function g_string_chunk_insert_const(byval chunk as GStringChunk ptr, byval string as const gchar ptr) as gchar ptr 3336 #define __G_TEST_UTILS_H__ 3337 3338 type GTestFunc as sub() 3339 type GTestDataFunc as sub(byval user_data as gconstpointer) 3340 type GTestFixtureFunc as sub(byval fixture as gpointer, byval user_data as gconstpointer) 3341 #macro g_assert_cmpstr(s1, cmp, s2) 3342 scope 3343 dim as const zstring ptr __s1 = (s1), __s2 = (s2) 3344 if g_strcmp0(__s1, __s2) cmp 0 then 3345 else 3346 g_assertion_message_cmpstr(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #s1 " " #cmp " " #s2, __s1, #cmp, __s2) 3347 end if 3348 end scope 3349 #endmacro 3350 #macro g_assert_cmpint(n1, cmp, n2) 3351 scope 3352 dim as gint64 __n1 = (n1), __n2 = (n2) 3353 if __n1 cmp __n2 then 3354 else 3355 g_assertion_message_cmpnum(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'i') 3356 end if 3357 end scope 3358 #endmacro 3359 #macro g_assert_cmpuint(n1, cmp, n2) 3360 scope 3361 dim as guint64 __n1 = (n1), __n2 = (n2) 3362 if __n1 cmp __n2 3363 else 3364 g_assertion_message_cmpnum(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'i') 3365 end if 3366 end scope 3367 #endmacro 3368 #macro g_assert_cmphex(n1, cmp, n2) 3369 scope 3370 dim as guint64 __n1 = (n1), __n2 = (n2) 3371 if __n1 cmp __n2 then 3372 else 3373 g_assertion_message_cmpnum(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'x') 3374 end if 3375 end scope 3376 #endmacro 3377 #macro g_assert_cmpfloat(n1, cmp, n2) 3378 scope 3379 dim as double __n1 = (n1), __n2 = (n2) 3380 if __n1 cmp __n2 then 3381 else 3382 g_assertion_message_cmpnum(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'f') 3383 end if 3384 end scope 3385 #endmacro 3386 3387 #macro g_assert_no_error(err) 3388 if err then 3389 g_assertion_message_error(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #err, err, 0, 0) 3390 end if 3391 #endmacro 3392 #macro g_assert_error(err, dom, c) 3393 if ((err = 0) orelse ((err)->domain <> dom)) orelse ((err)->code <> c) then 3394 g_assertion_message_error(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #err, err, dom, c) 3395 end if 3396 #endmacro 3397 #macro g_assert_true(expr) 3398 if G_LIKELY(expr) then 3399 else 3400 g_assertion_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, "'" #expr "' should be TRUE") 3401 end if 3402 #endmacro 3403 #macro g_assert_false(expr) 3404 if G_LIKELY(-((expr) = 0)) then 3405 else 3406 g_assertion_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, "'" #expr "' should be FALSE") 3407 end if 3408 #endmacro 3409 #macro g_assert_null(expr) 3410 if G_LIKELY(-((expr) = NULL)) then 3411 else 3412 g_assertion_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, "'" #expr "' should be NULL") 3413 end if 3414 #endmacro 3415 #macro g_assert_nonnull(expr) 3416 if G_LIKELY(-((expr) <> NULL)) then 3417 else 3418 g_assertion_message(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, "'" #expr "' should not be NULL") 3419 end if 3420 #endmacro 3421 #define g_assert_not_reached() scope : g_assertion_message_expr(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL) : end scope 3422 #macro g_assert(expr) 3423 if G_LIKELY(expr) then 3424 else 3425 g_assertion_message_expr(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, #expr) 3426 end if 3427 #endmacro 3428 3429 declare function g_strcmp0(byval str1 as const zstring ptr, byval str2 as const zstring ptr) as long 3430 declare sub g_test_minimized_result(byval minimized_quantity as double, byval format as const zstring ptr, ...) 3431 declare sub g_test_maximized_result(byval maximized_quantity as double, byval format as const zstring ptr, ...) 3432 declare sub g_test_init(byval argc as long ptr, byval argv as zstring ptr ptr ptr, ...) 3433 3434 #define g_test_initialized() g_test_config_vars->test_initialized 3435 #define g_test_quick() g_test_config_vars->test_quick 3436 #define g_test_slow() (g_test_config_vars->test_quick = 0) 3437 #define g_test_thorough() (g_test_config_vars->test_quick = 0) 3438 #define g_test_perf() g_test_config_vars->test_perf 3439 #define g_test_verbose() g_test_config_vars->test_verbose 3440 #define g_test_quiet() g_test_config_vars->test_quiet 3441 #define g_test_undefined() g_test_config_vars->test_undefined 3442 3443 declare function g_test_subprocess() as gboolean 3444 declare function g_test_run() as long 3445 declare sub g_test_add_func(byval testpath as const zstring ptr, byval test_func as GTestFunc) 3446 declare sub g_test_add_data_func(byval testpath as const zstring ptr, byval test_data as gconstpointer, byval test_func as GTestDataFunc) 3447 declare sub g_test_add_data_func_full(byval testpath as const zstring ptr, byval test_data as gpointer, byval test_func as GTestDataFunc, byval data_free_func as GDestroyNotify) 3448 declare sub g_test_fail() 3449 declare sub g_test_incomplete(byval msg as const gchar ptr) 3450 declare sub g_test_skip(byval msg as const gchar ptr) 3451 declare function g_test_failed() as gboolean 3452 declare sub g_test_set_nonfatal_assertions() 3453 #macro g_test_add(testpath, Fixture, tdata, fsetup, ftest, fteardown) 3454 scope 3455 dim add_vtable as sub cdecl(byval as const zstring ptr, byval as gsize, byval as gconstpointer, byval as sub cdecl(byval as Fixture ptr, byval as gconstpointer), byval as sub cdecl(byval as Fixture ptr, byval as gconstpointer), byval as sub cdecl(byval as Fixture ptr, byval as gconstpointer)) = cptr(sub cdecl(byval as const gchar ptr, byval as gsize, byval as gconstpointer, byval as sub cdecl(byval as Fixture ptr, byval as gconstpointer), byval as sub cdecl(byval as Fixture ptr, byval as gconstpointer), byval as sub cdecl(byval as Fixture ptr, byval as gconstpointer)), @g_test_add_vtable) 3456 add_vtable(testpath, sizeof(Fixture), tdata, fsetup, ftest, fteardown) 3457 end scope 3458 #endmacro 3459 declare sub g_test_message(byval format as const zstring ptr, ...) 3460 declare sub g_test_bug_base(byval uri_pattern as const zstring ptr) 3461 declare sub g_test_bug(byval bug_uri_snippet as const zstring ptr) 3462 declare sub g_test_timer_start() 3463 declare function g_test_timer_elapsed() as double 3464 declare function g_test_timer_last() as double 3465 declare sub g_test_queue_free(byval gfree_pointer as gpointer) 3466 declare sub g_test_queue_destroy(byval destroy_func as GDestroyNotify, byval destroy_data as gpointer) 3467 #define g_test_queue_unref(gobject) g_test_queue_destroy(g_object_unref, gobject) 3468 3469 type GTestTrapFlags as long 3470 enum 3471 G_TEST_TRAP_SILENCE_STDOUT = 1 shl 7 3472 G_TEST_TRAP_SILENCE_STDERR = 1 shl 8 3473 G_TEST_TRAP_INHERIT_STDIN = 1 shl 9 3474 end enum 3475 3476 declare function g_test_trap_fork(byval usec_timeout as guint64, byval test_trap_flags as GTestTrapFlags) as gboolean 3477 3478 type GTestSubprocessFlags as long 3479 enum 3480 G_TEST_SUBPROCESS_INHERIT_STDIN = 1 shl 0 3481 G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 shl 1 3482 G_TEST_SUBPROCESS_INHERIT_STDERR = 1 shl 2 3483 end enum 3484 3485 declare sub g_test_trap_subprocess(byval test_path as const zstring ptr, byval usec_timeout as guint64, byval test_flags as GTestSubprocessFlags) 3486 declare function g_test_trap_has_passed() as gboolean 3487 declare function g_test_trap_reached_timeout() as gboolean 3488 3489 #define g_test_trap_assert_passed() g_test_trap_assertions(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 0, 0) 3490 #define g_test_trap_assert_failed() g_test_trap_assertions(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 1, 0) 3491 #define g_test_trap_assert_stdout(soutpattern) g_test_trap_assertions(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 2, soutpattern) 3492 #define g_test_trap_assert_stdout_unmatched(soutpattern) g_test_trap_assertions(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 3, soutpattern) 3493 #define g_test_trap_assert_stderr(serrpattern) g_test_trap_assertions(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 4, serrpattern) 3494 #define g_test_trap_assert_stderr_unmatched(serrpattern) g_test_trap_assertions(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, 5, serrpattern) 3495 #define g_test_rand_bit() (0 <> (g_test_rand_int() and (1 shl 15))) 3496 3497 declare function g_test_rand_int() as gint32 3498 declare function g_test_rand_int_range(byval begin as gint32, byval end as gint32) as gint32 3499 declare function g_test_rand_double() as double 3500 declare function g_test_rand_double_range(byval range_start as double, byval range_end as double) as double 3501 type GTestCase as GTestCase_ 3502 declare function g_test_create_case(byval test_name as const zstring ptr, byval data_size as gsize, byval test_data as gconstpointer, byval data_setup as GTestFixtureFunc, byval data_test as GTestFixtureFunc, byval data_teardown as GTestFixtureFunc) as GTestCase ptr 3503 type GTestSuite as GTestSuite_ 3504 declare function g_test_create_suite(byval suite_name as const zstring ptr) as GTestSuite ptr 3505 declare function g_test_get_root() as GTestSuite ptr 3506 declare sub g_test_suite_add(byval suite as GTestSuite ptr, byval test_case as GTestCase ptr) 3507 declare sub g_test_suite_add_suite(byval suite as GTestSuite ptr, byval nestedsuite as GTestSuite ptr) 3508 declare function g_test_run_suite(byval suite as GTestSuite ptr) as long 3509 declare sub g_test_trap_assertions(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr, byval assertion_flags as guint64, byval pattern as const zstring ptr) 3510 declare sub g_assertion_message(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr, byval message as const zstring ptr) 3511 declare sub g_assertion_message_expr(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr, byval expr as const zstring ptr) 3512 declare sub g_assertion_message_cmpstr(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr, byval expr as const zstring ptr, byval arg1 as const zstring ptr, byval cmp as const zstring ptr, byval arg2 as const zstring ptr) 3513 declare sub g_assertion_message_cmpnum(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr, byval expr as const zstring ptr, byval arg1 as clongdouble, byval cmp as const zstring ptr, byval arg2 as clongdouble, byval numtype as byte) 3514 declare sub g_assertion_message_error(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr, byval expr as const zstring ptr, byval error as const GError ptr, byval error_domain as GQuark, byval error_code as long) 3515 declare sub g_test_add_vtable(byval testpath as const zstring ptr, byval data_size as gsize, byval test_data as gconstpointer, byval data_setup as GTestFixtureFunc, byval data_test as GTestFixtureFunc, byval data_teardown as GTestFixtureFunc) 3516 3517 type GTestConfig 3518 test_initialized as gboolean 3519 test_quick as gboolean 3520 test_perf as gboolean 3521 test_verbose as gboolean 3522 test_quiet as gboolean 3523 test_undefined as gboolean 3524 end type 3525 3526 #if (defined(__FB_WIN32__) and (not defined(GLIB_STATIC_COMPILATION))) or defined(__FB_CYGWIN__) 3527 extern import g_test_config_vars as const GTestConfig const ptr 3528 #else 3529 extern g_test_config_vars as const GTestConfig const ptr 3530 #endif 3531 3532 type GTestLogType as long 3533 enum 3534 G_TEST_LOG_NONE 3535 G_TEST_LOG_ERROR 3536 G_TEST_LOG_START_BINARY 3537 G_TEST_LOG_LIST_CASE 3538 G_TEST_LOG_SKIP_CASE 3539 G_TEST_LOG_START_CASE 3540 G_TEST_LOG_STOP_CASE 3541 G_TEST_LOG_MIN_RESULT 3542 G_TEST_LOG_MAX_RESULT 3543 G_TEST_LOG_MESSAGE 3544 G_TEST_LOG_START_SUITE 3545 G_TEST_LOG_STOP_SUITE 3546 end enum 3547 3548 type GTestLogMsg 3549 log_type as GTestLogType 3550 n_strings as guint 3551 strings as gchar ptr ptr 3552 n_nums as guint 3553 nums as clongdouble ptr 3554 end type 3555 3556 type GTestLogBuffer 3557 data as GString ptr 3558 msgs as GSList ptr 3559 end type 3560 3561 declare function g_test_log_type_name(byval log_type as GTestLogType) as const zstring ptr 3562 declare function g_test_log_buffer_new() as GTestLogBuffer ptr 3563 declare sub g_test_log_buffer_free(byval tbuffer as GTestLogBuffer ptr) 3564 declare sub g_test_log_buffer_push(byval tbuffer as GTestLogBuffer ptr, byval n_bytes as guint, byval bytes as const guint8 ptr) 3565 declare function g_test_log_buffer_pop(byval tbuffer as GTestLogBuffer ptr) as GTestLogMsg ptr 3566 declare sub g_test_log_msg_free(byval tmsg as GTestLogMsg ptr) 3567 type GTestLogFatalFunc as function(byval log_domain as const gchar ptr, byval log_level as GLogLevelFlags, byval message as const gchar ptr, byval user_data as gpointer) as gboolean 3568 declare sub g_test_log_set_fatal_handler(byval log_func as GTestLogFatalFunc, byval user_data as gpointer) 3569 declare sub g_test_expect_message(byval log_domain as const gchar ptr, byval log_level as GLogLevelFlags, byval pattern as const gchar ptr) 3570 declare sub g_test_assert_expected_messages_internal(byval domain as const zstring ptr, byval file as const zstring ptr, byval line as long, byval func as const zstring ptr) 3571 3572 type GTestFileType as long 3573 enum 3574 G_TEST_DIST 3575 G_TEST_BUILT 3576 end enum 3577 3578 declare function g_test_build_filename(byval file_type as GTestFileType, byval first_path as const gchar ptr, ...) as gchar ptr 3579 declare function g_test_get_dir(byval file_type as GTestFileType) as const gchar ptr 3580 declare function g_test_get_filename(byval file_type as GTestFileType, byval first_path as const gchar ptr, ...) as const gchar ptr 3581 #define g_test_assert_expected_messages() g_test_assert_expected_messages_internal(G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC) 3582 #define __G_THREADPOOL_H__ 3583 type GThreadPool as _GThreadPool 3584 3585 type _GThreadPool 3586 func as GFunc 3587 user_data as gpointer 3588 exclusive as gboolean 3589 end type 3590 3591 declare function g_thread_pool_new(byval func as GFunc, byval user_data as gpointer, byval max_threads as gint, byval exclusive as gboolean, byval error as GError ptr ptr) as GThreadPool ptr 3592 declare sub g_thread_pool_free(byval pool as GThreadPool ptr, byval immediate as gboolean, byval wait_ as gboolean) 3593 declare function g_thread_pool_push(byval pool as GThreadPool ptr, byval data as gpointer, byval error as GError ptr ptr) as gboolean 3594 declare function g_thread_pool_unprocessed(byval pool as GThreadPool ptr) as guint 3595 declare sub g_thread_pool_set_sort_function(byval pool as GThreadPool ptr, byval func as GCompareDataFunc, byval user_data as gpointer) 3596 declare function g_thread_pool_set_max_threads(byval pool as GThreadPool ptr, byval max_threads as gint, byval error as GError ptr ptr) as gboolean 3597 declare function g_thread_pool_get_max_threads(byval pool as GThreadPool ptr) as gint 3598 declare function g_thread_pool_get_num_threads(byval pool as GThreadPool ptr) as guint 3599 declare sub g_thread_pool_set_max_unused_threads(byval max_threads as gint) 3600 declare function g_thread_pool_get_max_unused_threads() as gint 3601 declare function g_thread_pool_get_num_unused_threads() as guint 3602 declare sub g_thread_pool_stop_unused_threads() 3603 declare sub g_thread_pool_set_max_idle_time(byval interval as guint) 3604 declare function g_thread_pool_get_max_idle_time() as guint 3605 #define __G_TIMER_H__ 3606 type GTimer as _GTimer 3607 const G_USEC_PER_SEC = 1000000 3608 declare function g_timer_new() as GTimer ptr 3609 declare sub g_timer_destroy(byval timer as GTimer ptr) 3610 declare sub g_timer_start(byval timer as GTimer ptr) 3611 declare sub g_timer_stop(byval timer as GTimer ptr) 3612 declare sub g_timer_reset(byval timer as GTimer ptr) 3613 declare sub g_timer_continue(byval timer as GTimer ptr) 3614 declare function g_timer_elapsed(byval timer as GTimer ptr, byval microseconds as gulong ptr) as gdouble 3615 declare sub g_usleep(byval microseconds as gulong) 3616 declare sub g_time_val_add(byval time_ as GTimeVal ptr, byval microseconds as glong) 3617 declare function g_time_val_from_iso8601(byval iso_date as const gchar ptr, byval time_ as GTimeVal ptr) as gboolean 3618 declare function g_time_val_to_iso8601(byval time_ as GTimeVal ptr) as gchar ptr 3619 #define __G_TRASH_STACK_H__ 3620 type GTrashStack as _GTrashStack 3621 3622 type _GTrashStack 3623 next as GTrashStack ptr 3624 end type 3625 3626 declare sub g_trash_stack_push(byval stack_p as GTrashStack ptr ptr, byval data_p as gpointer) 3627 declare function g_trash_stack_pop(byval stack_p as GTrashStack ptr ptr) as gpointer 3628 declare function g_trash_stack_peek(byval stack_p as GTrashStack ptr ptr) as gpointer 3629 declare function g_trash_stack_height(byval stack_p as GTrashStack ptr ptr) as guint 3630 #define __G_TREE_H__ 3631 type GTree as _GTree 3632 type GTraverseFunc as function(byval key as gpointer, byval value as gpointer, byval data as gpointer) as gboolean 3633 declare function g_tree_new(byval key_compare_func as GCompareFunc) as GTree ptr 3634 declare function g_tree_new_with_data(byval key_compare_func as GCompareDataFunc, byval key_compare_data as gpointer) as GTree ptr 3635 declare function g_tree_new_full(byval key_compare_func as GCompareDataFunc, byval key_compare_data as gpointer, byval key_destroy_func as GDestroyNotify, byval value_destroy_func as GDestroyNotify) as GTree ptr 3636 declare function g_tree_ref(byval tree as GTree ptr) as GTree ptr 3637 declare sub g_tree_unref