Create internal Fabric subclass of RCTImageComponentView

Summary: Changelog: [Internal] Create internal Fabric subclass of RCTImageComponentView

Reviewed By: sammy-SC

Differential Revision: D23211115

fbshipit-source-id: 0e756de3f3e555bf212dc88dfc8c32930ac85132
This commit is contained in:
Paige Sun
2020-08-22 01:17:11 -07:00
committed by Facebook GitHub Bot
parent 2d34c221f2
commit 6aa63272dc
4 changed files with 24 additions and 8 deletions
@@ -7,6 +7,7 @@
#import "RCTImageComponentView.h"
#import <React/RCTConversions.h>
#import <React/RCTImageBlurUtils.h>
#import <React/RCTImageResponseDelegate.h>
#import <React/RCTImageResponseObserverProxy.h>
@@ -18,9 +19,6 @@
#import <react/renderer/imagemanager/RCTImageInstrumentationProxy.h>
#import <react/renderer/imagemanager/RCTImagePrimitivesConversions.h>
#import "RCTConversions.h"
#import "RCTFabricComponentsPlugins.h"
using namespace facebook::react;
@interface RCTImageComponentView () <RCTImageResponseDelegate>
@@ -209,6 +207,17 @@ using namespace facebook::react;
@end
#ifdef __cplusplus
extern "C" {
#endif
// Can't the import generated Plugin.h because plugins are not in this BUCK target
Class<RCTComponentViewProtocol> RCTImageCls(void);
#ifdef __cplusplus
}
#endif
Class<RCTComponentViewProtocol> RCTImageCls(void)
{
return RCTImageComponentView.class;
@@ -36,7 +36,6 @@ Class<RCTComponentViewProtocol> RCTActivityIndicatorViewCls(void) __attribute__(
Class<RCTComponentViewProtocol> RCTSliderCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTSwitchCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTUnimplementedNativeViewCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTImageCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTParagraphCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTTextInputCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTInputAccessoryCls(void) __attribute__((used));
@@ -25,7 +25,6 @@ Class<RCTComponentViewProtocol> RCTFabricComponentsProvider(const char *name) {
{"Slider", RCTSliderCls},
{"Switch", RCTSwitchCls},
{"UnimplementedNativeView", RCTUnimplementedNativeViewCls},
{"Image", RCTImageCls},
{"Paragraph", RCTParagraphCls},
{"TextInput", RCTTextInputCls},
{"InputAccessoryView", RCTInputAccessoryCls},
@@ -9,14 +9,12 @@
#import <React/RCTAssert.h>
#import <React/RCTBorderDrawing.h>
#import <React/RCTConversions.h>
#import <objc/runtime.h>
#import <react/renderer/components/view/ViewComponentDescriptor.h>
#import <react/renderer/components/view/ViewEventEmitter.h>
#import <react/renderer/components/view/ViewProps.h>
#import "RCTConversions.h"
#import "RCTFabricComponentsPlugins.h"
using namespace facebook::react;
@implementation RCTViewComponentView {
@@ -622,6 +620,17 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
@end
#ifdef __cplusplus
extern "C" {
#endif
// Can't the import generated Plugin.h because plugins are not in this BUCK target
Class<RCTComponentViewProtocol> RCTViewCls(void);
#ifdef __cplusplus
}
#endif
Class<RCTComponentViewProtocol> RCTViewCls(void)
{
return RCTViewComponentView.class;