Perform the multi-touch action on the mobile performsTouchActions.
349775
public MultiTouchAction perform() {
        List<TouchAction> touchActions = actions.build();
        checkArgument(touchActions.size() > 0,
                "MultiTouch action must have at least one TouchAction added before it can be performed");
        if (touchActions.size() > 1) {
            performsTouchActions.performMultiTouchAction(this);
            return this;
        }  //android doesn't like having multi-touch actions with only a single TouchAction...
        performsTouchActions.performTouchAction(touchActions.get(0));
        return this;
    }
403197
@Override
    public void touch() {
        if (index.get() == null) {
            // set index
            int numDevces = Nd4j.getAffinityManager().getNumberOfDevices();

            /*
                if we have > 1 computational device, we assign workers to workspaces "as is", as provided via AffinityManager
             */
            if (numDevces > 1 && parties > 1) {
                int localIndex = Nd4j.getAffinityManager().getDeviceForCurrentThread();

                index.set(localIndex);
            } else {
                // if we have only 1 device (like cpu system, or single gpu), just attach consumer via flat index
                index.set(workersCounter.getAndIncrement());
            }
        }
    }
1166547
function(event) {
		return (
				(this._touchIsTouchEvent(event) && !this._touchSwiped(event.target))
			||	(!this._touchIsTouchEvent(event) && !this._touchIsEmulatedEvent(event))
		);
	}
313364
function touchStart(e) {
                $this = $(e.currentTarget);
                $this.data('callee1', touchStart);
                originalCoord.x = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageX : e.pageX;
                originalCoord.y = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageY : e.pageY;
                finalCoord.x = originalCoord.x;
                finalCoord.y = originalCoord.y;
                started = true;
                var origEvent = e.originalEvent;
                // Read event data into our startEvt:
                startEvnt = {
                    'position': {
                        'x': (settings.touch_capable) ? origEvent.touches[0].screenX : e.screenX,
                        'y': (settings.touch_capable) ? origEvent.touches[0].screenY : e.screenY
                    },
                    'offset': {
                        'x': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageX - ($this.offset() ? $this.offset().left : 0)) : Math.round(e.pageX - ($this.offset() ? $this.offset().left : 0)),
                        'y': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageY - ($this.offset() ? $this.offset().top : 0)) : Math.round(e.pageY - ($this.offset() ? $this.offset().top : 0))
                    },
                    'time': Date.now(),
                    'target': e.target
                };
            }
1294491
function triggerGesture(elements, startTouches, options, done) {
        var interval = 10,
            loops = Math.ceil(options.duration / interval),
            loop = 1;

        elements = ensureAnArray(elements);

        options = merge(options, {
            pos: [10, 10],
            duration: 250,
            touches: 1,
            deltaX: 0,
            deltaY: 0,
            radius: 100,
            scale: 1,
            rotation: 0,
            easing: 'swing'
        });

        function gestureLoop() {
            // calculate the radius
            // this is for scaling and multiple touches
            var radius = options.radius;
            if (options.scale !== 1) {
                radius = options.radius - (options.radius * (1 - options.scale) * (1 / loops * loop));
            }

            // calculate new position/rotation
            var easing = Simulator.easings[options.easing](1 / loops * loop),
                posX = options.pos[0] + (options.deltaX / loops * loop) * easing,
                posY = options.pos[1] + (options.deltaY / loops * loop) * easing,
                rotation = options.rotation / loops * loop,
                touches = getTouches([posX, posY], elements, startTouches.length, radius, rotation),
                isFirst = (loop == 1),
                isLast = (loop == loops);

            for (var t = touches.length - 1; t >= 0; t--) {
                if (isFirst) {
                    trigger(touches, touches[t].target, 'start');
                } else if (isLast) {
                    trigger(touches, touches[t].target, 'end');

                    // Remove processed touch
                    touches.pop()

                    if (touches.length === 0) {
                        return done();
                    }
                } else {
                    trigger(touches, touches[t].target, 'move');
                }
            }

            setTimeout(gestureLoop, interval);
            loop++;
        }
        gestureLoop();
    }
1076848
function (input) {
    // not needed with native support for the touchAction property
    if (NATIVE_TOUCH_ACTION) {
      return;
    }

    var srcEvent = input.srcEvent;
    var direction = input.offsetDirection;

    // if the touch action did prevented once this session
    if (this.manager.session.prevented) {
      srcEvent.preventDefault();
      return;
    }

    var actions = this.actions;
    var hasNone = inStr(actions, TOUCH_ACTION_NONE);
    var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
    var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);

    if (hasNone ||
      (hasPanY && direction & DIRECTION_HORIZONTAL) ||
      (hasPanX && direction & DIRECTION_VERTICAL)) {
      return this.preventSrc(srcEvent);
    }
  }
411117
function ( e ){

                if ( scope_Target.hasAttribute('disabled') ) {
                    return false;
                }

                // Stop if an active 'tap' transition is taking place.
                if ( hasClass(scope_Target, options.cssClasses.tap) ) {
                    return false;
                }

                e = fixEvent(e, data.pageOffset);

                // Handle reject of multitouch
                if ( !e ) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if ( data.hover && e.buttons ) {
                    return false;
                }

                e.calcPoint = e.points[ options.ort ];

                // Call the event handler with the event [ and additional data ].
                callback ( e, data );
            }
217485
function doubletap(position, element, done) {
                touchTypes.tap(position, element, function() {
                    setTimeout(function() {
                        touchTypes.tap(position, element, done);
                    }, 30);
                });
            }
259116
function (el) {
            $el = $(el);
            $el.on('scroll', handleScroll);
            $el.on('touchstart', handleTouchstart);
            $el.on('touchmove', handleTouchmove);
            $el.on('touchend', handleTouchend);
        }
675190
public void enableSelectOnTouch(boolean enable) {
        Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "enableSelectOnTouch %s enable = %b", getName(), enable);
        mSelectOnTouchEnabled = enable;
    }
415705
private void postTouchEvent(TouchState state, int eventType) {
        Window window = state.getWindow(false, null);
        View view = window == null ? null : window.getView();
        if (view != null) {
            switch (state.getPointCount()) {
                case 0:
                    postNoPoints(view);
                    break;
                case 1:
                    postPoint(window, view, eventType, state.getPoint(0));
                    break;
                default: {
                    int count = state.getPointCount();
                    int[] states = new int[count];
                    int[] ids = new int[count];
                    int[] xs = new int[count];
                    int[] ys = new int[count];
                    for (int i = 0; i < count; i++) {
                        states[i] = eventType;
                        TouchState.Point p = state.getPoint(i);
                        ids[i] = p.id;
                        xs[i] = p.x;
                        ys[i] = p.y;
                    }
                    postPoints(window, view, states, ids, xs, ys);
                }
            }
        }
    }
361917
function (value) {
    // find out the touch-action by the event handlers
    if (value == TOUCH_ACTION_COMPUTE) {
      value = this.compute();
    }

    if (NATIVE_TOUCH_ACTION) {
      this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
    }
    this.actions = value.toLowerCase().trim();
  }
1373740
function(event, touch) {
		if($.gestures.stoped) {
			return;
		}
		$.doAction('gestures', function(index, gesture) {
			if(!$.gestures.stoped) {
				if($.options.gestureConfig[gesture.name] !== false) {
					gesture.handle(event, touch);
				}
			}
		});
	}
597920
def on_touch_up(self, touch):
        
        if touch is not self._touch:
            return False
        self.pos_up = self.pos
        self.pos = self.pos_start
        self._touch = None
        return True
218294
private void postTouchEvent(MonocleWindow window,
                                View view,
                                TouchState newState) {
        int count = countEvents(newState);
        switch (count) {
            case 0:
                postNoPoints(view);
                break;
            case 1:
                if (state.getPointCount() == 1) {
                    // There is one point and it already existed
                    TouchState.Point oldPoint = state.getPoint(0);
                    TouchState.Point newPoint = newState.getPointForID(
                            oldPoint.id);
                    if (newPoint != null) {
                        if (newPoint.x == oldPoint.x
                                && newPoint.y == oldPoint.y) {
                            postPoint(window, view, TouchEvent.TOUCH_STILL, newPoint);
                        } else {
                            postPoint(window, view, TouchEvent.TOUCH_MOVED, newPoint);
                        }
                    } else {
                        postPoint(window, view, TouchEvent.TOUCH_RELEASED, oldPoint);
                    }
                } else {
                    // There is one point and it is newly pressed
                    postPoint(window, view, TouchEvent.TOUCH_PRESSED, newState.getPoint(0));
                }
                break;
            default: {
                int[] states = new int[count];
                int[] ids = new int[count];
                int[] xs = new int[count];
                int[] ys = new int[count];
                for (int i = 0; i < state.getPointCount(); i++) {
                    TouchState.Point oldPoint = state.getPoint(i);
                    TouchState.Point newPoint = newState.getPointForID(
                            oldPoint.id);
                    if (newPoint != null) {
                        ids[i] = newPoint.id;
                        xs[i] = newPoint.x;
                        ys[i] = newPoint.y;
                        if (newPoint.x == oldPoint.x
                                && newPoint.y == oldPoint.y) {
                            states[i] = TouchEvent.TOUCH_STILL;
                        } else {
                            states[i] = TouchEvent.TOUCH_MOVED;
                        }
                    } else {
                        states[i] = TouchEvent.TOUCH_RELEASED;
                        ids[i] = oldPoint.id;
                        xs[i] = oldPoint.x;
                        ys[i] = oldPoint.y;
                    }
                }
                // Once we have dealt with updates to old points, all that are left
                // are new points.
                for (int i = 0, j = state.getPointCount();
                        i < newState.getPointCount(); i++) {
                    TouchState.Point newPoint = newState.getPoint(i);
                    TouchState.Point oldPoint = state.getPointForID(
                            newPoint.id);
                    if (oldPoint == null) {
                        states[j] = TouchEvent.TOUCH_PRESSED;
                        ids[j] = newPoint.id;
                        xs[j] = newPoint.x;
                        ys[j] = newPoint.y;
                        j++;
                    }
                }
                postPoints(window, view, states, ids, xs, ys);
            }
        }
    }
879873
function touchCancel() {
			// reset the variables back to default values
			fingerCount = 0;
			endTime = 0;
			startTime = 0;
			startTouchesDistance=0;
			endTouchesDistance=0;
			pinchZoom=1;
			
			//If we were in progress of tracking a possible multi touch end, then re set it.
			cancelMultiFingerRelease();
			
			setTouchInProgress(false);
		}
226625
function () {
            /*  determine parameters  */
            var params = $cs.params("touch", arguments, {
                name: { pos: 0, req: true, valid: "string" }
            });

            /*  simply force value to same value in order to trigger event  */
            this.value({
                name:     params.name,
                value:    this.value(params.name),
                injected: true,
                force:    true
            });
        }