module GLib

Extended Modules

Defined in:

lib/gi-crystal/src/auto/g_lib-2.0/bytes.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/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/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

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 = 3

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 = 71

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 g_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 g_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+.

SOURCE_CONTINUE = true

Use this macro as the return value of a #GSourceFunc to leave the #GSource in the main loop.

SOURCE_REMOVE = false

Use this macro as the return value of a #GSourceFunc to remove the #GSource from the main loop.

Class Method Summary

Instance Method Summary

Class Method Detail

def self.application_name : String | Nil #

[View source]
def self.application_name=(application_name : String) : Nil #

[View source]
def self.bit_nth_lsf(mask : UInt64, nth_bit : Int32) : Int32 #

[View source]
def self.bit_nth_msf(mask : UInt64, nth_bit : Int32) : Int32 #

[View source]
def self.bit_storage(number : UInt64) : UInt32 #

[View source]
def self.check_version(required_major : UInt32, required_minor : UInt32, required_micro : UInt32) : String | Nil #

[View source]
def self.format_size_for_display(size : Int64) : String #

DEPRECATED


[View source]
def self.idle_add(priority : Priority = Priority::Default, &block : -> Bool) #

[View source]
def self.idle_remove_by_data(data : Pointer(Void) | Nil) : Bool #

[View source]
def self.idle_source_new : GLib::Source #

[View source]
def self.main_context_default : GLib::MainContext #

[View source]
def self.main_context_get_thread_default : GLib::MainContext | Nil #

[View source]
def self.main_context_ref_thread_default : GLib::MainContext #

[View source]
def self.main_current_source : GLib::Source | Nil #

[View source]
def self.main_depth : Int32 #

[View source]
def self.markup_escape_text(text : String, length : Int64) : String #

[View source]
def self.on_error_query(prg_name : String) : Nil #

[View source]
def self.on_error_stack_trace(prg_name : String) : Nil #

[View source]
def self.os_info(key_name : String) : String | Nil #

[View source]
def self.prgname : String | Nil #

[View source]
def self.prgname=(prgname : String) : Nil #

[View source]
def self.quark_from_string(string : String | Nil) : UInt32 #

[View source]
def self.quark_to_string(quark : UInt32) : String #

[View source]
def self.quark_try_string(string : String | Nil) : UInt32 #

[View source]
def self.reload_user_special_dirs_cache : Nil #

[View source]
def self.source_remove(tag : UInt32) : Bool #

[View source]
def self.source_set_name_by_id(tag : UInt32, name : String) : Nil #

[View source]
def self.spaced_primes_closest(num : UInt32) : UInt32 #

[View source]
def self.system_config_dirs : Enumerable(String) #

[View source]
def self.system_data_dirs : Enumerable(String) #

[View source]
def self.timeout(interval : Time::Span, priority : Priority = Priority::Default, &block : -> Bool) #

[View source]
def self.timeout_milliseconds(interval : UInt32, priority : Priority = Priority::Default, &block : -> Bool) #

[View source]
def self.timeout_seconds(interval : UInt32, priority : Priority = Priority::Default, &block : -> Bool) #

[View source]
def self.timeout_source_new(interval : UInt32) : GLib::Source #

[View source]
def self.timeout_source_new_seconds(interval : UInt32) : GLib::Source #

[View source]
def self.user_cache_dir : Path #

[View source]
def self.user_config_dir : Path #

[View source]
def self.user_data_dir : Path #

[View source]
def self.user_runtime_dir : Path #

[View source]
def self.user_special_dir(directory : GLib::UserDirectory) : Path | Nil #

[View source]
def self.user_state_dir : Path #

[View source]
def self.variant_get_gtype : UInt64 #

[View source]
def self.variant_is_object_path(string : String) : Bool #

[View source]
def self.variant_is_signature(string : String) : Bool #

[View source]
def self.variant_parse_error_print_context(error : GLib::Error, source_str : String) : String #

[View source]
def self.variant_parse_error_quark : UInt32 #

[View source]
def self.variant_parser_get_error_quark : UInt32 #

DEPRECATED


[View source]
def self.variant_type_checked_(arg0 : String) : GLib::VariantType #

[View source]
def self.variant_type_string_get_depth_(type_string : String) : UInt64 #

[View source]
def self.variant_type_string_is_valid(type_string : String) : Bool #

[View source]
def self.variant_type_string_scan(string : String, limit : String | Nil) : Bool #

[View source]

Instance Method Detail

def variant_parse(type : GLib::VariantType | Nil, text : String, limit : String | Nil, endptr : String | Nil) : GLib::Variant #

[View source]