Skip to content

Commit

Permalink
Remove outdated method skips
Browse files Browse the repository at this point in the history
These skips were added before we exposed the involved frameworks, but
we can remove them now.

Fixes #657
  • Loading branch information
madsmtm committed Oct 1, 2024
1 parent 8b2c8a7 commit c85f91e
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 57 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 22 additions & 5 deletions framework-crates/objc2-app-kit/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 15 additions & 37 deletions framework-crates/objc2-app-kit/translation-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ class.NSView.methods."getRectsExposedDuringLiveResize:count:".skipped = true
# Uses a pointer to SEL, which doesn't implement Encode yet
protocol.NSMenuDelegate.methods."menuHasKeyEquivalent:forEvent:target:action:".skipped = true

# Uses `CADisplayLink`, which is only available in CoreAnimation
class.NSView.methods."displayLinkWithTarget:selector:".skipped = true
class.NSWindow.methods."displayLinkWithTarget:selector:".skipped = true
class.NSScreen.methods."displayLinkWithTarget:selector:".skipped = true

# Duplicated method
class.NSSlider.methods.isVertical.skipped = true
class.NSSliderCell.methods.isVertical.skipped = true
Expand Down Expand Up @@ -109,6 +104,13 @@ class.NSFont.methods."getAdvancements:forCGGlyphs:count:".skipped = true
class.NSGlyphInfo.methods."glyphInfoWithCGGlyph:forFont:baseString:".skipped = true
class.NSGraphicsContext.methods."graphicsContextWithCGContext:flipped:".skipped = true
class.NSGraphicsContext.methods.CGContext.skipped = true
class.NSLayoutManager.methods."setGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
class.NSLayoutManager.methods."getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:".skipped = true
class.NSLayoutManager.methods."glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:".skipped = true
protocol.NSLayoutManagerDelegate.methods."layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
class.NSTextLayoutFragment.methods."drawAtPoint:inContext:".skipped = true
class.NSTextLineFragment.methods."drawAtPoint:inContext:".skipped = true
class.NSGlyphInfo.methods.glyphID.skipped = true

# OpenGL
class.NSOpenGLContext.skipped = true
Expand All @@ -120,47 +122,23 @@ fn.NSOpenGLSetOption.skipped = true
fn.NSOpenGLGetOption.skipped = true
fn.NSOpenGLGetVersion.skipped = true

# Uses `CKShare` from CloudKit
protocol.NSCloudSharingValidation.skipped = true
protocol.NSCloudSharingServiceDelegate.methods."sharingService:didSaveShare:".skipped = true
protocol.NSCloudSharingServiceDelegate.methods."sharingService:didStopSharing:".skipped = true

# Uses stuff from different frameworks / system libraries
class.NSAnimationContext.methods.timingFunction.skipped = true
class.NSAnimationContext.methods."setTimingFunction:".skipped = true
class.NSLayoutManager.methods."setGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
class.NSLayoutManager.methods."getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:".skipped = true
class.NSLayoutManager.methods."glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:".skipped = true
class.NSLayoutManagerDelegate.methods."layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
# QTKit
class.NSMovie.methods."initWithMovie:".skipped = true
class.NSMovie.methods.QTMovie.skipped = true
class.NSTextLayoutFragment.methods."drawAtPoint:inContext:".skipped = true
class.NSTextLineFragment.methods."drawAtPoint:inContext:".skipped = true
class.NSTextView.methods."quickLookPreviewableItemsInRanges:".skipped = true
class.NSSavePanel.methods.allowedContentTypes.skipped = true
class.NSSavePanel.methods."setAllowedContentTypes:".skipped = true
class.NSView.methods.backgroundFilters.skipped = true
class.NSView.methods."setBackgroundFilters:".skipped = true
class.NSView.methods.compositingFilter.skipped = true
class.NSView.methods."setCompositingFilter:".skipped = true
class.NSView.methods.contentFilters.skipped = true
class.NSView.methods."setContentFilters:".skipped = true
class.NSWorkspace.methods."iconForContentType:".skipped = true
class.NSWorkspace.methods."URLForApplicationToOpenContentType:".skipped = true
class.NSWorkspace.methods."URLsForApplicationsToOpenContentType:".skipped = true
class.NSWorkspace.methods."setDefaultApplicationAtURL:toOpenContentType:completionHandler:".skipped = true

# Needs `cpu_type_t` from `<mach/machine.h>`.
class.NSWorkspaceOpenConfiguration.methods.architecture.skipped = true
class.NSWorkspaceOpenConfiguration.methods."setArchitecture:".skipped = true

# Needs INIntent from Intents
protocol.NSApplicationDelegate.methods."application:handlerForIntent:".skipped = true
protocol.NSApplicationDelegate.methods."application:userDidAcceptCloudKitShareWithMetadata:".skipped = true
protocol.NSLayoutManagerDelegate.methods."layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:".skipped = true
class.NSItemProvider.methods."registerCloudKitShareWithPreparationHandler:".skipped = true
class.NSItemProvider.methods."registerCloudKitShare:container:".skipped = true
class.NSGlyphInfo.methods.glyphID.skipped = true

# Needs CoreText
class.NSAdaptiveImageGlyph.skipped-protocols = ["CTAdaptiveImageProviding"]

# header-translator crashes when trying to figure out the return type of this.
class.NSTextView.methods."quickLookPreviewableItemsInRanges:".skipped = true

###
### Main Thread Overrides
###
Expand Down
2 changes: 1 addition & 1 deletion framework-crates/objc2-core-data/translation-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static.NSRollbackMergePolicy.skipped = true
# Uses `NSDiffableDataSourceSnapshot`, which is defined in AppKit
protocol.NSFetchedResultsControllerDelegate.methods."controller:didChangeContentWithSnapshot:".skipped = true

# Needs stuff from CloudKit
# Needs stuff from CloudKit, which I'm unsure might create a dependency cycle?
class.NSPersistentCloudKitContainerOptions.methods.databaseScope.skipped = true
class.NSPersistentCloudKitContainerOptions.methods."setDatabaseScope:".skipped = true
class.NSPersistentCloudKitContainer.methods."recordForManagedObjectID:".skipped = true
Expand Down
12 changes: 8 additions & 4 deletions framework-crates/objc2-natural-language/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ ios = "12.0"
tvos = "12.0"
watchos = "5.0"
visionos = "1.0"

# Needs `MLModel` from CoreML
class.NLModel.methods."modelWithMLModel:error:".skipped = true
10 changes: 7 additions & 3 deletions framework-crates/objc2-sound-analysis/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions framework-crates/objc2-sound-analysis/translation-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ class.SNClassificationResult.methods.timeRange.skipped = true
# Needs `AVFAudio` framework
class.SNAudioStreamAnalyzer.methods."initWithFormat:".skipped = true
class.SNAudioStreamAnalyzer.methods."analyzeAudioBuffer:atAudioFramePosition:".skipped = true

# Needs `MLModel` from the `CoreML` framework
class.SNClassifySoundRequest.methods."initWithMLModel:error:".skipped = true

0 comments on commit c85f91e

Please sign in to comment.