-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92b8126
commit 76541fd
Showing
10 changed files
with
278 additions
and
66 deletions.
There are no files selected for viewing
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
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
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
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,9 @@ | ||
#import <React/RCTBridgeModule.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface BlurhashModule : NSObject <RCTBridgeModule> | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
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,40 @@ | ||
#import "BlurhashModule.h" | ||
|
||
#import <React/RCTUtils.h> | ||
#import <UIKit/UIKit.h> | ||
#ifdef RCT_NEW_ARCH_ENABLED | ||
#import <blurhash_codegen/blurhash_codegen.h> | ||
#endif | ||
|
||
#ifdef RCT_NEW_ARCH_ENABLED | ||
using namespace facebook::react; | ||
|
||
@interface BlurhashModule () <NativeBlurhashModuleSpec> | ||
@end | ||
#endif | ||
|
||
@implementation BlurhashModule | ||
|
||
RCT_EXPORT_MODULE() | ||
|
||
- (void)createBlurhashFromImage:(NSString *)imageUri | ||
componentsX:(double)componentsX | ||
componentsY:(double)componentsY | ||
resolve:(RCTPromiseResolveBlock)resolve | ||
reject:(RCTPromiseRejectBlock)reject { | ||
} | ||
|
||
- (void)clearCosineCache { | ||
// Not implemented on iOS. | ||
} | ||
|
||
#ifdef RCT_NEW_ARCH_ENABLED | ||
|
||
- (std::shared_ptr<TurboModule>)getTurboModule: | ||
(const ObjCTurboModule::InitParams &)params { | ||
return std::make_shared<NativeBlurhashModuleSpecJSI>(params); | ||
} | ||
|
||
#endif | ||
|
||
@end |
Oops, something went wrong.