class GLib::Source

Overview

The GSource struct is an opaque data type representing an event source.

Defined in:

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

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

def self.new(data : LibGLib::Source, transfer : GICrystal::Transfer) #

def self.new(ref_count : UInt32? = nil, priority : Int32? = nil, flags : UInt32? = nil, source_id : UInt32? = nil) #

def self.new(source_funcs : GLib::SourceFuncs, struct_size : UInt32) : self #

Class Method Detail

def self.g_type : UInt64 #

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


def self.remove(tag : UInt32) : Bool #

def self.set_name_by_id(tag : UInt32, name : String) : Nil #

Instance Method Detail

def ==(other : self) : Bool #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def add_child_source(child_source : GLib::Source) : Nil #

def add_unix_fd(fd : Int32, events : GLib::IOCondition) : Pointer(Void) #

def attach(context : GLib::MainContext?) : UInt32 #

def callback=(func : GLib::SourceFunc) : Nil #

def callback_data : Pointer(Void)? #

def callback_data! #

def callback_funcs : GLib::SourceCallbackFuncs? #

def callback_funcs! #

def can_recurse : Bool #

def can_recurse=(can_recurse : Bool) : Nil #

def context : GLib::MainContext? #

def context! #

def current_time(timeval : GLib::TimeVal) : Nil #

def destroy : Nil #

def flags : UInt32 #

def flags=(value : UInt32) #

def funcs=(funcs : GLib::SourceFuncs) : Nil #

def id : UInt32 #

def is_destroyed : Bool #

def modify_unix_fd(tag : Pointer(Void), new_events : GLib::IOCondition) : Nil #

def name : String? #

def name! #

def name=(name : String) : Nil #

def next : GLib::Source? #

def next! #

def poll_fds : GLib::SList? #

def poll_fds! #

def prev : GLib::Source? #

def prev! #

def priority : Int32 #

def priority=(priority : Int32) : Nil #

def priv : GLib::SourcePrivate? #

def priv! #

def query_unix_fd(tag : Pointer(Void)) : GLib::IOCondition #

def ready_time : Int64 #

def ready_time=(ready_time : Int64) : Nil #

def ref : GLib::Source #

def ref_count : UInt32 #

def ref_count=(value : UInt32) #

def remove_child_source(child_source : GLib::Source) : Nil #

def remove_unix_fd(tag : Pointer(Void)) : Nil #

def set_callback_indirect(callback_data : Pointer(Void)?, callback_funcs : GLib::SourceCallbackFuncs) : Nil #

def source_funcs : GLib::SourceFuncs? #

def source_funcs! #

def source_id : UInt32 #

def source_id=(value : UInt32) #

def static_name=(name : String) : Nil #

def time : Int64 #

def to_unsafe #

def unref : Nil #