Summary: We have some "internal-only" stuff we want to put in the attribute of a layout node. This allows us to do so a way that keeps it out of open-source and avoid the clunky subclassing. Reviewed By: adamjernst Differential Revision: D24162047 fbshipit-source-id: 518ab9fbf0b4274076f5b0ae1b249e197563fa7f
31 lines
828 B
Objective-C
31 lines
828 B
Objective-C
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <FlipperKitLayoutPlugin/SKNodeDescriptor.h>
|
|
|
|
#import "SKSubDescriptor.h"
|
|
|
|
@class SKComponentLayoutWrapper;
|
|
|
|
typedef SKNamed* (*SKAttributeGenerator)(SKComponentLayoutWrapper* node);
|
|
|
|
@interface SKComponentLayoutDescriptor
|
|
: SKNodeDescriptor<SKComponentLayoutWrapper*>
|
|
|
|
+ (void)registerSubDescriptor:(SKSubDescriptor)descriptor
|
|
forName:(NSString*)name;
|
|
|
|
/**
|
|
Allows you to 'plug-in' additional logic to update the attribute
|
|
string displayed for a node.
|
|
|
|
You can return a `nil` object from this, it will be gracefully ignored.
|
|
*/
|
|
+ (void)registerAttributeGenerator:(SKAttributeGenerator)generator;
|
|
|
|
@end
|