Add support for modal usage of ncurses windows

Fixes #25.
Merge remote-tracking branch 'upstream/master'
Merge pull request #26 from bpytlik/master

Add support for modal usage of ncurses windows