<Type Name="MainContext" FullName="GLib.MainContext">
  <TypeSignature Language="C#" Value="public class MainContext" Maintainer="auto" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MainContext extends System.Object" />
  <AssemblyInfo>
    <AssemblyName>glib-sharp</AssemblyName>
    <AssemblyPublicKey>
    </AssemblyPublicKey>
    <AssemblyVersion>2.12.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <summary>Manages events in the main context.</summary>
    <remarks />
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public MainContext ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.12.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>Create a new <see cref="T:GLib.MainContext" /> instance.</summary>
        <remarks>This is the default constructor for <see cref="T:GLib.MainContext" />.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Depth">
      <MemberSignature Language="C#" Value="public static int Depth { get; }" />
      <MemberSignature Language="ILAsm" Value=".property int32 Depth" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.12.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Int32</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Nesting level of the currently executing main loop.</summary>
        <value>A count of main loop levels.</value>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="Iteration">
      <MemberSignature Language="C#" Value="public static bool Iteration ();" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig bool Iteration() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.12.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Runs a single iteration for the given main loop.</summary>
        <returns>an object of type <see cref="T:System.Boolean" /></returns>
        <remarks>This is a convenience overload for <see cref="M:GLib.MainContext.Iteration(System.Boolean)" /> with <see langword="false" /> passed in.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Iteration">
      <MemberSignature Language="C#" Value="public static bool Iteration (bool MayBlock);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig bool Iteration(bool MayBlock) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.12.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="MayBlock" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="MayBlock">an object of type <see cref="T:System.Boolean" /></param>
        <summary>Runs a single iteration for the given main loop.</summary>
        <returns>an object of type <see cref="T:System.Boolean" /></returns>
        <remarks>This involves checking to see if any event sources are ready to be processed, then if no events sources are ready and <paramref name="may_block" /> is <see langword="true" />, waiting for a source to become ready, then dispatching the highest priority events sources that are ready. Note that even when <paramref name="may_block" /> is <see langword="true" />, it is still possible for g_main_context_iteration() to return <see langword="false" />, since the the wait may be interrupted for other reasons than an event source becoming ready.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Pending">
      <MemberSignature Language="C#" Value="public static bool Pending ();" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig bool Pending() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.12.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Checks if any sources have pending events for the given context.</summary>
        <returns>an object of type <see cref="T:System.Boolean" /></returns>
        <remarks />
      </Docs>
    </Member>
  </Members>
</Type>
