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(callback_data : Pointer(Void)? = nil, callback_funcs : GLib::SourceCallbackFuncs? = nil, source_funcs : GLib::SourceFuncs? = nil, ref_count : UInt32? = nil, context : GLib::MainContext? = nil, priority : Int32? = nil, flags : UInt32? = nil, source_id : UInt32? = nil, poll_fds : GLib::SList? = nil, prev : GLib::Source? = nil, next _next : GLib::Source? = nil, name : String? = nil, priv : GLib::SourcePrivate? = 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_data=(value : Pointer(Void)?) #

def callback_funcs : GLib::SourceCallbackFuncs? #

def callback_funcs! #

def callback_funcs=(value : GLib::SourceCallbackFuncs?) #

def can_recurse : Bool #

def can_recurse=(can_recurse : Bool) : Nil #

def context : GLib::MainContext? #

def context! #

def context=(value : GLib::MainContext?) #

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 name=(value : String?) #

def next : GLib::Source? #

def next! #

def next=(value : GLib::Source?) #

def poll_fds : GLib::SList? #

def poll_fds! #

def poll_fds=(value : GLib::SList?) #

def prev : GLib::Source? #

def prev! #

def prev=(value : GLib::Source?) #

def priority : Int32 #

def priority=(priority : Int32) : Nil #

def priv : GLib::SourcePrivate? #

def priv! #

def priv=(value : GLib::SourcePrivate?) #

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_funcs=(value : GLib::SourceFuncs?) #

def source_id : UInt32 #

def source_id=(value : UInt32) #

def static_name=(name : String) : Nil #

def time : Int64 #

def to_unsafe #

def unref : Nil #