Table of Contents

Class MainContext

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

Constructors

MainContext(MainContextOwnedHandle)

public MainContext(MainContextOwnedHandle handle)

Parameters

handle MainContextOwnedHandle

Properties

Handle

public MainContextOwnedHandle Handle { get; }

Property Value

MainContextOwnedHandle

Methods

Acquire()

public bool Acquire()

Returns

bool

AddPoll(PollFD, int)

public void AddPoll(PollFD fd, int priority)

Parameters

fd PollFD
priority int

Check(int, PollFD[])

public bool Check(int maxPriority, PollFD[] fds)

Parameters

maxPriority int
fds PollFD[]

Returns

bool

Default()

public static MainContext Default()

Returns

MainContext

Dispatch()

public void Dispatch()

Equals(MainContext?)

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

public bool Equals(MainContext? other)

Parameters

other MainContext

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.

FindSourceByFuncsUserData(SourceFuncs, IntPtr)

public Source FindSourceByFuncsUserData(SourceFuncs funcs, IntPtr userData)

Parameters

funcs SourceFuncs
userData IntPtr

Returns

Source

FindSourceById(uint)

public Source FindSourceById(uint sourceId)

Parameters

sourceId uint

Returns

Source

FindSourceByUserData(IntPtr)

public Source FindSourceByUserData(IntPtr userData)

Parameters

userData IntPtr

Returns

Source

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.

GetThreadDefault()

[Version("2.22")]
public static MainContext? GetThreadDefault()

Returns

MainContext

InvokeFull(int, SourceFunc)

[Version("2.28")]
public void InvokeFull(int priority, SourceFunc function)

Parameters

priority int
function SourceFunc

IsOwner()

[Version("2.10")]
public bool IsOwner()

Returns

bool

Iteration(bool)

public bool Iteration(bool mayBlock)

Parameters

mayBlock bool

Returns

bool

New()

public static MainContext New()

Returns

MainContext

NewWithFlags(MainContextFlags)

[Version("2.72")]
public static MainContext NewWithFlags(MainContextFlags flags)

Parameters

flags MainContextFlags

Returns

MainContext

Pending()

public bool Pending()

Returns

bool

PopThreadDefault()

[Version("2.22")]
public void PopThreadDefault()

Prepare(out int)

public bool Prepare(out int priority)

Parameters

priority int

Returns

bool

PushThreadDefault()

[Version("2.22")]
public void PushThreadDefault()

Ref()

public MainContext Ref()

Returns

MainContext

RefThreadDefault()

[Version("2.32")]
public static MainContext RefThreadDefault()

Returns

MainContext

Release()

public void Release()

RemovePoll(PollFD)

public void RemovePoll(PollFD fd)

Parameters

fd PollFD

Unref()

public void Unref()

Wakeup()

public void Wakeup()