Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.uimanager.events;
package com.facebook.react.uimanager.events

import com.facebook.react.uimanager.events.Event

/** Interface used to intercept events dispatched by {#link EventDispatcher} */
public interface EventDispatcherListener {
public fun interface EventDispatcherListener {
/**
* Called on every time an event is dispatched using {#link EventDispatcher#dispatchEvent}. Will
* be called from the same thread that the event is being dispatched from.
*
* @param event Event that was dispatched
*/
void onEventDispatch(Event event);
public fun onEventDispatch(event: Event<*>)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.uimanager.events;
package com.facebook.react.uimanager.events

/**
* An interface that can be implemented by a {@link com.facebook.react.bridge.ReactContext} to
* provide a first-class API for accessing the {@link EventDispatcher} from the {@link
* com.facebook.react.bridge.UIManager}.
*/
public interface EventDispatcherProvider {
public fun interface EventDispatcherProvider {

/**
* This method should always return an EventDispatcher, even if the instance doesn't exist; in
* that case it should return the empty {@link BlackHoleEventDispatcher}.
*
* @return An {@link EventDispatcher} to emit events to JS.
*/
EventDispatcher getEventDispatcher();
public fun getEventDispatcher(): EventDispatcher
}
Loading