1. Ronald Oussoren
  2. pyobjc

Commits

Ronald Oussoren  committed 07b56bf

- 'contextInfo:', 'context:', 'userData:' arguments get special treatment
in objc._convenience, remove special versions in *Signatures
- add signatures overrides for a number of methods
- add some unsupported/undocumented methods to find-raw-pointers.py

  • Participants
  • Parent commits 7a02285
  • Branches pyobjc-ancient

Comments (0)

Files changed (4)

File Lib/AppKit/_AppKitSignatures.py

View file
 setSignatureForSelector("NSFocusState", "clip:", "@@:n^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
 setSignatureForSelector("NSSurface", "surfaceID", "i@:")
 setSignatureForSelector("NSInputManager", "getMarkedText:selectedRange:", "v@:o^@o^{_NSRange=II}")
-setSignatureForSelector("NSToolbar", "_configSheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSAlert", "didEndAlert:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSEvent", "enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:", "@52@4:8i12{_NSPoint=ff}16I24d36i40@44i48i52i56")
-setSignatureForSelector("NSEvent", "userData", "i@:")
+#setSignatureForSelector("NSToolbar", "_configSheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSAlert", "didEndAlert:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSEvent", "enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:", "@52@4:8i12{_NSPoint=ff}16I24d36i40@44i48i52i56")
+#setSignatureForSelector("NSEvent", "userData", "i@:")
 setSignatureForSelector("NSPSMatrix", "invTransformRect:", "@@:N^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
 setSignatureForSelector("NSPSMatrix", "invTransform:", "@@:N^{_NSPoint=ff}")
 setSignatureForSelector("NSPSMatrix", "transformRect:", "@@:N^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
 setSignatureForSelector("NSPSMatrix", "transform:", "@@:N^{_NSPoint=ff}")
 setSignatureForSelector("NSButton", "getPeriodicDelay:interval:", "v@:o^fo^f")
-setSignatureForSelector("NSView", "addToolTipRect:owner:userData:", "i28@4:8{_NSRect={_NSPoint=ff}{_NSSize=ff}}12@28i32")
-setSignatureForSelector("NSView", "addTrackingRect:owner:userData:assumeInside:", "i@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}@ic")
-setSignatureForSelector("NSAlert", "didEndSheet:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSSavePanel", "_runModalForDirectory:file:relativeToWindow:modalDelegate:didEndSelector:contextInfo:", "v28@4:8@12@16@20@24:28i32")
-setSignatureForSelector("NSSavePanel", "beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v28@4:8@12@16@20@24:28i32")
-setSignatureForSelector("NSSavePanel", "didEndSheet:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSPageLayout", "_sheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSPageLayout", "beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:", "v24@4:8@12@16@20:24i28")
+#setSignatureForSelector("NSView", "addToolTipRect:owner:userData:", "i28@4:8{_NSRect={_NSPoint=ff}{_NSSize=ff}}12@28i32")
+#setSignatureForSelector("NSView", "addTrackingRect:owner:userData:assumeInside:", "i@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}@ic")
+#setSignatureForSelector("NSAlert", "didEndSheet:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSSavePanel", "_runModalForDirectory:file:relativeToWindow:modalDelegate:didEndSelector:contextInfo:", "v28@4:8@12@16@20@24:28i32")
+#setSignatureForSelector("NSSavePanel", "beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v28@4:8@12@16@20@24:28i32")
+#setSignatureForSelector("NSSavePanel", "didEndSheet:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSPageLayout", "_sheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSPageLayout", "beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:", "v24@4:8@12@16@20:24i28")
 setSignatureForSelector("NSPageLayout", "convertOldFactor:newFactor:", "v@:n^fo^f")
 setSignatureForSelector("NSBitmapImageRep", "getCompression:factor:", "v@:o^io^f")
 setSignatureForSelector("NSColor", "getCyan:magenta:yellow:black:alpha:", "v@:o^fo^fo^fo^fo^f")
 setSignatureForSelector("NSWorkspace", "getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:", "c28@4:8@12o^c16o^c20o^c24o^@28o^@32")
 setSignatureForSelector("NSWorkspace", "getInfoForFile:application:type:", "c@:@o^@o^@")
 setSignatureForSelector("NSWorkspace", "performFileOperation:source:destination:files:tag:", "c@:@@@@o^i")
-setSignatureForSelector("NSDocument", "_changeAlertDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSDocument", "_compatibility_canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:", "v16@4:8@12:16i20")
-setSignatureForSelector("NSDocument", "_compatibility_doSavePanelSave:delegate:didSaveSelector:contextInfo:", "v20@4:8i12@16:20i24")
-setSignatureForSelector("NSDocument", "_compatibility_shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:", "v20@4:8@12@16:20i24")
+#setSignatureForSelector("NSDocument", "_changeAlertDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSDocument", "_compatibility_canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:", "v16@4:8@12:16i20")
+#setSignatureForSelector("NSDocument", "_compatibility_doSavePanelSave:delegate:didSaveSelector:contextInfo:", "v20@4:8i12@16:20i24")
+#setSignatureForSelector("NSDocument", "_compatibility_shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:", "v20@4:8@12@16:20i24")
 setSignatureForSelector("NSDocument", "_didEndCloseSheet:returnCode:closeContext:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSDocument", "_document:pageLayoutDidReturn:contextInfo:", "v16@4:8@12c16i20")
-setSignatureForSelector("NSDocument", "_finishSaveDocumentTo:withType:forSaveOperation:withDelegate:didSaveSelector:contextInfo:", "v28@4:8@12@16i20@24:28i32")
-setSignatureForSelector("NSDocument", "_pageLayout:didEndAndReturn:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSDocument", "_printOperation:didReturn:contextInfo:", "v16@4:8@12c16i20")
-setSignatureForSelector("NSDocument", "_revertPanel:didConfirm:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSDocument", "_runAlertPanelForDocumentMoved:orDocumentRenamed:orDocumentInTrash:orDocumentUnavailable:thenSaveDocumentWithDelegate:didSaveSelector:contextInfo:", "v36@4:8c12c16c20c24@28:32i40")
-setSignatureForSelector("NSDocument", "_savePanelDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSDocument", "canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:", "v16@4:8@12:16i20")
-setSignatureForSelector("NSDocument", "runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:", "v20@4:8@12@16:20i24")
-setSignatureForSelector("NSDocument", "runModalPrintOperation:delegate:didRunSelector:contextInfo:", "v20@4:8@12@16:20i24")
-setSignatureForSelector("NSDocument", "runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:", "v20@4:8i12@16:20i24")
-setSignatureForSelector("NSDocument", "saveDocumentWithDelegate:didSaveSelector:contextInfo:", "v16@4:8@12:16i20")
-setSignatureForSelector("NSDocument", "saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:", "v24@4:8@12i16@20:24i28")
-setSignatureForSelector("NSDocument", "shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:", "v20@4:8@12@16:20i24")
-setSignatureForSelector("NSWindow", "_document:shouldClose:contextInfo:", "v16@4:8@12c16i20")
-setSignatureForSelector("NSWindow", "_setTrackingRect:inside:owner:userData:", "i36@4:8{_NSRect={_NSPoint=ff}{_NSSize=ff}}12c28@32i40")
+#setSignatureForSelector("NSDocument", "_document:pageLayoutDidReturn:contextInfo:", "v16@4:8@12c16i20")
+#setSignatureForSelector("NSDocument", "_finishSaveDocumentTo:withType:forSaveOperation:withDelegate:didSaveSelector:contextInfo:", "v28@4:8@12@16i20@24:28i32")
+#setSignatureForSelector("NSDocument", "_pageLayout:didEndAndReturn:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSDocument", "_printOperation:didReturn:contextInfo:", "v16@4:8@12c16i20")
+#setSignatureForSelector("NSDocument", "_revertPanel:didConfirm:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSDocument", "_runAlertPanelForDocumentMoved:orDocumentRenamed:orDocumentInTrash:orDocumentUnavailable:thenSaveDocumentWithDelegate:didSaveSelector:contextInfo:", "v36@4:8c12c16c20c24@28:32i40")
+#setSignatureForSelector("NSDocument", "_savePanelDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSDocument", "canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:", "v16@4:8@12:16i20")
+#setSignatureForSelector("NSDocument", "runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:", "v20@4:8@12@16:20i24")
+#setSignatureForSelector("NSDocument", "runModalPrintOperation:delegate:didRunSelector:contextInfo:", "v20@4:8@12@16:20i24")
+#setSignatureForSelector("NSDocument", "runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:", "v20@4:8i12@16:20i24")
+#setSignatureForSelector("NSDocument", "saveDocumentWithDelegate:didSaveSelector:contextInfo:", "v16@4:8@12:16i20")
+#setSignatureForSelector("NSDocument", "saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:", "v24@4:8@12i16@20:24i28")
+#setSignatureForSelector("NSDocument", "shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:", "v20@4:8@12@16:20i24")
+#setSignatureForSelector("NSWindow", "_document:shouldClose:contextInfo:", "v16@4:8@12c16i20")
+#setSignatureForSelector("NSWindow", "_setTrackingRect:inside:owner:userData:", "i36@4:8{_NSRect={_NSPoint=ff}{_NSSize=ff}}12c28@32i40")
 setSignatureForSelector("NSTypesetter", "layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:", "v@:@IIo^I")
 setSignatureForSelector("NSCell", "getPeriodicDelay:interval:", "v@:o^fo^f")
-setSignatureForSelector("NSProgressPanel", "setCancellationDelegate:wasCancelledSelector:contextInfo:", "v16@4:8@12:16i20")
+#setSignatureForSelector("NSProgressPanel", "setCancellationDelegate:wasCancelledSelector:contextInfo:", "v16@4:8@12:16i20")
 setSignatureForSelector("NSLayoutManager", "characterRangeForGlyphRange:actualGlyphRange:", "{_NSRange=II}@:{_NSRange=II}o^{_NSRange=II}")
 setSignatureForSelector("NSLayoutManager", "getFirstUnlaidCharacterIndex:glyphIndex:", "v@:o^Io^I")
 setSignatureForSelector("NSLayoutManager", "glyphAtIndex:isValidIndex:", "I@:Io^c")
 setSignatureForSelector("NSLayoutManager", "lineFragmentUsedRectForGlyphAtIndex:effectiveRange:allowLayout:", "{_NSRect={_NSPoint=ff}{_NSSize=ff}}@:Io^{_NSRange=II}c")
 setSignatureForSelector("NSLayoutManager", "temporaryAttributesAtCharacterIndex:effectiveRange:", "@@:Io^{_NSRange=II}")
 setSignatureForSelector("NSLayoutManager", "textContainerForGlyphAtIndex:effectiveRange:", "@@:Io^{_NSRange=II}")
-setSignatureForSelector("NSOpenPanel", "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v36@4:8@12@16@20@24@28:32i40")
-setSignatureForSelector("NSSavePanel", "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v36@4:8@12@16@20@24@28:32i40")
-setSignatureForSelector("NSPrintOperation", "runOperationModalForWindow:delegate:didRunSelector:contextInfo:", "v20@4:8@12@16:20i24")
+#setSignatureForSelector("NSOpenPanel", "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v36@4:8@12@16@20@24@28:32i40")
+#setSignatureForSelector("NSSavePanel", "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v36@4:8@12@16@20@24@28:32i40")
+#setSignatureForSelector("NSPrintOperation", "runOperationModalForWindow:delegate:didRunSelector:contextInfo:", "v20@4:8@12@16:20i24")
 setSignatureForSelector("NSSpellChecker", "checkSpellingOfString:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:", "{_NSRange=II}@:@i@cio^i")
 setSignatureForSelector("NSSpellChecker", "checkSpellingOfString:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:reconnectOnError:", "{_NSRange=II}@:@i@cio^ic")
-setSignatureForSelector("NSToolTipManager", "_setToolTip:forView:cell:rect:owner:ownerIsDisplayDelegate:userData:", "i48@4:8@12@16@20{_NSRect={_NSPoint=ff}{_NSSize=ff}}28@44c51i52")
-setSignatureForSelector("NSToolTipManager", "setToolTipForView:rect:displayDelegate:userData:", "i36@4:8@12{_NSRect={_NSPoint=ff}{_NSSize=ff}}16@32i40")
-setSignatureForSelector("NSToolTipManager", "setToolTipForView:rect:owner:userData:", "i36@4:8@12{_NSRect={_NSPoint=ff}{_NSSize=ff}}16@32i40")
+#setSignatureForSelector("NSToolTipManager", "_setToolTip:forView:cell:rect:owner:ownerIsDisplayDelegate:userData:", "i48@4:8@12@16@20{_NSRect={_NSPoint=ff}{_NSSize=ff}}28@44c51i52")
+#setSignatureForSelector("NSToolTipManager", "setToolTipForView:rect:displayDelegate:userData:", "i36@4:8@12{_NSRect={_NSPoint=ff}{_NSSize=ff}}16@32i40")
+#setSignatureForSelector("NSToolTipManager", "setToolTipForView:rect:owner:userData:", "i36@4:8@12{_NSRect={_NSPoint=ff}{_NSSize=ff}}16@32i40")
 setSignatureForSelector("NSMatrix", "getNumberOfRows:columns:", "v@:o^io^i")
 setSignatureForSelector("NSMatrix", "getRow:column:forPoint:", "c@:o^io^i{_NSPoint=ff}")
 setSignatureForSelector("NSMatrix", "getRow:column:ofCell:", "c@:o^io^i@")
-setSignatureForSelector("NSMatrix", "view:frameForToolTip:point:userData:", "{_NSRect={_NSPoint=ff}{_NSSize=ff}}28@8:12@16i20{_NSPoint=ff}24i32")
-setSignatureForSelector("NSMatrix", "view:stringForToolTip:point:userData:", "@24@4:8@12i16{_NSPoint=ff}20i28")
-setSignatureForSelector("NSDocumentController", "_document:didSave:contextInfo:", "v16@4:8@12c16i20")
-setSignatureForSelector("NSDocumentController", "closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:", "v16@4:8@12:16i20")
-setSignatureForSelector("NSDocumentController", "reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:", "v24@4:8@12c16@20:24i28")
-setSignatureForSelector("NSConcretePrintOperation", "_printPanel:didEndAndReturn:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSConcretePrintOperation", "_progressPanelWasCancelled:contextInfo:", "v12@4:8@12i16")
-setSignatureForSelector("NSConcretePrintOperation", "_progressPanel:didEndAndReturn:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSPrintPanel", "_sheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSPrintPanel", "beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:", "v24@4:8@12@16@20:24i28")
+#setSignatureForSelector("NSMatrix", "view:frameForToolTip:point:userData:", "{_NSRect={_NSPoint=ff}{_NSSize=ff}}28@8:12@16i20{_NSPoint=ff}24i32")
+#setSignatureForSelector("NSMatrix", "view:stringForToolTip:point:userData:", "@24@4:8@12i16{_NSPoint=ff}20i28")
+#setSignatureForSelector("NSDocumentController", "_document:didSave:contextInfo:", "v16@4:8@12c16i20")
+#setSignatureForSelector("NSDocumentController", "closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:", "v16@4:8@12:16i20")
+#setSignatureForSelector("NSDocumentController", "reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:", "v24@4:8@12c16@20:24i28")
+#setSignatureForSelector("NSConcretePrintOperation", "_printPanel:didEndAndReturn:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSConcretePrintOperation", "_progressPanelWasCancelled:contextInfo:", "v12@4:8@12i16")
+#setSignatureForSelector("NSConcretePrintOperation", "_progressPanel:didEndAndReturn:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSPrintPanel", "_sheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSPrintPanel", "beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:", "v24@4:8@12@16@20:24i28")
 setSignatureForSelector("NSTextContainer", "lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:", "{_NSRect={_NSPoint=ff}{_NSSize=ff}}@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}iio^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
-setSignatureForSelector("NSApplication", "_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:", "^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}24@4:8@12@16@20:24i28")
-setSignatureForSelector("NSApplication", "beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v@:@@@:i")
-setSignatureForSelector("NSAlert", "beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v@:@@@:i")
+#setSignatureForSelector("NSApplication", "_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:", "^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}24@4:8@12@16@20:24i28")
+#setSignatureForSelector("NSApplication", "beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v@:@@@:i")
+#setSignatureForSelector("NSAlert", "beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v@:@@@:i")
 setSignatureForSelector("NSApplication", "contextID", "i4@4:8")
 setSignatureForSelector("NSApplication", "openFile:ok:", "i12@4:8@12o^i16")
 setSignatureForSelector("NSApplication", "openTempFile:ok:", "i12@4:8@12o^i16")
 setSignatureForSelector("NSNib", "instantiateNibWithOwner:topLevelObjects:", "c@:@N^@")
 setSignatureForSelector("NSWorkspace", "launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:", "c24@0:4@8I12@16o^@20")
 setSignatureForSelector("NSWorkspace", "openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:", "c28@0:4@8@12I16@20o^@24")
-setSignatureForSelector("NSTextRulerOptions", "sheetDidEnd:returnCode:contextInfo:", "v@:@ii")
-setSignatureForSelector("NSAlert", "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", "v@:@@:i")
+#setSignatureForSelector("NSTextRulerOptions", "sheetDidEnd:returnCode:contextInfo:", "v@:@ii")
+#setSignatureForSelector("NSAlert", "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", "v@:@@:i")
 setSignatureForSelector("NSATSTypesetter", "characterRangeForGlyphRange:actualGlyphRange:", "{_NSRange=II}@:{_NSRange=II}o^{_NSRange=II}")
 setSignatureForSelector("NSATSTypesetter", "glyphRangeForGlyphRange:actualGlyphRange:", "{_NSRange=II}@:{_NSRange=II}o^{_NSRange=II}")
 setSignatureForSelector("NSATSTypesetter", "layoutParagraphAtPoint:", "I@:{_NSPoint=ff}")
 setSignatureForSelector("NSATSTypesetter", "lineFragmentRectForProposedRect:remainingRect:", "{_NSRect={_NSPoint=ff}{_NSSize=ff}}@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}")
 setSignatureForSelector("NSATSTypesetter", "getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:", "v@:o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}o^{_NSRect={_NSPoint=ff}{_NSSize=ff}}{_NSRange=II}{_NSPoint=ff}")
 setSignatureForSelector("NSATSTypesetter", "glyphRangeForCharacterRange:actualCharacterRange:", "{_NSRange=II}@:{_NSRange=II}o^{_NSRange=II}")
-setSignatureForSelector("NSSavePanel", "beginForDirectory:file:types:modelessDelegate:didEndSelector:contextInfo:", 'v@:@@@@:i')
+#setSignatureForSelector("NSSavePanel", "beginForDirectory:file:types:modelessDelegate:didEndSelector:contextInfo:", 'v@:@@@@:i')
 setSignatureForSelector("NSOpenGLPixelFormat", "getValues:forAttribute:forVirtualScreen:", 'v@:o^lii')
-setSignatureForSelector("NSSavePanel", "gotoSheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSNavFilepathInputController", "sheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
-setSignatureForSelector("NSNavFilepathInputController", "beginSheetForSavePanel:withFilepath:didEndSelector:contextInfo:", 'v@:@@:i')
+#setSignatureForSelector("NSSavePanel", "gotoSheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSNavFilepathInputController", "sheetDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
+#setSignatureForSelector("NSNavFilepathInputController", "beginSheetForSavePanel:withFilepath:didEndSelector:contextInfo:", 'v@:@@:i')
 setSignatureForSelector("NSGraphicsContext", "graphicsPort", "^{CGContext=}@:")
 #setSignatureForSelector("NSDocument", "initWithType:error:", "@@:@o^@")
+setSignatureForSelector("NSTableView", "dragImageForRows:event:dragImageOffset:", "@@:@@N^{_NSPoint=ff}")
+setSignatureForSelector("NSTableView", "dragImageForRowsWithIndexes:tableColumns:event:offset:", "@@:@@@N^{_NSPoint=ff}")

File Lib/objc/_FoundationSignatures.py

View file
 from _objc import setSignatureForSelector
 
 setSignatureForSelector("NSScanner", "scanCharactersFromSet:intoString:", "c@:@o^@")
+setSignatureForSelector("NSScanner", "scanDecimal:", "c@:o^{?=b8b4b1b1b18[8S]}")
 setSignatureForSelector("NSScanner", "scanDouble:", "c@:o^d")
 setSignatureForSelector("NSScanner", "scanFloat:", "c@:o^f")
 setSignatureForSelector("NSScanner", "scanHexInt:", "c@:o^I")
 
 setSignatureForSelector("NSObject", "validateValue:forKey:error:", "c@:N^@@o^@")
 setSignatureForSelector("NSObject", "validateValue:forKeyPath:error:", "c@:N^@@o^@")
-setSignatureForSelector("NSObject", "addObserver:forKeyPath:options:context:",
-    "v@:@@Ii")
-setSignatureForSelector("NSObject", "observeValueForKeyPath:ofObject:change:context:", "v@:@@@i")
-setSignatureForSelector("NSArray", "addObserver:toObjectsAtIndexes:forKeyPath:options:context:", 'v@:@@@Ii')
+#setSignatureForSelector("NSObject", "addObserver:forKeyPath:options:context:",
+#    "v@:@@Ii")
+#setSignatureForSelector("NSObject", "observeValueForKeyPath:ofObject:change:context:", "v@:@@@i")
+#setSignatureForSelector("NSArray", "addObserver:toObjectsAtIndexes:forKeyPath:options:context:", 'v@:@@@Ii')
 setSignatureForSelector("NSURLConnection", "sendSynchronousRequest:returningResponse:error:", "@@:@o^@o^@")
 setSignatureForSelector("NSString", "getParagraphStart:end:contentsEnd:forRange:", "v@:o^Io^Io^I{_NSRange=II}")
 setSignatureForSelector("NSMutableAttributedString", "readFromData:options:documentAttributes:", "c@:@@o^@")
 setSignatureForSelector("NSAttributedString", "initWithHTML:options:documentAttributes:", "@20@0:4@8@12o^@16")
 setSignatureForSelector("NSAttributedString", "initWithDocFormat:documentAttributes:", "@@:@o^@")
 setSignatureForSelector("NSKeyValueProperty", "keyPathIfAffectedByValueForKey:exactMatch:", "@@:@o^c")
-setSignatureForSelector("NSKeyValueObservationForwarder", "initWithObserver:relationshipKey:keyPathFromRelatedObject:options:context:", "@@:@@@Ii")
+#setSignatureForSelector("NSKeyValueObservationForwarder", "initWithObserver:relationshipKey:keyPathFromRelatedObject:options:context:", "@@:@@@Ii")
 setSignatureForSelector("NSDeserializer", "deserializePropertyListFromData:atCursor:mutableContainers:", "@@:@O^Ic")
 setSignatureForSelector("NSDeserializer", "deserializePropertyListLazilyFromData:atCursor:length:mutableContainers:", "@@:@O^IIc")
-setSignatureForSelector("OC_PythonObject", "addObserver:forKeyPath:options:context:", "v@:@@Ii")
-
+#setSignatureForSelector("OC_PythonObject", "addObserver:forKeyPath:options:context:", "v@:@@Ii")
+setSignatureForSelector("NSXMLDocument", "validateAndReturnError:", "c@:o^@")
+setSignatureForSelector("NSNetService", "getInputStream:outputStream:", "c@:o^@o^@")
 
 # Technically incorrect, but not used anyway
 setSignatureForSelector("NSObject", "setObservationInfo:", "v@:i")

File Lib/objc/_convenience.py

View file
         if sel.selector == "alloc" or sel.selector == "allocWithZone:":
             sel.isAlloc = 1
 
+        # 
+        # Handle some common exceptions to the usual rules:
+        #
+
         if sel.selector.endswith(':error:'):
+            # Error is always an output argument
             sigParts = splitSignature(sel.signature)
             if sigParts[-1] == '^@':
                 sigParts = sigParts[:-1] + ('o^@',)
                 sel.signature = ''.join(sigParts)
 
+        elif sel.selector.endswith(':userData:'):
+            # userData:(void*)arg -> userData:(int)arg
+            sigParts = splitSignature(sel.signature)
+            if sigParts[-1] == '^v':
+                sigParts = sigParts[:-1] + ('i',)
+                sel.signature = ''.join(sigParts)
+
+        elif sel.selector == 'userData':
+            # The getter for userData.
+            sigParts = splitSignature(sel.signature)
+            if sigParts[0] == '^v':
+                sigParts = ('i',) + sigParts[1:]
+                sel.signature = ''.join(sigParts)
+
+        elif sel.selector.endswith(':contextInfo:'):
+            # contextInfo:(void*)arg -> contextInfo:(int)arg
+            sigParts = splitSignature(sel.signature)
+            if sigParts[-1] == '^v':
+                sigParts = sigParts[:-1] + ('i',)
+                sel.signature = ''.join(sigParts)
+
+        elif sel.selector.endswith(':context:'):
+            # context:(void*)arg -> context:(int)arg
+            sigParts = splitSignature(sel.signature)
+            if sigParts[-1] == '^v':
+                sigParts = sigParts[:-1] + ('i',)
+                sel.signature = ''.join(sigParts)
+
+        elif sel.selector == 'context':
+            # The getter for context.
+            sigParts = splitSignature(sel.signature)
+            if sigParts[0] == '^v':
+                sigParts = ('i',) + sigParts[1:]
+                sel.signature = ''.join(sigParts)
+            
+
+
+
         if sel.selector in ( 'copy', 'copyWithZone:',
                       'mutableCopy', 'mutableCopyWithZone:'):
             # These methods transfer ownership to the caller, the runtime uses

File Scripts/find-raw-pointers.py

View file
 import objc
 import Foundation
 
-try:
-    import AppKit
-except ImportError:
-    pass
+if 1:
+    try:
+        import AppKit
+    except ImportError:
+        pass
 
-try:
-    import PreferencePanes
-except ImportError:
-    pass
+if 0:
+    try:
+        import PreferencePanes
+    except ImportError:
+        pass
 
-try:
-    import ScreenSaver
-except ImportError:
-    pass
+if 0:
+    try:
+        import ScreenSaver
+    except ImportError:
+        pass
 
-try:
-    import InterfaceBuilder
-except ImportError:
-    pass
+if 0:
+    try:
+        import InterfaceBuilder
+    except ImportError:
+        pass
 
-try:
-    import AddressBook
-except ImportError:
-    pass
+if 0:
+    try:
+        import AddressBook
+    except ImportError:
+        pass
 
-try:
-    import WebKit
-except ImportError:
-    pass
+if 0:
+    try:
+        import WebKit
+    except ImportError:
+        pass
 
-try:
-    import SecurityInterface
-except ImportError:
-    pass
+if 0:
+    try:
+        import SecurityInterface
+    except ImportError:
+        pass
 
-try:
-    import ExceptionHandlers
-except ImportError:
-    pass
+if 0:
+    try:
+        import ExceptionHandlers
+    except ImportError:
+        pass
 
-try:
-    import CoreData
-except ImportError:
-    pass
+if 0:
+    try:
+        import CoreData
+    except ImportError:
+        pass
 
 PTRSIG={}
 
 
 REL_OSX_10_2 = 'MacOS X 10.2'
 REL_OSX_10_3 = 'MacOS X 10.3'
+REL_OSX_10_4 = 'MacOS X 10.4'
 
 TP_SUPPORTED = 'supported'
 TP_UNSUPPORTED = 'unsupported'
 
 # XXX: This should be a data file, need to add framework info and comments.
 WRAPPED_METHODS={
+    'NSKeyValueIvarSetter_initWithContainerClassID_key_containerIsa_ivar_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSKeyValueIvarGetter_initWithContainerClassID_key_ivar_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSKeyValueAccessor_initWithContainerClassID_key_implementation_selector_extraArguments_count_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSKeyValueIvarMutableCollectionGetter_initWithContainerClassID_key_containerIsa_ivar_proxyClass_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSKeyValueIvarMutableCollectionGetter_ivar': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSKeyValueMethodSetter_initWithContainerClassID_key_method_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSKeyValueMethodGetter_initWithContainerClassID_key_method_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+
+    # All of these would require libxml2 wrappers:
+    'NSXMLTreeReader_createNamedNodeFromNode_reader_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processCDATA_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processComment_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processDocumentFragment_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processDocumentType_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processDocument_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processElement_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processEndElement_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processEndEntity_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processEntityReference_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processEntity_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processNode_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processNotation_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processProcessingInstruction_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processRealDocument_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processSignificantWhitespace_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processText_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processWhitespace_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLTreeReader_processXMLDeclaration_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLElementDeclarationContent_XMLStringSequenceStarted_choiceStarted_appendingToString_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLElementDeclarationContent_createElementContent_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLElementDeclarationContent_libxml2Content': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLElement_validateName_error_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSXMLSAXParser_context': (REL_OSX_10_4, TP_UNDOCUMENTED),
+
+
+
+    # WebKit related
+    'NSHTTPAuthenticator_addCredentialsToInitialHTTPRequest_proxyURL_protocol_': (REL_OSX_10_4, TP_UNSUPPORTED),
+    'NSHTTPAuthenticator_addCredentialsToRetryHTTPRequest_proxyURL_afterFailureResponse_nsFailureResponse_failureCount_protocol_withCallback_context_': (REL_OSX_10_4, TP_UNSUPPORTED),
+    'NSHTTPAuthenticator_checkForAuthenticationFailureInHTTPResponse_withURL_proxyURL_': (REL_OSX_10_4, TP_UNSUPPORTED),
+    'NSPortMessage_initWithMachMessage_': (REL_OSX_10_4, TP_UNSUPPORTED),
+    'NSSet_initWithObjects_ex_count_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSDictionary_initWithObjects_ex_forKeys_count_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSArray_initWithObjects_ex_count_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+
+    'NSConnectionHTTPURLProtocol_createStream_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSConnectionHTTPURLProtocol_retryAfterAuthenticationFailure_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSConnectionHTTPURLProtocol_setResponseHeaderUsingHTTPResponse_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSConnectionHTTPURLProtocol_updateConnectionForResponse_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSHTTPConnectionCache_addConnection_forKey_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSHTTPConnectionCache_connectionsForKey_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSHTTPConnectionCache_dequeueRequestForKey_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSHTTPConnectionCache_enqueueRequest_forKey_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSHTTPConnectionCache_removeConnection_forKey_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSHTTPConnectionCache_setUseSSLOnly_forKey_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+    'NSHTTPConnectionCache_useSSLOnlyForKey_': (REL_OSX_10_4, TP_UNDOCUMENTED),
+
+
+
+
     # Internal methods
     'OC_PythonArray_getObjects_inRange_': (REL_OSX_10_3, TP_UNSUPPORTED),
 
     'NSData_initWithBytesNoCopy_length_freeWhenDone_':1,
     'NSBezierPath_getLineDash_count_phase_':1,
     'NSFault_forward__':1,
+    'NSResurrectedObject_forward__':1,
+    'NSDeallocatedObject_forward__':1,
     'NSInvocationBuilder_forward__':1,
     'NSObject_forward__':1,
     'NSProxy_forward__':1,
     'NSCFNetworkHTTPURLProtocol_retryAfterAuthenticationFailure_':1,
     'NSCFNetworkHTTPURLProtocol_setResponseHeaderUsingHTTPResponse_andCall_context_':1,
     'NSURLAuthenticationChallengeState_initWithProtocol_httpRequest_challenge_callback_context_':1,
+    'NSURLAuthenticationChallengeState_initWithProtocol_httpRequest_proxyURL_challenge_callback_context_': 1,
     'NSHTTPURLProtocol_didAddCredentials_toRequest_context_':1,
     'NSURLQueue_newNode':1,
     'NSUndoManager_registerUndoWithTarget_selector_arguments_argumentCount_':1,
     if cls.__name__.startswith('%'): continue
     if cls.__name__ == 'Object': continue
 
+    if cls.__name__.startswith('OC_'): continue
+
     for selName in dir(cls):
         try:
             sel = getattr(cls, selName)
         if m:
             r = '%s_%s'%(cls.__name__, sel.selector.replace(':', '_'))
             if not WRAPPED_METHODS.has_key(r):
-                print r
+                print r, sel.signature
 
 #print "--- SIGNATURES ----"
 #sigs = PTRSIG.values()