Class Source
- Namespace
- GLib
- Assembly
- GLib-2.0.dll
public sealed class Source : BoxedRecord, GTypeProvider, InstanceFactory, IEquatable<Source>, IDisposable
- Inheritance
-
Source
- Implements
- Inherited Members
Constructors
Source()
public Source()
Source(SourceOwnedHandle)
public Source(SourceOwnedHandle handle)
Parameters
handleSourceOwnedHandle
Properties
Handle
public SourceOwnedHandle Handle { get; }
Property Value
Methods
AddChildSource(Source)
[Version("2.28")]
public void AddChildSource(Source childSource)
Parameters
childSourceSource
AddPoll(PollFD)
public void AddPoll(PollFD fd)
Parameters
fdPollFD
AddUnixFd(int, IOCondition)
[Version("2.36")]
public nint AddUnixFd(int fd, IOCondition events)
Parameters
fdinteventsIOCondition
Returns
Attach(MainContext?)
public uint Attach(MainContext? context)
Parameters
contextMainContext
Returns
Destroy()
public void Destroy()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equals(Source?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Source? other)
Parameters
otherSourceAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetCanRecurse()
public bool GetCanRecurse()
Returns
GetContext()
public MainContext? GetContext()
Returns
GetCurrentTime(TimeVal)
public void GetCurrentTime(TimeVal timeval)
Parameters
timevalTimeVal
GetGType()
public static Type GetGType()
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetId()
public uint GetId()
Returns
GetName()
[Version("2.26")]
public string? GetName()
Returns
GetPriority()
public int GetPriority()
Returns
GetReadyTime()
public long GetReadyTime()
Returns
GetTime()
[Version("2.28")]
public long GetTime()
Returns
IsDestroyed()
[Version("2.12")]
public bool IsDestroyed()
Returns
ModifyUnixFd(nint, IOCondition)
[Version("2.36")]
public void ModifyUnixFd(nint tag, IOCondition newEvents)
Parameters
tagnintnewEventsIOCondition
New(SourceFuncs, uint)
public static Source New(SourceFuncs sourceFuncs, uint structSize)
Parameters
sourceFuncsSourceFuncsstructSizeuint
Returns
QueryUnixFd(nint)
[Version("2.36")]
public IOCondition QueryUnixFd(nint tag)
Parameters
tagnint
Returns
Ref()
public Source Ref()
Returns
Remove(uint)
public static bool Remove(uint tag)
Parameters
taguint
Returns
RemoveByFuncsUserData(SourceFuncs, nint)
public static bool RemoveByFuncsUserData(SourceFuncs funcs, nint userData)
Parameters
funcsSourceFuncsuserDatanint
Returns
RemoveByUserData(nint)
public static bool RemoveByUserData(nint userData)
Parameters
userDatanint
Returns
RemoveChildSource(Source)
[Version("2.28")]
public void RemoveChildSource(Source childSource)
Parameters
childSourceSource
RemovePoll(PollFD)
public void RemovePoll(PollFD fd)
Parameters
fdPollFD
RemoveUnixFd(nint)
[Version("2.36")]
public void RemoveUnixFd(nint tag)
Parameters
tagnint
SetCallback(SourceFunc)
public void SetCallback(SourceFunc func)
Parameters
funcSourceFunc
SetCallbackIndirect(nint, SourceCallbackFuncs)
public void SetCallbackIndirect(nint callbackData, SourceCallbackFuncs callbackFuncs)
Parameters
callbackDatanintcallbackFuncsSourceCallbackFuncs
SetCanRecurse(bool)
public void SetCanRecurse(bool canRecurse)
Parameters
canRecursebool
SetFuncs(SourceFuncs)
[Version("2.12")]
public void SetFuncs(SourceFuncs funcs)
Parameters
funcsSourceFuncs
SetName(string)
[Version("2.26")]
public void SetName(string name)
Parameters
namestring
SetNameById(uint, string)
[Version("2.26")]
public static void SetNameById(uint tag, string name)
Parameters
SetPriority(int)
public void SetPriority(int priority)
Parameters
priorityint
SetReadyTime(long)
[Version("2.36")]
public void SetReadyTime(long readyTime)
Parameters
readyTimelong
SetStaticName(string)
[Version("2.70")]
public void SetStaticName(string name)
Parameters
namestring
Unref()
public void Unref()