class GLib::MainContext

Overview

The GMainContext struct is an opaque data type representing a set of sources to be handled in a main loop.

Defined in:

lib/gi-crystal/src/auto/g_lib-2.0/main_context.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

def self.new_with_flags(flags : GLib::MainContextFlags) : self #

Class Method Detail

def self.default : GLib::MainContext #

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


def self.ref_thread_default : GLib::MainContext #

def self.thread_default : GLib::MainContext? #

Instance Method Detail

def acquire : Bool #

def check(max_priority : Int32, fds : Enumerable(GLib::PollFD)) : Bool #

def dispatch : Nil #

def finalize #

def find_source_by_funcs_user_data(funcs : GLib::SourceFuncs, user_data : Pointer(Void)?) : GLib::Source #

def find_source_by_id(source_id : UInt32) : GLib::Source #

def find_source_by_user_data(user_data : Pointer(Void)?) : GLib::Source #

def invoke_full(priority : Int32, function : GLib::SourceFunc) : Nil #

def is_owner : Bool #

def iteration(may_block : Bool) : Bool #

def pending : Bool #

def pop_thread_default : Nil #

def prepare : Bool #

def push_thread_default : Nil #

def query(max_priority : Int32, timeout_ : Int32, fds : Enumerable(GLib::PollFD)) : Int32 #

def ref : GLib::MainContext #

def release : Nil #

def to_unsafe : Pointer(Void) #

def unref : Nil #

def wait(cond : GLib::Cond, mutex : GLib::Mutex) : Bool #

def wakeup : Nil #