this repo has no description
1/** 2* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). 3* 4* Do not edit this file as changes may cause incorrect behavior and will be lost 5* once the code is regenerated. 6* 7* @generated by codegen project: GenerateComponentHObjCpp.js 8*/ 9 10#import <Foundation/Foundation.h> 11#import <React/RCTDefines.h> 12#import <React/RCTLog.h> 13 14NS_ASSUME_NONNULL_BEGIN 15 16@protocol RCTRNSBottomTabsViewProtocol <NSObject> 17 18@end 19 20@protocol RCTRNSBottomTabsScreenViewProtocol <NSObject> 21 22@end 23 24@protocol RCTRNSFullWindowOverlayViewProtocol <NSObject> 25 26@end 27 28@protocol RCTRNSScreenStackHostViewProtocol <NSObject> 29 30@end 31 32@protocol RCTRNSSplitViewHostViewProtocol <NSObject> 33 34@end 35 36@protocol RCTRNSSplitViewScreenViewProtocol <NSObject> 37 38@end 39 40@protocol RCTRNSStackScreenViewProtocol <NSObject> 41 42@end 43 44@protocol RCTRNSModalScreenViewProtocol <NSObject> 45 46@end 47 48@protocol RCTRNSScreenContainerViewProtocol <NSObject> 49 50@end 51 52@protocol RCTRNSScreenContentWrapperViewProtocol <NSObject> 53 54@end 55 56@protocol RCTRNSScreenFooterViewProtocol <NSObject> 57 58@end 59 60@protocol RCTRNSScreenViewProtocol <NSObject> 61 62@end 63 64@protocol RCTRNSScreenNavigationContainerViewProtocol <NSObject> 65 66@end 67 68@protocol RCTRNSScreenStackHeaderConfigViewProtocol <NSObject> 69 70@end 71 72@protocol RCTRNSScreenStackHeaderSubviewViewProtocol <NSObject> 73 74@end 75 76@protocol RCTRNSScreenStackViewProtocol <NSObject> 77 78@end 79 80@protocol RCTRNSSearchBarViewProtocol <NSObject> 81- (void)blur; 82- (void)focus; 83- (void)clearText; 84- (void)toggleCancelButton:(BOOL)flag; 85- (void)setText:(NSString *)text; 86- (void)cancelSearch; 87@end 88 89RCT_EXTERN inline void RCTRNSSearchBarHandleCommand( 90 id<RCTRNSSearchBarViewProtocol> componentView, 91 NSString const *commandName, 92 NSArray const *args) 93{ 94 if ([commandName isEqualToString:@"blur"]) { 95#if RCT_DEBUG 96 if ([args count] != 0) { 97 RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNSSearchBar", commandName, (int)[args count], 0); 98 return; 99 } 100#endif 101 102 103 104 [componentView blur]; 105 return; 106} 107 108if ([commandName isEqualToString:@"focus"]) { 109#if RCT_DEBUG 110 if ([args count] != 0) { 111 RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNSSearchBar", commandName, (int)[args count], 0); 112 return; 113 } 114#endif 115 116 117 118 [componentView focus]; 119 return; 120} 121 122if ([commandName isEqualToString:@"clearText"]) { 123#if RCT_DEBUG 124 if ([args count] != 0) { 125 RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNSSearchBar", commandName, (int)[args count], 0); 126 return; 127 } 128#endif 129 130 131 132 [componentView clearText]; 133 return; 134} 135 136if ([commandName isEqualToString:@"toggleCancelButton"]) { 137#if RCT_DEBUG 138 if ([args count] != 1) { 139 RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNSSearchBar", commandName, (int)[args count], 1); 140 return; 141 } 142#endif 143 144 NSObject *arg0 = args[0]; 145#if RCT_DEBUG 146 if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"RNSSearchBar", commandName, @"1st")) { 147 return; 148 } 149#endif 150 BOOL flag = [(NSNumber *)arg0 boolValue]; 151 152 [componentView toggleCancelButton:flag]; 153 return; 154} 155 156if ([commandName isEqualToString:@"setText"]) { 157#if RCT_DEBUG 158 if ([args count] != 1) { 159 RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNSSearchBar", commandName, (int)[args count], 1); 160 return; 161 } 162#endif 163 164 NSObject *arg0 = args[0]; 165#if RCT_DEBUG 166 if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"RNSSearchBar", commandName, @"1st")) { 167 return; 168 } 169#endif 170 NSString * text = (NSString *)arg0; 171 172 [componentView setText:text]; 173 return; 174} 175 176if ([commandName isEqualToString:@"cancelSearch"]) { 177#if RCT_DEBUG 178 if ([args count] != 0) { 179 RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"RNSSearchBar", commandName, (int)[args count], 0); 180 return; 181 } 182#endif 183 184 185 186 [componentView cancelSearch]; 187 return; 188} 189 190#if RCT_DEBUG 191 RCTLogError(@"%@ received command %@, which is not a supported command.", @"RNSSearchBar", commandName); 192#endif 193} 194 195NS_ASSUME_NONNULL_END