Merge pull request #1134 from hwhw/master

Slight refactoring of input, fix picdocument, FFI-API for pic_jpeg
schedule in menu option callback
so that new reginal update on menu entry don't
affect screen update from callback results
Merge pull request #1135 from chrox/fix_touchmenu

schedule in menu option callback
fix refresh with rotation and viewport