minimize is already shoved in the debug api. sigh, in the end I really hope nobody but qt/gtk/sdl devs are even getting close to this.
https://plus.google.com/+KeithPackard/posts/azxz8ZPKght
Sadly it seems impossible to link to individual comments.