mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 12:39:27 +00:00
MigrateSurfaceDelegateFactory to Kotlin (#47688)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47688 MigrateSurfaceDelegateFactory to Kotlin changelog: [internal] internal Reviewed By: javache Differential Revision: D66133186 fbshipit-source-id: 3b53ab557dce6d099bb412f7be6c00ee81be40fc
This commit is contained in:
parent
c0eaa7f1be
commit
fa65b937f5
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* 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.common;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
|
||||
/**
|
||||
* Factory to create a {@link SurfaceDelegate}. The moduleName is needed to help the factory decide
|
||||
* which surface to return {@link SurfaceDelegate} that the given module should use to interact
|
||||
* with.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
public interface SurfaceDelegateFactory {
|
||||
/**
|
||||
* Create a {@link SurfaceDelegate} instance which is used to interact with a surface of platform
|
||||
* the app is running in.
|
||||
*
|
||||
* @param moduleName the module name that will be using the surface
|
||||
* @return {@link SurfaceDelegate} instance
|
||||
*/
|
||||
@Nullable
|
||||
SurfaceDelegate createSurfaceDelegate(String moduleName);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* 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.common
|
||||
|
||||
/**
|
||||
* Factory to create a [SurfaceDelegate]. The moduleName is needed to help the factory decide which
|
||||
* surface to return [SurfaceDelegate] that the given module should use to interact with.
|
||||
*/
|
||||
public fun interface SurfaceDelegateFactory {
|
||||
/**
|
||||
* Create a [SurfaceDelegate] instance which is used to interact with a surface of platform the
|
||||
* app is running in.
|
||||
*
|
||||
* @param moduleName the module name that will be using the surface
|
||||
* @return [SurfaceDelegate] instance
|
||||
*/
|
||||
public fun createSurfaceDelegate(moduleName: String): SurfaceDelegate?
|
||||
}
|
Loading…
Reference in New Issue
Block a user