You can already do that with X11, any X resource can be used by any process (caveats apply for security reasons, but for applications running locally it shouldn't be a problem) so you could simply pass a window ID to a child process via a pipe and then have it draw stuff on it.
Comments
You can already do that with X11, any X resource can be used by any process (caveats apply for security reasons, but for applications running locally it shouldn't be a problem) so you could simply pass a window ID to a child process via a pipe and then have it draw stuff on it.