* updated version of the conversion script, used to generate the previously

committed cocoa unit conversions, and which can also be used to translate
    the iOS SDK 3.2 headers
  + scripts (make-cocoa-headers.sh, make-ios-headers.sh) to (re)build the
    Cocoa/iOS headers, along with skeleton directories that contain the
    necessary helper files and a few required patches
  + frameworks.xml used by the conversion script
  * updated build instructions

git-svn-id: trunk@16522 -
This commit is contained in:
Jonas Maebe 2010-12-08 21:12:27 +00:00
parent c132727caf
commit a880603816
31 changed files with 5593 additions and 4528 deletions

28
.gitattributes vendored
View File

@ -1559,14 +1559,38 @@ packages/cocoaint/src/webkit/WebView.inc svneol=native#text/plain
packages/cocoaint/utils/Make[!!-~]Cocoa[!!-~]Headers.txt svneol=native#text/plain
packages/cocoaint/utils/Make[!!-~]iPhone[!!-~]Headers.txt svneol=native#text/plain
packages/cocoaint/utils/Using[!!-~]Installer[!!-~]Script.txt svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/CocoaAll.pas svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/CoreData.pas svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/InlineFunctions.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/UndefinedTypes.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/WebKit.pas svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/appkit/AppKit.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/appkit/CIColor.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/coredata/CoreData.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/foundation/Foundation.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/quartzcore/QuartzCore.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/webkit/UndefinedTypes.inc svneol=native#text/plain
packages/cocoaint/utils/cocoa-skel/src/webkit/WebKit.inc svneol=native#text/plain
packages/cocoaint/utils/frameworks.xml svneol=native#text/plain
packages/cocoaint/utils/install_objp.sh svneol=native#text/plain
packages/cocoaint/utils/iphone/iPhone[!!-~]Parser.txt svneol=native#text/plain
packages/cocoaint/utils/iphone/objp_parser.php svneol=native#text/plain
packages/cocoaint/utils/iphone/parser.php svneol=native#text/plain
packages/cocoaint/utils/iphone/pascocoa_parser.php svneol=native#text/plain
packages/cocoaint/utils/objp_parser.php svneol=native#text/plain
packages/cocoaint/utils/make-cocoa-headers.sh svneol=native#text/plain
packages/cocoaint/utils/make-ios-headers.sh svneol=native#text/plain
packages/cocoaint/utils/parser.php svneol=native#text/plain
packages/cocoaint/utils/pascocoa_parser.php svneol=native#text/plain
packages/cocoaint/utils/patches/cocoa-coredata-webkit.patch svneol=native#text/plain
packages/cocoaint/utils/patches/uikit.patch svneol=native#text/plain
packages/cocoaint/utils/source/objp_parser.php svneol=native#text/plain
packages/cocoaint/utils/source/pascocoa_parser.php svneol=native#text/plain
packages/cocoaint/utils/uikit-skel/src/InlineFunctions.inc svneol=native#text/plain
packages/cocoaint/utils/uikit-skel/src/UndefinedTypes.inc svneol=native#text/plain
packages/cocoaint/utils/uikit-skel/src/foundation/Foundation.inc svneol=native#text/plain
packages/cocoaint/utils/uikit-skel/src/iPhoneAll.pas svneol=native#text/plain
packages/cocoaint/utils/uikit-skel/src/opengles/OpenGLES.inc svneol=native#text/plain
packages/cocoaint/utils/uikit-skel/src/quartzcore/QuartzCore.inc svneol=native#text/plain
packages/cocoaint/utils/uikit-skel/src/uikit/UIKit.inc svneol=native#text/plain
packages/dbus/Makefile svneol=native#text/plain
packages/dbus/Makefile.fpc svneol=native#text/plain
packages/dbus/examples/Makefile svneol=native#text/plain

View File

@ -1,4 +1,6 @@
1) cd to the directory which contains parser.php
2) php parser.php -cocoa -root="/usr/local/lib/fpc/2.5.1/units/i386-darwin/cocoaint/src"
Note: -root is the path to the directory which contains the base appkit and foundation folders. These folders come in the FPC distribution with some hand parsed headers and the master include units for each framework.
To (re)build the Objective-Pascal Cocoa headers from source (note: only
tested against the Mac OS X 10.6 headers):
1) cd to the directory which contains parser.php (this directory)
2) ./make-cocoa-headers.sh
The built headers will be placed under cocoa-skel/src

View File

@ -2,23 +2,11 @@ It is against the Apple license to distribute even derivatives of the iPhone hea
Please note you must download the iPhone SDK (2GB+) from Apple's website (https://developer.apple.com/iphone), which contains the headers. Once the files are installed make sure the following SDK is available at this location:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/System/Library/Frameworks/UIKit.framework/Headers
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/Frameworks/UIKit.framework/Headers
1) cd to the directory which contains parser.php
2) php parser.php -iphone -root="/Developer/ObjectivePascal/Headers"
To build the iOS Objective-Pascal headers (only supported for the iOS 3.2 SDK headers at this time, other SDK versinos will probably result in errors and require manual modification),
1) cd to the directory which contains parser.php (the current directory)
2) ./make-ios-headers.sh
The built headers will be placed under uikit-skel/src.
Note: -root is the path to the directory which contains the base appkit and foundation folders. These folders come in the FPC distribution with some hand parsed headers and the master include units for each framework. In SVN they reside at packages/cocoaint/src.
3) Finally some handing coding must be done:
1) UITextInputTraits in UITextInputTraits.inc must be changed to UITextInputTraitsProtocol.
UITextField.inc(80,32) Error: Identifier not found "UITextInputTraits"
UITextField.inc(81,39) Error: Identifier not found "UITextInputTraits"
2) In UIAcceleration.inc you must comment out the follow 3 methods. Bug in FPC has been filed.
function x: UIAccelerationValue; message 'x';
function y: UIAccelerationValue; message 'y';
function z: UIAccelerationValue; message 'z';

View File

@ -0,0 +1,121 @@
unit CocoaAll;
{$mode delphi}
{$modeswitch objectivec1}
{$modeswitch cvar} { for "external" after the semi-colon with external vars }
interface
uses
ctypes,
AEDataModel,IconsCore,
CFBase, CFArray, CFBag , CFCharacterSet, CFData, CFDate, CFDictionary, CFNumber ,CFPropertyList, CFSet, CFString, CFStringEncodingExt, CFTimeZone, CFTree, CFURL, CFXMLNode, CFXMLParser, CFMachPort, CFMessagePort, CFRunLoop, CFSocket, CFBinaryHeap, CFBitVector, CFBundle, CFByteOrders, CFPlugIn, CFPreferences, CFURLAccess, CFUUID, CFLocale, CFStream, CFDateFormatter, CFNumberFormatter, CFCalendar, CFUserNotification, CFNotificationCenter, CFAttributedString, CFNetworkErrorss,
CGBase, CGAffineTransforms, CGBitmapContext, CGColor, CGColorSpace, CGContext, CGDataConsumer, CGDataProvider, CGDirectDisplay, CGDirectPalette, CGDisplayConfiguration, CGDisplayFades, CGErrors, CGEvent, CGEventSource, CGEventTypes, CGFont, CGFunction, CGGLContext, CGGeometry, CGImage, CGLayer, CGPDFArray, CGPDFContentStream, CGPDFContext, CGPDFDictionary, CGPDFDocument, CGPDFObject, CGPDFOperatorTable, CGPDFPage, CGPDFScanner, CGPDFStream, CGPDFString, CGPSConverter, CGPath, CGPattern, CGRemoteOperation, CGSession, CGShading, CGWindowLevels,
CVBase,CVImageBuffer,
IOSurfaceAPI,
SecBase, SecTrust,
MacTypes, MacOSXPosix,
macgl, CGLTypes,
AnonClassDefinitionsQuartzcore;
{$linkframework Cocoa}
{$define INTERFACE}
{$include UndefinedTypes.inc}
// also includes the ones for foundation and appkit
{$include quartzcore/AnonIncludeClassDefinitionsQuartzcore.inc}
{$define HEADER}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef HEADER}
{$define TYPES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef TYPES}
{$define RECORDS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef RECORDS}
type
{$define FORWARD}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef FORWARD}
{$define PROTOCOLS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef PROTOCOLS}
{$define CLASSES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef CLASSES}
{$define FUNCTIONS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef FUNCTIONS}
{$define EXTERNAL_SYMBOLS}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef EXTERNAL_SYMBOLS}
{$define USER_PATCHES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef USER_PATCHES}
{ Inline functions }
function NSSTR (inString: PChar): NSString;
function NSMakeRange (loc: NSUInteger; len: NSUInteger): NSRange;
function NSMaxRange (range: NSRange): NSUInteger;
function NSLocationInRange (loc: NSUInteger; range: NSRange): boolean;
function NSEqualRanges (range1, range2: NSRange): boolean;
function NSMakePoint (x: CGFloat; y: CGFloat): NSPoint;
function NSMakeSize(w: CGFloat; h: CGFloat): NSSize;
function NSMakeRect(x, y: CGFloat; w, h: CGFloat): NSRect;
function NSMaxX (aRect: NSRect): CGFloat;
function NSMaxY (aRect: NSRect): CGFloat;
function NSMidX (aRect: NSRect): CGFloat;
function NSMidY (aRect: NSRect): CGFloat;
function NSMinX (aRect: NSRect): CGFloat;
function NSMinY (aRect: NSRect): CGFloat;
function NSWidth (aRect: NSRect): CGFloat;
function NSHeight (aRect: NSRect): CGFloat;
function NSRectFromCGRect (aRect: CGRect): NSRect;
function NSRectToCGRect (aRect: NSRect): CGRect;
function NSPointFromCGPoint (aPoint: CGPoint): NSPoint;
function NSPointToCGPoint (aPoint: NSPoint): CGPoint;
function NSSizeFromCGSize(aSize: CGSize): NSSize;
function NSSizeToCGSize(aSize: NSSize): CGSize;
{$undef INTERFACE}
implementation
{$define IMPLEMENTATION}
{$include InlineFunctions.inc}
{$define USER_PATCHES}
{$include foundation/Foundation.inc}
{$include quartzcore/QuartzCore.inc}
{$include appkit/AppKit.inc}
{$undef USER_PATCHES}
{$undef IMPLEMENTATION}
end.

View File

@ -0,0 +1,58 @@
{$mode delphi}
{$modeswitch cvar}
{$modeswitch objectivec1}
unit CoreData;
interface
uses
ctypes, CocoaAll;
{$linkframework Cocoa} { Cocoa is "umbrella" fremework, includes CoreData }
{$define INTERFACE}
{$include coredata/AnonIncludeClassDefinitionsCoredata.inc}
{$define HEADER}
{$include coredata/CoreData.inc}
{$undef HEADER}
{$define TYPES}
{$include coredata/CoreData.inc}
{$undef TYPES}
{$define RECORDS}
{$include coredata/CoreData.inc}
{$undef RECORDS}
{$define FORWARD}
{$include coredata/CoreData.inc}
{$undef FORWARD}
{$define PROTOCOLS}
{$include coredata/CoreData.inc}
{$undef PROTOCOLS}
{$define CLASSES}
{$include coredata/CoreData.inc}
{$undef CLASSES}
{$define FUNCTIONS}
{$include coredata/CoreData.inc}
{$undef FUNCTIONS}
{$define EXTERNAL_SYMBOLS}
{$include coredata/CoreData.inc}
{$undef EXTERNAL_SYMBOLS}
{$define USER_PATCHES}
{$include coredata/CoreData.inc}
{$undef USER_PATCHES}
{$undef INTERFACE}
implementation
{$define IMPLEMENTATION}
{$undef IMPLEMENTATION}
end.

View File

@ -0,0 +1,132 @@
function NSMakeRange (loc: NSUInteger; len: NSUInteger): NSRange;
begin
result.location := loc;
result.length := len;
end;
function NSMaxRange (range: NSRange): NSUInteger;
begin
result := range.location + range.length;
end;
function NSLocationInRange (loc: NSUInteger; range: NSRange): boolean;
begin
if (loc <= range.location + range.length) and (loc >= range.location) then
result := true
else
result := false;
end;
function NSEqualRanges (range1, range2: NSRange): boolean;
begin
if (range1.location = range2.location) and (range1.length = range2.length) then
result := true
else
result := false;
end;
function NSMakePoint (x: CGFloat; y: CGFloat): NSPoint;
begin
result.y := y;
result.x := x;
end;
function NSMakeSize(w: CGFloat; h: CGFloat): NSSize;
begin
result.width := w;
result.height := h;
end;
function NSMakeRect(x, y: CGFloat; w, h: CGFloat): NSRect;
begin
result.origin.x := x;
result.origin.y := y;
result.size.width := w;
result.size.height := h;
end;
function NSMaxX (aRect: NSRect): CGFloat;
begin
result := aRect.origin.x + aRect.size.width;
end;
function NSMaxY (aRect: NSRect): CGFloat;
begin
result := aRect.origin.y + aRect.size.height;
end;
function NSMidX (aRect: NSRect): CGFloat;
begin
result := (aRect.origin.x + aRect.size.width) * 0.5 ;
end;
function NSMidY (aRect: NSRect): CGFloat;
begin
result := (aRect.origin.y + aRect.size.height) * 0.5 ;
end;
function NSMinX (aRect: NSRect): CGFloat;
begin
result := aRect.origin.x;
end;
function NSMinY (aRect: NSRect): CGFloat;
begin
result := aRect.origin.y;
end;
function NSWidth (aRect: NSRect): CGFloat;
begin
result := aRect.size.width;
end;
function NSHeight (aRect: NSRect): CGFloat;
begin
result := aRect.size.height;
end;
function NSRectFromCGRect (aRect: CGRect): NSRect;
begin
result.origin.x := aRect.origin.x;
result.origin.y := aRect.origin.y;
result.size.width := aRect.size.width;
result.size.height := aRect.size.height;
end;
function NSRectToCGRect (aRect: NSRect): CGRect;
begin
result.origin.x := aRect.origin.x;
result.origin.y := aRect.origin.y;
result.size.width := aRect.size.width;
result.size.height := aRect.size.height;
end;
function NSPointFromCGPoint (aPoint: CGPoint): NSPoint;
begin
result.y := aPoint.y;
result.x := aPoint.x;
end;
function NSPointToCGPoint (aPoint: NSPoint): CGPoint;
begin
result.y := aPoint.y;
result.x := aPoint.x;
end;
function NSSizeFromCGSize(aSize: CGSize): NSSize;
begin
result.width := aSize.width;
result.height := aSize.height;
end;
function NSSizeToCGSize(aSize: NSSize): CGSize;
begin
result.width := aSize.width;
result.height := aSize.height;
end;
function NSSTR (inString: PChar): NSString;
begin
Result := NSString(CFSTR(inString));
end;

View File

@ -0,0 +1,65 @@
type
__NSAppleEventManagerSuspension = record end;
IBAction = Pointer;
objc_protocol = protocol;
idptr = ^id;
idptrptr = ^idptr;
SELptr = ^SEL;
{ Variable argument list - disabled for Pascal }
type
va_list_rec = record
end;
va_list = ^va_list_rec;
{ Private instance variable types }
type
_NSImageCellAnimationState = Pointer;
_CGLPBufferObject = Pointer;
PATHSEGMENT = Pointer; {from NSBezierPath.h what is this???}
{ from CoreData }
type
NSAttributeType = NSUInteger;
{ Pointer C-Types }
{ An array of objects }
type
NSObjectArrayOfObjects = array[0..(high(longint) div sizeof(id))-1] of id;
NSObjectArrayOfObjectsPtr = ^NSObjectArrayOfObjects;
{ Cocoa types }
const
UINT_MAX = high(culong);
// 7.18.2.4 Limits of integer types capable of holding object pointers
INTPTR_MIN = low(ptrint);
INTPTR_MAX = high(ptrint);
UINTPTR_MAX = high(ptruint);
// 7.18.2.5 Limits of greatest-width integer types
INTMAX_MIN = low(int64);
INTMAX_MAX = high(int64);
UINTMAX_MAX = high(qword);
// 7.18.3 "Other"
PTRDIFF_MIN = INTPTR_MIN;
PTRDIFF_MAX = INTPTR_MAX;
{ from IOKit (not yet part of univint) }
const
NX_TABLET_POINTER_UNKNOWN = 0;
NX_TABLET_POINTER_PEN = 1;
NX_TABLET_POINTER_CURSOR = 2;
NX_TABLET_POINTER_ERASER = 3;
NX_SUBTYPE_DEFAULT = 0;
NX_SUBTYPE_TABLET_POINT = 1;
NX_SUBTYPE_TABLET_PROXIMITY = 2;
NX_SUBTYPE_MOUSE_TOUCH = 3;
NX_TABLET_BUTTON_PENTIPMASK = $0001;
NX_TABLET_BUTTON_PENLOWERSIDEMASK = $0002;
NX_TABLET_BUTTON_PENUPPERSIDEMASK = $0004;
{ Parser hacks - these types should never exist }
type
__NSAppleEventManagerSuspensionPtr = Pointer;

View File

@ -0,0 +1,69 @@
unit WebKit;
{$mode delphi}
{$modeswitch cvar}
{$modeswitch objectivec1}
interface
{$linkframework WebKit}
uses
ctypes, CocoaAll,
CFBase, CFArray, CFBag , CFCharacterSet, CFData, CFDate, CFDictionary, CFNumber ,CFPropertyList, CFSet, CFString, CFStringEncodingExt, CFTimeZone, CFTree, CFURL, CFXMLNode, CFXMLParser, CFMachPort, CFMessagePort, CFRunLoop, CFSocket, CFBinaryHeap, CFBitVector, CFBundle, CFByteOrders, CFPlugIn, CFPreferences, CFURLAccess, CFUUID, CFLocale, CFStream, CFDateFormatter, CFNumberFormatter, CFCalendar, CFUserNotification, CFNotificationCenter, CFAttributedString,
CGBase, CGAffineTransforms, CGBitmapContext, CGColor, CGColorSpace, CGContext, CGDataConsumer, CGDataProvider, CGDirectDisplay, CGDirectPalette, CGDisplayConfiguration, CGDisplayFades, CGErrors, CGEvent, CGEventSource, CGEventTypes, CGFont, CGFunction, CGGLContext, CGGeometry, CGImage, CGLayer, CGPDFArray, CGPDFContentStream, CGPDFContext, CGPDFDictionary, CGPDFDocument, CGPDFObject, CGPDFOperatorTable, CGPDFPage, CGPDFScanner, CGPDFStream, CGPDFString, CGPSConverter, CGPath, CGPattern, CGRemoteOperation, CGSession, CGShading, CGWindowLevels,
MacTypes,
AnonClassDefinitionsWebkit;
{$define INTERFACE}
{$include webkit/UndefinedTypes.inc}
{$include webkit/AnonIncludeClassDefinitionsWebkit.inc}
{$define HEADER}
{$include webkit/WebKit.inc}
{$undef HEADER}
{$define TYPES}
{$include webkit/WebKit.inc}
{$undef TYPES}
{$define RECORDS}
{$include webkit/WebKit.inc}
{$undef RECORDS}
type
{$define FORWARD}
{$include webkit/WebKit.inc}
{$undef FORWARD}
{$define PROTOCOLS}
{$include webkit/WebKit.inc}
{$undef PROTOCOLS}
{$define CLASSES}
{$include webkit/WebKit.inc}
{$undef CLASSES}
{$define FUNCTIONS}
{$include webkit/WebKit.inc}
{$undef FUNCTIONS}
{$define EXTERNAL_SYMBOLS}
{$include webkit/WebKit.inc}
{$undef EXTERNAL_SYMBOLS}
{$define USER_PATCHES}
{$include webkit/WebKit.inc}
{$undef USER_PATCHES}
{$undef INTERFACE}
implementation
{$define IMPLEMENTATION}
{$define USER_PATCHES}
{$include webkit/WebKit.inc}
{$undef USER_PATCHES}
{$undef IMPLEMENTATION}
end.

View File

@ -0,0 +1,182 @@
{ Added for compatibility }
{$include CIColor.inc}
{ === From OS 10.5 === }
{$include NSResponder.inc}
{$include NSGraphicsContext.inc}
{$include NSAccessibility.inc}
{$include NSAlert.inc}
{$include NSAnimationContext.inc}
{$include NSAppleScriptExtensions.inc}
{$include NSApplication.inc}
{$include NSParagraphStyle.inc}
{$include NSCell.inc}
{$include NSActionCell.inc}
{$include NSButtonCell.inc}
{$include NSDockTile.inc}
{$include NSFont.inc}
{$include NSFontDescriptor.inc}
{$include NSFontManager.inc}
{$include NSFormCell.inc}
{$include NSMenu.inc}
{$include NSColor.inc}
{$include NSColorSpace.inc}
{$include NSBrowserCell.inc}
{$include NSColorList.inc}
{$include NSColorPicking.inc}
{$include NSColorPicker.inc}
{$include NSCursor.inc}
{$include NSDocument.inc}
{$include NSDocumentController.inc}
{$include NSDragging.inc}
{$include NSErrors.inc}
{$include NSEvent.inc}
{$include NSFileWrapper.inc}
{$include NSHelpManager.inc}
{$include NSGradient.inc}
{$include NSGraphics.inc}
{$include NSImage.inc}
{$include NSImageCell.inc}
{$include NSImageRep.inc}
{$include NSBitmapImageRep.inc}
{$include NSCachedImageRep.inc}
{$include NSCIImageRep.inc}
{$include NSCustomImageRep.inc}
{$include NSEPSImageRep.inc}
{$include NSNib.inc}
{$include NSNibLoading.inc}
{$include NSPrinter.inc}
{$include NSSpeechRecognizer.inc}
{$include NSSpeechSynthesizer.inc}
{$include NSSpellChecker.inc}
{$include NSPageLayout.inc}
{$include NSPasteboard.inc}
{$include NSPrintInfo.inc}
{$include NSPrintOperation.inc}
{$include NSScreen.inc}
{$include NSSliderCell.inc}
{$include NSSpellProtocol.inc}
{$include NSTextFieldCell.inc}
{$include NSTokenFieldCell.inc}
{$include NSTrackingArea.inc}
{$include NSView.inc}
{$include NSMenuItem.inc}
{$include NSScrollView.inc}
{$include NSSplitView.inc}
{$include NSClipView.inc}
{$include NSText.inc}
{$include NSViewController.inc}
{$include NSControl.inc}
{$include NSButton.inc}
{$include NSPopUpButton.inc}
{$include NSImageView.inc}
{$include NSColorWell.inc}
{$include NSBrowser.inc}
{$include NSMatrix.inc}
{$include NSForm.inc}
{$include NSBox.inc}
{$include NSScroller.inc}
{$include NSSegmentedControl.inc}
{$include NSSlider.inc}
{$include NSTextField.inc}
{$include NSTokenField.inc}
{$include NSWindow.inc}
{$include NSPanel.inc}
{$include NSColorPanel.inc}
{$include NSFontPanel.inc}
{$include NSPrintPanel.inc}
{$include NSSavePanel.inc}
{$include NSOpenPanel.inc}
{$include NSWindowController.inc}
{$include NSWorkspace.inc}
{$include NSComboBox.inc}
{$include NSComboBoxCell.inc}
{$include NSTableColumn.inc}
{$include NSTableHeaderCell.inc}
{$include NSTableHeaderView.inc}
{$include NSTableView.inc}
{$include NSOutlineView.inc}
{$include NSAttributedString.inc}
{$include NSLayoutManager.inc}
{$include NSTextStorage.inc}
{$include NSTextView.inc}
{$include NSTextContainer.inc}
{$include NSTextAttachment.inc}
{$include NSInputManager.inc}
{$include NSInputServer.inc}
{$include NSStringDrawing.inc}
{$include NSRulerMarker.inc}
{$include NSRulerView.inc}
{$include NSSecureTextField.inc}
{$include NSInterfaceStyle.inc}
{$include NSProgressIndicator.inc}
{$include NSTabView.inc}
{$include NSTabViewItem.inc}
{$include NSMenuView.inc}
{$include NSMenuItemCell.inc}
{$include NSPopUpButtonCell.inc}
{$include NSAffineTransform.inc}
{$include NSBezierPath.inc}
{$include NSPICTImageRep.inc}
{$include NSStatusBar.inc}
{$include NSStatusItem.inc}
{$include NSSound.inc}
{$include NSMovie.inc}
{$include NSMovieView.inc}
{$include NSPDFImageRep.inc}
{$include NSQuickDrawView.inc}
{$include NSDrawer.inc}
{$include NSOpenGL.inc}
{$include NSOpenGLView.inc}
{$include NSApplicationScripting.inc}
{$include NSDocumentScripting.inc}
{$include NSTextStorageScripting.inc}
{$include NSToolbar.inc}
{$include NSToolbarItem.inc}
{$include NSToolbarItemGroup.inc}
{$include NSWindowScripting.inc}
{$include NSStepper.inc}
{$include NSStepperCell.inc}
{$include NSGlyphInfo.inc}
{$include NSShadow.inc}
{$include NSTypesetter.inc}
{$include NSATSTypesetter.inc}
{$include NSGlyphGenerator.inc}
{$include NSSearchField.inc}
{$include NSSearchFieldCell.inc}
{$include NSController.inc}
{$include NSObjectController.inc}
{$include NSArrayController.inc}
{$include NSDictionaryController.inc}
{$include NSTreeNode.inc}
{$include NSTreeController.inc}
{$include NSUserDefaultsController.inc}
{$include NSKeyValueBinding.inc}
{$include NSTextList.inc}
{$include NSTextTable.inc}
{$include NSDatePickerCell.inc}
{$include NSDatePicker.inc}
{$include NSLevelIndicatorCell.inc}
{$include NSLevelIndicator.inc}
{$include NSAnimation.inc}
{$include NSPersistentDocument.inc}
{$include NSRuleEditor.inc}
{$include NSPredicateEditor.inc}
{$include NSPredicateEditorRowTemplate.inc}
{$include NSPathCell.inc}
{$include NSPathControl.inc}
{$include NSPathComponentCell.inc}
{$include NSCollectionView.inc}
{$include NSTextInputClient.inc}
{ === From OS 10.6 === }
{include NSOpenGLLayer.inc}
{$include NSPasteboardItem.inc}
{$include NSRunningApplication.inc}
{$include NSTextInputContext.inc}
{$include NSTouch.inc}
{$include NSUserInterfaceItemSearching.inc}
{ === Added for 10.6 parse but from 10.5 === }
{$include NSUserInterfaceValidation.inc}

View File

@ -0,0 +1,28 @@
{ Parsed from Coredata.framework CoreData.h }
{ include CoreData.inc}
{$include CoreDataDefines.inc}
{$include CoreDataErrors.inc}
{$include NSPersistentStore.inc}
{$include NSAtomicStore.inc}
{$include NSAtomicStoreCacheNode.inc}
{$include NSPropertyDescription.inc}
{$include NSAttributeDescription.inc}
{$include NSEntityDescription.inc}
{$include NSEntityMapping.inc}
{$include NSEntityMigrationPolicy.inc}
{$include NSExpressionDescription.inc}
{$include NSFetchRequest.inc}
{$include NSFetchRequestExpression.inc}
{$include NSFetchedPropertyDescription.inc}
{$include NSManagedObject.inc}
{$include NSManagedObjectContext.inc}
{$include NSManagedObjectID.inc}
{$include NSManagedObjectModel.inc}
{$include NSMappingModel.inc}
{$include NSMigrationManager.inc}
{$include NSPersistentStoreCoordinator.inc}
{$include NSPropertyMapping.inc}
{$include NSRelationshipDescription.inc}

View File

@ -0,0 +1,131 @@
{ Parse category/protocol symbols from NSObject.h }
{-parse NSObject.h}
{ This unit adds categories and protocols to NSObject in objcbase.pp }
{ //include NSObjectSupport.inc}
{ === From OS 10.5 === }
{$include NSObjCRuntime.inc}
{$include NSInvocation.inc}
{$include NSPointerFunctions.inc}
{$include NSAffineTransform.inc}
{$include NSArray.inc}
{$include NSAttributedString.inc}
{$include NSAutoreleasePool.inc}
{$include NSBundle.inc}
{$include NSCalendar.inc}
{$include NSCharacterSet.inc}
{$include NSClassDescription.inc}
{$include NSCoder.inc}
{$include NSArchiver.inc}
{$include NSConnection.inc}
{$include NSData.inc}
{$include NSDate.inc}
{$include NSCalendarDate.inc}
{$include NSDecimal.inc}
{$include NSDictionary.inc}
{$include NSDistributedLock.inc}
{$include NSEnumerator.inc}
{$include NSError.inc}
{$include NSException.inc}
{$include NSFileHandle.inc}
{$include NSFileManager.inc}
{$include NSFormatter.inc}
{$include NSDateFormatter.inc}
{$include NSGarbageCollector.inc}
{$include NSSet.inc}
{$include NSScanner.inc}
{$include NSValue.inc}
{$include NSDecimalNumber.inc}
{$include NSValueTransformer.inc}
{$include NSGeometry.inc}
{$include NSHashTable.inc}
{$include NSHFSFileTypes.inc}
{$include NSHost.inc}
{$include NSIndexPath.inc}
{$include NSIndexSet.inc}
{$include NSKeyValueCoding.inc}
{$include NSKeyValueObserving.inc}
{$include NSKeyedArchiver.inc}
{$include NSLocale.inc}
{$include NSLock.inc}
{$include NSMapTable.inc}
{$include NSMetadata.inc}
{$include NSMethodSignature.inc}
{$include NSNetServices.inc}
{$include NSNotification.inc}
{$include NSNotificationQueue.inc}
{$include NSDistributedNotificationCenter.inc}
{$include NSNull.inc}
{$include NSNumberFormatter.inc}
{$include NSOperation.inc}
{$include NSPointerArray.inc}
{$include NSPort.inc}
{$include NSPortCoder.inc}
{$include NSPortMessage.inc}
{$include NSPortNameServer.inc}
{$include NSProcessInfo.inc}
{$include NSPropertyList.inc}
{$include NSProxy.inc}
{$include NSProtocolChecker.inc}
{$include NSDistantObject.inc}
{$include NSRange.inc}
{$include NSRunLoop.inc}
{$include NSSortDescriptor.inc}
{$include NSSpellServer.inc}
{$include NSStream.inc}
{$include NSString.inc}
{$include NSPathUtilities.inc}
{$include NSTask.inc}
{$include NSThread.inc}
{$include NSTimeZone.inc}
{$include NSTimer.inc}
{$include NSUndoManager.inc}
{$include NSURL.inc}
{$include NSURLHandle.inc}
{$include NSUserDefaults.inc}
{$include NSXMLNode.inc}
{$include NSXMLDTD.inc}
{$include NSXMLDTDNode.inc}
{$include NSXMLDocument.inc}
{$include NSXMLElement.inc}
{$include NSXMLNodeOptions.inc}
{$include NSXMLParser.inc}
{ include NSZone.inc}
{$include NSExpression.inc}
{$include NSPredicate.inc}
{$include NSComparisonPredicate.inc}
{$include NSCompoundPredicate.inc}
{$include NSAppleEventDescriptor.inc}
{$include NSAppleEventManager.inc}
{$include NSAppleScript.inc}
{$include NSObjectScripting.inc}
{$include NSScriptClassDescription.inc}
{$include NSScriptCoercionHandler.inc}
{$include NSScriptCommand.inc}
{$include NSScriptCommandDescription.inc}
{$include NSScriptExecutionContext.inc}
{$include NSScriptKeyValueCoding.inc}
{$include NSScriptObjectSpecifiers.inc}
{$include NSScriptStandardSuiteCommands.inc}
{$include NSScriptSuiteRegistry.inc}
{$include NSScriptWhoseTests.inc}
{$include NSURLAuthenticationChallenge.inc}
{$include NSURLCredential.inc}
{$include NSURLCredentialStorage.inc}
{$include NSURLProtectionSpace.inc}
{$include NSURLCache.inc}
{$include NSURLConnection.inc}
{$include NSURLProtocol.inc}
{$include NSURLRequest.inc}
{$include NSURLResponse.inc}
{$include NSHTTPCookie.inc}
{$include NSHTTPCookieStorage.inc}
{$include NSURLDownload.inc}
{$include NSURLError.inc}
{ === From OS 10.6 === }
{$include NSCache.inc}
{$include NSOrthography.inc}
{$include NSTextCheckingResult.inc}

View File

@ -0,0 +1,52 @@
{$include CAAnimation.inc}
{$include CABase.inc}
{$include CIFilter.inc}
{$include CALayer.inc}
{$include CACIFilterAdditions.inc}
{$include CAConstraintLayoutManager.inc}
{$include CAEmitterCell.inc}
{$include CAEmitterLayer.inc}
{$include CAGradientLayer.inc}
{$include CAMediaTiming.inc}
{$include CAMediaTimingFunction.inc}
{$include CAOpenGLLayer.inc}
{$include CARenderer.inc}
{$include CAReplicatorLayer.inc}
{$include CAScrollLayer.inc}
{$include CAShapeLayer.inc}
{$include CATextLayer.inc}
{$include CATiledLayer.inc}
{$include CATransaction.inc}
{$include CATransform3D.inc}
{$include CATransformLayer.inc}
{$include CAValueFunction.inc}
{$include CIColor.inc}
{$include CIContext.inc}
{$include CIFilterGenerator.inc}
{$include CIFilterShape.inc}
{$include CIImage.inc}
{$include CIImageAccumulator.inc}
{$include CIImageProvider.inc}
{$include CIKernel.inc}
{$include CIPlugIn.inc}
{$include CIPlugInInterface.inc}
{$include CIRAWFilter.inc}
{$include CISampler.inc}
{$include CIVector.inc}
{$include CVBase.inc}
{$include CVBuffer.inc}
{$include CVDisplayLink.inc}
{$include CVHostTime.inc}
{$include CVImageBuffer.inc}
{$include CVOpenGLBuffer.inc}
{$include CVOpenGLBufferPool.inc}
{$include CVOpenGLTexture.inc}
{$include CVOpenGLTextureCache.inc}
{$include CVPixelBuffer.inc}
{$include CVPixelBufferPool.inc}
{$include CVPixelFormatDescription.inc}
{$include CVReturn.inc}
{ include CoreAnimation.inc}
{ include CoreImage.inc}
{ include CoreVideo.inc}
{ include QuartzCore.inc}

View File

@ -0,0 +1,10 @@
type
WebNSUInteger = culong;
WebNSInteger = clong;
{ Missing }
type
JSGlobalContextRef = pointer;
JSObjectRef = pointer;
DOMTimeStamp = culonglong;

View File

@ -0,0 +1,167 @@
{ Parsed from Webkit.framework WebKit.h }
{$include WebScriptObject.inc}
{$include DOMObject.inc}
{$include DOMNode.inc}
{$include DOMCharacterData.inc}
{$include DOMText.inc}
{$include DOMStyleSheet.inc}
{$include CarbonUtils.inc}
{$include DOM.inc}
{$include DOMAbstractView.inc}
{$include DOMAttr.inc}
{$include DOMCDATASection.inc}
{$include DOMCSS.inc}
{$include DOMCSSRule.inc}
{$include DOMCSSValue.inc}
{$include DOMCSSCharsetRule.inc}
{$include DOMCSSFontFaceRule.inc}
{$include DOMCSSImportRule.inc}
{$include DOMCSSMediaRule.inc}
{$include DOMCSSPageRule.inc}
{$include DOMCSSPrimitiveValue.inc}
{$include DOMCSSRuleList.inc}
{$include DOMCSSStyleDeclaration.inc}
{$include DOMCSSStyleRule.inc}
{$include DOMCSSStyleSheet.inc}
{$include DOMCSSUnknownRule.inc}
{$include DOMCSSValueList.inc}
{$include DOMComment.inc}
{$include DOMCore.inc}
{$include DOMCounter.inc}
{$include DOMDocument.inc}
{$include DOMDocumentFragment.inc}
{$include DOMDocumentType.inc}
{$include DOMElement.inc}
{$include DOMEntity.inc}
{$include DOMEntityReference.inc}
{$include DOMEvent.inc}
{$include DOMEventException.inc}
{$include DOMEventListener.inc}
{$include DOMEventTarget.inc}
{$include DOMEvents.inc}
{$include DOMException.inc}
{$include DOMFile.inc}
{$include DOMFileList.inc}
{$include DOMHTML.inc}
{$include DOMHTMLElement.inc}
{$include DOMHTMLAnchorElement.inc}
{$include DOMHTMLAppletElement.inc}
{$include DOMHTMLAreaElement.inc}
{$include DOMHTMLBRElement.inc}
{$include DOMHTMLBaseElement.inc}
{$include DOMHTMLBaseFontElement.inc}
{$include DOMHTMLBodyElement.inc}
{$include DOMHTMLButtonElement.inc}
{$include DOMHTMLCollection.inc}
{$include DOMHTMLDListElement.inc}
{$include DOMHTMLDirectoryElement.inc}
{$include DOMHTMLDivElement.inc}
{$include DOMHTMLDocument.inc}
{$include DOMHTMLEmbedElement.inc}
{$include DOMHTMLFieldSetElement.inc}
{$include DOMHTMLFontElement.inc}
{$include DOMHTMLFormElement.inc}
{$include DOMHTMLFrameElement.inc}
{$include DOMHTMLFrameSetElement.inc}
{$include DOMHTMLHRElement.inc}
{$include DOMHTMLHeadElement.inc}
{$include DOMHTMLHeadingElement.inc}
{$include DOMHTMLHtmlElement.inc}
{$include DOMHTMLIFrameElement.inc}
{$include DOMHTMLImageElement.inc}
{$include DOMHTMLInputElement.inc}
{$include DOMHTMLIsIndexElement.inc}
{$include DOMHTMLLIElement.inc}
{$include DOMHTMLLabelElement.inc}
{$include DOMHTMLLegendElement.inc}
{$include DOMHTMLLinkElement.inc}
{$include DOMHTMLMapElement.inc}
{$include DOMHTMLMarqueeElement.inc}
{$include DOMHTMLMenuElement.inc}
{$include DOMHTMLMetaElement.inc}
{$include DOMHTMLModElement.inc}
{$include DOMHTMLOListElement.inc}
{$include DOMHTMLObjectElement.inc}
{$include DOMHTMLOptGroupElement.inc}
{$include DOMHTMLOptionElement.inc}
{$include DOMHTMLOptionsCollection.inc}
{$include DOMHTMLParagraphElement.inc}
{$include DOMHTMLParamElement.inc}
{$include DOMHTMLPreElement.inc}
{$include DOMHTMLQuoteElement.inc}
{$include DOMHTMLScriptElement.inc}
{$include DOMHTMLSelectElement.inc}
{$include DOMHTMLStyleElement.inc}
{$include DOMHTMLTableCaptionElement.inc}
{$include DOMHTMLTableCellElement.inc}
{$include DOMHTMLTableColElement.inc}
{$include DOMHTMLTableElement.inc}
{$include DOMHTMLTableRowElement.inc}
{$include DOMHTMLTableSectionElement.inc}
{$include DOMHTMLTextAreaElement.inc}
{$include DOMHTMLTitleElement.inc}
{$include DOMHTMLUListElement.inc}
{$include DOMImplementation.inc}
{$include DOMUIEvent.inc}
{$include DOMKeyboardEvent.inc}
{$include DOMMediaList.inc}
{$include DOMMouseEvent.inc}
{$include DOMMutationEvent.inc}
{$include DOMNamedNodeMap.inc}
{$include DOMNodeFilter.inc}
{$include DOMNodeIterator.inc}
{$include DOMNodeList.inc}
{$include DOMNotation.inc}
{$include DOMOverflowEvent.inc}
{$include DOMProcessingInstruction.inc}
{$include DOMProgressEvent.inc}
{$include DOMRGBColor.inc}
{$include DOMRange.inc}
{$include DOMRangeException.inc}
{$include DOMRanges.inc}
{$include DOMRect.inc}
{$include DOMStyleSheetList.inc}
{$include DOMStylesheets.inc}
{$include DOMTraversal.inc}
{$include DOMTreeWalker.inc}
{$include DOMViews.inc}
{$include DOMWheelEvent.inc}
{$include DOMXPath.inc}
{$include DOMXPathException.inc}
{$include DOMXPathExpression.inc}
{$include DOMXPathNSResolver.inc}
{$include DOMXPathResult.inc}
{$include HIWebView.inc}
{$include WebArchive.inc}
{$include WebBackForwardList.inc}
{$include WebDOMOperations.inc}
{$include WebDataSource.inc}
{$include WebDocument.inc}
{$include WebDownload.inc}
{$include WebEditingDelegate.inc}
{$include WebFrame.inc}
{$include WebFrameLoadDelegate.inc}
{$include WebFrameView.inc}
{$include WebHistory.inc}
{$include WebHistoryItem.inc}
{ include WebJavaPlugIn.inc}
{ include WebKit.inc}
{$include WebKitErrors.inc}
{$include WebPlugin.inc}
{$include WebPluginContainer.inc}
{$include WebPluginViewFactory.inc}
{$include WebPolicyDelegate.inc}
{$include WebPreferences.inc}
{$include WebResource.inc}
{$include WebResourceLoadDelegate.inc}
{$include WebUIDelegate.inc}
{$include WebView.inc}
{ include npapi.inc}
{ include npfunctions.inc}
{ include npruntime.inc}
{$include DOMExtensions.inc}

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
All frameworks that will be parsed must contain an entry in this file
-->
<frameworks>
<framework>
<name>foundation</name>
<root>/foundation/Foundation.inc</root>
<bridge>/bridgesupport/foundation.xml</bridge>
<headers>/System/Library/Frameworks/Foundation.framework/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
<!-- ignore_lines accepts regular expressions -->
<ignore_lines>
<line>#define NS_BLOCKS_AVAILABLE [0-9]+</line>
<line>FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);</line>
<line>FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0);</line>
<line>FOUNDATION_EXPORT void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2)));</line>
<line>FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args);</line>
</ignore_lines>
<ignore_comments>
<line>^[[:space:]]*NS.*\.h</line>
<line>MAC_OS_X_VERSION_MAX_ALLOWED</line>
<line>AVAILABLE_MAC_OS_X_VERSION</line>
<line>^[[:space:]]*Copyright[[:space:]]+(C)[[:space:]]+[0-9]+[[:space:]]+Apple Computer, Inc.</line>
</ignore_comments>
</framework>
<framework>
<name>appkit</name>
<root>/appkit/AppKit.inc</root>
<bridge>/bridgesupport/appkit.xml</bridge>
<headers>/System/Library/Frameworks/AppKit.framework/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
<ignore_comments>
<line>^[[:space:]]*NS.*\.h</line>
<line>MAC_OS_X_VERSION_MAX_ALLOWED</line>
<line>AVAILABLE_MAC_OS_X_VERSION</line>
<line>^[[:space:]]*Copyright[[:space:]]+(C)[[:space:]]+[0-9]+[[:space:]]+Apple Computer, Inc.</line>
</ignore_comments>
</framework>
<framework>
<name>uikit</name>
<root>/uikit/UIKit.inc</root>
<bridge></bridge>
<headers>/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/Frameworks/UIKit.framework/Headers</headers>
<include_pattern>{[$]+include (UI.*).inc}</include_pattern>
<header_pattern>^UI(.*)\.h</header_pattern>
<external_macro>UIKIT_EXTERN</external_macro>
</framework>
<framework>
<name>opengles</name>
<root>/opengles/OpenGLES.inc</root>
<bridge></bridge>
<headers>/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers</headers>
<include_pattern>{[$]+include (EAGL.*).inc}</include_pattern>
<header_pattern>^EAGL(.*)\.h</header_pattern>
<external_macro>EAGL_EXTERN_CLASS</external_macro>
</framework>
<framework>
<name>webkit</name>
<root>/webkit/WebKit.inc</root>
<bridge>/bridgesupport/webkit.xml</bridge>
<headers>/System/Library/Frameworks/WebKit.framework/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
<ignore_comments>
<line>^[[:space:]]*(DOM|Web).*\.h</line>
<line>^[[:space:]]*Copyright[[:space:]]+(C)[[:space:]]+[0-9]+[[:space:]]+Apple Computer, Inc.</line>
</ignore_comments>
</framework>
<framework>
<name>coredata</name>
<root>/coredata/CoreData.inc</root>
<headers>/System/Library/Frameworks/CoreData.framework/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
<external_macro>COREDATA_EXTERN</external_macro>
</framework>
<framework>
<name>calendarstore</name>
<root>/calendarstore/CalendarStore.inc</root>
<headers>/System/Library/Frameworks/CalendarStore.framework/Versions/A/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
</framework>
<framework>
<name>quicklook</name>
<root>/quicklook/QuickLook.inc</root>
<headers>/System/Library/Frameworks/QuickLook.framework/Versions/A/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
<external_macro>QL_EXPORT</external_macro>
</framework>
<framework>
<name>quicklookui</name>
<root>/quicklookui/QuickLookUI.inc</root>
<headers>/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
<external_macro>QL_EXPORT</external_macro>
</framework>
<framework>
<name>quartzcore</name>
<root>/quartzcore/QuartzCore.inc</root>
<headers>/System/Library/Frameworks/QuartzCore.framework/Headers</headers>
<include_pattern>{[$]+include (.*).inc}</include_pattern>
<header_pattern>^(.*)\.h</header_pattern>
<!-- Seperate with | (no spaces, regex is accepted) -->
<external_macro>CA_EXTERN</external_macro>
<!-- No spaces! -->
<ignore_types>SomeQuartzPointer,AnotherQuartzPointer</ignore_types>
<!-- Ignore these methods (Pascal names, no spaces) -->
<ignore_methods>render_toIOSurface_bounds_colorSpace,reclaimResources</ignore_methods>
<replace_types>
</replace_types>
</framework>
</frameworks>

View File

@ -0,0 +1,30 @@
#!/bin/bash
# halt on error
set -e
# convert basic cocoa headers
php parser.php -cocoa -root=`pwd`/cocoa-skel/src
# convert webkit headers
php parser.php -objp -all -frameworks=foundation,webkit -root=`pwd`/cocoa-skel/src
# convert coredata headers
php parser.php -objp -all -frameworks=foundation,coredata -root=`pwd`/cocoa-skel/src
# correct some translations the automatic translation cannot handle
patch -p0 < patches/cocoa-coredata-webkit.patch
# empty two headers that exist both in foundation and in appkit, and that
# thereby cause "duplicate identifier" errors
echo > `pwd`/cocoa-skel/src/foundation/NSAttributedString.inc
echo > `pwd`/cocoa-skel/src/foundation/NSAffineTransform.inc
echo
echo The headers have been converted and placed under
echo `pwd`/cocoa-skel/src.
echo If you wish to compile them, execute the following commands:
echo cp ../Makefile cocoa-skel
echo cd cocoa-skel
echo make OPT="-O2 -ap"
echo
echo The compiled files can be installed afterwards using \"make install\"
echo if required. If another compiler binary than the default one has to
echo be used, specify the alternative compiler binary location in the
echo last command by adding FPC=/full/path/to/ppcbinary
echo

View File

@ -0,0 +1,43 @@
#!/bin/bash
# halt on error
set -e
# change
SDKBASEPATH=/Developer/Platforms/iPhoneOS.Platform/Developer/SDKs/iPhoneOS3.2.sdk
if [ $? -ne 0 ]; then
SDKBASEPATH="$1"
fi;
if [ ! -d "$SDKBASEPATH" ]; then
echo iOS SDK base path \"$SDKBASEPATH\"
echo not found, specify it as the first parameter to this script.
echo Note that this parser version has only been verified to work with the
echo iOS SDK 3.2
echo
exit 1
fi
# convert uikit and related framework headers
php parser.php -objp -all -frameworks=foundation,quartzcore,opengles,uikit -root=`pwd`/uikit-skel/src -framework_path="$SDKBASEPATH"/System/Library/Frameworks
# correct some translations the automatic translation cannot handle
patch -p0 < patches/uikit.patch
# rename badly named unit and include file
sed -e 's/AnonClassDefinitionsQuartzcore/AnonClassDefinitionsUikit/' < uikit-skel/src/AnonClassDefinitionsQuartzcore.pas > uikit-skel/src/AnonClassDefinitionsUikit.pas
mv uikit-skel/src/quartzcore/AnonIncludeClassDefinitionsQuartzcore.inc uikit-skel/src/uikit/AnonIncludeClassDefinitionsUikit.inc
rm uikit-skel/src/AnonClassDefinitionsQuartzcore.pas
# empty two include files that are part of the RTL objcbase unit
echo > uikit-skel/src/foundation/NSObject.inc
echo > uikit-skel/src/foundation/NSZone.inc
echo
echo The headers have been converted and placed under
echo `pwd`/uikit-skel/src.
echo If you wish to compile them, execute the following commands:
echo cd uikit-skel/src
echo ppcarm -XR$SDKBASEPATH -FD`echo $SDKBASEPATH|sed -e 's+/SDKs/[^/]*sdk$++'`/usr/bin -O2 -ap -Cfvfpv2 iPhoneAll.pas
echo
echo The compiled files can be installed afterwards by copying iPhoneAll.{o,ppu} and
echo AnonClassDefinitionsUikit.{o,ppu} to a directory in your FPC unit path.
echo

View File

@ -1,18 +1,20 @@
<?php
$version = "FrameworkParser: 1.3. PasCocoa 0.3, Objective-P 0.4";
$version = "2.1.2";
require("pascocoa_parser.php");
require("objp_parser.php");
require("source/pascocoa_parser.php");
require("source/objp_parser.php");
/**
* Cocoa framework parser for PasCocoa
* Cocoa framework parser for Objective-Pascal
*
* @author Ryan Joseph
* @author Jonas Maebe
**/
// These files have duplicates in AppKit and Foundation so we ignore the foundation versions and everything is merged into AppKit
$duplicate_headers = array("foundation/NSAttributedString.inc", "foundation/NSAffineTransform.inc");
# $duplicate_headers = array("foundation/NSAttributedString.inc", "foundation/NSAffineTransform.inc");
$duplicate_headers = array();
// Print only these files
$only_files = null;
@ -43,6 +45,7 @@ function HandleCommandLineOptions ($argv) {
$where = explode("/", trim($value, "\""));
$options[$key]["framework"] = ucfirst($where[0]);
$options[$key]["name"] = $where[1];
$options["all"] = false; // headers override -all
break;
case 'framework_path':
@ -61,11 +64,15 @@ function HandleCommandLineOptions ($argv) {
$options[$key] = true;
break;
case 'delegates':
case 'noprint':
$options[$key] = true;
break;
case 'noprint':
case 'comments':
$options[$key] = true;
break;
case 'merge':
$options[$key] = true;
break;
@ -112,15 +119,18 @@ function HandleCommandLineOptions ($argv) {
$testing = false;
if ($testing) {
$GLOBALS["argv"][] = "-webkit";
$GLOBALS["argv"][] = "-root=/Developer/ObjectivePascal";
$GLOBALS["argv"][] = "-delegates";
print("=== WARNING: TESTING MODE ENABLED - COMMAND LINE IS OVERRIDDEN! ===\n");
//$GLOBALS["argv"][] = "-webkit";
$GLOBALS["argv"][] = "-root=/Developer/ObjectivePascal/dev";
//$GLOBALS["argv"][] = "-delegates";
$GLOBALS["argv"][] = "-objp";
$GLOBALS["argv"][] = "-comments";
//$GLOBALS["argv"][] = "-reference";
//$GLOBALS["argv"][] = "-all";
$GLOBALS["argv"][] = "-noprint";
$GLOBALS["argv"][] = "-all";
//$GLOBALS["argv"][] = "-noprint";
//$GLOBALS["argv"][] = "-show";
//$GLOBALS["argv"][] = "-only=\"UIWindow.h\"";
//$GLOBALS["argv"][] = "-frameworks=\"appkit,foundation\"";
$GLOBALS["argv"][] = "-frameworks=\"^foundation,quartzcore,appkit\"";
//$GLOBALS["argv"][] = "-framework_path=\"/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/System/Library/Frameworks\"";
//$GLOBALS["argv"][] = "-header=\"uikit/UIView.h\"";
@ -129,92 +139,33 @@ if ($testing) {
//$GLOBALS["argv"][] = "-header=\"webkit/DOMDocument.h\"";
//$GLOBALS["argv"][] = "-framework_path=\"/System/Library/Frameworks\"";
//$GLOBALS["argv"][] = "-header=\"foundation/NSBundle.h\"";
//$GLOBALS["argv"][] = "-header=\"appkit/NSBundle.h\"";
$GLOBALS["argv"][] = "-ignore=\"NSGeometry.h,NSRange.h\"";
$GLOBALS["argv"][] = "-objp";
//$GLOBALS["argv"][] = "-header=\"foundation/NSObjcRuntime.h\"";
//$GLOBALS["argv"][] = "-header=\"foundation/NSMapTable.h\"";
$GLOBALS["argv"][] = "-header=\"appkit/NSApplication.h\"";
//$GLOBALS["argv"][] = "-header=\"quartzcore/CALayer.h\""; //CAMediaTimingFunction
// Objective-P
/* Notes for master compile (-all):
CocoaAll.pas:
Compiling /Developer/ObjectivePascal/CocoaAll.pas
1) NSWorkspace.inc(35,46) Error: Duplicate identifier "NSWorkspaceLaunchAllowingClassicStartup"
2) NSClassDescription.inc(60,55) Error: Duplicate identifier "description"
3) NSScriptObjectSpecifiers.inc(194,44) Error: Duplicate identifier "classDescription"
4) NSScriptSuiteRegistry.inc(75,40) Error: Duplicate identifier "classDescription"
5) NSControl.inc(136,15) Error: Mismatch between number of declared parameters and number of colons in message string.
6) NSWorkspace.inc(135,189) Error: Duplicate identifier "description"
7) NSMenuItemCell.inc(64,9) Error: Duplicate identifier "reserved"
8) NSRuleEditor.inc(127,15) Error: Mismatch between number of declared parameters and number of colons in message string.
9) NSObjCRuntime.inc(79,24) Fatal: Syntax error, "identifier" expected but ":" found
Fatal: Compilation aborted
1) NSWorkspace.h has a duplicate NSWorkspaceLaunchAllowingClassicStartup constant
2) NSObjcRuntime.h contains a bad external function:
function __attribute__(: (format(__NSString__; : 1; : 2))): void NSLog(NSStringRef *format, ...); cdecl; external name '__attribute__';
procedure NSLog(fmt:NSString); cdecl; varargs; external;
3) NSMenuItemCell.h has a duplicate (case sensitive name not allowed in Pascal) field that must be changed by hand.
4) These methods have problems in the params. This is a Objc convention where an absent type is always "id"
- (void)performClick:sender;
- (void)setDelegate:delegate;
NSControl.inc(136,15) Error: Mismatch between number of declared parameters and number of colons in message string.
NSRuleEditor.inc(124,15) Error: Mismatch between number of declared parameters and number of colons in message string.
5) NSInteger types are wrong in NSObjcRuntime (should be long)
NSInteger = clong;
NSUInteger = culong;
NSNotFound = high(NSInteger);
6) Many description and classDescription identifiers are not protected in name space and cause errors
iPhoneAll.pas
1) UIAccelerometer: FPC bug causes methods with a single character message to fail. Remove the 3 methods affected
UIAccelerometer.inc(67,49) Error: Illegal expression after message directive
2) There's no way to know that UITextInputTraits is actually UITextInputTraitsProtocol due to name changes for Pascal syntax
UITextField.inc(91,32) Error: Identifier not found "UITextInputTraits"
WebKit.pas
1) Extra duplicate type in DOMObject.inc
DOMObjectInternal = Pointer;
DOMObjectInternal = DOMObjectInternal;
2) DOMDocument has method with reserved keyword name "implementation"
function implementation: DOMImplementation; message 'implementation';
3) DOMEvent has method with reserved keyword name "type"
function type: NSString; message 'type';
* reserved keywords are not protected in method names. This is messing up WebKit parsing badly
- General notes:
1) NSObject.h is parsed for the merged category methods that should be inserted manually into the real root class
2) NSRange.h was ignored because it contains custom code and can be maintained by hand very easily
3) NSGeometry.h was ignored because it contains many parsing errors and custom code, do this by hand for now.
4) All instance variables are placed into "private" for now. There are a very small number of classes that have public ivar's.
*/
//$GLOBALS["argv"][] = "-show";
}
if (count($GLOBALS["argv"]) == 1) {
print("Cocoa Framework Parser ($version) usage:\n");
print("php parser.php [switches]\n\n");
print("switches:\n\n");
print(" -all print all headers (.h) from AppKit/Foundation frameworks\n");
print(" -header=\"foundation/NSObject.h\" prints a single header from system frameworks\n");
print(" -root sets the root path of the pascocoa directory\n");
print(" -framework_path sets the root path of the frameworks directory (defaults to /System/Library/Frameworks)\n");
print(" -show prints output to screen instead of file\n");
print(" -ignore=\"NSObject.h,NSArray.h\" ignores the list of headers during parsing (-all only, no spaces)\n");
print(" -only=\"NSObject.h,NSArray.h\" only prints these files (-all only, no spaces)\n");
print(" -noprint parses but does not print (-all only)\n");
print(" -encodings prints Pascal type encoding glue for GenerateTypeEncodings.p (-all only)\n");
print(" -delegates prints NSDelegateController.inc to foundation (-all only)\n");
print(" -objp prints classes in FPC Objective-P dialect\n");
print(" -iphone one-time parse for iPhone headers\n");
print(" -cocoa one-time parse for Cocoa (AppKit/Foundation) headers\n");
print(" -frameworks=\"appkit,foundation\" list of supported frameworks to parse\n");
print("php parser.php [options]\n\n");
print("Options:\n\n");
print(" -all Print all headers (.h) from AppKit/Foundation frameworks.\n");
print(" -header=\"foundation/NSObject.h\" Prints a single header from system frameworks (if specified) or direct path.\n");
print(" -root Sets the root path of the output directory.\n");
print(" -framework_path Sets the root path of the frameworks directory (defaults to /System/Library/Frameworks).\n");
print(" -show Prints output to screen instead of file (mutually exclusive to -noprint).\n");
print(" -comments Parses comments.\n");
print(" -merge Headers are merged by difference (using diff/patch) instead of overwritten.\n");
print(" -ignore=\"NSObject.h,NSArray.h\" Ignores the list of headers during parsing (-all only, no spaces).\n");
print(" -only=\"NSObject.h,NSArray.h\" Only print these files (-all only, no spaces).\n");
print(" -noprint Parses but does not print (-all only).\n");
print(" -encodings Prints Pascal type encoding glue for GenerateTypeEncodings.p (-all only).\n");
print(" -objp Prints classes in FPC Objective Pascal dialect (obsolete).\n");
print(" -iphone One-time parse for iPhone headers.\n");
print(" -cocoa One-time parse for Cocoa (AppKit/Foundation) headers.\n");
print(" -frameworks=\"appkit,foundation\" List of supported frameworks to parse.\n");
print("\n\n");
}
@ -238,35 +189,35 @@ if ($options["out"]) {
if ($options["iphone"]) {
$options["all"] = true;
$options["objp"] = true;
$options["frameworks"] = array("uikit");
$options["frameworks"] = array("foundation","quartzcore","uikit");
}
// setup -cocoa options
if ($options["cocoa"]) {
$options["all"] = true;
$options["objp"] = true;
$options["frameworks"] = array("appkit","foundation");
$ignore_headers = array("NSGeometry.h","NSRange.h");
$options["frameworks"] = array("appkit","foundation","quartzcore");
$ignore_headers = array();
}
if ($options["webkit"]) {
$options["all"] = true;
$options["objp"] = true;
$options["frameworks"] = array("webkit");
$options["frameworks"] = array("foundation","webkit");
}
// create the parser instance
if ($options["objp"]) {
$parser = new TObjPParser ($root_path, "", $options["frameworks"], $options["show"]);
} else {
$parser = new TPasCocoaParser ($root_path, "", $options["frameworks"], $options["show"]);
}
$parser = new TObjPParser ($root_path, "", $options["frameworks"], $options["framework_path"], $options["show"]);
// Set additional options
$parser->parse_comments = $options["comments"];
$parser->merge_headers = $options["merge"];
// Process single headers
if ($options["header"] && !$options["all"]) {
$path = $options["framework_path"]."/".$options["header"]["framework"].".framework/Headers/".$options["header"]["name"];
print("* Processing $path...\n");
$parser->ProcessFile($path, true);
$parser->ProcessFile($path, !$options["noprint"]);
}
//$parser->PrintIvarSizeComparison("/Users/ryanjoseph/Desktop/objp/IvarSize.p");
@ -274,7 +225,7 @@ if ($options["header"] && !$options["all"]) {
// Process all headers
if ($options["all"]) {
$parser->ParseCocoaFrameworks($ignore_headers, null);
$parser->ParseAllFrameworks($ignore_headers, null);
if (!$options["noprint"]) $parser->PrintAllHeaders("", $duplicate_headers, $only_files, $options["reference"]);
if ($options["delegates"]) $parser->ParseDelegateClasses();
if ($options["encodings"]) $parser->PrintTypeEncodingGlue();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,252 @@
--- /Data/dev/cocoa/parsedheaders/newheaders3/appkit/NSWorkspace.inc 2010-09-22 20:20:31.000000000 +0200
+++ cocoa-skel/src/appkit/NSWorkspace.inc 2010-09-22 23:57:57.000000000 +0200
@@ -26,7 +26,7 @@
NSWorkspaceLaunchNewInstance = $00080000;
NSWorkspaceLaunchAndHide = $00100000;
NSWorkspaceLaunchAndHideOthers = $00200000;
- NSWorkspaceLaunchAllowingClassicStartup = 0;
+ NSWorkspaceLaunchDefault = NSWorkspaceLaunchAsync or NSWorkspaceLaunchAllowingClassicStartup;
const
NSExcludeQuickDrawElementsIconCreationOption = 1 shl 1;
--- /Data/dev/cocoa/parsedheaders/newheaders3/foundation/NSGeometry.inc 2010-09-22 20:21:06.000000000 +0200
+++ cocoa-skel/src/foundation/NSGeometry.inc 2010-09-22 23:57:57.000000000 +0200
@@ -6,57 +6,51 @@
{$ifndef NSGEOMETRY_PAS_T}
{$define NSGEOMETRY_PAS_T}
+{$if defined(cpu64) or defined(cpuarm) or defined(win32)}
{ Types }
type
NSPoint = CGPoint;
NSPointPtr = ^NSPoint;
- NSPointPointer = ^NSPoint;
- NSPointPointerPtr = ^NSPointPointer;
+ NSPointPointer = ^NSPointPtr;
NSPointArray = ^NSPoint;
- NSPointArrayPtr = ^NSPointArray;
NSSize = CGSize;
NSSizePtr = ^NSSize;
- NSSizePointer = ^NSSize;
- NSSizePointerPtr = ^NSSizePointer;
+ NSSizePointer = NSSizePtr;
NSSizeArray = ^NSSize;
- NSSizeArrayPtr = ^NSSizeArray;
NSRect = CGRect;
NSRectPtr = ^NSRect;
- NSRectPointer = ^NSRect;
- NSRectPointerPtr = ^NSRectPointer;
+ NSRectPointer = NSRectPtr;
NSRectArray = ^NSRect;
- NSRectArrayPtr = ^NSRectArray;
- NSRectEdge = NSUInteger;
- NSRectEdgePtr = ^NSRectEdge;
- NSPointPointer = ^NSPoint;
- NSPointPointerPtr = ^NSPointPointer;
- NSPointArray = ^NSPoint;
- NSPointArrayPtr = ^NSPointArray;
- NSSizePointer = ^NSSize;
- NSSizePointerPtr = ^NSSizePointer;
- NSSizeArray = ^NSSize;
- NSSizeArrayPtr = ^NSSizeArray;
- NSRectPointer = ^NSRect;
- NSRectPointerPtr = ^NSRectPointer;
- NSRectArray = ^NSRect;
- NSRectArrayPtr = ^NSRectArray;
{ Defines }
-const
- NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES = 1;
+{$define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES}
+
+{$endif cpu64 or cpuarm or win32}
{ Types }
type
-
+{$ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES}
+ NSRectEdge = NSUInteger;
+{$else}
NSRectEdge = culong;
+{$endif}
+ NSRectEdgePtr = ^NSRectEdge;
{ Constants }
+{$ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES}
+const
+ NSMinXEdge = CGRectMinXEdge;
+ NSMinYEdge = CGRectMinYEdge;
+ NSMaxXEdge = CGRectMaxXEdge;
+ NSMaxYEdge = CGRectMaxYEdge;
+{$else NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES}
const
NSMinXEdge = 0;
NSMinYEdge = 1;
NSMaxXEdge = 2;
NSMaxYEdge = 3;
+{$endif NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES}
{$endif}
{$endif}
@@ -66,30 +60,37 @@
{$define NSGEOMETRY_PAS_R}
{ Records }
+{$ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES}
type
_NSPoint = record
x: CGFloat;
y: CGFloat;
end;
-NSPoint = _NSPoint;
-_NSPointPtr = ^_NSPoint;
+ NSPoint = _NSPoint;
+ NSPointPtr = ^NSPoint;
+ NSPointPointer = NSPointPtr;
+ NSPointArray = ^NSPoint;
type
_NSSize = record
width: CGFloat;
height: CGFloat;
end;
-NSSize = _NSSize;
-_NSSizePtr = ^_NSSize;
+ NSSize = _NSSize;
+ NSSizePtr = ^NSSize;
+ NSSizePointer = NSSizePtr;
+ NSSizeArray = ^NSSize;
type
_NSRect = record
origin: NSPoint;
size: NSSize;
end;
-NSRect = _NSRect;
-_NSRectPtr = ^_NSRect;
-
+ NSRect = _NSRect;
+ NSRectPtr = ^NSRect;
+ NSRectPointer = NSRectPtr;
+ NSRectArray = ^NSRect;
+{$endif not NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES}
{$endif}
{$endif}
--- /Data/dev/cocoa/parsedheaders/newheaders3/foundation/NSObjCRuntime.inc 2010-09-22 20:21:06.000000000 +0200
+++ cocoa-skel/src/foundation/NSObjCRuntime.inc 2010-09-22 23:57:57.000000000 +0200
@@ -8,7 +8,6 @@
{ Defines }
const
- NS_BLOCKS_AVAILABLE = 1;
NS_BLOCKS_AVAILABLE = 0;
NSFoundationVersionNumber10_0 = 397.40;
NSFoundationVersionNumber10_1 = 425.00;
@@ -62,16 +61,21 @@
{ Types }
type
+{$if defined(cpu64) or defined(cpuarm) or defined(win32)}
NSInteger = clong;
- NSIntegerPtr = ^NSInteger;
NSUInteger = culong;
- NSUIntegerPtr = ^NSUInteger;
+{$else}
NSInteger = cint;
- NSIntegerPtr = ^NSInteger;
NSUInteger = cuint;
+{$endif}
+ NSIntegerPtr = ^NSInteger;
NSUIntegerPtr = ^NSUInteger;
NSComparisonResult = NSInteger;
NSComparisonResultPtr = ^NSComparisonResult;
+ NSEnumerationOptions = NSUInteger;
+ NSEnumerationOptionsPtr = ^NSEnumerationOptions;
+ NSSortOptions = NSUInteger;
+ NSSortOptionsPtr = ^NSSortOptions;
{ Constants }
@@ -81,6 +85,18 @@
NSOrderedDescending = 1;
const
+ NSEnumerationConcurrent = 1 shl 0;
+ NSEnumerationReverse = 1 shl 1;
+
+const
+ NSSortConcurrent = 1 shl 0;
+ NSSortStable = 1 shl 4;
+
+const
+ NSIntegerMax = high(NSInteger);
+ NSIntegerMin = low(NSInteger);
+ NSUIntegerMin = low(NSUinteger);
+ NSUIntegerMax = high(NSUinteger);
NSNotFound = NSIntegerMax;
{$endif}
--- /Data/dev/cocoa/parsedheaders/newheaders3/foundation/NSPointerFunctions.inc 2010-09-22 20:21:06.000000000 +0200
+++ cocoa-skel/src/foundation/NSPointerFunctions.inc 2010-09-22 23:57:57.000000000 +0200
@@ -25,7 +25,8 @@
{ Types }
type
NSPointerFunctionsOptions = NSUInteger;
- NSPointerFunctionsOptionsPtr = ^NSPointerFunctionsOptions;
+ NSPointerFunctionsOptionsPointer = ^NSPointerFunctionsOptions;
+ NSPointerFunctionsOptionsPtr = NSPointerFunctionsOptionsPointer;
{$endif}
{$endif}
@@ -53,8 +54,7 @@
{$ifdef FORWARD}
NSPointerFunctions = objcclass;
- NSPointerFunctionsPointer = ^NSPointerFunctions;
- NSPointerFunctionsPtr = NSPointerFunctionsPointer;
+ NSPointerFunctionsPtr = ^NSPointerFunctions;
{$endif}
@@ -70,6 +70,7 @@
function initWithOptions(options: NSPointerFunctionsOptions): id; message 'initWithOptions:';
class function pointerFunctionsWithOptions(options: NSPointerFunctionsOptions): id; message 'pointerFunctionsWithOptions:';
+(*
procedure setItem (newValue: NSUInteger); message 'setItem:';
function item: NSUInteger; message 'item';
procedure setItem1 (newValue: Boolean); message 'setItem1:';
@@ -80,6 +81,7 @@
function : NSUInteger; message '';
procedure setSrc (newValue: Pointer); message 'setSrc:';
function src: Pointer; message 'src';
+*)
procedure setUsesStrongWriteBarrier (newValue: Boolean); message 'setUsesStrongWriteBarrier:';
function usesStrongWriteBarrier: Boolean; message 'usesStrongWriteBarrier';
procedure setUsesWeakReadAndWriteBarriers (newValue: Boolean); message 'setUsesWeakReadAndWriteBarriers:';
--- /Data/dev/cocoa/parsedheaders/newheaders3/foundation/NSRange.inc 2010-09-22 20:21:06.000000000 +0200
+++ cocoa-skel/src/foundation/NSRange.inc 2010-09-22 23:57:57.000000000 +0200
@@ -6,11 +6,6 @@
{$ifndef NSRANGE_PAS_T}
{$define NSRANGE_PAS_T}
-{ Types }
-type
- NSRangePointer = ^NSRange;
- NSRangePointerPtr = ^NSRangePointer;
-
{$endif}
{$endif}
@@ -25,7 +20,8 @@
length: NSUInteger;
end;
NSRange = _NSRange;
-_NSRangePtr = ^_NSRange;
+NSRangePtr = ^NSRange;
+NSRangePointer = NSRangePtr;
{$endif}

View File

@ -0,0 +1,52 @@
--- /Data/dev/cocoa/parsedheaders/iphoneheaders/foundation/NSObjCRuntime.inc 2010-10-04 00:21:29.000000000 +0200
+++ uikit-skel/src/foundation/NSObjCRuntime.inc 2010-10-03 22:12:15.000000000 +0200
@@ -60,14 +60,17 @@
{ Types }
type
+{$if defined(cpu64) or defined(win32)}
NSInteger = clong;
NSIntegerPtr = ^NSInteger;
NSUInteger = culong;
NSUIntegerPtr = ^NSUInteger;
+{$else}
NSInteger = cint;
NSIntegerPtr = ^NSInteger;
NSUInteger = cuint;
NSUIntegerPtr = ^NSUInteger;
+{$endif}
NSComparisonResult = NSInteger;
NSComparisonResultPtr = ^NSComparisonResult;
@@ -79,6 +82,10 @@
NSOrderedDescending = 1;
const
+ NSIntegerMax = high(NSInteger);
+ NSIntegerMin = low(NSInteger);
+ NSUIntegerMin = low(NSUinteger);
+ NSUIntegerMax = high(NSUinteger);
NSNotFound = NSIntegerMax;
{$endif}
--- /Data/dev/cocoa/parsedheaders/iphoneheaders/foundation/NSRange.inc 2010-10-04 00:21:29.000000000 +0200
+++ uikit-skel/src/foundation/NSRange.inc 2010-10-03 22:14:20.000000000 +0200
@@ -10,9 +10,4 @@
-{ Types }
-type
- NSRangePointer = ^NSRange;
- NSRangePointerPtr = ^NSRangePointer;
-
{$endif}
{$endif}
@@ -26,6 +21,8 @@
end;
NSRange = _NSRange;
_NSRangePtr = ^_NSRange;
+NSRangePtr = ^NSRange;
+NSRangePointer = NSRangePtr;
{$endif}

View File

@ -2,59 +2,22 @@
class TObjPParser extends TPasCocoaParser {
var $objc_id = "id"; // Default type for generic objects
var $objc_id_real = "id"; // The real type of generic objects (id)
var $sel_string = "SEL";
var $trailing_underscore = true;
var $print_header_references = false;
// ignore these classes when testing for ivar size
var $ignore_class_ivar_comparison = array( "NSNibOutletConnector", "NSNibConnector", "NSNibControlConnector", "NSPredicateEditorRowTemplate", "NSSegmentedCell",
"NSSimpleHorizontalTypesetter", "NSInvocation", "NSPointerFunctions", "NSConstantString");
var $reserved_keywords = array( "const", "object", "string", "array", "var", "set", "interface", "classname", "unit",
"self", "type", "raise", "property", "to", "for", "with", "function", "procedure", "result",
"pointer", "create", "new", "dispose", "label", "packed", "record", "char", "class", "implementation",
// identifiers from NSObject
"zone",
);
var $replace_types = array( "void"=>"Pointer", "BOOL"=>"Boolean", "long"=>"clong", "int"=>"cint",
"unsigned long"=>"culong", "unsigned short"=>"cushort", "void *"=>"Pointer", "unsigned int"=>"cuint",
"Class"=>"Pobjc_class", "uint"=>"cuint",
"uint8_t"=>"byte", "signed int"=>"cint", "const char"=>"char", "const void"=>"Pointer",
"const uint8_t"=>"byte", "unsigned"=>"cuint", "int32_t"=>"longint", "float"=>"single",
"unsigned long long"=>"culonglong", "int64_t"=>"clonglong", "uint32_t"=>"cardinal", "uint16_t"=>"word",
"unsigned char"=>"char", "short"=>"cshort", "double"=>"double", "long long"=>"clonglong",
// ??? new in instance var parser: (add to main section eventually)
"signed char"=>"char", "uint64_t"=>"qword",
// work-arounds - the type replacement needs regex to handle with spaces I guess
"void*"=>"Pointer",
// macros
"IBAction"=>"void", "IBOutlet"=>"",
// special pointers
"const id *"=>"NSObjectArrayOfObjectsPtr", "Protocol *"=>"Protocol", "NSObject *"=>"NSObject",
"const char *"=>"PChar", "const void *"=>"Pointer", "unsigned char *"=>"Pointer", "char *"=>"PChar",
"unsigned *"=>"Pointer", "unichar *"=>"PWideChar", "const unichar *"=>"PWideChar",
);
// These methods require that the last parameter append a trailing underscore (if $trailing_underscore is on)
var $trailing_underscore_methods = array("- (void)copy:(id)sender;", "- (void)setNeedsDisplay:(BOOL)flag;");
// We use direct Cocoa classes now always
var $toll_free_bridge = array();
var $trailing_underscore_methods = array("- (void)copy:(id)sender;", "- (void)setNeedsDisplay:(BOOL)flag;","- (void*)QTMovie;","- (QTMovie *)QTMovie;","- (BOOL)load:(NSError **)error;");
var $ignore_methods = array("observationInfo");
var $ignore_methods = array("observationInfo");
// Converts an Objective-c method name to Pascal
function ConvertObjcMethodName ($method) {
$params = explode(":", $method);
$name = "";
$count = 0;
if (count($params) > 1) {
foreach ($params as $value) {
@ -72,18 +35,13 @@ class TObjPParser extends TPasCocoaParser {
$name = $this->ReplaceObjcType($name);
return $name;
}
// We use direct objc classes now so we don't need to replace them with references like in PasCocoa
function ReplaceNSTypesWithRef ($string) {
return $string;
}
}
// Converts an Objective-C method to Pascal format
function ConvertObjcMethodToPascal ($class, $source, $parts, $protected_keywords, $has_params) {
function ConvertObjcMethodToPascal ($class, $source, $parts, $protected_keywords, $has_params, $deprecatedmods) {
// remove deprecated macros from method source
$source = eregi_replace("[[:space:]]*DEPRECATED_IN_MAC_OS_X_VERSION_[0-9]+_[0-9]+_AND_LATER", "", $source);
//print("$source\n");
//print_r($parts);
// replace "hinted" params comment with hinted type
if ($this->replace_hinted_params) {
@ -96,61 +54,64 @@ class TObjPParser extends TPasCocoaParser {
}
// return type
if (eregi("(/\*[[:space:]]*(.*)[[:space:]]*\*/)", $parts[2], $captures)) $parts[2] = $captures[2];
if (eregi("(/\*[[:space:]]*(.*)[[:space:]]*\*/)", $parts[2], $captures)) $parts[2] = $this->ReplaceRemoteMessagingModifiers($captures[2], $null);
//print_r($parts);
} else { // remmove comments from params and return type
} else { // remove comments from params and return type
$parts[4] = eregi_replace("(/\*.*\*/)", "", $parts[4]);
$parts[4] = trim($parts[4], " ");
$parts[4] = trim($parts[4]);
$parts[2] = eregi_replace("(/\*.*\*/)", "", $parts[2]);
$parts[2] = trim($parts[2], " ");
$parts[2] = $this->ReplaceRemoteMessagingModifiers($parts[2], $null);
}
$return_type_clean = $parts[2];
$return_type_pointers = preg_replace("![^*]+!e", "", $return_type_clean);
$return_type_clean = trim($return_type_clean,"* ");
// perform preformatting before attempting to protect keywords
$parts[2] = $this->FormatObjcType($parts[2], $modifiers);
$parts[4] = $this->FormatObjcParams($parts[4]);
// protect keywords in the parameter and return type
if (count($protected_keywords) > 0) {
foreach ($protected_keywords as $keyword) {
$parts[4] = istr_replace_word($keyword, $keyword."_", $parts[4]);
$parts[2] = istr_replace_word($keyword, $keyword."_", $parts[2]);
}
}
$parts[4] = $this->FormatObjcParams($parts[4], $variable_arguments);
//print($parts[4]."\n");
if ($has_params) {
$name = $this->ConvertObjcMethodName($source);
// merge default protected keywords for the class/category
if ($this->default_protected["*"]) $protected_keywords = array_merge($this->default_protected["*"], $protected_keywords);
if ($this->default_protected[$class]) $protected_keywords = array_merge($this->default_protected[$class], $protected_keywords);
$param_array = $this->ConvertObjcParamsToPascal($parts[4], $protected_keywords, $variable_arguments);
$param_array = $this->ConvertObjcParamsToPascal($parts[4], $protected_keywords);
$params = "(".$param_array["string"].")";
$params_with_modifiers = "(".$param_array["string_with_modifiers"].")";
} else {
$params = "";
$params_with_modifiers = "";
// no parameters -> definitely no underscore normally, but there are some
// conflicts...
$name = $parts[3];
// clean it up
if ($this->trailing_underscore) {
if (in_array($source, $this->trailing_underscore_methods)) $name = $name . "_";
}
$param_array = null;
$variable_arguments = false;
}
// protect method name from keywords
if ($this->IsKeywordReserved($name)) $name .= "_";
// replace objc type
$return_type = $this->ConvertReturnType($return_type_clean);
$return_type = $this->ConvertReturnType($return_type_clean,$return_type_pointers);
$virtual = "";
$class_prefix = "";
// determine the type based on return value
if (ereg($this->regex_procedure_type, $return_type_clean)) {
if (ereg($this->regex_procedure_type, $return_type_clean.$return_type_pointers)) {
$kind = "procedure";
} else {
$kind = "function";
@ -181,15 +142,11 @@ class TObjPParser extends TPasCocoaParser {
$method = $class_prefix."function $name$params_with_modifiers: $return_type;$modifier$virtual";
$method_template = "[KIND] [PREFIX]$name"."[PARAMS]: [RETURN];$modifier";
$method_template_function = "function [PREFIX]$name"."[PARAMS]: [RETURN];$modifier";
}
$method_template_procedure = "procedure [PREFIX]$name"."[PARAMS];$modifier";
$method_template_function = "function [PREFIX]$name"."[PARAMS]: [RETURN];$modifier";
// ??? DEBUGGING
//print("$method\n");
// build structure
$struct["def"] = $method;
$struct["template"] = $method_template;
@ -197,6 +154,7 @@ class TObjPParser extends TPasCocoaParser {
$struct["template_procedure"] = $method_template_procedure;
$struct["objc_method"] = $this->CopyObjcMethodName($source);
$struct["class_prefix"] = $class_prefix;
if ($deprecatedmods != "") $struct["deprecated"] = $deprecatedmods.";";
//$struct["def_objc"] = eregi("(.*);", $source, $captures[1]);
if ($return_type == "void") $return_type = "";
$struct["return"] = $return_type;
@ -217,7 +175,7 @@ class TObjPParser extends TPasCocoaParser {
// FPC bug work around
if (strlen($name) > $this->maximum_method_length) {
$struct["can_override"] = false;
print(" # WARNING: method $name can't override because the name is too long\n");
print(" # WARNING: method $name can't override because the name is too long\n");
$this->warning_count ++;
}
@ -239,45 +197,104 @@ class TObjPParser extends TPasCocoaParser {
return true;
}
}
function PrintGlobalClassInfo($all_classes, $defined_classes, $anon_classes) {
// add all classes as anonymous external classes to a separate unit.
// They will be overridden by the actual definitions in the translated
// headers part of the main unit, but this way they can appear as record
// field types and as callback parameters
// open the output file if we not printing to terminal
if (!$this->show) {
$this->output = fopen("$this->root$this->out/AnonClassDefinitions".ucfirst($this->framework).".pas", "w+");
}
$this->PrintOutput(0, "{ Parsed from ".ucfirst($this->framework)." }");
$date = @date("D M j G:i:s T Y");
$this->PrintOutput(0, "");
// allows parameter names conflicting with field names
$this->PrintOutput(0, "{\$mode delphi}");
$this->PrintOutput(0, "{\$modeswitch objectivec1}");
// enables "external" after the semi-colon
$this->PrintOutput(0, "{\$modeswitch cvar}");
$this->PrintOutput(0, "");
$this->PrintOutPut(0,"unit AnonClassDefinitions".ucfirst($this->framework).";");
$this->PrintOutput(0, "");
$this->PrintOutput(0, "interface");
$this->PrintOutput(0, "");
$this->PrintOutput(0, "type");
foreach ($all_classes as $class)
$this->PrintOutput(1, $class." = objcclass; external;");
$this->PrintOutput(0, "");
$this->PrintOutput(0, "implementation");
$this->PrintOutput(0, "");
$this->PrintOutput(0, "end.");
// Now all anonymous external classes that have no real definition to an
// include file that is added to the main unit. This way it is possible
// to declare variables of these types in user programs without having to
// include the unit above will all anonymous classes (should not be used)
// open the output file if we not printing to terminal
if (!$this->show) {
$this->output = fopen("$this->root$this->out/$this->framework/AnonIncludeClassDefinitions".ucfirst($this->framework).".inc", "w+");
}
$this->PrintOutput(0, "{ Parsed from ".ucfirst($this->framework)." }");
$date = @date("D M j G:i:s T Y");
// add all classes as anonymous external classes. They will be overridden
// by the actual definitions in the translated headers, but this way they
// can appear as record field types and as callback parameters
$first = true;
foreach ($anon_classes as $class) {
if (!in_array($class,$defined_classes)) {
if ($first) {
$this->PrintOutput(0, "type");
$first = false;
}
$this->PrintOutput(1, $class." = objcclass; external;");
}
}
}
// Prints all classes from the header in Objective-P FPC format
function PrintHeader ($header) {
global $version;
//print_r($header);
//print_r($this->dump["categories"]);
$this->output = fopen($header["path"], "w+");
// open the output file if we not printing to terminal
if (!$this->show) {
if ($this->merge_headers) {
$this->output = fopen($header["path_merge"], "w+");
} else {
$this->output = fopen($header["path"], "w+");
}
}
$this->PrintOutput(0, "{ Parsed from ".ucfirst($header["framework"]).".framework ".$header["name"]." }");
$date = date("D M j G:i:s T Y");
$this->PrintOutput(0, "{ Version $version - $date }");
$date = @date("D M j G:i:s T Y");
$this->PrintOutput(0, "{ Version: $version - $date }");
$this->PrintOutput(0, "");
$macro = strtoupper(substr($header["name"], 0, (strripos($header["name"], "."))));
/*
if ($header["classes"]) {
$this->PrintOutput(0, "{\$ifdef HEADER}");
$this->PrintOutput(0, "{\$ifndef $macro"."_PAS_H}");
$this->PrintOutput(0, "{\$define $macro"."_PAS_H}");
$this->PrintOutput(0, "type");
foreach ($header["classes"] as $class) {
// Make a pointer to each class
$this->PrintOutput(1, $class["name"]."Pointer = Pointer;");
}
$this->PrintOutput(0, "");
$this->PrintOutput(0, "{\$endif}");
$this->PrintOutput(0, "{\$endif}");
}
*/
$this->PrintOutput(0, "");
$this->PrintOutput(0, "{\$ifdef TYPES}");
$this->PrintOutput(0, "{\$ifndef $macro"."_PAS_T}");
$this->PrintOutput(0, "{\$define $macro"."_PAS_T}");
$this->PrintTypes($header);
$this->PrintTypes($header, false);
$this->PrintOutput(0, "");
$this->PrintOutput(0, "{\$endif}");
$this->PrintOutput(0, "{\$endif}");
@ -334,11 +351,14 @@ class TObjPParser extends TPasCocoaParser {
if ($header["classes"]) {
foreach ($header["classes"] as $class) {
$this->PrintOutput(1, $class["name"]." = objcclass;");
$this->PrintOutput(1, $class["name"]."Pointer = ^".$class["name"].";");
if ($class["name"]) {
$this->PrintOutput(1, $class["name"]." = objcclass;");
$this->PrintOutput(1, $class["name"].$this->class_pointer_suffix." = ^".$class["name"].";");
// for consistency also offer Ptr-name variant
$this->PrintOutput(1, $class["name"]."Ptr = ".$class["name"].$this->class_pointer_suffix.";");
}
}
}
$this->PrintOutput(0, "");
$this->PrintOutput(0, "{\$endif}");
}
@ -350,8 +370,13 @@ class TObjPParser extends TPasCocoaParser {
$this->PrintOutput(0, "{\$define $macro"."_PAS_C}");
foreach ($header["classes"] as $class) {
//if (in_array($class["name"], $this->cocoa_classes))
$this->PrintClass($class);
if ($class["name"]) $this->PrintClass($class);
}
if (count($header["categories"]) > 0) {
foreach ($header["categories"] as $category) {
$this->PrintCategory($class, $category);
}
}
$this->PrintOutput(0, "");
@ -369,12 +394,14 @@ class TObjPParser extends TPasCocoaParser {
foreach ($header["protocols"] as $protocol) {
$this->PrintOutput(1, "");
$this->PrintOutput(0, "{ ".$protocol["name"]." Protocol }");
if ($protocol["comment"]) $this->PrintOutput(0, $protocol["comment"]);
$this->PrintOutput(1, $protocol["name"]."$this->protocol_suffix = objcprotocol");
// print methods
if ($protocol["methods"]) {
foreach ($protocol["methods"] as $name => $method) {
$this->PrintOutput(2, $method["def"]." message '".$method["objc_method"]."';");
if ($method["comment"]) $this->PrintOutput(2, $method["comment"]);
$this->PrintOutput(2, $method["def"]." message '".$method["objc_method"]."';".$method["deprecated"]);
}
}
@ -386,15 +413,45 @@ class TObjPParser extends TPasCocoaParser {
}
}
function PrintCategory ($class, $category) {
// declare real category if external
if ($category["external"]) {
$new_name = " name '".$category["external_name"]."'";
}
$category_name = $category["name"].$this->category_suffix;
$this->PrintOutput(0, "");
$this->PrintOutput(0, "{ $category_name }");
if ($category["comment"]) $this->PrintOutput(0, $category["comment"]);
// print super class or protocol which the class conforms to
$this->PrintOutput(1, "$category_name = objccategory(".$category["super"].")");
// print methods
if ($category["methods"]) {
foreach ($category["methods"] as $method) {
if ($method["comment"]) $this->PrintOutput(2, $method["comment"]);
$this->PrintOutput(2, $method["def"]." message '".$method["objc_method"]."';".$method["deprecated"]);
}
}
$this->PrintOutput(1, "end; external$new_name;");
}
function PrintClass ($class) {
$this->PrintOutput(0, "");
$this->PrintOutput(0, "{ ".$class["name"]." }");
if ($class["comment"]) $this->PrintOutput(0, $class["comment"]);
//print_r($class["methods"]);
// print super class or protocol which the class conforms to
if ($class["conforms"]) {
$this->PrintOutput(1, $class["name"]." = objcclass(".$class["super"].", ".$class["conforms"].")");
if ($class["adopts"]) {
$this->PrintOutput(1, $class["name"]." = objcclass(".$class["super"].", ".$class["adopts"].")");
} elseif ($class["super"]) {
$this->PrintOutput(1, $class["name"]." = objcclass(".$class["super"].")");
}
@ -416,145 +473,28 @@ class TObjPParser extends TPasCocoaParser {
if ($class["methods"]) {
$this->PrintOutput(0, "");
foreach ($class["methods"] as $method) {
$this->PrintOutput(2, $method["def"]." message '".$method["objc_method"]."';");
if ($method["comment"]) $this->PrintOutput(2, $method["comment"]);
$this->PrintOutput(2, $method["def"]." message '".$method["objc_method"]."';".$method["deprecated"]);
}
}
// print adopted protocol methods
if (count($class["protocols"]) > 0) {
$this->PrintOutput(0, "");
$this->PrintOutput(2, "{ Adopted Protocols }");
//print_r($this->dump["protocols"]);
// print category-level methods
if (count($class["categories"]) > 0) {
foreach ($class["categories"] as $name => $category) {
$this->PrintOutput(0, "");
$this->PrintOutput(2, "{ Category: $name }");
if ($category["methods"]) {
foreach ($category["methods"] as $method) {
$this->PrintOutput(2, $method["def"]." message '".$method["objc_method"]."';");
foreach ($class["protocols"] as $name) {
if ($this->dump["protocols"][$name]) {
foreach ($this->dump["protocols"][$name] as $method) {
if (!$this->ClassContainsMethod($class, $method)) $this->PrintOutput(2, $method["def"]);
}
}
}
}
}
$this->PrintOutput(1, "end; external;");
}
function PrintDelegateReference ($valid_categories) {
global $version;
$date = date("D M j G:i:s T Y");
$this->PrintOutput(0, "{ Version $version - $date }");
$this->PrintOutput(0, "");
ksort($this->delegate_methods);
$this->PrintOutput(0, "unit $this->master_delegate_file;");
$this->PrintOutput(0, "interface");
$this->PrintOutput(0, "");
$this->PrintOutput(0, "{ Copy and paste these delegate methods into your real classes. }");
// implemented methods
foreach ($this->delegate_methods as $category => $selectors) {
if (in_array($category, $this->ignore_categories)) continue;
// make sure the category is valid
$valid = false;
foreach ($valid_categories as $pattern) {
if (eregi($pattern, $category)) {
$valid = true;
break;
}
}
if (!$valid) continue;
$this->PrintOutput(0, "");
$this->PrintOutput(0, "type");
$this->PrintOutput(1, "$category = objccategory (NSObject)");
//$this->PrintOutput(1, "public");
foreach ($selectors as $selector) {
// FPC long name bug work-around
if (strlen($selector["name_pascal"]) > $this->maximum_method_length) continue;
if ($selector["kind"] == "procedure") {
$this->PrintOutput(2, $selector["kind"]." ".$selector["name_pascal"].$selector["param_string"].";"." message '".$selector["name"]."';");
} else {
$this->PrintOutput(2, $selector["kind"]." ".$selector["name_pascal"].$selector["param_string"].": ".$selector["method"]["return"].";"." message '".$selector["name"]."';");
}
}
$this->PrintOutput(1, "end;");
}
}
function PrintIvarSizeComparison ($path) {
$count = 0;
$block = true;
$block_count = 1;
$limit = 2000;
$handle = fopen($path, "w+");
if (!$handle) die("Bad path to size comparison output program!");
fwrite($handle, "{\$mode objfpc}\n");
fwrite($handle, "{\$modeswitch objectivec1}\n");
fwrite($handle, "program IvarSize;\n");
fwrite($handle, "uses\n");
fwrite($handle, " objp,objcrtl,objcrtlmacosx;\n");
// print derived classes
foreach ($this->cocoa_classes as $class) {
if (in_array($class, $this->ignore_class_ivar_comparison)) continue;
if ($previous == $class) continue;
fwrite($handle, "type\n");
fwrite($handle, " TDerived$class = objcclass ($class)\n");
fwrite($handle, " extrabyte: byte;\n");
fwrite($handle, "end;\n");
$previous = $class;
}
// print procedures
foreach ($this->cocoa_classes as $class) {
if (in_array($class, $this->ignore_class_ivar_comparison)) continue;
if ($previous == $class) continue;
if ($count == 0) {
fwrite($handle, "\n");
fwrite($handle, "procedure PrintGlue$block_count;\n");
fwrite($handle, "begin\n");
$block_count ++;
}
$count ++;
fwrite($handle, " if class_getInstanceSize(TDerived$class) <> (class_getInstanceSize($class)+1) then\n");
fwrite($handle, " writeln('size of $class is wrong: ',class_getInstanceSize(TDerived$class),' <> ',class_getInstanceSize($class)+1);\n");
if ($count == $limit) {
fwrite($handle, "end;\n");
$count = 0;
}
$previous = $class;
}
if ($count < $limit) {
fwrite($handle, "end;\n");
$block_count --;
}
fwrite($handle, "begin\n");
for ($i=1; $i < $block_count + 1; $i++) {
fwrite($handle, " PrintGlue$i;\n");
}
fwrite($handle, "end.\n");
}
}
?>
?>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
function NSSTR (inString: PChar): NSString;
begin
Result := NSString(CFSTR(inString));
end;

View File

@ -0,0 +1,69 @@
type
__NSAppleEventManagerSuspension = record end;
IBAction = Pointer;
objc_protocol = protocol;
idptr = ^id;
idptrptr = ^idptr;
SELptr = ^SEL;
{ Variable argument list - disabled for Pascal }
type
va_list_rec = record
end;
va_list = ^va_list_rec;
{ Private instance variable types }
type
_NSImageCellAnimationState = Pointer;
_CGLPBufferObject = Pointer;
PATHSEGMENT = Pointer; {from NSBezierPath.h what is this???}
{ from CoreData }
type
NSAttributeType = NSUInteger;
{ Pointer C-Types }
{ An array of objects }
type
NSObjectArrayOfObjects = array[0..(high(longint) div sizeof(id))-1] of id;
NSObjectArrayOfObjectsPtr = ^NSObjectArrayOfObjects;
{ Cocoa types }
const
UINT_MAX = high(culong);
// 7.18.2.4 Limits of integer types capable of holding object pointers
INTPTR_MIN = low(ptrint);
INTPTR_MAX = high(ptrint);
UINTPTR_MAX = high(ptruint);
// 7.18.2.5 Limits of greatest-width integer types
INTMAX_MIN = low(int64);
INTMAX_MAX = high(int64);
UINTMAX_MAX = high(qword);
// 7.18.3 "Other"
PTRDIFF_MIN = INTPTR_MIN;
PTRDIFF_MAX = INTPTR_MAX;
{ from IOKit (not yet part of univint) }
const
NX_TABLET_POINTER_UNKNOWN = 0;
NX_TABLET_POINTER_PEN = 1;
NX_TABLET_POINTER_CURSOR = 2;
NX_TABLET_POINTER_ERASER = 3;
NX_SUBTYPE_DEFAULT = 0;
NX_SUBTYPE_TABLET_POINT = 1;
NX_SUBTYPE_TABLET_PROXIMITY = 2;
NX_SUBTYPE_MOUSE_TOUCH = 3;
NX_TABLET_BUTTON_PENTIPMASK = $0001;
NX_TABLET_BUTTON_PENLOWERSIDEMASK = $0002;
NX_TABLET_BUTTON_PENUPPERSIDEMASK = $0004;
{ Parser hacks - these types should never exist }
type
__NSAppleEventManagerSuspensionPtr = Pointer;
{ does not really exist, is in inactive part of ifdef }
NSURLHandleClientProtocol = objcprotocol
end; external;

View File

@ -0,0 +1,79 @@
{ include Foundation.inc}
{$include NSObjCRuntime.inc}
{$include NSValue.inc}
{$include NSString.inc}
{$include NSArray.inc}
{$include NSSet.inc}
{$include NSPredicate.inc}
{$include NSFormatter.inc}
{$include NSScanner.inc}
{$include FoundationErrors.inc}
{$include NSAttributedString.inc}
{$include NSAutoreleasePool.inc}
{$include NSBundle.inc}
{$include NSByteOrder.inc}
{$include NSCalendar.inc}
{$include NSCharacterSet.inc}
{$include NSCoder.inc}
{$include NSComparisonPredicate.inc}
{$include NSCompoundPredicate.inc}
{$include NSData.inc}
{$include NSDate.inc}
{$include NSDateFormatter.inc}
{$include NSDecimal.inc}
{$include NSDecimalNumber.inc}
{$include NSDictionary.inc}
{$include NSEnumerator.inc}
{$include NSError.inc}
{$include NSException.inc}
{$include NSExpression.inc}
{$include NSFileHandle.inc}
{$include NSFileManager.inc}
{$include NSHTTPCookie.inc}
{$include NSHTTPCookieStorage.inc}
{$include NSIndexPath.inc}
{$include NSIndexSet.inc}
{$include NSInvocation.inc}
{$include NSKeyValueCoding.inc}
{$include NSKeyValueObserving.inc}
{$include NSKeyedArchiver.inc}
{$include NSLocale.inc}
{$include NSLock.inc}
{$include NSMethodSignature.inc}
{$include NSNetServices.inc}
{$include NSNotification.inc}
{$include NSNotificationQueue.inc}
{$include NSNull.inc}
{$include NSNumberFormatter.inc}
{$include NSObject.inc}
{$include NSOperation.inc}
{$include NSPathUtilities.inc}
{$include NSPort.inc}
{$include NSProcessInfo.inc}
{$include NSPropertyList.inc}
{include NSProxy.inc}
{$include NSRange.inc}
{$include NSRunLoop.inc}
{$include NSSortDescriptor.inc}
{$include NSStream.inc}
{$include NSThread.inc}
{$include NSTimeZone.inc}
{$include NSTimer.inc}
{$include NSURL.inc}
{$include NSURLAuthenticationChallenge.inc}
{$include NSURLCache.inc}
{$include NSURLConnection.inc}
{$include NSURLCredential.inc}
{$include NSURLCredentialStorage.inc}
{$include NSURLError.inc}
{$include NSURLProtectionSpace.inc}
{$include NSURLProtocol.inc}
{$include NSURLRequest.inc}
{$include NSURLResponse.inc}
{$include NSUndoManager.inc}
{$include NSUserDefaults.inc}
{$include NSValueTransformer.inc}
{$include NSXMLParser.inc}
{$include NSZone.inc}

View File

@ -0,0 +1,106 @@
unit iPhoneAll;
{$mode delphi}
{$modeswitch objectivec1}
{$modeswitch cvar}
interface
{$linkframework CoreFoundation}
{$linkframework CoreGraphics}
{$linkframework UIKit}
uses
ctypes,
CFBase,CFArray,CFBag,CFCharacterSet,CFData,CFDate,CFDictionary,CFNumber,CFPropertyList,CFSet,CFString,CFStringEncodingExt,CFTimeZone,CFTree,CFURL,CFXMLNode,CFXMLParser,CFMachPort,CFMessagePort,CFRunLoop,CFSocket,CFBinaryHeap,CFBitVector,CFBundle,CFByteOrders,CFPlugIn,CFPreferences,CFURLAccess,CFUUID,CFLocale,CFStream,CFDateFormatter,CFNumberFormatter,CFCalendar,CFUserNotification,CFNotificationCenter,CFAttributedString,CFNetworkErrorss,
CGBase,CGAffineTransforms,CGBitmapContext,CGColor,CGColorSpace,CGContext,CGDataConsumer,CGDataProvider,CGDirectDisplay,CGDirectPalette,CGDisplayConfiguration,CGDisplayFades,CGErrors,CGEvent,CGEventSource,CGEventTypes,CGFont,CGFunction,CGGLContext,CGGeometry,CGImage,CGLayer,CGPDFArray,CGPDFContentStream,CGPDFContext,CGPDFDictionary,CGPDFDocument,CGPDFObject,CGPDFOperatorTable,CGPDFPage,CGPDFScanner,CGPDFStream,CGPDFString,CGPSConverter,CGPath,CGPattern,CGRemoteOperation,CGSession,CGShading,CGWindowLevels,
MacTypes, AEDataModel, Icons, SecBase, SecTrust,
AnonClassDefinitionsUikit;
{$define INTERFACE}
{$include UndefinedTypes.inc}
{$include uikit/AnonIncludeClassDefinitionsUikit.inc}
{$define HEADER}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef HEADER}
{$define TYPES}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef TYPES}
{$define RECORDS}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef RECORDS}
type
{$define FORWARD}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef FORWARD}
{$define PROTOCOLS}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef PROTOCOLS}
{$define CLASSES}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef CLASSES}
{$define FUNCTIONS}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef FUNCTIONS}
{$define EXTERNAL_SYMBOLS}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef EXTERNAL_SYMBOLS}
{$define USER_PATCHES}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef USER_PATCHES}
{ Inline functions }
function NSSTR (inString: PChar): NSString;
{$undef INTERFACE}
implementation
{$define IMPLEMENTATION}
{$include InlineFunctions.inc}
{$define USER_PATCHES}
{$include foundation/Foundation.inc}
{$include opengles/OpenGLES.inc}
{$include quartzcore/QuartzCore.inc}
{$include uikit/UIKit.inc}
{$undef USER_PATCHES}
{$undef IMPLEMENTATION}
end.

View File

@ -0,0 +1,3 @@
{$include EAGL.inc}
{$include EAGLDrawable.inc}

View File

@ -0,0 +1,19 @@
{$include CAAnimation.inc}
{$include CABase.inc}
{$include CADisplayLink.inc}
{$include CALayer.inc}
{$include CAEAGLLayer.inc}
{$include CAGradientLayer.inc}
{$include CAMediaTiming.inc}
{$include CAMediaTimingFunction.inc}
{$include CAReplicatorLayer.inc}
{$include CAScrollLayer.inc}
{$include CAShapeLayer.inc}
{$include CATextLayer.inc}
{$include CATiledLayer.inc}
{$include CATransaction.inc}
{$include CATransform3D.inc}
{$include CATransformLayer.inc}
{$include CAValueFunction.inc}
{ include CoreAnimation.inc}
{ include QuartzCore.inc}

View File

@ -0,0 +1,76 @@
{$include UIResponder.inc}
{$include UIView.inc}
{$include UIControl.inc}
{$include UIViewController.inc}
{$include UINavigationController.inc}
{$include UIAccelerometer.inc}
{$include UIAccessibility.inc}
{$include UIAccessibilityConstants.inc}
{$include UIAccessibilityElement.inc}
{$include UIActivityIndicatorView.inc}
{$include UIBarItem.inc}
{$include UIBarButtonItem.inc}
{$include UIBezierPath.inc}
{$include UIButton.inc}
{$include UIColor.inc}
{$include UIDataDetectors.inc}
{$include UIDatePicker.inc}
{$include UIDevice.inc}
{$include UIApplication.inc}
{$include UIDocumentInteractionController.inc}
{$include UIEvent.inc}
{$include UIFont.inc}
{$include UIGeometry.inc}
{$include UIGestureRecognizer.inc}
{$include UIGestureRecognizerSubclass.inc}
{$include UIGraphics.inc}
{$include UIImage.inc}
{$include UIImagePickerController.inc}
{$include UIImageView.inc}
{$include UIInterface.inc}
{$include UIAlert.inc}
{$include UIKitDefines.inc}
{$include UILabel.inc}
{$include UILocalizedIndexedCollation.inc}
{$include UILongPressGestureRecognizer.inc}
{$include UIMenuController.inc}
{$include UINavigationBar.inc}
{$include UINibDeclarations.inc}
{$include UINibLoading.inc}
{$include UIPageControl.inc}
{$include UIPanGestureRecognizer.inc}
{$include UIPasteboard.inc}
{$include UIPickerView.inc}
{$include UIPinchGestureRecognizer.inc}
{$include UIPopoverController.inc}
{$include UIProgressView.inc}
{$include UIRotationGestureRecognizer.inc}
{$include UIScreen.inc}
{$include UIScreenMode.inc}
{$include UIScrollView.inc}
{$include UISearchBar.inc}
{$include UISearchDisplayController.inc}
{$include UISegmentedControl.inc}
{$include UISlider.inc}
{$include UISplitViewController.inc}
{$include UIStringDrawing.inc}
{$include UISwipeGestureRecognizer.inc}
{$include UISwitch.inc}
{$include UITabBar.inc}
{$include UITabBarController.inc}
{$include UITabBarItem.inc}
{$include UITableView.inc}
{$include UITableViewCell.inc}
{$include UITableViewController.inc}
{$include UITapGestureRecognizer.inc}
{$include UITextChecker.inc}
{$include UITextField.inc}
{$include UITextInput.inc}
{$include UITextInputTraits.inc}
{$include UITextView.inc}
{$include UIToolbar.inc}
{$include UITouch.inc}
{$include UIVideoEditorController.inc}
{$include UIWebView.inc}
{$include UIWindow.inc}