@@ -90,6 +90,13 @@ interface CSSearchableIndex {
9090 [ Export ( "deleteAllSearchableItemsWithCompletionHandler:" ) ]
9191 [ Async ]
9292 void DeleteAll ( [ NullAllowed ] Action < NSError > completionHandler ) ;
93+
94+ // from interface CSExternalProvider (CSSearchableIndex)
95+
96+ [ Async ( ResultTypeName = "CSSearchableIndexBundleDataResult" ) ]
97+ [ NoTV , iOS ( 16 , 0 ) , Mac ( 13 , 0 ) , MacCatalyst ( 16 , 0 ) ]
98+ [ Export ( "provideDataForBundle:identifier:type:completionHandler:" ) ]
99+ void ProvideData ( string bundle , string identifier , string type , Action < NSData , NSError > completionHandler ) ;
93100 }
94101
95102 delegate void CSSearchableIndexFetchHandler ( NSData clientState , NSError error ) ;
@@ -1074,6 +1081,11 @@ interface CSSearchQuery {
10741081 [ Export ( "initWithQueryString:attributes:" ) ]
10751082 NativeHandle Constructor ( string queryString , [ NullAllowed ] string [ ] attributes ) ;
10761083
1084+ [ Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1085+ [ Export ( "initWithQueryString:queryContext:" ) ]
1086+ [ DesignatedInitializer ]
1087+ NativeHandle Constructor ( string queryString , CSSearchQueryContext queryContext ) ;
1088+
10771089 [ Export ( "cancelled" ) ]
10781090 bool Cancelled { [ Bind ( "isCancelled" ) ] get ; }
10791091
@@ -1105,4 +1117,126 @@ interface CSImportExtension : NSExtensionRequestHandling
11051117 bool Update ( CSSearchableItemAttributeSet attributes , NSUrl contentUrl , [ NullAllowed ] out NSError error ) ;
11061118 }
11071119
1120+ [ NoTV , Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1121+ [ BaseType ( typeof ( CSSearchQuery ) ) ]
1122+ [ DisableDefaultCtor ]
1123+ interface CSUserQuery
1124+ {
1125+ [ Export ( "initWithUserQueryString:queryContext:" ) ]
1126+ [ DesignatedInitializer ]
1127+ NativeHandle Constructor ( [ NullAllowed ] string userQueryString , CSUserQueryContext queryContext ) ;
1128+
1129+ [ Export ( "foundSuggestionCount" ) ]
1130+ nint FoundSuggestionCount { get ; }
1131+
1132+ [ NullAllowed , Export ( "foundSuggestionsHandler" , ArgumentSemantic . Copy ) ]
1133+ Action < NSArray < CSSuggestion > > FoundSuggestionsHandler { get ; set ; }
1134+
1135+ [ Export ( "start" ) ]
1136+ void Start ( ) ;
1137+
1138+ [ Export ( "cancel" ) ]
1139+ void Cancel ( ) ;
1140+ }
1141+
1142+ [ NoTV , Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1143+ [ BaseType ( typeof ( CSSearchQueryContext ) ) ]
1144+ [ DisableDefaultCtor ]
1145+ interface CSUserQueryContext
1146+ {
1147+ [ Static ]
1148+ [ Export ( "userQueryContext" ) ]
1149+ CSUserQueryContext UserQueryContext { get ; }
1150+
1151+ [ Static ]
1152+ [ Export ( "userQueryContextWithCurrentSuggestion:" ) ]
1153+ CSUserQueryContext Create ( [ NullAllowed ] CSSuggestion currentSuggestion ) ;
1154+
1155+ [ Export ( "maxSuggestionCount" ) ]
1156+ nint MaxSuggestionCount { get ; set ; }
1157+ }
1158+
1159+ [ NoTV , Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1160+ [ BaseType ( typeof ( CSUserQueryContext ) ) ]
1161+ [ DisableDefaultCtor ]
1162+ interface CSTopHitQueryContext
1163+ {
1164+ [ Static ]
1165+ [ Export ( "topHitQueryContext" ) ]
1166+ CSTopHitQueryContext TopHitQueryContext { get ; }
1167+
1168+ [ Static ]
1169+ [ Export ( "topHitQueryContextWithCurrentSuggestion:" ) ]
1170+ CSTopHitQueryContext Create ( [ NullAllowed ] CSSuggestion currentSuggestion ) ;
1171+
1172+ [ Export ( "maxItemCount" ) ]
1173+ nint MaxItemCount { get ; set ; }
1174+ }
1175+
1176+ [ NoTV , Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1177+ [ BaseType ( typeof ( CSUserQuery ) ) ]
1178+ [ DisableDefaultCtor ]
1179+ interface CSTopHitQuery
1180+ {
1181+ [ Export ( "initWithUserQueryString:queryContext:" ) ]
1182+ [ DesignatedInitializer ]
1183+ NativeHandle Constructor ( [ NullAllowed ] string userQueryString , CSTopHitQueryContext queryContext ) ;
1184+ }
1185+
1186+ [ NoTV , Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1187+ [ BaseType ( typeof ( NSObject ) ) ]
1188+ [ DisableDefaultCtor ]
1189+ interface CSSuggestion : NSSecureCoding , NSCopying
1190+ {
1191+
1192+ [ Field ( "CSSuggestionHighlightAttributeName" ) ]
1193+ NSString HighlightAttributeName { get ; }
1194+
1195+ [ Export ( "localizedAttributedSuggestion" ) ]
1196+ NSAttributedString LocalizedAttributedSuggestion { get ; }
1197+
1198+ [ Export ( "suggestionKind" ) ]
1199+ CSSuggestionKind SuggestionKind { get ; }
1200+
1201+ [ Export ( "compare:" ) ]
1202+ NSComparisonResult Compare ( CSSuggestion other ) ;
1203+ }
1204+
1205+ [ NoTV , Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1206+ [ BaseType ( typeof ( NSObject ) ) ]
1207+ interface CSSearchQueryContext : NSSecureCoding , NSCopying
1208+ {
1209+ [ NullAllowed , Export ( "fetchAttributes" , ArgumentSemantic . Strong ) ]
1210+ string [ ] FetchAttributes { get ; set ; }
1211+
1212+ [ NullAllowed , Export ( "protectionClasses" , ArgumentSemantic . Strong ) ]
1213+ string [ ] ProtectionClasses { get ; set ; }
1214+
1215+ [ NullAllowed , Export ( "filterQueries" , ArgumentSemantic . Copy ) ]
1216+ string [ ] FilterQueries { get ; set ; }
1217+
1218+ [ NullAllowed , Export ( "keyboardLanguage" , ArgumentSemantic . Strong ) ]
1219+ string KeyboardLanguage { get ; set ; }
1220+
1221+ [ Export ( "sourceOptions" , ArgumentSemantic . Assign ) ]
1222+ CSSearchQuerySourceOptions SourceOptions { get ; set ; }
1223+ }
1224+
1225+ [ NoTV , Mac ( 13 , 0 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1226+ [ Native ]
1227+ public enum CSSearchQuerySourceOptions : long
1228+ {
1229+ Default = 0 ,
1230+ AllowMail = 1L << 0 ,
1231+ }
1232+
1233+ [ NoTV , Mac ( 10 , 13 ) , iOS ( 16 , 0 ) , MacCatalyst ( 16 , 0 ) ]
1234+ [ Native ]
1235+ public enum CSSuggestionKind : long
1236+ {
1237+ None ,
1238+ Custom ,
1239+ Default ,
1240+ }
1241+
11081242}
0 commit comments