//public Window () : this (Context.GetInstance (ContextType.Application)) {}
//public Window (WindowType type) : this (Context.GetInstance (ContextType.Application), type) {}
public Window(Context ctx, WindowType type = WindowType.SCREEN_APPLICATION_WINDOW)
{
context = ctx;
if (screen_create_window_type (out handle, ctx.Handle, type) != 0) {
throw new Exception ("Unable to create window");
}
if (type != WindowType.SCREEN_APPLICATION_WINDOW &&
type != WindowType.SCREEN_CHILD_WINDOW) {
return;
}
if (screen_create_window_group (handle, handle.ToString ()) != 0) {
throw new Exception ("Unable to create window group");
}
context.RegisterWindow (this);
}