Skip to content

Commit

Permalink
* ios17 bindings: post-processing run, with latest Bro-gen changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dkimitsa committed Nov 6, 2023
1 parent 307b37d commit 9c20b15
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 35 deletions.
4 changes: 4 additions & 0 deletions compiler/cocoatouch/src/main/bro-gen/coredata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,10 @@ protocols:
name: getSectionIndexTitle
'-controller:didChangeContentWithSnapshot:':
name: didChangeContent
parameters:
snapshot:
type: NSDiffableDataSourceSnapshot<NSString, NSManagedObjectID> # as its declared in UIKit and template parameters are not picked from cursor_obj_c_class_ref

'-controller:didChangeContentWithDifference:':
name: didChangeContent
NSFetchedResultsSectionInfo: # DONE
Expand Down
5 changes: 4 additions & 1 deletion compiler/cocoatouch/src/main/bro-gen/matter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ framework: Matter
clang_args: [ '-x', 'objective-c' ]
headers:
- /System/Library/Frameworks/Matter.framework/Headers/Matter.h
exclude_deprecated: true

# drop anything that is deprecated in version 17.0 and below
min_usable_version: 17.0

private_typedefs:
NSCopying: NSObject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
/*</imports>*/

/*<javadoc>*/

/**
* @deprecated Deprecated in iOS 9.0.
*/
/*</javadoc>*/
/*<annotations>*//*</annotations>*/
/*<annotations>*/@Deprecated/*</annotations>*/
public enum /*<name>*/ABPersonImageFormat/*</name>*/ implements ValuedEnum {
/*<values>*/
Thumbnail(0L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
@Method(selector = "evaluateOnCPUWithInputs:outputs:error:")
boolean evaluateOnCPU(NSArray<MLMultiArray> inputs, NSArray<MLMultiArray> outputs, NSError.NSErrorPtr error);
@Method(selector = "encodeToCommandBuffer:inputs:outputs:error:")
boolean encodeToCommandBuffer(org.robovm.apple.metal.MTLCommandBuffer commandBuffer, NSArray<?> inputs, NSArray<?> outputs, NSError.NSErrorPtr error);
boolean encodeToCommandBuffer(org.robovm.apple.metal.MTLCommandBuffer commandBuffer, NSArray<MTLTexture> inputs, NSArray<MTLTexture> outputs, NSError.NSErrorPtr error);
/*</methods>*/
/*<adapter>*/
/*</adapter>*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
@NotImplemented("evaluateOnCPUWithInputs:outputs:error:")
public boolean evaluateOnCPU(NSArray<MLMultiArray> inputs, NSArray<MLMultiArray> outputs, NSError.NSErrorPtr error) { return false; }
@NotImplemented("encodeToCommandBuffer:inputs:outputs:error:")
public boolean encodeToCommandBuffer(org.robovm.apple.metal.MTLCommandBuffer commandBuffer, NSArray<?> inputs, NSArray<?> outputs, NSError.NSErrorPtr error) { return false; }
public boolean encodeToCommandBuffer(org.robovm.apple.metal.MTLCommandBuffer commandBuffer, NSArray<MTLTexture> inputs, NSArray<MTLTexture> outputs, NSError.NSErrorPtr error) { return false; }
/*</methods>*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,16 @@ public NSArray<?> listAvailableTestingOperations() throws NSErrorException {
/**
* @since Available in iOS 16.0 and later.
*/
public NSDictionary<?, ?> runTestingOperations(NSArray<?> operations) throws NSErrorException {
public NSDictionary<?, NSError> runTestingOperations(NSArray<?> operations) throws NSErrorException {
NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
NSDictionary<?, ?> result = runTestingOperations(operations, ptr);
NSDictionary<?, NSError> result = runTestingOperations(operations, ptr);
if (ptr.get() != null) { throw new NSErrorException(ptr.get()); }
return result;
}
/**
* @since Available in iOS 16.0 and later.
*/
@Method(selector = "runTestingOperations:error:")
private native NSDictionary<?, ?> runTestingOperations(NSArray<?> operations, NSError.NSErrorPtr error);
private native NSDictionary<?, NSError> runTestingOperations(NSArray<?> operations, NSError.NSErrorPtr error);
/*</methods>*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
* @since Available in iOS 14.0 and later.
*/
@Method(selector = "newComputePipelineStateWithAdditionalBinaryFunctions:error:")
public native MTLComputePipelineState newComputePipelineState(NSArray<?> functions, NSError.NSErrorPtr error);
public native MTLComputePipelineState newComputePipelineState(NSArray<MTLFunction> functions, NSError.NSErrorPtr error);
/**
* @since Available in iOS 14.0 and later.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ public MTLLinkedFunctions() {}
/*</constructors>*/
/*<properties>*/
@Property(selector = "functions")
public native NSArray<?> getFunctions();
public native NSArray<MTLFunction> getFunctions();
@Property(selector = "setFunctions:")
public native void setFunctions(NSArray<?> v);
public native void setFunctions(NSArray<MTLFunction> v);
/**
* @since Available in iOS 14.0 and later.
*/
@Property(selector = "binaryFunctions")
public native NSArray<?> getBinaryFunctions();
public native NSArray<MTLFunction> getBinaryFunctions();
/**
* @since Available in iOS 14.0 and later.
*/
@Property(selector = "setBinaryFunctions:")
public native void setBinaryFunctions(NSArray<?> v);
public native void setBinaryFunctions(NSArray<MTLFunction> v);
@Property(selector = "groups")
public native NSDictionary<?, ?> getGroups();
@Property(selector = "setGroups:")
Expand All @@ -72,12 +72,12 @@ public MTLLinkedFunctions() {}
* @since Available in iOS 15.0 and later.
*/
@Property(selector = "privateFunctions")
public native NSArray<?> getPrivateFunctions();
public native NSArray<MTLFunction> getPrivateFunctions();
/**
* @since Available in iOS 15.0 and later.
*/
@Property(selector = "setPrivateFunctions:")
public native void setPrivateFunctions(NSArray<?> v);
public native void setPrivateFunctions(NSArray<MTLFunction> v);
/*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ public MTLRenderPipelineFunctionsDescriptor() {}
/*</constructors>*/
/*<properties>*/
@Property(selector = "vertexAdditionalBinaryFunctions")
public native NSArray<?> getVertexAdditionalBinaryFunctions();
public native NSArray<MTLFunction> getVertexAdditionalBinaryFunctions();
@Property(selector = "setVertexAdditionalBinaryFunctions:")
public native void setVertexAdditionalBinaryFunctions(NSArray<?> v);
public native void setVertexAdditionalBinaryFunctions(NSArray<MTLFunction> v);
@Property(selector = "fragmentAdditionalBinaryFunctions")
public native NSArray<?> getFragmentAdditionalBinaryFunctions();
public native NSArray<MTLFunction> getFragmentAdditionalBinaryFunctions();
@Property(selector = "setFragmentAdditionalBinaryFunctions:")
public native void setFragmentAdditionalBinaryFunctions(NSArray<?> v);
public native void setFragmentAdditionalBinaryFunctions(NSArray<MTLFunction> v);
@Property(selector = "tileAdditionalBinaryFunctions")
public native NSArray<?> getTileAdditionalBinaryFunctions();
public native NSArray<MTLFunction> getTileAdditionalBinaryFunctions();
@Property(selector = "setTileAdditionalBinaryFunctions:")
public native void setTileAdditionalBinaryFunctions(NSArray<?> v);
public native void setTileAdditionalBinaryFunctions(NSArray<MTLFunction> v);
/*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public MTLStitchedLibraryDescriptor() {}
@Property(selector = "setFunctionGraphs:")
public native void setFunctionGraphs(NSArray<MTLFunctionStitchingGraph> v);
@Property(selector = "functions")
public native NSArray<?> getFunctions();
public native NSArray<MTLFunction> getFunctions();
@Property(selector = "setFunctions:")
public native void setFunctions(NSArray<?> v);
public native void setFunctions(NSArray<MTLFunction> v);
/*</properties>*/
/*<members>*//*</members>*/
/*<methods>*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ protected MTKTextureLoader() {}
* @since Available in iOS 10.0 and later.
*/
@Method(selector = "newTexturesWithContentsOfURLs:options:completionHandler:")
public native void newTexture(NSArray<NSURL> URLs, MTKTextureLoaderOptions options, @Block VoidBlock2<NSArray<?>, NSError> completionHandler);
public native void newTexture(NSArray<NSURL> URLs, MTKTextureLoaderOptions options, @Block VoidBlock2<NSArray<MTLTexture>, NSError> completionHandler);
/**
* @since Available in iOS 10.0 and later.
*/
@Method(selector = "newTexturesWithNames:scaleFactor:bundle:options:completionHandler:")
public native void newTexture(NSArray<NSString> names, @MachineSizedFloat double scaleFactor, NSBundle bundle, MTKTextureLoaderOptions options, @Block VoidBlock2<NSArray<?>, NSError> completionHandler);
public native void newTexture(NSArray<NSString> names, @MachineSizedFloat double scaleFactor, NSBundle bundle, MTKTextureLoaderOptions options, @Block VoidBlock2<NSArray<MTLTexture>, NSError> completionHandler);
@Method(selector = "newTextureWithData:options:completionHandler:")
public native void newTexture(NSData data, MTKTextureLoaderOptions options, @Block VoidBlock2<MTLTexture, NSError> completionHandler);
@Method(selector = "newTextureWithCGImage:options:completionHandler:")
Expand All @@ -100,17 +100,17 @@ public MTLTexture newTexture(NSURL URL, MTKTextureLoaderOptions options) throws
/**
* @since Available in iOS 10.0 and later.
*/
public NSArray<?> newTextures(NSArray<NSURL> URLs, MTKTextureLoaderOptions options) throws NSErrorException {
public NSArray<MTLTexture> newTextures(NSArray<NSURL> URLs, MTKTextureLoaderOptions options) throws NSErrorException {
NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
NSArray<?> result = newTextures(URLs, options, ptr);
NSArray<MTLTexture> result = newTextures(URLs, options, ptr);
if (ptr.get() != null) { throw new NSErrorException(ptr.get()); }
return result;
}
/**
* @since Available in iOS 10.0 and later.
*/
@Method(selector = "newTexturesWithContentsOfURLs:options:error:")
private native NSArray<?> newTextures(NSArray<NSURL> URLs, MTKTextureLoaderOptions options, NSError.NSErrorPtr error);
private native NSArray<MTLTexture> newTextures(NSArray<NSURL> URLs, MTKTextureLoaderOptions options, NSError.NSErrorPtr error);
public MTLTexture newTexture(NSData data, MTKTextureLoaderOptions options) throws NSErrorException {
NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
MTLTexture result = newTexture(data, options, ptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
protected UIApplicationShortcutItem(Handle h, long handle) { super(h, handle); }
protected UIApplicationShortcutItem(SkipInit skipInit) { super(skipInit); }
@Method(selector = "initWithType:localizedTitle:localizedSubtitle:icon:userInfo:")
public UIApplicationShortcutItem(String type, String localizedTitle, String localizedSubtitle, UIApplicationShortcutIcon icon, NSDictionary<?, ?> userInfo) { super((SkipInit) null); initObject(init(type, localizedTitle, localizedSubtitle, icon, userInfo)); }
public UIApplicationShortcutItem(String type, String localizedTitle, String localizedSubtitle, UIApplicationShortcutIcon icon, NSDictionary<NSString, ?> userInfo) { super((SkipInit) null); initObject(init(type, localizedTitle, localizedSubtitle, icon, userInfo)); }
@Method(selector = "initWithType:localizedTitle:")
public UIApplicationShortcutItem(String type, String localizedTitle) { super((SkipInit) null); initObject(init(type, localizedTitle)); }
/*</constructors>*/
Expand All @@ -73,7 +73,7 @@
@Property(selector = "icon")
public native UIApplicationShortcutIcon getIcon();
@Property(selector = "userInfo")
public native NSDictionary<?, ?> getUserInfo();
public native NSDictionary<NSString, ?> getUserInfo();
@Property(selector = "targetContentIdentifier")
public native NSObject getTargetContentIdentifier();
/*</properties>*/
Expand All @@ -93,13 +93,13 @@ public void setIcon(UIApplicationShortcutIcon v) {
throw new UnsupportedOperationException("UIApplicationShortcutItem is immutable");
}

public void setUserInfo(NSDictionary<?, ?> v) {
public void setUserInfo(NSDictionary<NSString, ?> v) {
throw new UnsupportedOperationException("UIApplicationShortcutItem is immutable");
}
/*<members>*//*</members>*/
/*<methods>*/
@Method(selector = "initWithType:localizedTitle:localizedSubtitle:icon:userInfo:")
protected native @Pointer long init(String type, String localizedTitle, String localizedSubtitle, UIApplicationShortcutIcon icon, NSDictionary<?, ?> userInfo);
protected native @Pointer long init(String type, String localizedTitle, String localizedSubtitle, UIApplicationShortcutIcon icon, NSDictionary<NSString, ?> userInfo);
@Method(selector = "initWithType:localizedTitle:")
protected native @Pointer long init(String type, String localizedTitle);
/*</methods>*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
protected UIMutableApplicationShortcutItem(Handle h, long handle) { super(h, handle); }
protected UIMutableApplicationShortcutItem(SkipInit skipInit) { super(skipInit); }
@Method(selector = "initWithType:localizedTitle:localizedSubtitle:icon:userInfo:")
public UIMutableApplicationShortcutItem(String type, String localizedTitle, String localizedSubtitle, UIApplicationShortcutIcon icon, NSDictionary<?, ?> userInfo) { super(type, localizedTitle, localizedSubtitle, icon, userInfo); }
public UIMutableApplicationShortcutItem(String type, String localizedTitle, String localizedSubtitle, UIApplicationShortcutIcon icon, NSDictionary<NSString, ?> userInfo) { super(type, localizedTitle, localizedSubtitle, icon, userInfo); }
@Method(selector = "initWithType:localizedTitle:")
public UIMutableApplicationShortcutItem(String type, String localizedTitle) { super(type, localizedTitle); }
/*</constructors>*/
Expand All @@ -81,9 +81,9 @@
@Property(selector = "setIcon:")
public native void setIcon(UIApplicationShortcutIcon v);
@Property(selector = "userInfo")
public native NSDictionary<?, ?> getUserInfo();
public native NSDictionary<NSString, ?> getUserInfo();
@Property(selector = "setUserInfo:")
public native void setUserInfo(NSDictionary<?, ?> v);
public native void setUserInfo(NSDictionary<NSString, ?> v);
@Property(selector = "targetContentIdentifier")
public native NSObject getTargetContentIdentifier();
@Property(selector = "setTargetContentIdentifier:")
Expand Down

0 comments on commit 9c20b15

Please sign in to comment.