-
public class PointerEvent extends Event<PointerEvent>
-
-
Method Summary
Modifier and Type Method Description static PointerEvent
obtain(String eventName, int surfaceId, int viewTag, MotionEvent motionEventToCopy)
static PointerEvent
obtain(String eventName, int surfaceId, int viewTag, MotionEvent motionEventToCopy, int coalescingKey)
String
getEventName()
void
dispatch(RCTEventEmitter rctEventEmitter)
Dispatch this event to JS using the given event emitter. void
onDispose()
Called when the EventDispatcher is done with an event, either because it was dispatched orbecause it was coalesced with another Event. void
dispatchModern(RCTModernEventEmitter rctEventEmitter)
Dispatch this event to JS using a V2 EventEmitter. -
Methods inherited from class com.facebook.react.uimanager.events.Event
canCoalesce, coalesce, getCoalescingKey, getSurfaceId, getTimestampMs, getUIManagerType, getUniqueID, getViewTag
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
obtain
static PointerEvent obtain(String eventName, int surfaceId, int viewTag, MotionEvent motionEventToCopy)
-
obtain
static PointerEvent obtain(String eventName, int surfaceId, int viewTag, MotionEvent motionEventToCopy, int coalescingKey)
-
getEventName
String getEventName()
-
dispatch
void dispatch(RCTEventEmitter rctEventEmitter)
Dispatch this event to JS using the given event emitter. Compatible with old and new renderer.Instead of using this or dispatchModern, it is recommended that you simply override`getEventData`.
-
onDispose
void onDispose()
Called when the EventDispatcher is done with an event, either because it was dispatched orbecause it was coalesced with another Event.
-
dispatchModern
void dispatchModern(RCTModernEventEmitter rctEventEmitter)
Dispatch this event to JS using a V2 EventEmitter. If surfaceId is not -1 and `getEventData` isnon-null, this will use the RCTModernEventEmitter API. Otherwise, it falls back to theold-style dispatch function. For Event classes that need to do something different, this methodcan always be overridden entirely, but it is not recommended.
This method additionally allows C++ to coalesce events and detect continuous ones forconcurrent mode (Fabric only).
-
-
-
-