module GLib
Extended Modules
Defined in:
lib/gi-crystal/src/auto/g_lib-2.0/allocator.crlib/gi-crystal/src/auto/g_lib-2.0/bytes.cr
lib/gi-crystal/src/auto/g_lib-2.0/cache.cr
lib/gi-crystal/src/auto/g_lib-2.0/completion.cr
lib/gi-crystal/src/auto/g_lib-2.0/g_lib.cr
lib/gi-crystal/src/auto/g_lib-2.0/main_context.cr
lib/gi-crystal/src/auto/g_lib-2.0/main_loop.cr
lib/gi-crystal/src/auto/g_lib-2.0/mapped_file.cr
lib/gi-crystal/src/auto/g_lib-2.0/markup_parse_context.cr
lib/gi-crystal/src/auto/g_lib-2.0/markup_parser.cr
lib/gi-crystal/src/auto/g_lib-2.0/mem_chunk.cr
lib/gi-crystal/src/auto/g_lib-2.0/path_buf.cr
lib/gi-crystal/src/auto/g_lib-2.0/relation.cr
lib/gi-crystal/src/auto/g_lib-2.0/source.cr
lib/gi-crystal/src/auto/g_lib-2.0/source_callback_funcs.cr
lib/gi-crystal/src/auto/g_lib-2.0/source_funcs.cr
lib/gi-crystal/src/auto/g_lib-2.0/tuples.cr
lib/gi-crystal/src/auto/g_lib-2.0/unix_pipe.cr
lib/gi-crystal/src/auto/g_lib-2.0/variant_builder.cr
lib/gi-crystal/src/auto/g_lib-2.0/variant_dict.cr
lib/gi-crystal/src/auto/g_lib-2.0/variant_type.cr
lib/gi-crystal/src/bindings/g_lib/bytes.cr
lib/gi-crystal/src/bindings/g_lib/error.cr
lib/gi-crystal/src/bindings/g_lib/list.cr
lib/gi-crystal/src/bindings/g_lib/slist.cr
lib/gi-crystal/src/bindings/g_lib/timeout.cr
lib/gi-crystal/src/bindings/g_lib/variant.cr
lib/gi-crystal/src/bindings/g_lib/variant_dict.cr
Constant Summary
-
ALLOC_AND_FREE =
2
-
ALLOC_ONLY =
1
-
ALLOCATOR_LIST =
1
-
ALLOCATOR_NODE =
3
-
ALLOCATOR_SLIST =
2
-
ATOMIC_REF_COUNT_INIT =
1
-
Evaluates to the initial reference count for
gatomicrefcount
.This macro is useful for initializing
gatomicrefcount
fields inside structures, for instance:|[ typedef struct { gatomicrefcount ref_count; char *name; char *address; } Person;
static const Person default_person = { .ref_count = G_ATOMIC_REF_COUNT_INIT, .name = "Default name", .address = "Default address", }; ]|
-
MAJOR_VERSION =
2
-
The major version number of the GLib library.
Like #glib_major_version, but from the headers used at application compile time, rather than from the library linked against at application run time.
-
MICRO_VERSION =
0
-
The micro version number of the GLib library.
Like #gtk_micro_version, but from the headers used at application compile time, rather than from the library linked against at application run time.
-
MINOR_VERSION =
84
-
The minor version number of the GLib library.
Like #gtk_minor_version, but from the headers used at application compile time, rather than from the library linked against at application run time.
-
PRIORITY_DEFAULT =
0
-
Use this for default priority event sources.
In GLib this priority is used when adding timeout functions with
GLib::timeout_add
. In GDK this priority is used for events from the X server. -
PRIORITY_DEFAULT_IDLE =
200
-
Use this for default priority idle functions.
In GLib this priority is used when adding idle functions with
GLib::idle_add
. -
PRIORITY_HIGH =
-100
-
Use this for high priority event sources.
It is not used within GLib or GTK.
-
PRIORITY_HIGH_IDLE =
100
-
Use this for high priority idle functions.
GTK uses %G_PRIORITY_HIGH_IDLE + 10 for resizing operations, and %G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is done to ensure that any pending resizes are processed before any pending redraws, so that widgets are not redrawn twice unnecessarily.)
-
PRIORITY_LOW =
300
-
Use this for very low priority background tasks.
It is not used within GLib or GTK.
-
REF_COUNT_INIT =
-1
-
Evaluates to the initial reference count for
grefcount
.This macro is useful for initializing
grefcount
fields inside structures, for instance:|[ typedef struct { grefcount ref_count; char *name; char *address; } Person;
static const Person default_person = { .ref_count = G_REF_COUNT_INIT, .name = "Default name", .address = "Default address", }; ]|
-
SOURCE_CONTINUE =
true
-
Use this macro as the return value of a
GLib::SourceFunc
to leave theGLib::Source
in the main loop. -
SOURCE_REMOVE =
false
-
Use this macro as the return value of a
GLib::SourceFunc
to remove theGLib::Source
from the main loop. -
TEST_OPTION_NO_PRGNAME =
"no_g_set_prgname"
-
A value that can be passed as an option to
GLib::test_init
.If this option is given,
GLib::test_init
will not callGLib#prgname=
. -
TEST_OPTION_NONFATAL_ASSERTIONS =
"nonfatal-assertions"
-
A value that can be passed as an option to
GLib::test_init
.If this option is given, assertions will not abort the process, but call
GLib::test_fail
. Equivalent toGLib::test_set_nonfatal_assertions
.
Class Method Summary
- .aligned_free_sized(mem : Pointer(Void) | Nil, alignment : UInt64, size : UInt64) : Nil
- .application_name : String | Nil
- .application_name=(application_name : String) : Nil
- .assertion_message_cmpint(domain : String, file : String, line : Int32, func : String, expr : String, arg1 : UInt64, cmp : String, arg2 : UInt64, numtype : Int8) : Nil
- .async_queue_new : GLib::AsyncQueue
- .async_queue_new_full(item_free_func : GLib::DestroyNotify | Nil) : GLib::AsyncQueue
- .atomic_int_compare_and_exchange_full(atomic : Pointer(Int32), oldval : Int32, newval : Int32, preval : Int32) : Bool
- .atomic_int_exchange(atomic : Pointer(Int32), newval : Int32) : Int32
- .atomic_pointer_compare_and_exchange_full(atomic : Pointer(Void), oldval : Pointer(Void) | Nil, newval : Pointer(Void) | Nil, preval : Pointer(Void)) : Bool
- .atomic_pointer_exchange(atomic : Pointer(Void) | Nil, newval : Pointer(Void) | Nil) : Pointer(Void) | Nil
- .bit_nth_lsf(mask : UInt64, nth_bit : Int32) : Int32
- .bit_nth_msf(mask : UInt64, nth_bit : Int32) : Int32
- .bit_storage(number : UInt64) : UInt32
- .blow_chunks : Nil
- .byte_array_append(array : ::Bytes, data : Pointer(UInt8), len : UInt32) : ::Bytes
- .byte_array_prepend(array : ::Bytes, data : Pointer(UInt8), len : UInt32) : ::Bytes
- .byte_array_ref(array : ::Bytes) : ::Bytes
- .byte_array_ref(*array : UInt8)
- .byte_array_remove_index(array : ::Bytes, index_ : UInt32) : ::Bytes
- .byte_array_remove_index_fast(array : ::Bytes, index_ : UInt32) : ::Bytes
- .byte_array_remove_range(array : ::Bytes, index_ : UInt32, length : UInt32) : ::Bytes
- .byte_array_set_size(array : ::Bytes, length : UInt32) : ::Bytes
- .byte_array_sized_new(reserved_size : UInt32) : ::Bytes
- .byte_array_sort(array : ::Bytes, compare_func : GLib::CompareFunc) : Nil
- .byte_array_sort_with_data(array : ::Bytes, compare_func : GLib::CompareDataFunc, user_data : Pointer(Void) | Nil) : Nil
- .check_version(required_major : UInt32, required_minor : UInt32, required_micro : UInt32) : String | Nil
- .chmod(filename : String, mode : Int32) : Int32
- .closefrom(lowfd : Int32) : Int32
- .creat(filename : String, mode : Int32) : Int32
- .datalist_id_remove_multiple(datalist : GLib::Data, keys : Enumerable(UInt32)) : Nil
- .error_domain_register(error_type_name : String, error_type_private_size : UInt64, error_type_init : GLib::ErrorInitFunc, error_type_copy : GLib::ErrorCopyFunc, error_type_clear : GLib::ErrorClearFunc) : UInt32
- .error_domain_register_static(error_type_name : String, error_type_private_size : UInt64, error_type_init : GLib::ErrorInitFunc, error_type_copy : GLib::ErrorCopyFunc, error_type_clear : GLib::ErrorClearFunc) : UInt32
- .fdwalk_set_cloexec(lowfd : Int32) : Int32
- .fopen(filename : String, mode : String) : Pointer(Void) | Nil
-
.format_size_for_display(size : Int64) : String
DEPRECATED
- .free_sized(mem : Pointer(Void) | Nil, size : UInt64) : Nil
- .freopen(filename : String, mode : String, stream : Pointer(Void) | Nil) : Pointer(Void) | Nil
- .fsync(fd : Int32) : Int32
- .hash_table_find(hash_table : Pointer(Void), predicate : GLib::HRFunc, user_data : Pointer(Void) | Nil) : Pointer(Void) | Nil
- .hash_table_foreach(hash_table : Pointer(Void), func : GLib::HFunc, user_data : Pointer(Void) | Nil) : Nil
- .hash_table_foreach_remove(hash_table : Pointer(Void), func : GLib::HRFunc, user_data : Pointer(Void) | Nil) : UInt32
- .hash_table_foreach_steal(hash_table : Pointer(Void), func : GLib::HRFunc, user_data : Pointer(Void) | Nil) : UInt32
- .hash_table_ref(hash_table : Pointer(Void)) : Pointer(Void)
- .hook_insert_sorted(hook_list : GLib::HookList, hook : GLib::Hook, func : GLib::HookCompareFunc) : Nil
- .idle_add(priority : Priority = Priority::Default, &block : -> Bool)
- .idle_remove_by_data(data : Pointer(Void) | Nil) : Bool
- .idle_source_new : GLib::Source
- .list_pop_allocator : Nil
- .list_push_allocator(allocator : GLib::Allocator) : Nil
- .log_writer_default_set_debug_domains(domains : String | Nil) : Nil
- .log_writer_syslog(log_level : GLib::LogLevelFlags, fields : Enumerable(GLib::LogField), user_data : Pointer(Void) | Nil) : GLib::LogWriterOutput
- .lstat(filename : String, buf : GLib::StatBuf) : Int32
- .main_context_default : GLib::MainContext
- .main_context_get_thread_default : GLib::MainContext | Nil
- .main_context_ref_thread_default : GLib::MainContext
- .main_current_source : GLib::Source | Nil
- .main_depth : Int32
- .markup_escape_text(text : String, length : Int64) : String
- .mem_chunk_info : Nil
- .mkdir(filename : String, mode : Int32) : Int32
- .node_pop_allocator : Nil
- .node_push_allocator(allocator : GLib::Allocator) : Nil
- .on_error_query(prg_name : String) : Nil
- .on_error_stack_trace(prg_name : String | Nil) : Nil
- .once_init_enter_impl(location : Pointer(UInt64)) : Bool
- .open(filename : String, flags : Int32, mode : Int32) : Int32
- .os_info(key_name : String) : String | Nil
- .path_buf_equal(v1 : Pointer(Void), v2 : Pointer(Void)) : Bool
- .pointer_bit_lock_and_get(address : Pointer(Void), lock_bit : UInt32) : Nil
- .pointer_bit_lock_mask_ptr(ptr : Pointer(Void) | Nil, lock_bit : UInt32, set : Bool, preserve_mask : UInt64, preserve_ptr : Pointer(Void) | Nil) : Pointer(Void) | Nil
- .pointer_bit_unlock_and_set(address : Pointer(Void), lock_bit : UInt32, ptr : Pointer(Void) | Nil, preserve_mask : UInt64) : Nil
- .prgname : String | Nil
- .prgname=(prgname : String) : Nil
- .prgname_once=(prgname : String) : Bool
-
.qsort_with_data(pbase : Pointer(Void), total_elems : Int32, size : UInt64, compare_func : GLib::CompareDataFunc, user_data : Pointer(Void) | Nil) : Nil
DEPRECATED
- .quark_from_string(string : String | Nil) : UInt32
- .quark_to_string(quark : UInt32) : String
- .quark_try_string(string : String | Nil) : UInt32
- .ref_string_equal(str1 : String, str2 : String) : Bool
- .reload_user_special_dirs_cache : Nil
- .remove(filename : String) : Int32
- .rename(oldfilename : String, newfilename : String) : Int32
- .sequence_foreach_range(begin _begin : GLib::SequenceIter, end _end : GLib::SequenceIter, func : GLib::Func, user_data : Pointer(Void) | Nil) : Nil
- .sequence_sort_changed(iter : GLib::SequenceIter, cmp_func : GLib::CompareDataFunc, cmp_data : Pointer(Void) | Nil) : Nil
- .sequence_sort_changed_iter(iter : GLib::SequenceIter, iter_cmp : GLib::SequenceIterCompareFunc, cmp_data : Pointer(Void) | Nil) : Nil
- .slist_pop_allocator : Nil
- .slist_push_allocator(allocator : GLib::Allocator) : Nil
- .source_remove(tag : UInt32) : Bool
- .source_set_name_by_id(tag : UInt32, name : String) : Nil
- .spaced_primes_closest(num : UInt32) : UInt32
- .stat(filename : String, buf : GLib::StatBuf) : Int32
- .strdupv(str_array : Enumerable(String) | Nil) : Enumerable(String) | Nil
- .strdupv(*str_array : String)
- .strsplit(string : String, delimiter : String, max_tokens : Int32) : Enumerable(String)
- .strsplit_set(string : String, delimiters : String, max_tokens : Int32) : Enumerable(String)
- .system_config_dirs : Enumerable(String)
- .system_data_dirs : Enumerable(String)
- .test_disable_crash_reporting : Nil
- .test_trap_subprocess_with_envp(test_path : String | Nil, envp : Enumerable(String) | Nil, usec_timeout : UInt64, test_flags : GLib::TestSubprocessFlags) : Nil
- .timeout(interval : Time::Span, priority : Priority = Priority::Default, &block : -> Bool)
- .timeout_milliseconds(interval : UInt32, priority : Priority = Priority::Default, &block : -> Bool)
- .timeout_seconds(interval : UInt32, priority : Priority = Priority::Default, &block : -> Bool)
- .timeout_source_new(interval : UInt32) : GLib::Source
- .timeout_source_new_seconds(interval : UInt32) : GLib::Source
- .user_cache_dir : Path
- .user_config_dir : Path
- .user_data_dir : Path
- .user_runtime_dir : Path
- .user_special_dir(directory : GLib::UserDirectory) : Path | Nil
- .user_state_dir : Path
- .utf8_truncate_middle(string : String, truncate_length : UInt64) : String
- .utime(filename : String, utb : Pointer(Void) | Nil) : Int32
- .variant_get_gtype : UInt64
- .variant_is_object_path(string : String) : Bool
- .variant_is_signature(string : String) : Bool
- .variant_parse_error_print_context(error : GLib::Error, source_str : String) : String
- .variant_parse_error_quark : UInt32
-
.variant_parser_get_error_quark : UInt32
DEPRECATED
- .variant_type_checked_(type_string : String) : GLib::VariantType
- .variant_type_string_get_depth_(type_string : String) : UInt64
- .variant_type_string_is_valid(type_string : String) : Bool
- .variant_type_string_scan(string : String, limit : String | Nil) : Bool
Instance Method Summary
Class Method Detail
DEPRECATED