static extern int screen_flush_context(IntPtr ctx, FlushingType flags);
static extern int screen_post_window(IntPtr win, IntPtr buf, int count, [In] int[] dirty_rects, FlushingType flags);
public void Render(Buffer buf, Rectangle rect, FlushingType flush) { Console.WriteLine("Rendering {0}", rect); var dirty = new int[] { rect.Left, rect.Top, rect.Width, rect.Height }; if (screen_post_window(_handle, buf.Handle, 1, dirty, flush) != 0) { throw new Exception("Unable to render buffer to window!!"); } }
public void WaitPost(FlushingType flag) { if (screen_wait_post(_handle, flag) != 0) throw new Exception("Unable to wait post."); }
static extern int screen_wait_post(IntPtr win, FlushingType flags);