class GLib::Source
- GLib::Source
- Reference
- Object
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.crConstructors
- .new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
- .new(data : LibGLib::Source, transfer : GICrystal::Transfer)
- .new(ref_count : UInt32? = nil, priority : Int32? = nil, flags : UInt32? = nil, source_id : UInt32? = nil)
- .new(source_funcs : GLib::SourceFuncs, struct_size : UInt32) : self
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
- .remove(tag : UInt32) : Bool
- .set_name_by_id(tag : UInt32, name : String) : Nil
Instance Method Summary
-
#==(other : self) : Bool
Returns
true
if this reference is the same as other. - #add_child_source(child_source : GLib::Source) : Nil
- #add_unix_fd(fd : Int32, events : GLib::IOCondition) : Pointer(Void)
- #attach(context : GLib::MainContext?) : UInt32
- #callback=(func : GLib::SourceFunc) : Nil
- #callback_data : Pointer(Void)?
- #callback_data!
- #callback_funcs : GLib::SourceCallbackFuncs?
- #callback_funcs!
- #can_recurse : Bool
- #can_recurse=(can_recurse : Bool) : Nil
- #context : GLib::MainContext?
- #context!
- #current_time(timeval : GLib::TimeVal) : Nil
- #destroy : Nil
- #flags : UInt32
- #flags=(value : UInt32)
- #funcs=(funcs : GLib::SourceFuncs) : Nil
- #id : UInt32
- #is_destroyed : Bool
- #modify_unix_fd(tag : Pointer(Void), new_events : GLib::IOCondition) : Nil
- #name : String?
- #name!
- #name=(name : String) : Nil
- #next : GLib::Source?
- #next!
- #poll_fds : GLib::SList?
- #poll_fds!
- #prev : GLib::Source?
- #prev!
- #priority : Int32
- #priority=(priority : Int32) : Nil
- #priv : GLib::SourcePrivate?
- #priv!
- #query_unix_fd(tag : Pointer(Void)) : GLib::IOCondition
- #ready_time : Int64
- #ready_time=(ready_time : Int64) : Nil
- #ref : GLib::Source
- #ref_count : UInt32
- #ref_count=(value : UInt32)
- #remove_child_source(child_source : GLib::Source) : Nil
- #remove_unix_fd(tag : Pointer(Void)) : Nil
- #set_callback_indirect(callback_data : Pointer(Void)?, callback_funcs : GLib::SourceCallbackFuncs) : Nil
- #source_funcs : GLib::SourceFuncs?
- #source_funcs!
- #source_id : UInt32
- #source_id=(value : UInt32)
- #static_name=(name : String) : Nil
- #time : Int64
- #to_unsafe
- #unref : Nil
Constructor Detail
def self.new(ref_count : UInt32? = nil, priority : Int32? = nil, flags : UInt32? = nil, source_id : UInt32? = nil)
#
Class Method Detail
Instance Method Detail
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.
def set_callback_indirect(callback_data : Pointer(Void)?, callback_funcs : GLib::SourceCallbackFuncs) : Nil
#