Apply hide/restore selection controls logic to zoom in/out.
When one scrolls around, handles and context menu get temporarily
hidden, and are shown again when the gesture finishes.
In order to match s-browser behavior, patch extends that logic
to zoom in/out gestures.
In summary, once user starts to pinch, controls are temporarily
hidden (similarly to scroll). They are restored when user lift
up his fingers.
Setter and getter methods are also renamed to SetControlsTemporarilyHidden
and AreControlsTemporarilyHidden.
These are the scenarios:
Scrolls
1) when user starts to scroll one ScrollBegin gets emitted.
2) when user stops to scroll one ScrollEnd gets emitted.
So, it is a simple 1:1.
Start pinch zoom
1) When user starts to pinch zoom, first ScrollBegin is emitted, and then
PinchBegin is emitted, so we call SetControlsTemporarilyHidden(true) twice.
The first call, sets hidden status to true, and actually hide the controls.
The second call early returns on line 102.
Stop pinch zoom
1) When user lift up both fingers at the same time, ScrollEnd and PinchEnd are
emitted, so we call SetControlsTemporarilyHidden(false) twice.
The first call checks there is no finger touching the screen. If no, then it sets
status to false, and request showing the controls again. The second call earl
returns in line 102.
2) When user lifts up only one finger, and keeps another down, only PinchEnd
is called. At this point, it calls SetControlsTemporarilyHidden(false), checks
that one finger is still down, and early returns in line 111 - scrolling is
happening now. When user lifts up the last finger, ScrollEnd is emitted,
and SetControlsTemporarilyHidden(false) is called. At this point, it confirms
that no fingers are down, sets the status to false, and request showing
of controls again.
Note that to make sure no finger is on screen, patch exposes
RWHVEfl::pointer_state's GetPointerCount method.
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=5007
Reviewed by: a.renevier, djmix.kim, sns.park
Change-Id: Ic627be821e9146d3c360463c4a4832d30ab68715
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>