So you implement a rendering system and an input queue on top of a drawing region. Sounds like you are implementing a Terminal emulator.