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 = nil, priority : Int32 | Nil = nil, flags : UInt32 | Nil = nil, source_id : UInt32 | Nil = 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
trueif 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 | Nil) : UInt32
- #callback=(func : GLib::SourceFunc) : Nil
- #callback_data : Pointer(Void) | Nil
- #callback_data!
- #callback_funcs : GLib::SourceCallbackFuncs | Nil
- #callback_funcs!
- #can_recurse : Bool
- #can_recurse=(can_recurse : Bool) : Nil
- #context : GLib::MainContext | Nil
- #context!
-
#current_time(timeval : GLib::TimeVal) : Nil
DEPRECATED
- #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 | Nil
- #name!
- #name=(name : String) : Nil
- #next : GLib::Source | Nil
- #next!
- #poll_fds : GLib::SList | Nil
- #poll_fds!
- #prev : GLib::Source | Nil
- #prev!
- #priority : Int32
- #priority=(priority : Int32) : Nil
- #priv : GLib::SourcePrivate | Nil
- #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) | Nil, callback_funcs : GLib::SourceCallbackFuncs) : Nil
- #source_funcs : GLib::SourceFuncs | Nil
- #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 = nil, priority : Int32 | Nil = nil, flags : UInt32 | Nil = nil, source_id : UInt32 | Nil = nil)
#
Class Method Detail
Returns the type id (GType) registered in GLib type system.
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) | Nil, callback_funcs : GLib::SourceCallbackFuncs) : Nil
#