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(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)
- .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_data=(value : Pointer(Void)?)
- #callback_funcs : GLib::SourceCallbackFuncs?
- #callback_funcs!
- #callback_funcs=(value : GLib::SourceCallbackFuncs?)
- #can_recurse : Bool
- #can_recurse=(can_recurse : Bool) : Nil
- #context : GLib::MainContext?
- #context!
- #context=(value : GLib::MainContext?)
- #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
- #name=(value : String?)
- #next : GLib::Source?
- #next!
- #next=(value : GLib::Source?)
- #poll_fds : GLib::SList?
- #poll_fds!
- #poll_fds=(value : GLib::SList?)
- #prev : GLib::Source?
- #prev!
- #prev=(value : GLib::Source?)
- #priority : Int32
- #priority=(priority : Int32) : Nil
- #priv : GLib::SourcePrivate?
- #priv!
- #priv=(value : GLib::SourcePrivate?)
- #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_funcs=(value : GLib::SourceFuncs?)
- #source_id : UInt32
- #source_id=(value : UInt32)
- #static_name=(name : String) : Nil
- #time : Int64
- #to_unsafe
- #unref : Nil
Constructor Detail
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)
#
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
#