Permalink
Browse files

Expose main loop, do not refresh on every key press, that is the widg…

…et's job
  • Loading branch information...
1 parent bc3cbe5 commit 2820875a10c5fc9d2c0092d5238d0994dac852e3 @migueldeicaza migueldeicaza committed Jan 23, 2011
Showing with 23 additions and 1 deletion.
  1. +16 −0 docs/Mono.Terminal/Application.xml
  2. +7 −1 gui.cs
@@ -588,6 +588,22 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
+ <Member MemberName="MainLoop">
+ <MemberSignature Language="C#" Value="public static Mono.Terminal.MainLoop MainLoop { get; }" />
+ <MemberSignature Language="ILAsm" Value=".property class Mono.Terminal.MainLoop MainLoop" />
+ <MemberType>Property</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>1.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Mono.Terminal.MainLoop</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ <value>To be added.</value>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
<Member MemberName="MakeColor">
<MemberSignature Language="C#" Value="public static int MakeColor (short f, short b);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 MakeColor(int16 f, int16 b) cil managed" />
View
@@ -729,6 +729,7 @@ void Adjust ()
else if (first + point >= w)
first = point - (w / 3);
Redraw ();
+ Curses.refresh ();
}
void SetText (string new_text)
@@ -2478,6 +2479,11 @@ public static int MakeColor (short f, short b)
static Window main_window;
static MainLoop mainloop;
+ public static MainLoop MainLoop {
+ get {
+ return mainloop;
+ }
+ }
public static bool UsingColor { get; private set; }
@@ -2560,7 +2566,7 @@ public static void Init (bool disable_color)
Container top = toplevels.Count > 0 ? toplevels [toplevels.Count-1] : null;
if (top != null)
ProcessChar (top);
- Curses.refresh ();
+
return true;
});
}

0 comments on commit 2820875

Please sign in to comment.