1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 09:49:19 +02:00

synchronization with beta branch

This commit is contained in:
Nikolay Pultsin 2013-10-24 01:32:13 +01:00
parent f5e353c29e
commit ef90f7a11d
5 changed files with 28 additions and 26 deletions

View file

@ -186,6 +186,15 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
((ApiObject.Integer)parameters[2]).Value,
((ApiObject.Boolean)parameters[3]).Value
));
case GET_TAP_ACTION_BY_COORDINATES:
return ApiObject.envelope(getTapActionByCoordinates(
((ApiObject.String)parameters[0]).Value,
((ApiObject.Integer)parameters[1]).Value,
((ApiObject.Integer)parameters[2]).Value,
((ApiObject.Integer)parameters[3]).Value,
((ApiObject.Integer)parameters[4]).Value,
((ApiObject.Boolean)parameters[5]).Value
));
case SET_TAPZONE_ACTION:
setTapZoneAction(
((ApiObject.String)parameters[0]).Value,
@ -559,6 +568,12 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
);
}
public String getTapActionByCoordinates(String name, int x, int y, int width, int height, boolean singleTap) {
return TapZoneMap.zoneMap(name).getActionByCoordinates(
x, y, width, height, singleTap ? TapZoneMap.Tap.singleNotDoubleTap : TapZoneMap.Tap.doubleTap
);
}
public void setTapZoneAction(String name, int h, int v, boolean singleTap, String action) {
TapZoneMap.zoneMap(name).setActionForZone(h, v, singleTap, action);
}