Now you get a instance rotate :) With only one bug.
I have to restore to previous rotation state of the
native system after exists. Because the native system
does poll the new rotation state that changed by ioctl.
Currently, I don't know how to force the native system
to detect the changes.
* move rotation mode to global variable, now check rotation
with Screen.cur_rotation_mode
* move screenRotate to screen module so other UIs can use it.
now shiftmode and altmode is recoreded in Keys module. So all the UIs
are sharing these two mode instead of remembering their own. These fix
the bug in UI switchings.
For instance, you use combo 'Alt'+'b' to fire up some menu in pdfreader,
the altmode is set, but the alt key was released after the menu show
up. Then the key release event will only be captured by the menu. So
after you exit from the menu, the altmode is still set in pdfreader,
which is not what we want.
Conflicts:
filechooser.lua
* merge rotate branch with search branch
* fix font display bug in font menu
not fully tested the new rotation implemention yet.
adjustFWKey() will change code event for five way keys
according to current rotation mode. Add this to the
input.waitForEvent loop and your UI can navigate properly
in different rotation mode.
also, added key codes from launchpad sources.
thus, a few constants change their names.
These are the current keys:
PGFWD = next page
PGBCK = previous page
SHIFT+PGFWD = zoom in
SHIFT+PGBCK = zoom out
A = fit to page
S = fit to page width
D = fit to page height
SHIFT+A = fit to page content
SHIFT+S = fit to page content width
SHIFT+D = fit to page content height
SHIFT+FW_UP = Gamma + 0.2
SHIFT+FW_DOWN = Gamma - 0.2