Table of Contents

Class Source

Namespace
GLib
Assembly
GLib-2.0.dll
public sealed class Source : BoxedRecord, IEquatable<Source>
Inheritance
Source
Implements
Inherited Members

Constructors

Source()

public Source()

Source(SourceOwnedHandle)

public Source(SourceOwnedHandle handle)

Parameters

handle SourceOwnedHandle

Properties

Handle

public SourceOwnedHandle Handle { get; }

Property Value

SourceOwnedHandle

Methods

AddChildSource(Source)

[Version("2.28")]
public void AddChildSource(Source childSource)

Parameters

childSource Source

AddPoll(PollFD)

public void AddPoll(PollFD fd)

Parameters

fd PollFD

AddUnixFd(int, IOCondition)

[Version("2.36")]
public IntPtr AddUnixFd(int fd, IOCondition events)

Parameters

fd int
events IOCondition

Returns

IntPtr

Attach(MainContext?)

public uint Attach(MainContext? context)

Parameters

context MainContext

Returns

uint

Destroy()

public void Destroy()

Equals(Source?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Source? other)

Parameters

other Source

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetCanRecurse()

public bool GetCanRecurse()

Returns

bool

GetContext()

public MainContext? GetContext()

Returns

MainContext

GetCurrentTime(TimeVal)

public void GetCurrentTime(TimeVal timeval)

Parameters

timeval TimeVal

GetGType()

public static Type GetGType()

Returns

Type

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

uint

GetName()

[Version("2.26")]
public string? GetName()

Returns

string

GetPriority()

public int GetPriority()

Returns

int

GetReadyTime()

public long GetReadyTime()

Returns

long

GetTime()

[Version("2.28")]
public long GetTime()

Returns

long

IsDestroyed()

[Version("2.12")]
public bool IsDestroyed()

Returns

bool

ModifyUnixFd(IntPtr, IOCondition)

[Version("2.36")]
public void ModifyUnixFd(IntPtr tag, IOCondition newEvents)

Parameters

tag IntPtr
newEvents IOCondition

New(SourceFuncs, uint)

public static Source New(SourceFuncs sourceFuncs, uint structSize)

Parameters

sourceFuncs SourceFuncs
structSize uint

Returns

Source

QueryUnixFd(IntPtr)

[Version("2.36")]
public IOCondition QueryUnixFd(IntPtr tag)

Parameters

tag IntPtr

Returns

IOCondition

Ref()

public Source Ref()

Returns

Source

Remove(uint)

public static bool Remove(uint tag)

Parameters

tag uint

Returns

bool

RemoveByFuncsUserData(SourceFuncs, IntPtr)

public static bool RemoveByFuncsUserData(SourceFuncs funcs, IntPtr userData)

Parameters

funcs SourceFuncs
userData IntPtr

Returns

bool

RemoveByUserData(IntPtr)

public static bool RemoveByUserData(IntPtr userData)

Parameters

userData IntPtr

Returns

bool

RemoveChildSource(Source)

[Version("2.28")]
public void RemoveChildSource(Source childSource)

Parameters

childSource Source

RemovePoll(PollFD)

public void RemovePoll(PollFD fd)

Parameters

fd PollFD

RemoveUnixFd(IntPtr)

[Version("2.36")]
public void RemoveUnixFd(IntPtr tag)

Parameters

tag IntPtr

SetCallback(SourceFunc)

public void SetCallback(SourceFunc func)

Parameters

func SourceFunc

SetCallbackIndirect(IntPtr, SourceCallbackFuncs)

public void SetCallbackIndirect(IntPtr callbackData, SourceCallbackFuncs callbackFuncs)

Parameters

callbackData IntPtr
callbackFuncs SourceCallbackFuncs

SetCanRecurse(bool)

public void SetCanRecurse(bool canRecurse)

Parameters

canRecurse bool

SetFuncs(SourceFuncs)

[Version("2.12")]
public void SetFuncs(SourceFuncs funcs)

Parameters

funcs SourceFuncs

SetName(string)

[Version("2.26")]
public void SetName(string name)

Parameters

name string

SetNameById(uint, string)

[Version("2.26")]
public static void SetNameById(uint tag, string name)

Parameters

tag uint
name string

SetPriority(int)

public void SetPriority(int priority)

Parameters

priority int

SetReadyTime(long)

[Version("2.36")]
public void SetReadyTime(long readyTime)

Parameters

readyTime long

SetStaticName(string)

[Version("2.70")]
public void SetStaticName(string name)

Parameters

name string

Unref()

public void Unref()