NONE
on-entry:
curr = none
BOTTOM
on-entry:
curr = button
AREA
on-entry:
curr =area
set_pointer()
finger in
area or top
finger
up
finger in
bottom
finger in
area
finger in
bottom
button != curr
Check state of
all touches
tp_post_softbutton_buttons()
!buttons.click_pend
&& current == old
yes
no
current = buttons.state & 0x01
old = buttons.old_state & 0x01
button = 0
is_top = 0
All touches are in state none
no
yes
buttons.click_pend = 1
(Some touches are in middle) ||
((Some touches are in right) &&
(Some touches are in left))
yes
button = BTN_MIDDLE
current
no
yes
Some touches are in right
yes
no
button = BTN_RIGHT
button = BTN_LEFT
no
buttons.active = button
buttons.active_is_top = is_top
state = BUTTON_PRESSED
button = buttons.active
is_top = buttons.active_is_top
buttons.active = 0
buttons.active_is_top = 0
state = BUTTON_RELEASED
buttons.click_pend = 0
button
no
yes
tp_notify_softbutton(
button, is_top, state)
finger in
top
TOP_NEW
on-entry:
curr = button
start enter timeout
TOP
phys
button
press
enter
timeout
finger in
top
button != curr
finger in
area or
bottom
TOP_TO_IGNORE
on-entry:
start leave timeout
finger in
area or bottom
finger in
top
button == curr
IGNORE
on-entry:
curr =none
leave
timeout
touches in top?
yes
is_top = 1
no