-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'[skip ci] [RN][kotlin] Migrate RCTEventEmitter to Kotlin (#48467)
Summary: Pull Request resolved: #48467 # Changelog: [Internal] - As in the title. Differential Revision: D67793304'
- Loading branch information
1 parent
5e7a5a0
commit eedcdc5
Showing
3 changed files
with
46 additions
and
45 deletions.
There are no files selected for viewing
43 changes: 0 additions & 43 deletions
43
...ative/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/RCTEventEmitter.java
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
...-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/RCTEventEmitter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
package com.facebook.react.uimanager.events | ||
|
||
import com.facebook.proguard.annotations.DoNotStripAny | ||
import com.facebook.react.bridge.JavaScriptModule | ||
import com.facebook.react.bridge.WritableArray | ||
import com.facebook.react.bridge.WritableMap | ||
|
||
/** | ||
* Paper JS interface to emit events from native to JS. | ||
* | ||
* Deprecated in favor of [RCTModernEventEmitter], which works with both the old and new renderer. | ||
*/ | ||
@DoNotStripAny | ||
@Deprecated("Use [RCTModernEventEmitter] instead") | ||
public interface RCTEventEmitter : JavaScriptModule { | ||
/** | ||
* @param targetTag react tag of the view that receives the event | ||
* @param eventName name of event | ||
* @param event event params | ||
*/ | ||
@Deprecated("Use [RCTModernEventEmitter.receiveEvent] instead") | ||
public fun receiveEvent(targetTag: Int, eventName: String, event: WritableMap?) | ||
|
||
/** | ||
* Receive and process touches | ||
* | ||
* @param eventName JS event name | ||
* @param touches active pointers data | ||
* @param changedIndices indices of changed pointers | ||
*/ | ||
@Deprecated("Dispatch the TouchEvent using [EventDispatcher] instead") | ||
public fun receiveTouches( | ||
eventName: String, | ||
touches: WritableArray, | ||
changedIndices: WritableArray | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters