update the position of a pointer
@param   {String}   type             EVENT_END
@param   {Object}   pointerEvent
544071
function updatePointer(type, pointerEvent) {
    if(type == EVENT_END) {
      delete this.pointers[pointerEvent.pointerId];
    }
    else {
      pointerEvent.identifier = pointerEvent.pointerId;
      this.pointers[pointerEvent.pointerId] = pointerEvent;
    }

    // it's save to use Object.keys, since pointerEvents are only in newer browsers
    return Object.keys(this.pointers).length;
  }
830704
function(evt)
	{
		return (evt.pointerType != null) ? (evt.pointerType == 'pen' || evt.pointerType ===
			evt.MSPOINTER_TYPE_PEN) : ((evt.mozInputSource != null) ?
					evt.mozInputSource == 2 : evt.type.indexOf('pen') == 0);
	}
1267239
function getCursorPosition(event) {
  let cursorX;
  let cursorY;
  let rect = htmlElement.getBoundingClientRect();
  if (event.touches !== undefined) {
    cursorX = event.touches[0].clientX;
    cursorY = event.touches[0].clientY;
  } else {
    cursorX = event.clientX;
    cursorY = event.clientY;
  }
  return {
    x: cursorX - rect.left,
    y: cursorY - rect.top,
  };
}
1248155
function(type, evt) {
			var state = this._eventTypes ? this._eventTypes[type] : null;
			if (state) {
				var listeners = state.listeners;
				try {
					state.level++;
					if (listeners) {
						for (var i=0, len=listeners.length; i < len; i++) {
							if (listeners[i]) {
								var l = listeners[i].listener;
								if (typeof l === "function") {
									l.call(this, evt);
								} else if (l.handleEvent && typeof l.handleEvent === "function") {
									l.handleEvent(evt);
								}
							}
						}
					}
				} finally {
					state.level--;
					if (state.compact && state.level === 0) {
						for (var j=listeners.length - 1; j >= 0; j--) {
							if (!listeners[j]) {
								listeners.splice(j, 1);
							}
						}
						if (listeners.length === 0) {
							delete this._eventTypes[type];
						}
						state.compact = false;
					}
				}
			}
		}
804383
function getEventPosition(event) {
    let _event = event
    if (event.touches) {
        [_event] = event.touches
    }
    return [
        _event.pageX - window.pageXOffset,
        _event.pageY - window.pageYOffset
    ]
}
1153818
function Event(type, data, bubbles) {
            if (data === void 0) { data = null; }
            if (bubbles === void 0) { bubbles = false; }
            this._type = type;
            this._bubbles = bubbles;
            this.data = data;
        }
77503
function enablePointerEvent() {
        if (!pointerInitialized) {

            // instantiate a pool of pointer catched
            for (var v = 0; v < me.device.maxTouchPoints; v++) {
                T_POINTERS.push(new me.Pointer());
            }

            if (me.input.pointerEventTarget === null) {
                // default pointer event target
                me.input.pointerEventTarget = me.video.renderer.getScreenCanvas();
            }

            if (me.device.PointerEvent) {
                // standard Pointer Events
                activeEventList = pointerEventList;
            } else {
                // Regular Mouse events
                activeEventList = mouseEventList;
            }
            if (me.device.touch && !me.device.PointerEvent) {
                // touch event on mobile devices
                activeEventList = activeEventList.concat(touchEventList);
            }
            registerEventListener(activeEventList, onPointerEvent);

            // set the PointerMove/touchMove/MouseMove event
            if (typeof(api.throttlingInterval) === "undefined") {
                // set the default value
                api.throttlingInterval = ~~(1000 / me.sys.fps);
            }

            if (me.sys.autoFocus === true) {
                me.device.focus();
                me.input.pointerEventTarget.addEventListener(
                    activeEventList[2], // MOUSE/POINTER DOWN
                    function () {
                        me.device.focus();
                    },
                    { passive: (api.preventDefault === false) }
                );
            }

            // if time interval <= 16, disable the feature
            var i;
            var events = findAllActiveEvents(activeEventList, POINTER_MOVE);
            if (api.throttlingInterval < 17) {
                for (i = 0; i < events.length; i++) {
                    if (activeEventList.indexOf(events[i]) !== -1) {
                        me.input.pointerEventTarget.addEventListener(
                            events[i],
                            onMoveEvent,
                            { passive: true } // do not preventDefault on Move events
                        );
                    }

                }
            }
            else {
                for (i = 0; i < events.length; i++) {
                    if (activeEventList.indexOf(events[i]) !== -1) {
                        me.input.pointerEventTarget.addEventListener(
                            events[i],
                            me.utils.function.throttle(
                                onMoveEvent,
                                api.throttlingInterval,
                                false
                            ),
                            { passive: true } // do not preventDefault on Move events
                        );
                    }
                }
            }
            // disable all gesture by default
            me.input.setTouchAction(me.input.pointerEventTarget);

            pointerInitialized = true;
        }
    }
34684
def update_ptr
      ptr.clear
      if (not (arry_type = self.class.ary_type).is_a?(Symbol)) 
        if arry_type.respond_to? :to_native
          ary.each {|item| ptr.write_pointer(arry_type.to_native(item, nil)) }
        elsif arry_type.method_defined? :bytes
          ptr.write_bytes(ary.map {|item| item.respond.bytes }.join)
        elsif arry_type.method_defined? :pointer
          ary.each do |item|
            if item.size == item.pointer.size
              ptr.write_bytes((itm_ptr = item.pointer).read_bytes(itm_ptr.size))
            else
              raise ArgumentError, "Cannot reliably convert `#{item}' to a native_type"
            end
          end
        else
          raise ArgumentError, "Cannot reliably convert `#{arry_type}' to a native_type"
        end
      else
        Utils.put_array_typedef(ptr, arry_type, ary)
      end
      update_ptr_cache
      #self.ptr_cache_hash = @bytes.hash # @FIXME ptr_hash() and @bytes.hash should be the same...
    end
539442
function(evt)
	{
		return (evt.pointerType != null) ? (evt.pointerType == 'touch' || evt.pointerType ===
			evt.MSPOINTER_TYPE_TOUCH) : ((evt.mozInputSource != null) ?
					evt.mozInputSource == 5 : evt.type.indexOf('touch') == 0);
	}
878188
function (win, fromPoint, toPoint, duration, callback) {
		if(syn.support.pointerEvents){
			createEventAtPoint("pointerover", fromPoint, win);
			createEventAtPoint("pointerenter", fromPoint, win);
		}
		createEventAtPoint("mouseover", fromPoint, win);
		createEventAtPoint("mouseenter", fromPoint, win);

		if(syn.support.pointerEvents){ createEventAtPoint("pointermove", fromPoint, win); }
		createEventAtPoint("mousemove", fromPoint, win);
		
		
		if(syn.support.pointerEvents){createEventAtPoint("pointerdown", fromPoint, win);}
		if(syn.support.touchEvents){createEventAtPoint("touchstart", fromPoint, win);}
		createEventAtPoint("mousedown", fromPoint, win);
		startMove(win, fromPoint, toPoint, duration, function () {
			if(syn.support.pointerEvents){createEventAtPoint("pointerup", toPoint, win);}
			if(syn.support.touchEvents){createEventAtPoint("touchend", toPoint, win);}
			createEventAtPoint("mouseup", toPoint, win);
			if(syn.support.pointerEvents){createEventAtPoint("pointerleave", toPoint, win);}
			createEventAtPoint("mouseleave", toPoint, win);
			callback();
		});
	}
1264142
private Tree<Row> findEndIf( Tree<Row> pointer ){
        while( !Type.END_IF.equals( pointer.getContent().getType() ) ){
            pointer = pointer.getNext();
        }
        return pointer;
    }
1338541
private void updatePointer(long next_ptr, long next_value)
                    throws IOException,
                    EOFException {
        filemgr.seek(next_ptr);
        filemgr.writeLong(next_value);
    }
901486
function ( type, event ) {
            var touches = [];
    
            if ( MS_POINTER ) {
                for ( var n in this._touches ) {
                    touches.push( this._touches[n] );
                }
            } else {
                touches = event.touches;
            }
    
            return touches;
        }
99241
private void updateCoord(MouseEvent event)
    {
        oldX = x;
        oldY = y;
        x = event.getX();
        y = event.getY();
        mx = x - oldX;
        my = y - oldY;
    }
1223907
function msPointerCancel(inEvent) {
  const e = this.prepareEvent_(inEvent);
  this.dispatcher.cancel(e, inEvent);
  this.cleanup(inEvent.pointerId);
}
25309
final void addPointer(int keyPos, int keySize, int valuePos, int valueSize) {
    assert keyPos + keySize == valuePos;
    int start = memoryBuffer.limit() - POINTER_SIZE_BYTES;
    memoryBuffer.putInt(start, keyPos);
    memoryBuffer.putInt(start + 4, valuePos);
    memoryBuffer.putInt(start + 8, valueSize);
    memoryBuffer.limit(start);
    valuesHeld++;
  }
1230442
function mouseEventPoint(mouseEvent, container) {
  const rect = container.getBoundingClientRect();
  return new Point(
    mouseEvent.clientX - rect.left - (container.clientLeft || 0),
    mouseEvent.clientY - rect.top - (container.clientTop || 0)
  );
}